Support: 1-800-961-4454
1-800-961-2888

Rackspace Cloudvent Calendar Day 15: RackConnect And knife-rackspace

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!

About the Author

This is a post written and contributed by Hart Hoover.

Hart Hoover is a Cloud Strategist at Rackspace Hosting. Hoover started his career as a Racker in 2007 as a Linux Systems Administrator, providing technical support for dedicated servers. He moved to the cloud in 2009 to help design the Managed Cloud Servers support model. He has presented at various technical conferences, maintains and contributes to the Rackspace DevOps Blog, and advises Rackspace customers on best practices for cloud computing.


More
Racker Powered
©2014 Rackspace, US Inc.