Request For Comments (RFCs)
  • Request for comments (RFC)
  • RFC 001: Matcher architecture
  • RFC 002: Archival Storage Service
  • RFC 003: Asset Access
  • RFC 004: METS Adapter
  • RFC 005: Reporting Pipeline
  • RFC 006: Reindexer architecture
  • RFC 007: Goobi Upload
  • RFC 008: API Filtering
  • RFC 009: AWS account setup
  • RFC 010: Data model
  • RFC 011: Network Architecture
  • RFC 012: API Architecture
  • RFC 013: Release & Deployment tracking
    • Deployment example
    • Version 1
  • RFC 014: Born digital workflow
  • RFC 015: How we work
    • Code Reviews
    • Shared Libraries
  • RFC 016: Holdings service
  • URL Design
  • Pipeline Tracing
  • Platform Reliability
    • CI/CD
    • Observability
    • Reliability
  • RFC 020: Locations and requesting
  • RFC 021: Data science in the pipeline
  • RFC 022: Logging
    • Logging example
  • RFC 023: Images endpoint
  • RFC 024: Library management
  • RFC 025: Tagging our Terraform resources
  • RFC 026: Relevance reporting service
  • RFC 026: Relation Embedder
  • RFC 027: Pipeline Intermediate Storage
  • RFC 029: Work state modelling
  • Pipeline merging
  • RFC 031: Relation Batcher
  • RFC 032: Calm deletion watcher
  • RFC 033: Api internal model versioning
  • RFC 034: Modelling Locations in the Catalogue API
  • RFC 035: Modelling MARC 856 "web linking entry"
  • RFC 036: Modelling holdings records
  • API faceting principles & expectations
  • Matcher versioning
  • Requesting API design
  • TEI Adapter
  • Tracking changes to the Miro data
  • How do we tell users how to find stuff?
  • Removing deleted records from (re)indexes
  • RFC 044: Tracking Patron Deletions
  • Work relationships in Sierra, part 2
    • Work relationships in Sierra
  • Born Digital in IIIF
  • Transitive hierarchies in Sierra
  • RFC 047: Changing the structure of the Catalogue API index
  • RFC 048: Concepts work plan
  • RFC 049: Changing how aggregations are retrieved by the Catalogue API
  • RFC 050: Design considerations for the concepts API
  • RFC 051: Ingesting Library of Congress concepts
  • RFC: 052: The Concepts Pipeline - phase one
  • RFC 053: Logging in Lambdas
  • RFC 054: Authoritative ids with multiple Canonical ids.
  • RFC 055: Genres as Concepts
  • RFC 055: Content API
    • Content API: articles endpoint
    • Content API: Events endpoint
    • Content API: exhibitions endpoint
    • The future of this endpoint
  • RFC 056: Prismic to Elasticsearch ETL pipeline
  • RFC 57: Relevance testing
    • Examples of rank CLI usage
  • RFC 059: Splitting the catalogue pipeline Terraform
  • RFC 060: Service health-check principles
  • RFC 060: Offsite requesting
    • Sierra locations in the Catalogue API
  • Content-api: next steps
Powered by GitBook
On this page
  • Usage
  • Setup
  • Check the state
  • Deploy
  1. RFC 013: Release & Deployment tracking

Deployment example

This is an example TF stack demonstrating the principles described in this RFC.

Usage

Setup

You will need to create the stack and populate the ECR repositories.

# Create the stack
terraform apply

# Populates ECR repos with images
./deploy.sh

You should receive a list of the images in ECR:

{
    "imageIds": [
        {
            "imageDigest": "sha256:4fe8827f51a5e11bb83afa8227cbccb402df840d32c6b633b7ad079bc8144100",
            "imageTag": "prod"
        },
        {
            "imageDigest": "sha256:afe605d272837ce1732f390966166c2afff5391208ddd57de10942748694049d",
            "imageTag": "hash_2"
        },
        {
            "imageDigest": "sha256:4fe8827f51a5e11bb83afa8227cbccb402df840d32c6b633b7ad079bc8144100",
            "imageTag": "hash_1"
        }
    ]
}

You can see there are 2 images (notice the matching digests) under 3 tags. By default hash_1 is tagged prod.

Check the state

You can then run check.sh to view the current state of deployments.

This lists the image digests in use by the services current tasks, along with the digest currently tagged "prod".

$ ./check.sh
prod ENV_DIGEST: sha256:4fe8827f51a5e11bb83afa8227cbccb402df840d32c6b633b7ad079bc8144100

All TASK_DIGESTS will match the ENV_DIGEST when the deployment is complete.

TASK_DIGEST: sha256:4fe8827f51a5e11bb83afa8227cbccb402df840d32c6b633b7ad079bc8144100 (match)

Deploy

You can choose to deploy hash_2 as follows:

# Populates ECR repos with images
./deploy.sh hash_2

This will update the image tags so that hash_2 is tagged prod and a redeployment is forced.

Again you can check the status of the deployment by running check.sh.

If you check while the transition is occuring you may see both tasks available with the new image_id task replacing the old.

$ ./check.sh
prod ENV_DIGEST: sha256:afe605d272837ce1732f390966166c2afff5391208ddd57de10942748694049d

All TASK_DIGESTS will match the ENV_DIGEST when the deployment is complete.

TASK_DIGEST: sha256:afe605d272837ce1732f390966166c2afff5391208ddd57de10942748694049d (match)
TASK_DIGEST: sha256:4fe8827f51a5e11bb83afa8227cbccb402df840d32c6b633b7ad079bc8144100 (no_match)
PreviousRFC 013: Release & Deployment trackingNextVersion 1

Last updated 10 months ago