This smoke-tests suite is a "template", containing pipelines, configurations, sample-apps, and scripts, that can be used to monitor the health of various critical Cloud-Foundry components, workflows and marketplace services. Check out this article for a more detailed overview of the project.
This repo has the following Components -
bootstrap-smoke-test-pipeline
- This deployssmoke-test-pipeline
on the specific concourse/team paths that are dedicated for each CF foundation.smoke-test-pipeline
- Runs on each of the foundation specific concourse/team paths, contains jobs corresponding to every service specific smoke-test.
The environments directory contains foundations-specific param files and a common-params file. These files need to be customized based on the overall PCF deployment.
The scripts that test the end-to-end workflows involving various types of service-instances and sample apps that interact with those service instances.
These apps are simple light weight apps that are used by the smoke-tests scripts to test the app-workflows with service-instances.
This suite can be deployed on a multi-foundation CF setup by following the steps below -
- Clone this repo and upload it on your organization's internal github.
- Rename the directories inside
environments/
with the names of CF foundations in your environment. - Update foundation specific parameters in
environments/*/pipeline-vars.yml
files. - Replace placeholders such as
FOUNDATION1
, with the CF foundation names inbootstrap-smoke-test-pipeline
underparams
section. - Update the github-url in the
bootstrap-smoke-test-pipeline
andsmoke-test-pipeline.yml
files. - Save, commit and push the above changes in your internal repo.
- Create or ensure the presence of the following keys in Vault or other secret-management tool (These keys should be accessible by the
bootstrap-smoke-test-pipeline
) -
CONCOURSE_PASSWORD_FOR_{YOUR-FOUNDATION1}
CONCOURSE_PASSWORD_FOR_{YOUR-FOUNDATION2}
- Create or ensure the presence of the following keys in Vault or other secret-management tool for each foundation (These keys should be accessible by the
smoke-test-pipeline
) -
- PIVNET_API_TOKEN - API_TOKEN to download products from Pivnet.
- GIT_PRIVATE_KEY - Private Key to your own internal github where you will host this repo.
- SMOKE_USER - CF user that should have `OrgManager` role on `smoke-org` and `system` orgs.
- SMOKE_PASSWORD - Password for SMOKE_USER.
- Deploy bootstrap pipeline-
fly -t {concourse-target-for-bootstrap-pipeline} sp -p bootstrap-smoke-test-pipeline -c ci/pipelines/bootstrap-smoke-test-pipeline.yml -l environments/global-pipeline-vars.yml
. Unpause and let the deploy job run. It will deploysmoke-test-pipeline
on all the foundations added underenvironments/
. - Create
smoke-org
in every foundation added in step 2-3. Create all the*_SMOKE_SPACE
mentioned inglobal-pipeline-vars.yml
. - If you don't intend to run specific smoke-test jobs in the smoke-test-pipeline, you can remove those jobs from
smoke-test-pipeline.yml
before deploying the bootstrap pipeline. - Let
smoke-test-pipeline
run and check for params related errors. Once those are fixed, the pipeline jobs should run fine, unless there is a valid problem with the foundation. - In every smoke-test script, you might want to replace
send_metric_to_influxdb
at the end, with other result-reporter methods or comment it if you don't intend to export results. Inreport_results.py
you would need to update the urls for metrics platform that you want to use.
- Simply create
environments/{new-foundation-name}/pipeline-vars.yml
file, copy the params from any other foundation's param file and make the necessary changes. - Create or ensure the presence of the params menetioned above in vault.
- Set the fly target to
{concourse-url}
,{team-name}
team. - Run -
fly -t {concourse-target-for-bootstrap-pipeline} sp -p bootstrap-smoke-test-pipeline -c ci/pipelines/bootstrap-smoke-test-pipeline.yml -l environments/global-pipeline-vars.yml
.