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
Pivotal Platform Automation 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 Pivotal Network.
Retrieval from Pivotal Network
Ops Manager 2.5
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.
S3 filename prefixing
Note the unique regex format for blob names,
for example: \[p-healthwatch,(.*)\]p-healthwatch-.*.pivotal.
Pivnet filenames will not always contain the necessary metadata
to accurately download files from S3.
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 and download-product-s3,
refer to the download-product task reference.
The pipeline requires configuration for the download-product task.
Below are examples that can be used.
## Pipeline Components
### Resource Types
This custom resource type uses the pivnet resource
to pull down and separate both pieces of the Platform Automation product (tasks and image)
so they can be stored separately in S3.
```yaml
resource_types:
- name: pivnet
type: docker-image
source:
repository: pivotalcf/pivnet-resource
tag: latest-final
Product Resources
S3 resources where Platform Automation download-product outputs will be stored.
Each product/stemcell needs a separate resource defined.
Platform Automation will not create these resources for you.
platform-automation-pivnet is downloaded directly from Pivnet
and will be used to download all other products from Pivnet.
platform-automation-tasks and platform-automation-image are S3 resources
that will be stored for internet-restricted, or faster, access.
Platform Automation will not create this resource for you.
You will need to add your download-product configuration configuration files
to your configurations repo.
Platform Automation will not create these resources for you.
For more details, see the Inputs and Outputs section.
((foundation)) is a value
intended to be replaced by the filepath
of your foundation directory structure in github
(if you are not using multi-foundation, this value can be removed).
((credhub-*)) are values for accessing your Concourse Credhub.
These are set when fly-ing your pipeline.
For more information on how to fly your pipeline
and use ((foundation)),
please reference our How To Guides for your specific workflow.
Platform Automation will not create your Credhub or store values into your Credhub for you.
1 2 3 4 5 6 7 8 910111213141516
# This task is used in multiple jobs# The yaml anchor "*credhub-interpolate" is used in its placecredhub-interpolate:&credhub-interpolateimage:platform-automation-imagefile:platform-automation-tasks/tasks/credhub-interpolate.ymlparams:CREDHUB_CLIENT:((credhub-client))CREDHUB_SECRET:((credhub-secret))CREDHUB_SERVER:((credhub-server))CREDHUB_CA_CERT:((credhub-ca-cert))PREFIX:'/pipeline/vsphere'INTERPOLATION_PATHS:"download-product"input_mapping:files:configoutput_mapping:interpolated-files:config
Jobs
Each job corresponds to a "box" on the visual representation of your Concourse pipeline.
These jobs consume resources defined above.
jobs:-name:fetch-healthwatchplan:-aggregate:-get:dailytrigger:true-get:platform-automation-imageparams:unpack:true-get:platform-automation-tasksparams:unpack:true-get:config-task:credhub-interpolate<<:*credhub-interpolate-task:download-healthwatch-product-and-stemcellimage:platform-automation-imagefile:platform-automation-tasks/tasks/download-product.ymlparams:CONFIG_FILE:download-product/healthwatch.ymloutput_mapping:{downloaded-stemcell:healthwatch-stemcell}-aggregate:-put:healthwatch-productparams:file:downloaded-product/*.pivotal-put:healthwatch-stemcellparams:file:healthwatch-stemcell/*.tgz-name:fetch-opsmanplan:-aggregate:-get:dailytrigger:true-get:platform-automation-imageparams:unpack:true-get:platform-automation-tasksparams:unpack:true-get:config-task:credhub-interpolate<<:*credhub-interpolate-task:download-opsman-imageimage:platform-automation-imagefile:platform-automation-tasks/tasks/download-product.ymlparams:CONFIG_FILE:download-product/opsman.yml-aggregate:-put:opsman-productparams:file:downloaded-product/*-name:fetch-pasplan:-aggregate:-get:dailytrigger:true-get:platform-automation-imageparams:unpack:true-get:platform-automation-tasksparams:unpack:true-get:config-task:credhub-interpolate<<:*credhub-interpolate-task:download-pas-product-and-stemcellimage:platform-automation-imagefile:platform-automation-tasks/tasks/download-product.ymlparams:CONFIG_FILE:download-product/pas.ymloutput_mapping:{downloaded-stemcell:pas-stemcell}-aggregate:-put:pas-productparams:file:downloaded-product/*.pivotal-put:pas-stemcellparams:file:pas-stemcell/*.tgz-name:fetch-pas-windowsplan:-aggregate:-get:dailytrigger:true-get:platform-automation-imageparams:unpack:true-get:platform-automation-tasksparams:unpack:true-get:config-task:credhub-interpolate<<:*credhub-interpolate-task:download-pas-windows-productimage:platform-automation-imagefile:platform-automation-tasks/tasks/download-product.ymlparams:CONFIG_FILE:download-product/pas-windows.yml-aggregate:-put:pas-windows-productparams:file:downloaded-product/*.pivotal-name:fetch-pksplan:-aggregate:-get:dailytrigger:true-get:platform-automation-imageparams:unpack:true-get:platform-automation-tasksparams:unpack:true-get:config-task:credhub-interpolate<<:*credhub-interpolate-task:download-pks-product-and-stemcellimage:platform-automation-imagefile:platform-automation-tasks/tasks/download-product.ymlparams:CONFIG_FILE:download-product/pks.ymloutput_mapping:{downloaded-stemcell:pks-stemcell}-aggregate:-put:pks-productparams:file:downloaded-product/*.pivotal-put:pks-stemcellparams:file:pks-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-aggregate:-put:platform-automation-tasksparams:file:platform-automation-pivnet/*tasks*.zip-put:platform-automation-imageparams:file:platform-automation-pivnet/*image*.tgz