-
-
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
This documentation is not yet complete. The Vagrant and Chef setup for Huginn has not been merged into master yet.
Deploying Huginn to EC2 with Chef (warning as of 16 March 2014: may be outdated, remove this when fixed)
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 EC2 instance, run:
knife solo bootstrap [user@]hostname -r role[huginn_production]
You can provide ssh options like -i
(identity file) and -p
(SSH port) to knife if needed. 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
To install Huginn on an EC2 instance, fill out aws.access_key_id
, aws.secret_access_key
, aws.keypair_name
, and override.ssh.private_key_path
in the deployment/Vagrantfile
and run
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 or even to spin up an EC2 server for experimentation.
It'll install Huginn on a newly created EC2 instance in Rails's production environment mode. It uses the same chef role role[huginn_production]
as mentioned above.
vagrant plugin install vagrant-aws
vagrant plugin install vagrant-omnibus
vagrant plugin install vagrant-librarian-chef
git clone git://github.com/cantino/huginn.git
cd huginn/deployment
Fill out aws.access_key_id
, aws.secret_access_key
, aws.keypair_name
, and override.ssh.private_key_path
in deployment/Vagrantfile
vagrant up ec2 --provider=aws
vagrant ssh ec2
exit
vagrant destroy ec2
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 vb
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 huginn
and password huginn
is created and Huginn is installed at /home/huginn/huginn
exit
vagrant halt
vagrant halt -f
vagrant destroy