Public | Automated Build

Last pushed: 6 months ago
Short Description
A base image for the StellaConnect rails app and workers
Full Description

Docker Deploy

This repo, docker-deploy, is designed to handle the build/deploy process of various tools and repos inside StellaService. It is currently configured to sucessfully deploy the following applications

  • PCM
  • Connect (QA environment)
  • Connect API
  • Core DB Dockerization

The purpose of this repo is to have as little configuration in bamboo as possible, while maintaining version control and accountability.

Using fabric - inspect a more detailed help on a per task basis by using

fab -d <TASK_NAME>




Clone the repo

$ pip install -r requirements.txt 

To Show the available tasks:

$ fab help

Depending on the framework (aka REPO) that you're deploying, you'll need different environment variables for both build and deply. The standard for building are:

DEP_REPO="git clone -b master https://${bamboo.bb_user}:${bamboo.bb_password} docker-deploy"
CODE_REPO="git clone -b master https://${bamboo.bb_user}:${bamboo.bb_password} code"
DOCS_REPO="git clone -b master https://${bamboo.bb_user}:${bamboo.bb_password} docs"

With a command of:

fab build build_artifact:${bamboo.planRepository.revision},${bamboo.REPO},${bamboo.APP_DIR}

to execute the build where the first variable is the revision, second is the REPO name, and the third being the application dir for which its built inside of.

While the standard for deploying are

FQDN=${bamboo.FQDN} #For production or stg deploys where the FQDN is static - do not set this otherwise
DEPLOY_NUMBERS=2 #How many instances you want it deployed to on the cluster
BRANCH=${bamboo.planRepository.branchName} #Branch Name - this is populated from the build
DB_HOST=${bamboo.DB_HOST} # For overriding the DB host
GITHUB_USER=${bamboo.GITHUB_USER} #For cloning (populated by bamboo)
APP_NAME=${bamboo.APP_NAME} #The name of the app as defined in the framework
BB_USER=${bamboo.bb_user} # Same as GH
HOST=${bamboo.HOST} # Used for SSH tasks
DEP_REPO="git clone -b master https://${bamboo.bb_user}:${bamboo.bb_password}"

and to execute the deploy:

$ fab qa deploy_artifact:${bamboo.planRepository.revision}
Docker Pull Command
Source Repository