nikfrank / devopsloft

DevOps Loft community app

Home Page:http://www.devopsloft.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

drawing

Contributing

Spinning [dev|stage] environment

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

DEV environment

Prerequisites
  • VirtualBox
  • Verify /vault directory exists and is writable
  • Install the following packages:
  • virtualbox
  • fabric3
  • docker-compose

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
Spin environment
  ./spin.py up [dev|stage]
SSH the environment
  vagrant ssh [dev|stage]
Don't forget to destroy the environment when you done to avoid unnecessary charges !!!
  ./spin.py destroy [dev|stage]
  • Do not use vagrant directly to spin and environment. It might work, but most likely it won't ============================================================================================== Steps for Docker: Setting the App
  1. install docker or docker for windows

  2. Run in the directory where docker file is located: "docker build -t spinner ."

  3. Run "docker run -t -d --name spincontainer -v /var/run/docker.sock:/var/run/docker.sock spinner"

  4. Run "docker exec -it spincontainer bash"

  5. Run "python spin-docker.py"

  6. Now you can exit the container and you'll see the apps containers created on host and running

Destroying the App and cleaning up the spin container-

  1. docker exec -it spincontainer bash
  2. python spin-docker.py --action destroy
if you want to remove the intermediate container and image as well:
  1. docker rm -f spincontainer
  2. docker rmi spinner

Notes

About

DevOps Loft community app

http://www.devopsloft.io


Languages

Language:Python 52.5%Language:Shell 20.2%Language:HTML 17.5%Language:Dockerfile 4.3%Language:Ruby 2.4%Language:CSS 1.9%Language:Batchfile 0.8%Language:TSQL 0.4%