antarctica/monolith-service-deployment-client

This package is abandoned and no longer maintained. No replacement package was suggested.

Client for interacting with AWS Code Deploy for deploying Monolith services

v0.3.1 2016-09-21 09:06 UTC

This package is auto-updated.

Last update: 2017-09-08 12:18:14 UTC


README

A simple client to upload and deploy application archives using AWS S3 and AWS Code Deploy using the AWS PHP SDK

This project uses version 0.3.0 of the Base flavour of the BAS Base Project - Pristine.

Overview

This package provides an opinionated client for deploying applications (services) developed for the Monolith shared hosting environment.

Specifically this package is purpose designed for the Monolith Service Deployment Image

Consequently, this package is not a general purpose AWS Code Deploy client or similar.

It provides two features:

  • uploads application archives to AWS S3 as a Code Deploy revisions
  • deploys such revisions using AWS Code Deploy to a number of instances

Usage

Because of how this package is designed to be used, all configurable parts of this package are configured using environment variables.

Environment Variable Required Default Value Example value
AWS_ACCESS_KEY_ID Yes Not Set xxx
AWS_SECRET_ACCESS_KEY Yes Not Set xxx
AWS_DEFAULT_REGION Yes Not Set eu-west-1
S3_BUCKET Yes Not Set bas-packages-dev
MONOLITH_REVISIONS_PATH Yes Not Set zips/apps
MONOLITH_SERVICE_NAME Yes Not Set ExampleService
MONOLITH_SERVICE_REVISION Yes Not Set example
DEPLOYMENT_CONFIG Yes Not Set CodeDeployDefault.OneAtATime
DEPLOYMENT_GROUP_NAME Yes Not Set MonolithDevelopment

See the Example Client for an example of using this package.

Developing

Setup

  1. Ensure you meet all the requirements to bring up a local development environment
  2. Checkout this project locally $ git clone git@bitbucket.org:antarctica/monolith-service-deployment-client.git
  3. $ cd monolith-service-deployment-client/provisioning/site-development-local
  4. $ vagrant up
  5. $ cd ..
  6. $ ansible-playbook site-development-local.yml

Source control

Write access to this repository is restricted. Contact the project maintainer to request access.

Issues

Issues for this project are managed using Trello.

Tests

This project uses manual testing only.

  1. $ cd provisioning/site-development-local
  2. $ vagrant up
  3. $ cd ..
  4. $ ansible-playbook site-development-local.yml
  5. $ cd site-development-local
  6. $ vagrant ssh
  7. $ cd /srv/apps/monolith-deployment-php-client
  8. set environment variables [1]
  9. $ php example-client.php

[1]

$ export AWS_ACCESS_KEY_ID=xxx && export AWS_SECRET_ACCESS_KEY=xxx && export AWS_DEFAULT_REGION=eu-west-1 \
&& export S3_BUCKET=bas-packages-dev && export MONOLITH_REVISIONS_PATH=zips/apps \
&& export MONOLITH_SERVICE_NAME=ExampleService && export MONOLITH_SERVICE_REVISION=a35fa2c61a170112f46a319a118bf57e014cd3fe \
&& export DEPLOYMENT_CONFIG=CodeDeployDefault.OneAtATime && export DEPLOYMENT_GROUP_NAME=MonolithDevelopment

Feedback

The maintainer of this project is BAS Web & Apps Team, they can be contacted at: webapps@bas.ac.uk.

Licence

Copyright 2016 NERC BAS.

Unless stated otherwise, all documentation is licensed under the Open Government License - version 3. All code is licensed under the MIT license.

Copies of these licenses are included within this project.