@@ -37,10 +37,14 @@ Before you can run our Ansible playbooks, you need to meet the following
3737prerequisites:
3838
3939* Create a DigitalOcean API token, and pass it to the inventory generator by
40- setting the ` DO_API_TOKEN ` environment variable.
40+ setting the ` DO_API_TOKEN ` environment variable. The API token must have
41+ access to the following scopes:
42+ - Read: droplet, firewall, monitoring, project, ssh_key
43+ - Create: droplet
44+ - Update: droplet, monitoring, project
4145* If you are creating a new droplet, and want to configure DNS as well, then
42- create a CloudFlare API token, and pass it to the Ansible playbook by setting
43- the ` CLOUDFLARE_TOKEN ` environment variable.
46+ create a CloudFlare API token with DNS edit permissions , and pass it to the
47+ Ansible playbook by setting the ` CLOUDFLARE_TOKEN ` environment variable.
4448* Set the vault decryption password of the Ansible vaulted file with our
4549 secrets. This may be done by setting the ` ANSIBLE_VAULT_PASSWORD_FILE `
4650 environment variable to point to a file containing the password.
@@ -117,7 +121,7 @@ Initial setup
117121The summary of the initial setup is:
118122
1191231 . Create the droplet with monitoring and relevant SSH keys.
120- 2 . Assign new droplet to the matplotlib.org project and the Web firewall .
124+ 2 . Assign new droplet to the matplotlib.org project.
1211253 . Add DNS entries pointing to the server on CloudFlare.
1221264 . Grab the SSH host fingerprints.
1231275 . Reboot.
@@ -144,7 +148,8 @@ ansible-playbook create.yml --extra-vars "host=pluto functional=web99 ssh_keys='
144148
145149The playbook will create the server, as well as add DNS records on CloudFlare.
146150Note, you must set ` DO_API_TOKEN ` and ` CLOUDFLARE_TOKEN ` in the environment to
147- access these services.
151+ access these services. The droplet ID and IP address will be printed at the
152+ end of the playbook.
148153
149154Then, to ensure you are connecting to the expected server, you should grab the
150155SSH host keys via the DigitalOcean Droplet Console:
@@ -159,16 +164,21 @@ Note down the outputs to verify later, e.g.,
159164
160165```
161166# Use these for comparison when connecting yourself.
162- 1024 SHA256:J2sbqvhI/VszBtVvPabgxyz6sRnGLrZUn0kqfv4doAM root@mercury.matplotlib.org (DSA)
163- 256 SHA256:J0rOMayXhL1+5wbm4WQNpAvmscDjqwJjAtk1SLemRMI root@mercury.matplotlib.org (ECDSA)
164- 256 SHA256:y8EDRGMpLWOW72x47MVKsAfSAl8JHjsOc/RGaiMTPGs root@mercury.matplotlib.org (ED25519)
165- 3072 SHA256:AyuNO8FES5k9vobv0Pu9XpvtjVFZ1bTTNxb1lo+AuRA root@mercury.matplotlib.org (RSA)
167+ 256 SHA256:p6MiA8+IO1WcpXHDOQ4rhiVCo+MDxWB7ehfNfxvbDkU root@venus.matplotlib.org (ECDSA)
168+ 256 SHA256:RfDahJqnQFLeFN+zl9f+hmB+W05OoZK26NfNQkj6KtY root@venus.matplotlib.org (ED25519)
169+ 3072 SHA256:tYwdULlz5/XP5Ze7PCj9XpO3VIMEZkiOiFuhr9nke34 root@venus.matplotlib.org (RSA)
166170```
167171
168172Finally, you should reboot the droplet. This is due to a bug in cloud-init on
169173DigitalOcean, which generates a new machine ID after startup, causing system
170174logs to be seem invisible.
171175
176+ This can be done from the Console, or via the CLI:
177+
178+ ```
179+ doctl compute droplet-action reboot <droplet-id>
180+ ```
181+
172182Running Ansible
173183---------------
174184
0 commit comments