-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Deploying huginn on any server or virtualbox using chef solo and or vagrant
Chef cookbooks for deploying Huginn are available in deployment
. Use the role role[huginn_production]
to deploy Huginn to a production environment or the role role[huginn_development]
to deploy to a development environment.
Here are instructions for deploying Huginn to any server using chef solo.
First, install knife-solo:
gem install knife-solo
This will also install chef solo.
Next, install the librarian-chef gem:
gem install librarian-chef
Install the cookbooks listed in the Cheffile by running:
cd deployment && librarian-chef install
Now, to deploy Huginn in production mode on a newly created Server or VPS, run:
knife solo bootstrap [user@]hostname -r role[huginn_production]
In future you can redeploy by running
knife solo cook [user@]hostname -r role[huginn_production]
You can provide ssh options like -i
(identity file) and -p
(SSH port) to knife if needed.
This will generate a file at nodes/hostname.json
with the contents {"run_list":[]}
TODO
When this finishes, Huginn should be installed and running on your server at port 80. Visit your server to check it out. A new user has been created for managing Huginn with username huginn
and password huginn
(please change it right away by logging in and typing passwd
). Huginn is installed in the home directory of huginn
at /home/huginn
. Setup follows Capistrano standards, so the current
, shared
, and releases
directories are present with current
symlinked to the most recent deployment in releases
. Nginx is running and proxy-passing to a Unicorn server, with config files at /home/huginn/shared/config/nginx.conf
and /home/huginn/shared/config/unicorn.rb
respectively, which you can change according to your needs and redeploy by running above mentioned command. Before redeploying, make sure that Huginn isn't already running by stopping it with sudo stop huginn
. You can start, stop, or restart Huginn with these commands:
sudo start huginn
sudo stop huginn
sudo restart huginn
If you would like to use your private Huginn repo, then you will have to replace https://github.com/cantino/huginn
with the URL of your Huginn private repo in the deploy
resource's repo
attribute here: deployment/site-cookbooks/huginn_production/recipes/default.rb
.
You can also use Vagrant to play with Huginn locally.
vagrant plugin install vagrant-omnibus
vagrant plugin install vagrant-librarian-chef
git clone git://github.com/cantino/huginn.git
cd huginn/deployment
librarian-chef install
vagrant up
cd huginn/deployment
librarian-chef install
vagrant up --provider=parallels
vagrant ssh
You should now be able to visit http://localhost:3000
to use Huginn on your local computer. It uses the role[huginn_development]
chef role. A new user with username admin
and password password
is created and Huginn is installed at /home/huginn/huginn
exit
vagrant halt
vagrant halt -f
vagrant destroy