Infrastructure Code Continuous Delivery Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 25: Line 25:
* Resolving build-time configuration (pulling in configuration files that are shared across multiple projects)
* Resolving build-time configuration (pulling in configuration files that are shared across multiple projects)
* Compiling or transforming the code, such as generating configuration files from templates.
* Compiling or transforming the code, such as generating configuration files from templates.
* Publish artifacts in a delivery repository.
* Publish [[#Artifact|infrastructure artifacts]] in a delivery repository.
====Offline and Mock Tests as part of the Build Step====
====Offline and Mock Tests as part of the Build Step====
[[Infrastructure_Code_Testing_Concepts#Offline_Stack_Tests|Offline stack tests]] and [[Infrastructure_Code_Testing_Concepts#Testing_with_Mock_APIs_and_Doubles|tests with mock API and doubles]] do not require provisioning infrastructure so they can be run at build stage.
[[Infrastructure_Code_Testing_Concepts#Offline_Stack_Tests|Offline stack tests]] and [[Infrastructure_Code_Testing_Concepts#Testing_with_Mock_APIs_and_Doubles|tests with mock API and doubles]] do not require provisioning infrastructure so they can be run at build stage.

Revision as of 00:56, 23 January 2022

External

Internal

Overview

The delivery pipeline metaphor describes how a change in the infrastructure code progresses from the person that makes the change all the way to production.

Reconcile with Continuous Delivery. TO CONTINUE: IaC Chapter 8 Core Practice: Continuously Test and Deliver → Infrastructure Delivery Pipelines.

TO INTEGRATE:

Infrastructure Delivery Pipeline

A infrastructure delivery pipeline consists in multiple types of activities, grouped in stages: Infrastructure Delivery Pipeline.png

Activities

Build

The build stage compiles application code and makes the code available for use for other stages. Building is usually done once in a pipeline, every time the source code changes. Building implies the following steps:

  • Retrieving build-time dependencies, such as libraries, including those from other projects in the code base and external libraries.
  • Resolving build-time configuration (pulling in configuration files that are shared across multiple projects)
  • Compiling or transforming the code, such as generating configuration files from templates.
  • Publish infrastructure artifacts in a delivery repository.

Offline and Mock Tests as part of the Build Step

Offline stack tests and tests with mock API and doubles do not require provisioning infrastructure so they can be run at build stage.

Infrastructure Artifacts

Promote

Promotion means moving code between delivery stages.

Apply

Infrastructure code tools are executed and infrastructure resources are created based on the code. The infrastructure resources are created in different environments, corresponding to the pipeline stage the activity belongs to: stage testing, integration, production.

Validate

Stages

Online Stack Testing Stage

System Integration Testing Stage

Production Stage

Organizatorium

Tools