In the spirit of the holiday season, I’m sharing some tips and features of our cloud that you may not know about. In this countdown I’ll have 24 posts for you, each covering a single topic or feature about Rackspace Cloud products. We’ll post one per day so keep checking back!
I love configuration management. If you are running more than one server it’s a great idea to use a configuration management system. In this post, I want to point out a great new feature of Chef that you can take advantage of if you are using our RackConnect solution.
If you are using Chef, you can use the knife plugin for Rackspace called, of course, knife-rackspace. When deploying nodes with knife, typically you would issue something like this command:
# provision a new 1GB Ubuntu 12.04 webserver knife rackspace server create -I 80fbcb55-b206-41f9-9bc2-2dd7aac6c061 -f 3 -A ‘USERNAME' -K “APIKEY” -r 'role[webserver]'
If you are using RackConnect, some automation needs to happen on our end before Chef runs. To force Chef to wait, you can use the “–rackconnect-wait” flag. This forces Chef to read server metadata to see when the RackConnect work is done.
# provision a new 1GB Ubuntu 12.04 webserver knife rackspace server create --rackconnect-wait -I 80fbcb55-b206-41f9-9bc2-2dd7aac6c061 -f 3 -A ‘USERNAME' -K “APIKEY” -r 'role[webserver]'
Now Chef will wait until the RackConnect automation is complete before provisioning your server. Keep checking back for more tips and tricks!