The repository provides the code to create local
(VirtualBox) and remote
(AWS) infrastructure for
a web application stack.
- VirtualBox for local virtualization
- Vagrant to create a local infrastructure
- for Guest additions
vagrant plugin install vagrant-vbguest --plugin-version 0.21
- AWS to create a remote infrastructure on AWS EC2
- aws setup for config (region) and credentials (access key id, secret access key)
- Ansible for provisioning tool
The setup consists of the following steps, setting up the machines (locally or remotely) , provisioning the infrastructure and deploying the application stack.
Creates and and destroys the infrastructure (looked as abstractions over machines).
# env local|aws
# command create|destroy
machine.sh <env> [command]
Installs and configures the infrastructure.
# env local|aws
provision.sh <env>
Deploys the application stack, mainly running in docker containers.
# env local|aws
# stack velocorner|any-app-stack
provision.sh <env> <stack>
Run psql
docker run -it -v /opt/velocorner/psql/data:/var/lib/postgresql/data -u postgres postgres:12.2-alpine /bin/bash
pg_resetwal /var/lib/postgresql/data