/sentry-sample

Configuration files to setup a Sentry environment in Docker

Primary LanguageHCL

Terraform scripts to deploy a Sentry sample website

This repository contains the automation scripts to setup a Sentry environment running in Docker. The sample will create the following components:

  1. Sentry Website
  2. Sentry Service (cron)
  3. Sentry worker (1)
  4. Redis
  5. Postgres DB

Pre-reqs

The scripts have been tested in the following environment:

  1. Ubuntu 16.04 Xenial LTS
  2. Provisioned with at least 2 vCPU and 4 GB Memory
  3. User needs to be a sudoer

Quick steps

On a bash terminal in your environment run the following commands to stand up the service

cd ~
git clone https://github.com/rafamunozg/sentry-sample.git
cd sentry-sample
./init/docker.sh
su -l $USER
cd sentry-sample
./init/terraform.sh
cd terraform
terraform init
terraform apply -auto-approve

If prompted, respond with yes and hit enter

Step by step and some troubleshooting

Initialize the environment

  1. Clone this repository on a VM with Ubuntu 16.04 Xenial Xerus

git clone https://github.com/rafamunozg/sentry-sample.git

If Git is missing, follow the recommendation to install it, or simply use:

sudo apt-get install -y git

Then try to clone the repository again ... it should work this time.

  1. cd into the sentry-sample folder

cd sentry-sample

  1. Install Docker

./init/docker.sh

  1. login again as yourself for the group permissions to be picked up

su -l $USER

  1. cd into the proper folder and install Terraform
cd sentry-sample

./init/terraform.sh
  1. cd into the terraform folder and run the appropriate scripts
cd terraform
terraform init
terraform apply -auto-approve
  1. At the end of the execution, you will receive the information needed to login to the site

    • URL
    • User / Password
  2. Login and continue on the initial page

Next steps

  1. Deploy these containers on ECS cluster
  2. Split code in nodes: Postgres, Redis should be their own nodes
  3. Add a couple of workers to the cluster
  4. Deploy a sample Flask application to see Sentry in action