### Complete Pipeline Example Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Demonstrates a full deployment pipeline with infrastructure setup, CF deployment, testing, and cleanup stages. Resources include git repositories for tasks, CF deployment, BBL state, and acceptance tests. ```yaml resources: - name: cf-deployment-concourse-tasks type: git source: uri: https://github.com/cloudfoundry/cf-deployment-concourse-tasks.git branch: main tag_filter: v12.* - name: cf-deployment type: git source: uri: https://github.com/cloudfoundry/cf-deployment.git branch: main - name: bbl-state type: git source: uri: git@github.com:my-org/bbl-state.git branch: main private_key: ((git_private_key)) - name: cf-acceptance-tests type: git source: uri: https://github.com/cloudfoundry/cf-acceptance-tests.git branch: main jobs: - name: setup-infrastructure plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - task: bbl-up file: cf-deployment-concourse-tasks/bbl-up/task.yml input_mapping: bbl-config: bbl-state params: BBL_IAAS: gcp BBL_GCP_SERVICE_ACCOUNT_KEY: ((gcp_key)) BBL_GCP_REGION: us-central1 BBL_ENV_NAME: ci-cf LB_DOMAIN: ci.cf.example.com BBL_LB_CERT: ((lb_cert)) BBL_LB_KEY: ((lb_key)) - put: bbl-state params: repository: updated-bbl-state rebase: true - name: deploy-cf plan: - in_parallel: - get: cf-deployment-concourse-tasks passed: [setup-infrastructure] - get: cf-deployment - get: bbl-state passed: [setup-infrastructure] trigger: true - task: deploy file: cf-deployment-concourse-tasks/bosh-deploy/task.yml params: MANIFEST_FILE: cf-deployment.yml SYSTEM_DOMAIN: sys.ci.cf.example.com OPS_FILES: operations/use-compiled-releases.yml DEPLOY_WITH_UPTIME_MEASUREMENTS: false - name: run-acceptance-tests plan: - in_parallel: - get: cf-deployment-concourse-tasks passed: [deploy-cf] - get: cf-acceptance-tests - get: bbl-state passed: [deploy-cf] trigger: true - task: update-integration-config file: cf-deployment-concourse-tasks/update-integration-configs/task.yml input_mapping: integration-configs: bbl-state params: SYSTEM_DOMAIN: sys.ci.cf.example.com CATS_INTEGRATION_CONFIG_FILE: ci/cats_config.json - task: run-cats file: cf-deployment-concourse-tasks/run-cats/task.yml input_mapping: integration-config: updated-integration-configs params: NODES: 8 CONFIG_FILE_PATH: ci/cats_config.json FLAKE_ATTEMPTS: 2 - name: cleanup plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - task: delete-deployment file: cf-deployment-concourse-tasks/bosh-delete-deployment/task.yml params: DEPLOYMENT_NAME: cf - task: bosh-cleanup file: cf-deployment-concourse-tasks/bosh-cleanup/task.yml params: CLEAN_ALL: true ``` -------------------------------- ### Open ASGs for BOSH Instance Group Task Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Creates CF Application Security Groups to allow communication to BOSH instance group IPs. Configure BBL_STATE_DIR, SYSTEM_DOMAIN, BOSH_DEPLOYMENT, INSTANCE_GROUP_NAME, and SECURITY_GROUP_NAME. ```yaml jobs: - name: open-database-access plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - task: open-asgs file: cf-deployment-concourse-tasks/open-asgs-for-bosh-instance-group/task.yml params: BBL_STATE_DIR: environments/production SYSTEM_DOMAIN: sys.my-cf.example.com BOSH_DEPLOYMENT: cf INSTANCE_GROUP_NAME: database SECURITY_GROUP_NAME: database-access ``` -------------------------------- ### BOSH Deploy with Created Release Task Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Creates a development release from source code and deploys it, replacing the existing version in cf-deployment. Use this for testing upstream components before a formal release. ```yaml jobs: - name: test-release-upgrade plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: cf-deployment - get: bbl-state - get: diego-release # Your release source repo - task: deploy-with-dev-release file: cf-deployment-concourse-tasks/bosh-deploy-with-created-release/task.yml input_mapping: release: diego-release params: BBL_STATE_DIR: environments/staging MANIFEST_FILE: cf-deployment.yml SYSTEM_DOMAIN: sys.staging.example.com OPS_FILES: | operations/use-compiled-releases.yml # Optional: bump a submodule before creating release BUMP_SUBMODULE: src/code.cloudfoundry.org/executor SUBMODULE_BRANCH: main DEPLOY_WITH_UPTIME_MEASUREMENTS: true FAIL_ON_DOWNTIME: false BOSH_LITE: false ``` -------------------------------- ### Configure bbl-up Task in Concourse Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Use this task to create cloud infrastructure and deploy a BOSH director. Ensure the input mapping and required IaaS parameters are correctly configured for your environment. ```yaml # Concourse pipeline job configuration jobs: - name: deploy-infrastructure plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - get: bbl-config - task: bbl-up file: cf-deployment-concourse-tasks/bbl-up/task.yml input_mapping: bbl-config: bbl-state # Use bbl-state if no custom plan patches needed params: BBL_IAAS: gcp BBL_GCP_SERVICE_ACCOUNT_KEY: ((gcp_service_account_key)) BBL_GCP_REGION: us-central1 BBL_STATE_DIR: environments/production BBL_ENV_NAME: prod-cf LB_DOMAIN: my-cf.example.com BBL_LB_CERT: ((ssl_certificate)) BBL_LB_KEY: ((ssl_private_key)) GIT_COMMIT_EMAIL: "ci@example.com" GIT_COMMIT_USERNAME: "CI Bot" DEBUG_MODE: false SKIP_LB_CREATION: false - put: bbl-state params: repository: updated-bbl-state rebase: true ``` -------------------------------- ### Run Cloud Foundry Acceptance Tests (CATs) Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Configures the 'run-cats' task to execute Cloud Foundry Acceptance Tests with specified parallelism, retry settings, and configuration paths. Use to validate a deployed CF environment. ```yaml jobs: - name: acceptance-tests plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: cf-acceptance-tests - get: integration-config - get: cf-cli # Optional: provide custom CF CLI binary optional: true - task: run-cats file: cf-deployment-concourse-tasks/run-cats/task.yml params: NODES: 12 # Parallel ginkgo nodes CONFIG_FILE_PATH: integration_config.json REPORTER_CONFIG_FILE_PATH: reporter_config.json # Optional custom reporter SKIP_REGEXP: "routing" # Skip tests matching regex FLAKE_ATTEMPTS: 2 # Retry failed tests TIMEOUT: 2h CAPTURE_LOGS: true # Save logs to cats-trace-output ``` -------------------------------- ### BOSH Deploy with Updated Release Submodule Task Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Deploys a release after bumping a specific submodule. This task explicitly uses a separate resource input for the submodule, allowing for precise version control. ```yaml jobs: - name: test-submodule-bump plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: cf-deployment - get: bbl-state - get: diego-release - get: executor # The submodule resource trigger: true - task: deploy-with-bumped-submodule file: cf-deployment-concourse-tasks/bosh-deploy-with-updated-release-submodule/task.yml input_mapping: release: diego-release submodule: executor params: BBL_STATE_DIR: environments/staging MANIFEST_FILE: cf-deployment.yml SYSTEM_DOMAIN: sys.staging.example.com BUMP_SUBMODULE: src/code.cloudfoundry.org/executor DEPLOY_WITH_UPTIME_MEASUREMENTS: true FAIL_ON_DOWNTIME: true ``` -------------------------------- ### Run BOSH Errand Task Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Executes a BOSH errand on a specified deployment. Optional parameters allow targeting specific instances and controlling whether the VM remains running after completion. ```yaml jobs: - name: run-smoke-tests plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - task: smoke-tests file: cf-deployment-concourse-tasks/run-errand/task.yml params: BBL_STATE_DIR: environments/production DEPLOYMENT_NAME: cf ERRAND_NAME: smoke-tests INSTANCE: smoke-tests/first # Optional: target specific instance KEEP_ALIVE: false # Keep VM running after errand completes ``` -------------------------------- ### BOSH Cleanup Task Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Performs BOSH cleanup to free up disk space by removing unused releases, stemcells, and orphaned disks. Set CLEAN_ALL to true for a comprehensive cleanup. ```yaml jobs: - name: weekly-cleanup plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - get: weekly-timer trigger: true - task: cleanup file: cf-deployment-concourse-tasks/bosh-cleanup/task.yml params: BBL_STATE_DIR: environments/production CLEAN_ALL: true # Uses --all flag for comprehensive cleanup ``` -------------------------------- ### Rotate CA Certificates - Step 2 Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Executes the second step of the CA certificate rotation process, targeting specific certificates. Ensure a redeployment has occurred before running this step. ```yaml - name: rotate-step-2 plan: - task: rotate-cas-step-2 file: cf-deployment-concourse-tasks/rotate-ca-certificates/task.yml params: BBL_STATE_DIR: environments/production STEP: step_2 CA_CERTS: application_ca,cf_app_sd_ca,credhub_ca,log_cache_ca,loggregator_ca ``` -------------------------------- ### Configure bosh-deploy Task in Concourse Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Use this task to perform BOSH deployments with support for operations files and variable files. It includes optional uptime measurement parameters for monitoring deployment health. ```yaml jobs: - name: deploy-cf plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: cf-deployment - get: bbl-state - get: ops-files - get: vars-files - task: deploy file: cf-deployment-concourse-tasks/bosh-deploy/task.yml params: BBL_STATE_DIR: environments/production MANIFEST_FILE: cf-deployment.yml SYSTEM_DOMAIN: sys.my-cf.example.com OPS_FILES: | operations/use-compiled-releases.yml operations/scale-to-one-az.yml custom-ops/my-custom-ops.yml VARS_FILES: | vars/production-vars.yml REGENERATE_CREDENTIALS: false SKIP_STEMCELL_UPLOAD: false BOSH_LITE: false BOSH_DEPLOY_ARGS: "--fix" # Uptime measurement options DEPLOY_WITH_UPTIME_MEASUREMENTS: true FAIL_ON_DOWNTIME: true MEASURE_TCP_AVAILABILITY: true MEASURE_SYSLOG_AVAILABILITY: true TCP_DOMAIN: tcp.my-cf.example.com TCP_PORT: 1025 AVAILABLE_PORT: 1026 APP_PUSHABILITY_THRESHOLD: 0 HTTP_AVAILABILITY_THRESHOLD: 0 TCP_AVAILABILITY_THRESHOLD: 0 ``` -------------------------------- ### Redeploy BOSH Deployment Source: https://github.com/cloudfoundry/cf-deployment-concourse-tasks/blob/main/README.md Helper commands to refresh the BOSH deployment manifest and apply changes after certificate rotation steps. ```shell bosh -d cf manifest > manifest.yml bosh -d cf --non-interactive deploy manifest.yml ``` -------------------------------- ### BOSH Deploy Task Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt A placeholder for a BOSH deploy task configuration. This snippet shows the task file reference and input mapping for operations files, intended to be part of a larger deployment pipeline. ```yaml - task: deploy file: cf-deployment-concourse-tasks/bosh-deploy/task.yml input_mapping: ops-files: collected-ops-files # ... deployment params ``` -------------------------------- ### Rotate CA Certificates - Step 1 Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Initiates the first step of a three-step CA certificate rotation process for Cloud Foundry using CredHub. Requires redeployment after completion. Specify the BBL state directory and the list of CAs to rotate. ```yaml # Complete rotation pipeline structure jobs: - name: rotate-step-1 plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - task: rotate-cas-step-1 file: cf-deployment-concourse-tasks/rotate-ca-certificates/task.yml params: BBL_STATE_DIR: environments/production STEP: step_1 CA_CERTS: application_ca,cf_app_sd_ca,credhub_ca,log_cache_ca,loggregator_ca,metric_scraper_ca,nats_ca,nats_internal_ca,network_policy_ca,pxc_galera_ca,pxc_server_ca,router_ca,routing_api_ca,service_cf_internal_ca,silk_ca,uaa_ca ``` -------------------------------- ### Update Integration Configs with CredHub Credentials Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Updates integration configuration files for CATs, RATs, and WATS by fetching credentials from CredHub. Commits the updated configurations to a git repository. Requires BBL state, system domain, and git commit details. ```yaml jobs: - name: update-test-configs plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - get: integration-configs - task: update-configs file: cf-deployment-concourse-tasks/update-integration-configs/task.yml params: BBL_STATE_DIR: environments/production SYSTEM_DOMAIN: sys.my-cf.example.com CATS_INTEGRATION_CONFIG_FILE: cats_integration_config.json RATS_INTEGRATION_CONFIG_FILE: rats_integration_config.json WATS_INTEGRATION_CONFIG_FILE: wats_integration_config.json GIT_COMMIT_EMAIL: "ci@example.com" GIT_COMMIT_USERNAME: "CI Bot" # Optional: private docker registry for CATs PRIVATE_DOCKER_REGISTRY_IMAGE: registry.example.com/test-app PRIVATE_DOCKER_REGISTRY_USERNAME: ((docker_username)) PRIVATE_DOCKER_REGISTRY_PASSWORD: ((docker_password)) - put: integration-configs params: repository: updated-integration-configs ``` -------------------------------- ### BOSH Upload Stemcells Task Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Uploads necessary stemcells for a BOSH deployment without executing a full deployment. This is useful for pre-staging stemcells. ```yaml jobs: - name: upload-stemcells plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: cf-deployment - get: bbl-state - get: ops-files - task: upload-stemcells file: cf-deployment-concourse-tasks/bosh-upload-stemcells/task.yml params: BBL_STATE_DIR: environments/production INFRASTRUCTURE: google # aws, bosh-lite, google, vsphere, azure, or openstack MANIFEST_FILE: cf-deployment.yml OPS_FILES: | operations/use-compiled-releases.yml operations/windows2019-cell.yml ``` -------------------------------- ### Configure bbl-destroy Task in Concourse Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Use this task to destroy the BOSH director and associated cloud infrastructure. Debug output is written to bbl_destroy.txt upon failure. ```yaml jobs: - name: teardown-infrastructure plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - task: bbl-destroy file: cf-deployment-concourse-tasks/bbl-destroy/task.yml params: BBL_STATE_DIR: environments/production # GCP credentials BBL_GCP_SERVICE_ACCOUNT_KEY: ((gcp_service_account_key)) # Or AWS credentials # BBL_AWS_ACCESS_KEY_ID: ((aws_access_key_id)) # BBL_AWS_SECRET_ACCESS_KEY: ((aws_secret_access_key)) # Or Azure credentials # BBL_AZURE_CLIENT_ID: ((azure_client_id)) # BBL_AZURE_CLIENT_SECRET: ((azure_client_secret)) # BBL_AZURE_TENANT_ID: ((azure_tenant_id)) # BBL_AZURE_SUBSCRIPTION_ID: ((azure_subscription_id)) GIT_COMMIT_EMAIL: "ci@example.com" GIT_COMMIT_USERNAME: "CI Bot" - put: bbl-state params: repository: updated-bbl-state rebase: true ``` -------------------------------- ### Collect and Merge Operations Files Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Merges a set of custom operations files with a base set, prioritizing the custom files in case of naming conflicts. Use this task to prepare a combined set of operations files for deployment. ```yaml jobs: - name: prepare-ops-files plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: cf-deployment # Contains base ops files - get: custom-ops-files # Your custom operations - task: collect-ops file: cf-deployment-concourse-tasks/collect-ops-files/task.yml input_mapping: base-ops-files: cf-deployment new-ops-files: custom-ops-files params: BASE_OPS_FILE_DIR: operations NEW_OPS_FILES: | my-env/scale-down.yml my-env/custom-certs.yml - task: deploy file: cf-deployment-concourse-tasks/bosh-deploy/task.yml input_mapping: ops-files: collected-ops-files # ... deployment params ``` -------------------------------- ### BOSH Delete Deployment Task Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Deletes a specified BOSH deployment or all deployments. Supports force deletion to bypass errors. Configure DEPLOYMENT_NAME and DELETE_ALL_DEPLOYMENTS parameters as needed. ```yaml jobs: - name: delete-cf-deployment plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - task: delete-deployment file: cf-deployment-concourse-tasks/bosh-delete-deployment/task.yml params: BBL_STATE_DIR: environments/staging DEPLOYMENT_NAME: cf DELETE_ALL_DEPLOYMENTS: false # Set true to delete ALL deployments IGNORE_ERRORS: false # Set true to force deletion ``` -------------------------------- ### Redeploy Cloud Foundry after CA Rotation Step Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt A Concourse job to redeploy the Cloud Foundry environment after a CA certificate rotation step. It fetches the current manifest and performs a non-interactive deployment. ```yaml - name: redeploy-after-step-1 plan: - task: redeploy config: platform: linux run: path: bash args: - -c - | bosh -d cf manifest > manifest.yml bosh -d cf --non-interactive deploy manifest.yml ``` -------------------------------- ### Set Cloud Foundry Feature Flags Source: https://context7.com/cloudfoundry/cf-deployment-concourse-tasks/llms.txt Configures the 'set-flags' task to enable or disable specified Cloud Foundry feature flags using the CF CLI. Provide the system domain and lists of enabled/disabled flags. ```yaml jobs: - name: configure-feature-flags plan: - in_parallel: - get: cf-deployment-concourse-tasks - get: bbl-state - task: set-flags file: cf-deployment-concourse-tasks/set-feature-flags/task.yml params: BBL_STATE_DIR: environments/production SYSTEM_DOMAIN: sys.my-cf.example.com ENABLED_FEATURE_FLAGS: "diego_docker service_instance_sharing" DISABLED_FEATURE_FLAGS: "user_org_creation" ``` -------------------------------- ### Pinning Concourse Task Version Source: https://github.com/cloudfoundry/cf-deployment-concourse-tasks/blob/main/README.md Use a tag_filter in your Concourse pipeline resource configuration to lock to a specific major version of the tasks. ```yaml - name: cf-deployment-concourse-tasks type: git source: branch: main uri: https://github.com/cloudfoundry/cf-deployment-concourse-tasks.git tag_filter: v3.* ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.