Skip to content

Tags: EngineerBetter/iac-example

Tags

15-promote

Toggle 15-promote's commit message

Unverified

No user is associated with the committer email.
Promote changes to prod through staging

CI is changed such that pushes to main will trigger the staging
pipeline. If the staging pipeline is successful, the branch "staging"
is updated to the current SHA. The prod pipeline will trigger on pushes
to the staging pipeline.

Environments are now configured via the environments.yml file. Most
operations will fail when targeting environments not referenced in this
file.

14-parameterise-environments

Toggle 14-parameterise-environments's commit message

Unverified

No user is associated with the committer email.
Parameterise environment names

Previously only a production environment existed. It is now possible to
deploy any environmenr with a given name by changing the environment
variable TF_VAR_env_name. This same environment name is used when setting
deploy and destroy pipelines in CI.

13-record-versions

Toggle 13-record-versions's commit message

Unverified

No user is associated with the committer email.
Record versions of dependencies

So that builds can be reliably reproduced, we declare all versions of
resources in git (such as image sha256). We use conftest to ensure
that images remain pinned.

12-integration-test

Toggle 12-integration-test's commit message

Unverified

No user is associated with the committer email.
Add integration tests

To ensure that sock-shop is deployed and functional, a system is run test that
loads the front end and asserts on its content.

11-smoke-test

Toggle 11-smoke-test's commit message

Unverified

No user is associated with the committer email.
Add smoke tests to deploy

After deploying, there is now a wait to ensure the the kubernetes
manifest was applied successfully. This is achieved by adding a
readinessProbe to the front-end that HTTP gets / to ensure a 200
response and a kubectl wait to ensure this check is successful at
least one after deploy.

10-alert

Toggle 10-alert's commit message

Unverified

No user is associated with the committer email.
Notify on slack when a build fails

09-converge

Toggle 09-converge's commit message

Unverified

No user is associated with the committer email.
Run deploy pipeline every hour

Running the pipeline hourly will ensure the deployment stays in sync
with the definition in code.

08-idempotent

Toggle 08-idempotent's commit message

Unverified

No user is associated with the committer email.
Run bootstrap idempotently in CI

The bootstrap script that creates a DynamoDB table and S3 bucket for
use by terraform was not idempotent, meaning sequential runs would
fail after the first. By making it idempotent it may now be run in
CI every pipeline run.

07-automatically-apply

Toggle 07-automatically-apply's commit message

Unverified

No user is associated with the committer email.
Deploy and destroy in Jenkins CI

Set up Jenkins pipelines for deploying and destroying our infrastructure
and sock shop app. CI ensures that all tests and checks are successful
prior to deployment.

The Destroy pipeline is configured to be disabled by default. Running
this pipeline manually will remove all infrastructure and deployments.

06-dynamic-test

Toggle 06-dynamic-test's commit message

Unverified

No user is associated with the committer email.
Added Snyk terraform plan scanning

When deploying the cluster, a terraform plan is generated which is
always scanned by Snyk. By settings the environment variable
IGNORE_SNYK_TEST_PLAN_FAILURE=true, misconfigurations will not cause
a deployment failure but will instead merely report on issues.