Public | Automated Build

Last pushed: 17 hours ago
Short Description
Docker image, which runs an Ansible playbook to provision and decommission UPP delivery clusters.
Full Description

Docker image to provision a cluster

Table of Contents

Tutorial
For developer
Set up SSH
Provision a delivery cluster
Set up HTTPS support
Decommission an environment
Coco Management Server

Tutorial

If you're looking to provision a new cluster, the tutorial might be a better place to start than here.

For developers

If you want to adjust provisioner's code, see the developer readme AND the change process for provisioner

Set up SSH

See SSH_README.md

Provision a delivery cluster

You can provision t or p clusters in eu-west-1 and us-east-1.

## Set all the environment variables required to provision a cluster. These variables are stored in LastPass
## For PROD cluster
## LastPass: PROD Delivery cluster provisioning setup
## For TEST cluster
## LastPass: TEST Delivery cluster provisioning setup

## Pull latest stable image and run docker command
docker pull coco/upp-delivery-provisioner:latest
docker run \
    -e "VAULT_PASS=$VAULT_PASS" \
    -e "TOKEN_URL=$TOKEN_URL" \
    -e "SERVICES_DEFINITION_ROOT_URI=$SERVICES_DEFINITION_ROOT_URI" \
    -e "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" \
    -e "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" \
    -e "ENVIRONMENT_TAG=$ENVIRONMENT_TAG" \
    -e "AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION" \
    -e "BINARY_WRITER_BUCKET=$BINARY_WRITER_BUCKET" \
    -e "AWS_MONITOR_TEST_UUID=$AWS_MONITOR_TEST_UUID" \
    -e "COCO_MONITOR_TEST_UUID=$COCO_MONITOR_TEST_UUID" \
    -e "BRANCH_NAME=$BRANCH_NAME" \
    -e "API_HOST=$API_HOST" \
    -e "UPP_GATEWAY_HOST=$UPP_GATEWAY_HOST" \
    -e "UPP_GATEWAY_PORT=$UPP_GATEWAY_PORT" \
    -e "NEO4J_READ_URL=$NEO4J_READ_URL" \
    -e "NEO4J_WRITE_URL=$NEO4J_WRITE_URL" \
    -e "CES_HOST=$CES_HOST" \
    -e "CES_CREDENTIALS=$CES_CREDENTIALS" \
    -e "CLUSTER_BASIC_HTTP_CREDENTIALS=$CLUSTER_BASIC_HTTP_CREDENTIALS" \
    -e "ENVIRONMENT_TYPE=$ENVIRONMENT_TYPE" \
    -e "AWS_ES_ENDPOINT=$AWS_ES_ENDPOINT" \
    -e "AWS_ES_CONTENT_ENDPOINT=$AWS_ES_CONTENT_ENDPOINT" \
    -e "METHODE_API=$METHODE_API" \
    -e "AGGREGATE_CONCEPT_BUCKET=$AGGREGATE_CONCEPT_BUCKET" \
    -e "AGGREGATE_CONCEPT_QUEUE=$AGGREGATE_CONCEPT_QUEUE" \
    -e "DYNAMODB_TABLE"=$DYNAMODB_TABLE \
    -e "NEO4J_FLEET_ENDPOINT=$NEO4J_FLEET_ENDPOINT" \
    -e "PUBLISHING_READ_URL=$PUBLISHING_READ_URL" \
    -e "PUBLISHING_AUTHORIZATION_KEY=$PUBLISHING_AUTHORIZATION_KEY" \
    coco/upp-delivery-provisioner:latest

## Note - if you require a specific version of the docker image, you can replace 'latest' with 'v1.0.17'

If you need a Docker runtime environment to provision a cluster you can set up Coco Management Server in AWS.

Decommission an environment

Note: make sure to disable termination protection for each machine before, otherwise the decom will not work: find your instances in AWS console, and for each of them right click -> Instance Settings -> Change Termination Protection -> Yes, Disable.

## Secret used during decommissioning to decrypt keys - stored in LastPass.
## Lastpass: upp-delivery-provisioner-ansible-vault-pass
export VAULT_PASS=

## AWS API keys for decommissioning - stored in LastPass.
## Lastpass: infraprod-coco-aws-provisioning-keys
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=

## AWS region containing cluster to be decommissioned.
export AWS_DEFAULT_REGION=eu-west-1

## Cluster environment tag to decommission.
export ENVIRONMENT_TAG=
docker pull coco/upp-delivery-provisioner:latest
docker run \
  -e "VAULT_PASS=$VAULT_PASS" \
  -e "ENVIRONMENT_TAG=$ENVIRONMENT_TAG" \
  -e "AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION" \
  -e "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" \
  -e "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" \
  coco/upp-delivery-provisioner:latest /bin/bash /decom.sh

## Note - if you require a specific version of the docker image, you can replace 'latest' with 'v1.0.17'

Coco Management Server

See details in cloudformation/README.md

Docker Pull Command
Owner
coco

Comments (0)