If the Quickstart on the homepage doesn't work - take a look here.
bundle install berks install rake build_ami
NOTE: The AMI in template.json has all of the proper required kernel extensions for Docker as well as Chef (currently unused) and Ansible provisioners. If you supply your own AMI, make sure it's got those items. You can rebuild build your own from this repo.
2. Create an AWS security group with port 80 and 443 open to the world, port 22 open to you and all ports open to other members of that group.
ec2-create-group -K your-key octohost -d "Octohost Group" --region us-west-2 ec2-authorize octohost -P tcp -p 80 -s 0.0.0.0/0 --region us-west-2 ec2-authorize octohost -P tcp -p 443 -s 0.0.0.0/0 --region us-west-2 ec2-authorize octohost -P tcp -p 22 -s 0.0.0.0/0 --region us-west-2 # Not totally required - but helpful with Serf. ec2-authorize octohost -P tcp -p 0-65535 -o sg-groupid --region us-west-2 ec2-authorize octohost -P udp -p 0-65535 -o sg-groupid --region us-west-2
In the end - your group should look like this:
ec2-describe-group octohost --region us-west-2 GROUP sg-groupid 0000000000 octohost Octohost Group PERMISSION 457992882886 octohost ALLOWS tcp 0 65535 FROM USER 0000000000 NAME octohost ID sg-groupid ingress PERMISSION 457992882886 octohost ALLOWS udp 0 65535 FROM USER 0000000000 NAME octohost ID sg-groupid ingress PERMISSION 457992882886 octohost ALLOWS tcp 22 22 FROM CIDR 0.0.0.0/0 ingress PERMISSION 457992882886 octohost ALLOWS tcp 80 80 FROM CIDR 0.0.0.0/0 ingress PERMISSION 457992882886 octohost ALLOWS tcp 443 443 FROM CIDR 0.0.0.0/0 ingress
3. Create a running instance using your AMI (or use ami-ff9ac4cf) and security group:
ec2-run-instances --key your-key -g sg-groupid ami-yourAMI --user-data-file user-data-file/setup --region us-west-2
Make sure to edit the user-data-file/setup with the correct information if you're:
You can safely leave that part out if you're not using the user-data-file.
4. Once it's launched - visit that ip address with your web browser - it should say:
"No Application Configured - This domain is not associated with an application."
5. Add your private key to gitreceive:
cat ~/.ssh/id_dsa.pub | ssh -i ~/your-key.pem firstname.lastname@example.org "sudo gitreceive upload-key ubuntu"
6. Now you can push one of our example repos:
git clone email@example.com:octohost/harp.git cd harp git remote add octohost firstname.lastname@example.org:harp.git git push octohost master
It will pull the base Docker container, build your repo and launch your site. The last "remote:" line should look like this:
Your site is available at: http://harp.ip.address.here.xip.io
7. Visit that site:
NOTE: Whatever you name your git repo is what the website URL is - for example:
git remote add octohost email@example.com:octohost-test.git
would be located at:
8. Take a look around at all of the frameworks and languages available at https://github.com/octohost.
There's lots to do, this is nowhere near done - but it's working as the backend for a service of ours.
Got a change? Send us a pull request - we'll look at adding whatever is needed.
--user-data-file user-data-file/setup- be sure to edit that file with your domain name.