Below you will find a reference pipeline that illustrates the tasks and provides an example of a basic pipeline design. You know your environment and constraints and we don't - we recommend you look at the tasks that make up the pipeline, and see how they can be arranged for your specific automation needs. For a deeper dive into each task see the Task Reference.
These Concourse pipelines are examples on how to use the tasks. If you use a different CI/CD platform, you can use these Concourse files as examples of the inputs, outputs, and arguments used in each step in the workflow.
Prerequisites
Deployed Concourse
Info
Platform Automation Toolkit is based on Concourse CI.
We recommend that you have some familiarity with Concourse before getting started.
If you are new to Concourse, Concourse CI Tutorials would be a good place to start.
Persisted datastore that can be accessed by Concourse resource (e.g. s3, gcs, minio)
A set of valid download-product-config files: Each product has a configuration YAML of what version to download from Tanzu Network.
The filename for the artifact downloaded from Ops Manager is changed! If your resources or pipelines
have a regex for the Ops Manager filename, you may be affected. (Please see
Ops Manager's official notice
for more information)
The pipeline downloads dependencies consumed by the tasks
and places them into a trusted s3-like storage provider.
This helps other concourse deployments without internet access
retrieve task dependencies.
Blobstore filename prefixing
Note the unique regex format for blob names,
for example: \[p-healthwatch,(.*)\]p-healthwatch-.*.pivotal.
Tanzu Network filenames will not always contain the necessary metadata
to accurately download files from a blobstore (i.e. s3, gcs, azure).
So, the product slug and version are prepended when using download-product.
For more information on how this works,
and what to expect when using download-product,
refer to the download-product task reference.
The pipeline requires configuration for the download-product task.
Below are examples that can be used.
This can be useful when you want to take
a fully assembled pipeline as a starting point;
the rest of this document covers the sections of the full pipeline in more detail.
Pipeline Components
Resource Types
This custom resource type uses the pivnet-resource
to pull down and separate both pieces of the Platform Automation Toolkit product (tasks and image)
so they can be stored separately in S3.
S3 resources where Platform Automation Toolkit download-product outputs will be stored.
Each product/stemcell needs a separate resource defined.
Platform Automation Toolkit will not create these resources for you.
platform-automation-pivnet is downloaded directly from Tanzu Network
and will be used to download all other products from Tanzu Network.
platform-automation-tasks and platform-automation-image are S3 resources
that will be stored for internet-restricted, or faster, access.
Platform Automation Toolkit will not create this resource for you.
You will need to add your download-product configuration configuration files
to your configurations repo.
Platform Automation Toolkit will not create these resources for you.
For more details, see the Inputs and Outputs section.
This helps load secrets stored in an external credential manager -- such as Credhub.
Concourse supports several credential managers natively.
The configuration below uses the prepare-tasks-with-secrets task
to load secrets from your external configuration files.
1 2 3 4 5 6 7 8 9101112
# This task is used in multiple jobs# The yaml anchor "*prepare-tasks-with-secrets" is used in its placeprepare-tasks-with-secrets:&prepare-tasks-with-secretsimage:platform-automation-imagefile:platform-automation-tasks/tasks/prepare-tasks-with-secrets.ymlparams:CONFIG_PATHS:config/download-product-pivnetinput_mapping:tasks:platform-automation-tasksconfig:configurationoutput_mapping:tasks:platform-automation-tasks
Jobs
Each job corresponds to a "box" on the visual representation of your Concourse pipeline.
These jobs consume resources defined above.
jobs:-name:fetch-opsmanplan:-in_parallel:-get:dailytrigger:true-get:platform-automation-imageparams:unpack:true-get:platform-automation-tasksparams:unpack:true-get:configuration-task:prepare-tasks-with-secrets<<:*prepare-tasks-with-secrets-task:download-opsman-imageimage:platform-automation-imagefile:platform-automation-tasks/tasks/download-product.ymlparams:CONFIG_FILE:download-product-pivnet/download-opsman.ymlinput_mapping:config:configuration-in_parallel:-put:opsman-productparams:file:downloaded-product/*-name:fetch-pksplan:-in_parallel:-get:dailytrigger:true-get:platform-automation-imageparams:unpack:true-get:platform-automation-tasksparams:unpack:true-get:configuration-task:prepare-tasks-with-secrets<<:*prepare-tasks-with-secrets-task:download-pks-product-and-stemcellimage:platform-automation-imagefile:platform-automation-tasks/tasks/download-product.ymlparams:CONFIG_FILE:download-product-pivnet/download-pks.ymlinput_mapping:config:configurationoutput_mapping:{downloaded-stemcell:pks-stemcell}-in_parallel:-put:pks-productparams:file:downloaded-product/*.pivotal-put:pks-stemcellparams:file:pks-stemcell/*.tgz-name:fetch-tasplan:-in_parallel:-get:dailytrigger:true-get:platform-automation-imageparams:unpack:true-get:platform-automation-tasksparams:unpack:true-get:configuration-task:prepare-tasks-with-secrets<<:*prepare-tasks-with-secrets-task:download-tas-product-and-stemcellimage:platform-automation-imagefile:platform-automation-tasks/tasks/download-product.ymlparams:CONFIG_FILE:download-product-pivnet/download-tas.ymlinput_mapping:config:configurationoutput_mapping:{downloaded-stemcell:tas-stemcell}-in_parallel:-put:tas-productparams:file:downloaded-product/*.pivotal-put:tas-stemcellparams:file:tas-stemcell/*.tgz-name:fetch-healthwatchplan:-in_parallel:-get:dailytrigger:true-get:platform-automation-imageparams:unpack:true-get:platform-automation-tasksparams:unpack:true-get:configuration-task:prepare-tasks-with-secrets<<:*prepare-tasks-with-secrets-task:download-healthwatch-product-and-stemcellimage:platform-automation-imagefile:platform-automation-tasks/tasks/download-product.ymlparams:CONFIG_FILE:download-product-pivnet/download-healthwatch.ymlinput_mapping:config:configurationoutput_mapping:{downloaded-stemcell:healthwatch-stemcell}-in_parallel:-put:healthwatch-productparams:file:downloaded-product/*.pivotal-put:healthwatch-stemcellparams:file:healthwatch-stemcell/*.tgz-name:fetch-platform-automation# We use the pivnet resource to bootstrap the pipeline,# and because this product is part of the pipeline, not the foundationplan:-get:platform-automation-pivnettrigger:true-in_parallel:-put:platform-automation-tasksparams:file:platform-automation-pivnet/*tasks*.zip-put:platform-automation-imageparams:file:platform-automation-pivnet/*image*.tgz