Skip to content

Pipeline Factory

Casey Lee edited this page Oct 31, 2018 · 4 revisions

Pipeline Factory

AWS Service Catalog can be utilized to offer teams the ability to create mu pipelines in a self-service manner while still enforcing governance and applying least privilege access.

Configuration

The pipeline factory is first defined as a catalog in a mu.yml file with only one catalog being defined per mu namespace:

catalog:

  ### these users are added to a newly created IAM group 
  ### that allows them to provision pipelines via service catalog
  ###
  iamUsers:
  - casey.lee

  ### each pipeline template has a name, description and set of versions
  ###
  pipelines:
  - name: basic-pipeline
    description: Basic pipeline with no acceptance environment
    versions:
      v2: 
        source:
          provider: GitHub
        acceptance:
          disabled: true
        production:
          environment: prod-fargate
      v1: 
        muVersion: 1.5.3
        source:
          provider: GitHub
        acceptance:
          disabled: true
        production:
          environment: prod-ec2

  - name: spring-boot-pipeline
    description: Spring Boot pipeline 
    versions:
      v1:
        source:
          provider: GitHub
        build:
          image: aws/codebuild/java:openjdk-8
        acceptance:
          environment: acpt-fargate
        production:
          environment: prod-fargate

Next run mu catalog up to setup AWS Service Catalog with the products you have defined.

Provisioning with Console

Pipelines can be provisioned through the AWS Service Catalog console.

Pick pipeline type:

Choose version:

Provide details:

Provisioning with CLI

Alternatively, the mu.yml file for a service can be updated to reference the name and version of a specific pipeline template:

service:
  pipeline:
    catalog:
      name: basic-pipeline
      version: v2

Then run mu pipeline up to provision the pipeline via AWS Service Catalog.