Skip to content

Latest commit

 

History

History
84 lines (64 loc) · 2.43 KB

README.md

File metadata and controls

84 lines (64 loc) · 2.43 KB

Build Status

drawing

Contributing

Spinning [dev|stage] environment

Global Prerequisites
  • python 3
  • Use `.env.local` file for configuration keys which overrides `.env`

DEV environment

Prerequisites
  • Verify /vault directory exists and is writable
  • For Windoes 10 Home users
    • Docker toolbox
    • docker-cli (`choco install docker-cli` - using prompt)
    • docker-compose (`choco install docker-compose` - using prompt)

STAGE environment

Prerequisites
  • AWS account
  • AWS credentials: access key & access secret
  • keypair
  • subnet ID
  • Security Group with inbound ports for SSH (22), HTTP (80), HTTPS (443), and 8200
  • AWS S3 Bucket
Installation Requirements

On Linux, run the following commands

python -m venv ~/devopsloft_venv
source ~/devopsloft_venv/bin/active
pip install -r requirements.txt

Also make sure you have Docker installed on the system where you plan to run the application.

Run the app
  1. In the root directory of the project run docker build -t spinner .
  2. Run docker run -t -d --name spincontainer -v /var/run/docker.sock:/var/run/docker.sock spinner
  3. Run docker exec -it spincontainer bash
  4. Run python spin-docker.py
Run the app on Windows 10 Home
  1. Run docker-machine env default
  2. Run eval $(docker-machine env default --shell linux)
  3. In the root directory of the project run docker build -t spinner .
  4. Run docker run -t -d --name spincontainer -v //var/run/docker.sock:/var/run/docker.sock spinner
  5. Run winpty docker exec -it spincontainer bash
  6. Run python spin-docker.py
  7. Check the ip for your lochalhost - on the host machine run docker-machine ip default
Cleanup Environment

Run the following to cleanup your environment

  1. docker exec -it spincontainer bash
  2. python spin-docker.py --action destroy
  3. docker rm -f spincontainer
  4. docker rmi spinner