This is a ChatOps virtual machine, , which utilizes Slack as an adapter connecting/interacting with Hubot and StackStorm.
You can use it to play around with ChatOps. It is not meant for any production usage.
To get it working, you will need to first install VirtualBox and Vagrant. Once you have these installed, clone (or download) this repository.
$ cd /to/your/directory
$ git clone https://github.com/dixudx/chatops-vagrant.git
$ cd chatops-vagrant
$ vagrant up
On the first run this might take some time and will download a large vm image. After some time, you will get a running instance of ChatOps with Hubot and StackStorm installed.
If you finished working, just enter vagrant destroy
to throw away everything you
did (Attention: This will clear all actions you performed on the vm.) and you can start over again
the next time with vagrant up
to bring up a fresh virtual machine.
If you just want to shutdown the virtual machine without destroying your
data use vagrant suspend
and vagrant resume
to start it again. In this
case all your data changes on the ChatOps will be persisted.
There is a configuration file called config.yaml
that you can edit with a text editor, to change
some settings.
Register for a Slack account if you don’t have one yet. Enable Hubot integration in settings.
Once you’re done, you’ll get one API Token.
StackStorm Option | Description |
---|---|
hubot_slack_token | Hubot Integration API Token, e.g. "xoxb-12345-67890" |
st2_version | The version of StackStorm, e.g. "stable" or "latest" |
You can choose to use your own Ubuntu mirror by setting use_sources_list
to true
in config.yaml
and placing file sources.list
in folder provision
.
You can also accelerate the installation of Python packages by setting pip_mirror
in config.yaml
.
Set the 32bit
option to true
if you run on a system, that only supports 32bit virtualization or
would like to test the 32 bit version for any other reason. You should normally not need this.
You can specify the amount of memory
used by the virtual machine. It is set to 2048
(MB) by default,
since I think this is a good value that would work for the most users. If you however have very low memory
you can try to decrease this value or increase it, if you have enough memory left in your system.
IMPORTANT NOTICE:
Remember to configure the right registry for npm with 'npmmirror' in config.yaml
,
which can speed up the installation of npm packages.
Also you can customize the Hubot with below parameters.
Hubot Option | Description |
---|---|
owner | Bot owner, e.g. "Bot Wrangler bw@example.com" |
name | Bot name, e.g. "Hubot" |
description | Bot description, e.g. "Delightfully aware robutt" |
IMPORTANT NOTICE:
Port 8080, 9100 and 9101 on your local machine have been used for port forwarding. If you want to reserve these ports for other purposes, please modify those in file Vagrantfile
.
After the provision finished, you can access the StackStorm WebUI with address http://localhost:8080
,
which will be forwarded to port 8080 on the guest machine.
username:
testu
password:
testp
You should see your bot online in Slack and now you're ready to type some chat commands. Don't forget to invite your bot into the Slack channel: /invite <your-bot-name>
. Your first ChatOps command is:
!help