-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
ADR/neededA decision has been made and it needs to be documentedA decision has been made and it needs to be documentedarea/infrastructure
Milestone
Description
Reasons to change the hosting:
- I can't pay for it anymore as my card isn't accepted
- The price got higher ($7.2/mo) and there should be a cheaper alternative
Requirements:
- it should be possible to create VMs with Terraform
- consider using Selectel (see https://docs.selectel.ru/en/terraform/quickstart/)
Plan:
- automate the current provisioning with Terraform
- install
tfenvto fixtfenv: command not found - show versions of
tfenvandterraform- fix
cat: /home/runner/work/mystamps/mystamps/tfenv/version: No such file or directory. Version could not be resolved (set by /home/runner/work/mystamps/mystamps/tfenv/version or tfenv use <version>)(executetfenv useafter installation)
- fix
- execute
terraform init - execute
terraform plan- fix
Error: No configuration files - pass
-detailed-exitcodeoption - import existing resources
- commit encrypted
terraform.tfstatefile ingenerated-terraformbranch -
pass a token ascommit encrypted-varoption or as env variableTF_VAR_<name>terraform.tfvarsfile (withdo_token) - checkout
generated-terraformbranch to the nested folder - decrypt
terraform.tfvarsfile (+ always clean it up) - decrypt
terraform.tfstatefile (+ always clean it up) - pass
-state=terraform.tfstateoption and-var-file=terraform.tfvars - update docs to use files from a new branch (decrypt, remove
terraform.tfvars.examplefile and update.gitignore)
- commit encrypted
- fix
- decide whether to execute
terraform applyor not (and how to deal with terraform's plan and possibly modified state file) - mark a variable as
sensitive(https://www.digitalocean.com/community/tutorials/how-to-protect-sensitive-data-in-terraform) (requires terraform >= 0.14; see Update Terraform to 0.15.x #1613)
- install
- automate the current provisioning with Ansible
- Publish playbook for production #1125
- Use ansible-vault for sensitive data #435
- Ansible: automate prod server installation #267
- run a playbook in
--syntax-checkmode- commit
infra/vagrant/provisioning/prod.inventory- correct links
- commit
infra/vagrant/provisioning/vars/prod.yml - fix ansible-playbook:
ERROR! the role 'php-coder.oraclejdk' was not found - fix ansible-galaxy:
ERROR! Expecting requirements file to be a dict with the key 'collections' that contains a list of collections to install
- commit
- run a playbook in
--checkmode (resolution: as we can't fully rely on check mode (becauseshellandcommandare always get executed), let's not use it) - run a real playbook
- fix
Failed to connect to the host via ssh: Host key verification failed(disable host key checking) - fix
Failed to connect to the host via ssh: no such identity: /Users/coder/.ssh/mystamps_rsa: No such file or directory(commitmystamps_rsa) - fix
Could not find or access '../../../target/mystamps.war(need to build WAR file)
- fix
- provision with Terraform to a new server
- provision with Ansible to a new server
- add caching for tfenv/terraform/ansible/ansible roles
- consider running ansible with
--diffoption (and setdiff: noto the tasks with sensitive information) (resolution: we decided to not use check mode, so this option isn't needed either) - merge together 2 prod inventories (one for deploy and one for everything else) (Use mystamps-app Ansible role for deployment #431)
- choose a way to run ansible: fully from a pipeline or from within a script (like
deploy.sh). The latter has a benefit that it can be run locally, as well (easier to debug)
See also similar issue for the past migration: #399
Metadata
Metadata
Assignees
Labels
ADR/neededA decision has been made and it needs to be documentedA decision has been made and it needs to be documentedarea/infrastructure