-
Notifications
You must be signed in to change notification settings - Fork 11
Provision new machine
cintiadr edited this page Sep 18, 2017
·
32 revisions
Note: Jetstream migration guidelines in here
- Use terraform to provision new machine and run ansible. Use
./build create <machine>to start new terraform stack. Reviewvariables.tffile. Use./build plan <machine>to check changes and./build apply <machine>to create the machine and its resources.- If the machine should have backups, change variable has_backup to true and uncomment outputs. Check Backups Strategy for details.
- Create a terraform resource 'dme_record' for each DNS record it'll be using. Each application/port publicly accessible should be using a different DNS record, as we aim to only use port 443 for all our web applications.
- Modify terraform variable
update_osto true, and apply terraform again to update packages.
At this point, machine will be only accessible using root/terraform private key
- Create machine definition in ansible. Add machine to relevant inventory file and create host var files in ansible.
- If the machine should have a docker apps, follow this guide to check all requirements
- If the machine should have backups, add to backups group and add outputs from terraform as aws variables in host_var file.
- Secrets should go to
vaultfile, and should be encrypted usingansible-vault - Commit and push changes to github
- Modify terraform variable
use_ansibleto true, and run./build plan <machine>and./build apply <machine>
- Verify alerts in datadog
- Add monitoring in pingdom and status.io (only if production)
- Add machine to Server inventory and add its service to this wiki
Read this before updating this wiki.