Using Salt Cloud with Rackspace

read

Now that salt-cloud is bundled with salt itself (and has been for 3+ months), it’s even easier to use salt cloud to provision minions easily.

As a Rackspace user, make sure to use the OpenStack provider. The current Rackspace driver actually tries to connect to the old cloud instances (pre-2010). Newer accounts won’t even have access to those, but that’s a discussion for a separate thread.

Let’s build stuff!

This article assumes you have a working salt master setup. The primary pieces you need are /etc/salt/cloud.providers and /etc/salt/cloud.profiles, both of which go on the salt master.

Example /etc/salt/cloud.providers

This setup needs to be replicated near exactly, replacing all the {keyword} with your own.

rackspace-cloud:# Setup the minion configuration, including the salt-master IP# This can be the service net if the master is in the same# Data Center.minion:master:{master_ip}# Configure Rackspace using the OpenStack pluginprovider:openstackidentity_url:'https://identity.api.rackspacecloud.com/v2.0/tokens'compute_name:cloudServersOpenStackprotocol:ipv4# IAD compute_region:IAD# Rackspace authentication credentialsuser:{rackspace_user}tenant:{rackspace_tenant_id}# Account numberapikey:{rackspace_api_key}

Example /etc/salt/cloud.profiles

To use salt-cloud, you need to set up profiles for the type of box you want to use, pairing size, image and provider.