Skip to content

Latest commit

 

History

History
121 lines (80 loc) · 4.11 KB

File metadata and controls

121 lines (80 loc) · 4.11 KB

Digital Paper Edit - Infrastructure

This is purely the infrastructural part to tie together with firebase of Digital Paper Edit.

Environment URL
Test https://digital-paper-edit.test.tools.bbc.co.uk
Live https://digital-paper-edit.tools.bbc.co.uk

For historical undestanding of this repo, read ADR 2019-04-23-transcript-architecture.md for more information.

System Architecture

Usage

  • infrastructure contains deployment configurations.
  • SPEC contains instructions to build an RPM. specific code. (WIP)

The Makefile has instructions that will allow you to build your RPMS and release them. Makefile, you can build the RPM that pulls in the NPM modules, that contain the logic.

These Makefile instructions will only work on BBC CentOS based machines, as it requires certain BBC specific dependencies.

Development

Development for components should be done in the Client.

Dependencies

See Client.

Build

The RPM build is specific per environment. What this means is that environment specific configuration is pulled in at build-time. It's retrieved via the SSM (AWS's System Service Manager) and bundled in with npm run build. See Configuration section for more details.

Cloudformation

You can build the AWS Stacks in infrastructure by running make all. This will install Python dependencies in your virtualenv folder and generate the templates.

If you only want to build the stacks, run make stacks.

Note: There are 3 CFN files generated from the make steps.

  • dns
  • main
  • user

DNS and Main are both deployed in the Jenkins job, and linked to Cosmos project for the client

If you want to create the Cloudformation, you will need to do it manually here.

The User stack

The user is a standalone Jenkins job in Jenkins job, related to Cosmos project.

The separation is for historical reasons.

The generated user is used by the client app (GCP) to access an S3 bucket, required to start the transcription process.

Deployment

For BBC deployment we use Jenkins job. This will use the Jenkins Deploy script to release the RPM to the test environment. Live deployments should be done by promoting the release on Cosmos.

Configuration files

The Client needs a working .env to be able to run.

The .env file is pulled in during the make dpe-prep step. This step will work on EC2 instances with attached instance profiles, that have permissions to access the specified parameters and keys. With working instances, it's able to pull in environment specific file and corresponding decrypt keys.

The parameters in SSM should be named:

  • test-digital-paper-edit-env
  • live-digital-paper-edit-env

The keys in KMS should have aliases:

  • alias/test-digital-paper-edit
  • alias/live-digital-paper-edit

Test and live environments should be identical.

Jenkin's IAM Policy has been updated as part of issue 15 and issue 16 in Jenkins.

Licence

See LICENCE

Legal Disclaimer

Despite using React and DraftJs, the BBC is not promoting any Facebook products or other commercial interest.