Closed MarZab closed 9 years ago
Thanks for the detailed list. I will take a look and see where I can improve the documentation and the cookbooks.
Unfortunately since we can't share images on Rackspace it makes it more complex than it should be. Maybe I can just use a standard Ubuntu 14.04 image in the JSON so that it cuts out a few steps.
I'll also add a command to clear out Consul to make that easier.
also https://github.com/octohost/octohost-cookbook/blob/master/files/default/consulkv could have some error checking, giving out a json error was making me go in loops trying to find the source of the error :)
Thanks a bunch for this awesome project, il be sure to contribute as much as I can.
OK - so I think I've fixed many of the problems listed here:
octohost/ubuntu-14.04
repo now.I'm going to look and see if I can get Terraform going with Openstack/Rackspace now as well.
OK - now there's a set of Terraform files for Rackspace - it clears out Consul and gets it all running:
https://github.com/octohost/octohost-cookbook/commit/beac71a
All you should have to do is:
cp variables.dist variables.tf
terraform apply
cat ~/.ssh/id_dsa.pub | ssh root@ip.add.res.here "sudo gitreceive upload-key name"
Let me know if you've got any questions or concerns. Likely if you're not using North American endpoints some of that may have to change - but it worked in IAD for me.
It took me the better part of the last 2 days to figure all this out - so I'm writing it down for the next poor soul who goes my path (me included) before this will be cleaned up.
Build the image
clone this repo to a folder https://github.com/octohost/ubuntu-14.04
export SDK_
...build_openstack
This step will spin up a instance on rackspace, make a image then save it, then destroy the server. Get the ID from the image it made, we'll need that now.
clone this repo follow octohost::default replace
source_image
inside template.json with the ID mentioned beforeexport SDK_
...build_openstack
This step will use the image it constructed before for a base in a similar process then before, making a server, building the image, saving the image then destroying the server. Yay this means you now have a image you can spin up with your own configuration.
Install the server in one node mode
You might want to scale on later, but for now, lets have one server.
It works up to step 3, when you push, you get these errors:
perl: warning: Setting locale failed.
Login, run this, then logout/login again.
sudo locale-gen en_US en_US.UTF-8
dpkg-reconfigure locales
remote: parse error: Invalid numeric literal at line 1, column 3
This one is a doozy, it might look innocent enough but it is actually a symptom of Consul not working Other symptoms are:remote: 2015/06/04 11:48:43 [ERR] (view) "key(octohost/sample/DOMAINS)" store key: error fetching: Unexpected response code: 500
The problem here is actually
2015/06/04 12:58:27 [INFO] raft: Disabling EnableSingleNode (bootstrap)
ie. Consul is excpecting more nodes and it wont startup before it has 2 more Stop Consul, remove the old data and restart:service consul stop
mv /var/cache/octohost /var/cache/octohost-old
mkdir /var/cache/octohost
service consul start
Now listen to the log to see it successfully started:
consul monitor
octo restart []
will not help you start the service, you need to push the git repo again, YAY DONE