This project contains deployment scripts for running simple-server.
We use terraform for provisioning servers and ansible for orchestration.
terraform/
- Scripts for provisioning infrastructure on AWS.ansible/
- Scripts for managing dependencies required to run simple-server on AWS infrastructure.standalone/
- Scripts for setting up simple-server on bare-metal servers or vanilla VMs. It sets up simple-server with the required peripherals (load balancing, monitoring etc.) and aims to be independent of third party applications as far as possible.docs/
- Miscellaneous docs.
To set up a new deployment of Simple on AWS, follow these steps:
- Use the
terraform/
documentation to provision the necessary infrastructure on AWS - Use the
ansible/
documentation to install dependencies required to runsimple-server
on AWS infrastructure - Use the
Simple Server Deployment
documentation to install and run the simple-server application
To set up a new deployment of Simple on standalone infrastructure, follow these steps:
- Obtain the public IP addresses of the standalone servers
- Use the
standalone/
documentation to set up, install, and run the simple-server application on the standalone servers
The terraform/
setup is not fully utilized for all running environments yet. We track the current environment status in this document (refer to Provisioned with terraform
) along with other notes and details.
We use ansible vault to manage encrypted secrets. The recommended way to set things up is below, which will allow you to use ansible-vault
to view / edit encryptes files without having to
constantly type in the password. This setup will also allow you to use git diff
locally on encrypted files and make sense of them. Otherwise you are just diff'ing binary blobs.
- Place the vault password in the repository root in a file named
.vault_password
. This file is gitignored and should never be checked in. - Run the following to configure the diff driver
git config --global diff.ansible-vault.textconv "ansible-vault view"
- Configure the vault password location in an env var - you'll probably want to add this to your shell profile:
export ANSIBLE_VAULT_PASSWORD_FILE=.vault_password
Now you can use git diff to view any changes locally on .env
files.
- Create a new file in
ansible/roles/ssh/files/ssh_keys/sandbox
with your name as the file name in lowercase - In your terminal run
pbcopy < ~/.ssh/id_rsa.pub
to copy your SSH key - Paste the SSH key in the new file you created
- Create a new branch and submit a PR
- Wait for the PR to be reviewed, merged, and deployed to Sandbox