Skip to content

NHS-digital-website/deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NHS Digital Publication System

Build Status

Introduction

This project allows you to build infrastructure needed for building, testing and deploying NHS Digital Website.

Currently we are supporting two platforms

  • BloomReach onDemand
  • AWS

Usage

Run make help to get a list of available commands.

In most cases you will run something like this:

# authenticate your terminal for 1h to access `nhsd-profile-name` AWS profile using
# your MFA token.
$(make aws-sudo PROFILE=nhsd-profile-name TOKEN=...)

If you have aws CLI installed on your machine you could test your authentication works by trying to list S3 buckets:

aws s3 ls

The actual value of nhsd-profile-name has to be the same as the name of the profile you chose when configuring your local AWS client (see Installation section). If your AWS API access isn't configured for MFA you can leave the TOKEN= parameter out.

# run commands...
make stack ROLE=aws_foundation ENV=mgt
make stack ...

In make stack command, the value passed as ROLE parameter is the name of one of the folders under ansible/roles directory in the codebase, e.g. aws_permissions. ENV identifies the environment you want to update the stack for.

Documentation

Requirements

In order to use this project you need:

Installation

Everything you need will be installed locally. Simply run:

make init

Perform a one-off configuration of your local Amazon CLI client by executing:

ansible/.venv/bin/aws --profile nhsd-profile-name configure

This will ask you to provide your AWS access key id and access key value, AWS region (eu-west-1) and preferred format of output generated by the client. It then saves those details in ~/.aws/configuration and ~/.aws/credentials. The name of the profile (nhsd-profile-name), is an arbitrary value, specific to your local client configuration, but, once chosen here, needs to be used with all aws-sudo commands (see Usage section).

Configuration

Configuration is kept in env.mk file. You can set/override any variable defined in Makefile

# your user name for SSH
USERNAME ?= firstname.lastname
# AWS (ssh) ec2 key pair name
KEY_NAME ?= firstname.lastname

Activate virtualenv:

source ansible/.venv/bin/activate

Contributing

Overview