Adds doc how to build the staging environment with terraform + ansible

This commit is contained in:
Maximilian Kratz 2023-07-07 19:42:24 +02:00
parent dccba6da7b
commit af7c1c922d
1 changed files with 15 additions and 0 deletions

View File

@ -34,6 +34,14 @@ Terraform is used to create the infrastructure (VMs) and run a basic provisionin
- To destroy the infrastructure, run:
- `$ terraform destroy -var-file="secrets.tfvars"`
### Staging
- To create the infrastructure, run:
- `$ terraform plan -var-file="secrets.tfvars" -target=hcloud_server.staging`
- `$ terraform apply -var-file="secrets.tfvars" -target=hcloud_server.staging`
- To destroy the infrastructure, run:
- `$ terraform destroy -var-file="secrets.tfvars" -target=hcloud_server.staging`
## Ansible
@ -44,6 +52,13 @@ Ansible is used to configure the VMs and create/configure all necessary services
- `$ ansible-galaxy install -r requirements.yml`
- `$ ansible-playbook playbook.yml`
### Staging
- To create/configure/update all services only on the staging VM, run:
- `$ export ANSIBLE_CONFIG=./ansible.cfg`
- `$ ansible-galaxy install -r requirements.yml`
- `$ ansible-playbook playbook.yaml --limit staging`
### Ansible Lint
- Installation: `$ pip3 install ansible-lint`