Digital Ocean Quickstart¶
This quickstart walks through the process of setting up a Digital Ocean droplet using these Ansible playbooks.
Table of Contents¶
Droplet setup¶
Start by logging in to your Digital Ocean account and creating a droplet. You should be able to create or specify an SSH key.
Warning
You must modify the path to the SSH private
key, specified in do.cfg
(the Digital Ocean
Ansible config file), to match the SSH key that
you added to the droplet at its creation.
Warning
Once you create your droplet and it is connected
to the internet via a public IP, you must update
the file dohosts
(the Digital Ocean Ansible
inventory file) to point to the correct IP address
for the droplet.
Run provision and base playbooks¶
Once you have the correct SSH key in do.cfg
and the correct droplet IP address in dohosts
,
you are ready to run the Ansible playbooks.
Run the provision playbook to prepare the droplet for Ansible:
ANSIBLE_CONFIG="do.cfg" \ ansible-playbook \ provision.yml
Now you can run the base playbook.
Warning
You must provide a machine_name
parameter to
the base playbook. This variable is not
defined by default. Define it using the
--extra-vars
flag.
Specifying a machine name using the --extra-vars
flag:
ANSIBLE_CONFIG="do.cfg" \ ansible-playbook \ --extra-vars "machine_name=redbeard" \ base.yml
Run pod playbooks¶
Once you've run the base playbook, you can install the
docker pod with the corresponding playbook by specifying
ANSIBLE_CONFIG
and pointing to the Digital Ocean config file.
pod-charlesreid1:
ANSIBLE_CONFIG="do.cfg" \ ansible-playbook \ --extra-vars "machine_name=redbeard" \ podcharlesreid1.yml