Before you begin, you'll need to collect the following (ask @ycombinator):
~/.ssh/drg.pem
- The
ansible-vault
password.
-
Download and install Ansible.
- On Mac OSX machines with Homebrew installed, you can simply run:
$ brew install ansible
- On Mac OSX machines with Homebrew installed, you can simply run:
-
Install pyrax.
$ sudo pip install pyrax
- Create a file named
~/.rackspace_cloud_credentials
with the following contents:
[rackspace_cloud]
username = <REPLACE WITH YOUR RACKSPACE CLOUD USERNAME>
api_key = <REPLACE WITH YOUR RACKSPACE CLOUD API KEY>
- Make sure the
drg.pem
file is in your~/.ssh
directory. The corresponding public key needs to be uploaded as thedrg
public key in the "SSH Keys" section of your Rackspace Cloud Control Panel for the region(s) where you wish to setup production infrastructure. Modify file permissions:
$ chmod 600 ~/.ssh/drg.pem
- Change to this directory on your development machine.
$ cd /path/to/rack.to
- Run the Ansible playbook to set up the production environment within a region.
$ RAX_REGION=DFW ansible-playbook --ask-vault-pass -i inventory/ site.yml