### Get Deployment Information Source: https://context7.com/cloudfoundry/bosh-deployment-resource/llms.txt Download current manifest files or export compiled releases for use in other pipelines. ```yaml jobs: - name: export-deployment plan: # Basic get - downloads manifest.yml and target file - get: my-deployment trigger: true - name: export-compiled-releases plan: # Get with compiled release export - get: my-deployment params: compiled_releases: - name: my-app-release - name: routing-release jobs: - gorouter - route_registrar ``` -------------------------------- ### Configure GCS Vars Store Source: https://github.com/cloudfoundry/bosh-deployment-resource/blob/master/README.md Example configuration for a persisted variables store using Google Cloud Storage. ```yaml provider: gcs config: bucket: my-bucket file_name: path/to/vars-store.yml json_key: "{\"type\": \"service_account\"}" ``` -------------------------------- ### Download Compiled Releases Source: https://github.com/cloudfoundry/bosh-deployment-resource/blob/master/README.md Parameters for the get operation to fetch specific compiled releases and jobs. ```yaml - get: staging params: compiled_releases: - name: release-one - name: release-two jobs: - job-one - job-two ``` -------------------------------- ### Sample Dynamic Source File Source: https://github.com/cloudfoundry/bosh-deployment-resource/blob/master/README.md JSON structure for a dynamic source configuration file. ```json { "target": "dynamic-director.example.com", "client_secret": "generated-secret", "vars_store": { "config": { "bucket": "my-bucket" } } } ``` -------------------------------- ### Deploy with Advanced Options Source: https://context7.com/cloudfoundry/bosh-deployment-resource/llms.txt Configure deployment behavior such as dry-run mode, VM recreation, and parallel operation limits. ```yaml jobs: - name: deploy-with-options plan: - get: deployment-repo - put: my-deployment params: manifest: deployment-repo/manifests/app.yml # Show deployment diff without applying changes dry_run: false # Recreate all VMs in deployment recreate: false # Fix VMs with unresponsive agents fix: true # Maximum concurrent VM operations max_in_flight: 5 # Skip drain scripts for specific instance groups skip_drain: - worker - router # Run bosh cleanup after deployment cleanup: true # Show unredacted output (exposes secrets) no_redact: false ``` -------------------------------- ### Deploy with Variables and Ops Files Source: https://context7.com/cloudfoundry/bosh-deployment-resource/llms.txt Use variable interpolation and ops files to maintain environment-specific configurations from a single base manifest. ```yaml jobs: - name: deploy-staging plan: - get: deployment-repo - put: staging-deployment params: manifest: deployment-repo/manifests/base.yml # Inline variables vars: environment: staging instances: 2 enable_ssl: true domains: - staging.example.com - staging-api.example.com smtp: server: smtp.example.com port: 587 username: notifications # Variables from files (interpolated into manifest) vars_files: - deployment-repo/vars/staging.yml - deployment-repo/vars/common.yml # Individual variable values from file contents var_files: admin_password: secrets/admin-password.txt ssl_certificate: certs/staging.crt ssl_private_key: certs/staging.key # Ops files for manifest transformations ops_files: - deployment-repo/ops/scale-for-staging.yml - deployment-repo/ops/add-monitoring.yml - deployment-repo/ops/configure-logging.yml ``` -------------------------------- ### Dynamic Source Configuration Source: https://context7.com/cloudfoundry/bosh-deployment-resource/llms.txt Configure BOSH director targets at runtime using a source file, useful for ephemeral director environments. ```yaml jobs: - name: deploy-to-dynamic-director plan: - get: bosh-lite-pool trigger: true - get: deployment-repo - put: dynamic-deployment params: # Source file overrides/merges with resource source config source_file: bosh-lite-pool/metadata manifest: deployment-repo/manifests/app.yml releases: - deployment-repo/releases/*.tgz ``` ```json { "target": "https://10.0.0.6:25555", "client": "admin", "client_secret": "dynamic-password-123", "ca_cert": "-----BEGIN CERTIFICATE-----\nMIID...\n-----END CERTIFICATE-----", "vars_store": { "provider": "gcs", "config": { "bucket": "ephemeral-directors", "file_name": "director-abc123/vars.yml" } } } ``` -------------------------------- ### Perform Dynamic Put Operation Source: https://github.com/cloudfoundry/bosh-deployment-resource/blob/master/README.md Use a source file to define deployment parameters at runtime. ```yaml - put: staging params: source_file: path/to/sourcefile ``` -------------------------------- ### Deploy BOSH Manifest Source: https://github.com/cloudfoundry/bosh-deployment-resource/blob/master/README.md Use this snippet to deploy a BOSH manifest. Specify paths to the manifest, stemcells, and releases. Variables can be provided directly or via vars files. ```yaml - put: staging params: manifest: path/to/manifest.yml stemcells: - path/to/stemcells-* releases: - path/to/releases-* vars: enable_ssl: true domains: ["example.com", "example.net"] smtp: server: example.com port: 25 ``` -------------------------------- ### Configure BOSH Deployment Resource Source Source: https://context7.com/cloudfoundry/bosh-deployment-resource/llms.txt Define the connection details, authentication, and optional jumpbox settings for the BOSH director. ```yaml resources: - name: my-deployment type: bosh-deployment source: # Required: Name of the deployment to manage deployment: my-app-deployment # Required: BOSH director address target: https://bosh.example.com:25555 # Required: UAA client ID or username client: admin # Required: UAA client secret or password client_secret: ((bosh-admin-password)) # Optional: CA certificate for SSL validation ca_cert: | -----BEGIN CERTIFICATE----- MIIDtzCCAp+gAwIBAgIJAMZ/... -----END CERTIFICATE----- # Optional: Jumpbox configuration for tunneled access jumpbox_url: 10.0.0.5:22 jumpbox_ssh_key: ((jumpbox-ssh-key)) jumpbox_username: jumpbox # Optional: Skip check for dynamic configurations skip_check: false ``` -------------------------------- ### Configure GCS Variables Store Source: https://context7.com/cloudfoundry/bosh-deployment-resource/llms.txt Set up a Google Cloud Storage backend to persist credentials and variables across deployment runs. ```yaml resources: - name: production-deployment type: bosh-deployment source: deployment: production target: https://bosh.production.example.com:25555 client: ci-deployer client_secret: ((bosh-ci-secret)) ca_cert: ((bosh-ca-cert)) vars_store: provider: gcs config: bucket: my-credentials-bucket file_name: deployments/production/vars-store.yml json_key: | { "type": "service_account", "project_id": "my-project", "private_key_id": "abc123...", "private_key": "-----BEGIN PRIVATE KEY-----\n...", "client_email": "bosh-deployer@my-project.iam.gserviceaccount.com", "client_id": "123456789", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token" } ``` -------------------------------- ### Deploy Releases and Stemcells in Pipeline Source: https://context7.com/cloudfoundry/bosh-deployment-resource/llms.txt Use the put operation to deploy a manifest while providing local release and stemcell artifacts. ```yaml jobs: - name: deploy-app plan: - get: app-release trigger: true - get: stemcell - get: deployment-repo - put: my-deployment params: # Required: Path to deployment manifest manifest: deployment-repo/manifests/app.yml # Optional: Glob patterns for release tarballs releases: - app-release/*.tgz - deployment-repo/releases/*.tgz # Optional: Glob patterns for stemcell tarballs stemcells: - stemcell/*.tgz ``` -------------------------------- ### Deploy with BOSH.io Stemcells Source: https://context7.com/cloudfoundry/bosh-deployment-resource/llms.txt Automatically fetch stemcells from bosh.io by specifying the stemcell type, removing the need for manual artifact management. ```yaml jobs: - name: deploy-with-boshio-stemcells plan: - get: deployment-repo - get: app-release - put: my-deployment params: manifest: deployment-repo/manifests/app.yml releases: - app-release/*.tgz # Download stemcells from bosh.io automatically # Options: "regular" or "light" bosh_io_stemcell_type: light ``` -------------------------------- ### Define BOSH Deployment Resource Source: https://github.com/cloudfoundry/bosh-deployment-resource/blob/master/README.md Standard resource definition including authentication and target details. ```yaml - name: staging type: bosh-deployment source: deployment: staging-deployment-name target: https://bosh.example.com:25555 client: admin client_secret: admin ca_cert: "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----" ``` -------------------------------- ### Declare BOSH Deployment Resource Type Source: https://github.com/cloudfoundry/bosh-deployment-resource/blob/master/README.md Include this in the resource_types section of your pipeline configuration. ```yaml resource_types: - name: bosh-deployment type: docker-image source: repository: cloudfoundry/bosh-deployment-resource ``` -------------------------------- ### Configure BOSH Deployment Pipeline Source: https://context7.com/cloudfoundry/bosh-deployment-resource/llms.txt Defines a complete Concourse pipeline with staging and production deployment jobs, including resource types and job-specific parameters. ```yaml resource_types: - name: bosh-deployment type: docker-image source: repository: cloudfoundry/bosh-deployment-resource resources: - name: app-repo type: git source: uri: https://github.com/myorg/my-app branch: main - name: app-release type: github-release source: owner: myorg repository: my-app-release access_token: ((github-token)) - name: stemcell type: bosh-io-stemcell source: name: bosh-google-kvm-ubuntu-jammy-go_agent - name: staging-deployment type: bosh-deployment source: deployment: my-app-staging target: https://bosh.staging.example.com:25555 client: ((staging-bosh-client)) client_secret: ((staging-bosh-secret)) ca_cert: ((staging-bosh-ca)) - name: production-deployment type: bosh-deployment source: deployment: my-app-production target: https://bosh.prod.example.com:25555 client: ((prod-bosh-client)) client_secret: ((prod-bosh-secret)) ca_cert: ((prod-bosh-ca)) jumpbox_url: ((prod-jumpbox-url)) jumpbox_ssh_key: ((prod-jumpbox-key)) jobs: - name: deploy-staging serial: true plan: - in_parallel: - get: app-repo trigger: true - get: app-release trigger: true - get: stemcell - put: staging-deployment params: manifest: app-repo/manifests/app.yml vars_files: - app-repo/vars/staging.yml ops_files: - app-repo/ops/staging-scale.yml releases: - app-release/my-app-*.tgz stemcells: - stemcell/*.tgz cleanup: true - name: deploy-production serial: true plan: - in_parallel: - get: app-repo passed: [deploy-staging] - get: app-release passed: [deploy-staging] - get: stemcell passed: [deploy-staging] - put: production-deployment params: manifest: app-repo/manifests/app.yml vars_files: - app-repo/vars/production.yml ops_files: - app-repo/ops/production-scale.yml - app-repo/ops/enable-ha.yml releases: - app-release/my-app-*.tgz stemcells: - stemcell/*.tgz max_in_flight: 3 cleanup: true ``` -------------------------------- ### Delete Deployment Source: https://context7.com/cloudfoundry/bosh-deployment-resource/llms.txt Remove a BOSH deployment, with an optional force flag to ignore errors during cleanup. ```yaml jobs: - name: teardown-environment plan: - put: my-deployment params: delete: enabled: true force: false # Set to true to ignore deletion errors # Example with force delete for cleanup jobs - name: force-cleanup plan: - put: my-deployment params: delete: enabled: true force: true ``` -------------------------------- ### Delete BOSH Deployment Source: https://github.com/cloudfoundry/bosh-deployment-resource/blob/master/README.md Use this snippet to delete a BOSH deployment. Set `enabled` to true. The `force` option can be used to ignore errors during deletion. ```yaml - put: staging params: delete: enabled: true force: true ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.