Code Monkey home page Code Monkey logo

hubot-control's Introduction

Hubot Control

Control self-hosted Hubot like a boss!

Build Status Coverage Status Code Climate Dependency Status

Help Wanted!

This project is not being actively maintained. If you are interested and willing to help with maintenance, please respond here: #16

Installation

  • Run DB migrations with rake db:migrate
  • Change config.action_mailer.default_url_options in config/environments/* (optional)
  • Run it like a regular Rails 4 app. Try it out with rails s, run daemonized with unicorn_rails -p <port> -D.
  • Owner of rails app process must have write permissions to #{Rails.root}/hubots and #{Rails.root}/scripts, or just #{Rails.root}
  • Use [email protected] / hubot to log in

Tutorials

How to get Hubot on HipChat using Hubot Control on CentOS Linux

Book: Automation and Monitoring with Hubot

Automation and Monitoring with Hubot is available at Leanpub.

Running on Heroku

git clone [email protected]:spajus/hubot-control.git && cd hubot-control
heroku create --buildpack https://github.com/rtgibbons/heroku-buildpack-ruby-nodejs.git
git push heroku master
heroku config:add PATH=/app/node_modules/.bin:/app/bin:/app/vendor/bundle/ruby/2.0.0/bin:/usr/local/bin:/usr/bin:/bin
heroku run rake db:migrate
heroku open

Heroku support is still experimental, but you can find some helpful tips here.

Heroku demo: http://hubot-control-demo.herokuapp.com/ (usually broken due to periodic file system wipeouts, see issues/4)

Running with Docker

Prerequisites:

Start a Postgres instance

docker run --name hubot-control-db -d -e DB_USER="docker" -e DB="hubot_control" -e PASS="docker" hackedu/postgresql

Create a data-only container to store Hubots

docker run --name hubot-control-data -v /usr/src/hubot-control/hubots busybox

Run database migrations

docker run --rm --link hubot-control-db:db -e RAILS_DB_USERNAME="docker" -e RAILS_DB_PASSWORD="docker" hackedu/hubot-control bundle exec rake db:migrate RAILS_ENV=production

Start Hubot Control

docker run --name hubot-control -d --link hubot-control-db:db --volumes-from hubot-control-data -e RAILS_DB_USERNAME="docker" -e RAILS_DB_PASSWORD="docker" -p 3000:3000 hackedu/hubot-control

Hubot Control will now be running on port 3000 of your system. Whenever you create a hubot , you'll want to restart Hubot Control and publish their HTTP ports (-p flag).

There's a few things to notice:

  • The Postgres database is in a separate container than Hubot Control. When Hubot Control is stopped or removed, the database will be persisted in the Postgres container. You may want to map the Postgres data to a volume on your host. The Postgres image's documentation has more details on this (https://registry.hub.docker.com/u/paintedfox/postgresql/).
  • The files for created hubots are stored in the hubot-control-data container. Do not delete this container unless you want to delete all of your hubots.
  • All of the application data for Hubot Control is stored in separate containers, so we don't lose any data if we delete the hubot-control container.

Usage

  1. Check status page and install missing dependencies for Hubot
  2. Add hubot instance
  3. Configure the variables, add scripts
  4. Click on Hubot name in the sidebar to control it
  5. Develop scripts with built-in editor

Features

Check server compatibility

Hubot Check Prerequisites

Create Hubot instances from web interface

Create Hubot

Test your Hubot via interactive web shell

Test Hubot

Control your Hubot

Hubot Control Panel

Edit pre-startup script

Hubot before start

Manage and develop custom Hubot scripts

Hubot Scripts Edit Hubot Scripts Include External Scripts

Edit variables and configuration files

Hubot Configuration

Tail logs to troubleshoot problems

Hubot Log

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

hubot-control's People

Contributors

crawfordcomeaux avatar dependabot[bot] avatar michaelmior avatar ostsjoe avatar rothgar avatar spajus avatar zachlatta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hubot-control's Issues

Delete all scripts if git sync failed

I added some Git Settings to sync the custom scripts and it failed because it didn't have permission for the Git repo and then proceeded to delete all of the custom scripts.

Getting started steps give DB password failed error

Following the guide https://github.com/spajus/hubot-control#running-with-docker gives error as below..

➜  ~  docker run --name hubot-control-db -d -e USER="docker" -e DB="hubot_control" -e PASS="docker" paintedfox/postgresql
fb456f783cd7acc25a651bf8d722b395c65facc8969aa7687a2ea4fa75b3e0dd
➜  ~  docker run --name hubot-control-data -v /usr/src/hubot-control/hubots busybox
➜  ~  docker run --rm --link hubot-control-db:db -e RAILS_DB_USERNAME="docker" -e RAILS_DB_PASSWORD="docker" hackedu/hubot-control bundle exec rake db:migrate RAILS_ENV=production
Your Gemfile lists the gem sqlite3 (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
rake aborted!
PG::ConnectionBad: FATAL:  password authentication failed for user "docker"
FATAL:  password authentication failed for user "docker"

Tasks: TOP => db:migrate

Cant create new Hubot

Get the following error on hitting add new hubot:

NoMethodError in HubotsController#new
undefined method `+' for nil:NilClass

Extracted source (around line #114):

    ports = Hubot.select("max(port) as port, max(test_port) as test_port").first
    if ports
     >>>>> return ports.port + 1, ports.test_port + 1
    else
      return 8000, 9000
    end

Rails.root: /Users/martinohagan/Dev/hubot-control

Let me know if you need anything else!

Hubots indefinitely 'missing from disk' upon creation

I've confirmed that the user running rails has rw access to the entire rails root directory, /hubots included. Oddly, the webrick output suggests that it is unable to make the /hubots/MY_HUBOT directory.

Ubuntu 14.04.1 / rvm stable / ruby 2.0.0

Cannot create hubot

Hi...I'm new to docker and hubot. I've got all the docker containers running and can log into the hubot-control container from my browser. When I go to create a hubot with the following options...

Title: hipchat-hubot
Name: hubot
Adapter: hipchat
HTTP Port: 8000
Test Port: 9000

...and click the CREATE button....the browser button says "Building Hubot" but eventually just times out after about 30 seconds and my hubot doesn't get created. The browser page shows "No data received". I'm not sure what's going on...can you help point me in the right direction?

Do I have to setup the container ports first?

Failing to detect hubot running correctly

I'm seeing a weird issue where hubot-control kicks off a hubot instance, the instance starts ok and connects to my chat service, but hubot-control doesn't show it as running.

What's the detection mechanism for determining whether the instance is running or not? It seems to assume that it's not running based on some arbitrary exit code, somewhere, but I've no idea where.

Unable to create Hubot

Ran hubot-control container from non-root user but with docker privileges.

image

Obviously system user is root, but according to Dockerfile:

RUN useradd -m hubot

EXPOSE 3000

WORKDIR /usr/src/app
RUN chown -R hubot:hubot /usr/src/app

USER hubot
RUN RAILS_ENV=production bundle exec rake assets:precompile

Help Wanted

I'm looking for people who could take over the maintenance / development of this project. I am no longer using Hubot at work, and don't have the motivation to continue with maintenance, so if you are interested to take over, please reply to this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.