{"user":"cfcommunity","name":"bosh-config-resource","namespace":"cfcommunity","repository_type":"image","status":1,"status_description":"active","description":"Concourse resource for bosh cloud/runtime config","is_private":false,"is_automated":false,"star_count":0,"pull_count":24702984,"last_updated":"2025-03-16T16:59:56.60192Z","last_modified":"2025-03-16T16:59:54.441973Z","date_registered":"2017-05-04T14:55:43.721881Z","collaborator_count":0,"affiliation":null,"hub_user":"cfcommunity","has_starred":false,"full_description":"[![Docker Stars](https://img.shields.io/docker/stars/cfcommunity/bosh-config-resource.svg?style=plastic)](https://registry.hub.docker.com/v2/repositories/cfcommunity/bosh-config-resource/stars/count/)\n[![Docker pulls](https://img.shields.io/docker/pulls/cfcommunity/bosh-config-resource.svg?style=plastic)](https://registry.hub.docker.com/v2/repositories/cfcommunity/bosh-config-resource)\n\u003c!--\n[![Concourse Build](https://ci.gstack.io/api/v1/teams/gk-plat-devs/pipelines/slack-notification-resource/jobs/build/badge)](https://ci.gstack.io/teams/gk-plat-devs/pipelines/slack-notification-resource)\n--\u003e\n[![dockeri.co](https://dockeri.co/image/cfcommunity/bosh-config-resource)](https://hub.docker.com/r/cfcommunity/bosh-config-resource/)\n\n# BOSH Config Resource\n\nA resource that will allow updating cloud and runtime configs on a live Bosh\nserver, using the [Bosh CLI v2][cli_v2].\n\n[cli_v2]: https://bosh.io/docs/cli-v2/\n\n\n## Adding to your pipeline\n\nTo use the BOSH Config Resource, you must declare it in your pipeline as a\nresource type:\n\n```yaml\nresource_types:\n- name: bosh-config\n  type: registry-image\n  source:\n    repository: cfcommunity/bosh-config-resource\n```\n\n\n## Source Configuration\n\n* `target`: *Optional.* The address of the BOSH director which will be used for\n  the config. If omitted, `source_file` must be specified via out parameters, as\n  documented below.\n* `client`: *Required.* The username or UAA client ID for the BOSH director.\n* `client_secret`: *Required.* The password or UAA client secret for the BOSH\n  director.\n* `ca_cert`: *Optional.* CA certificate used to validate SSL connections to\n  Director and UAA. If omitted, the director's certificate must be already\n  trusted.\n* `config`: *Required.* Type of config to update.\n* `name`: *Optional.* Property for named-configs. Illegal when `all` is `true`.\n  If omitted when `all` is `false`, it will default to `default`, which is the\n  usual name of default BOSH configs.\n* `all`: *Optional.* Set to `true` when in need for `check` to watch at changes\n  on _all_ configs of the type spcified with `config`. Defaults to `false`.\n* `includes`: *Optional.* An allow-list of config names. When `all` is set to\n  `true`, an array of config names to include. If not empty, any config name\n  that is not in this array is not considered. Globbing _à la Bash_ is supported.\n* `excludes`: *Optional.* A deny-list list of config names. When `all` is set to\n  `true`, an array of config names to exclude. Any config name that is in this\n  array is not considered. This takes precedence over anything listed in the\n  `includes` array. Globbing _à la Bash_ is supported.\n\n### Example\n\nIn this first example, the cloud config named `my-named-config` is watched at\n(by `check` steps), fetched (by `get` steps) or updated (by `put` steps).\n\n```yaml\n- name: staging\n  type: bosh-config\n  source:\n    target: https://bosh.example.com:25555\n    client: admin\n    client_secret: admin\n    ca_cert: \"-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\"\n    config: cloud\n    name: my-named-config\n```\n\nIn the second example below, all could configs which name matches the\n`*-network` Bash-globbing pattern will be watched at (by `check` steps),\nfetched (by `get` steps) or updated (by `put` steps).\n\n```yaml\n- name: network-configs\n  type: bosh-config\n  source:\n    target: https://bosh.example.com:25555\n    client: admin\n    client_secret: admin\n    ca_cert: \"-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\"\n    config: cloud\n    all: true\n    includes:\n      - \"*-network\"\n```\n\n### Dynamic Source Configuration\n\nSometimes source configuration cannot be known ahead of time, such as when a BOSH director is created as part of your\npipeline. In these scenarios, it is helpful to be able to have a dynamic source configuration. In addition to the\nnormal parameters for `put`, the following parameters can be provided to redefine the source:\n\n* `source_file`: *Optional.* Path to a file containing a YAML or JSON source\n  config. This allows the target to be determined at runtime, e.g. by acquiring\n  a BOSH lite instance using the\n  [Pool resource](https://github.com/concourse/pool-resource). The content of\n  the `source_file` should have the same structure as the source configuration\n  for the resource itself. The `source_file` will be merged into the exist\n  source configuration.\n\n_Notes_:\n - `target` must **ONLY** be configured via the `source_file` otherwise the implicit `get` will fail after the `put`.\n - This is only supported for a `put`.\n\n\n## Behaviour\n\n### `check` Step (`check` script): Check for any change on one or many configs\n\nThis will generate a version based on the SHA-1 fingerprint of the specified\nconfig (if `all` is unspecified or `false`), or the set of matching configs\n(if `all` is `true`).\n\n### `get` Step (`in` script): Download most recent config from BOSH director\n\nThis will download the config manifest. It will place two files in the target directory:\n\n- When `source.all` is `false`\n  - `{cloud,runtime}-config.yml`: The config manifest\n  - `version`: The sha1 of the config manifest\n- When `source.all` is `true`\n  - `\u003cname\u003e-{cloud,runtime}-config.yml`: The config manifest named `\u003cname\u003e`\n  - `version`: The sha1 of the concatenated config manifests\n\n_Note_: Only the most recent version of configs is fetchable\n\n### `put` Step (`out` script): Update config on BOSH director\n\nThis will upload any given releases, and update the config(s) with the specified\nmanifest(s).\n\nWhen `source.all` is `false` the config with the type defined in `source.config`\nand name defined by `source.name` is updated. Any `params.ops_files` are\napplied, and any `params.vars` are interpolated.\n\nWhen `source.all` is `true`, then the configs defined in `params.manifests`,\nwith given name (key) and manifest file (value), are updated. Theses must all be\nof the type defined in `source.config`. The `params.ops_files` and `params.vars`\ndo apply to _all_ of them. `source.includes` and `source.excludes` apply to the\nnames defined in the keys of the `params.manifests` dictionary.\n\n#### Parameters\n\n* `manifest`: *Required when `all` is `false`.* Path to a BOSH config manifest\n  file.\n* `manifests`: *Required when `all` is `true`.* Dictionary of config names\n  (keys) and paths to their respective manifest files (values).\n* `ops_files`: *Optional.* Array of paths to ops files to apply.\n* `vars`: *Optional.* Dictionary of variables to apply.\n* `releases`: *Optional.* Array of paths to bosh releases to upload.\n* `source_file`: *Optional.* Path to a file containing a BOSH director address.\n  This allows the target to be determined at runtime, e.g. by acquiring a BOSH\n  lite instance using the\n  [Pool resource](https://github.com/concourse/pool-resource).\n  If both `source_file` and `target` are specified, `source_file` takes\n  precedence.\n\n``` yaml\n# Update config\n- put: staging\n  params:\n    manifest: path/to/config-manifest.yml\n    ops_files:\n      - path/to/ops-file.yml\n      - path/to/another-ops-file.yml\n    releases:\n      - path/to/first/release\n      - path/to/second/release\n    vars:\n      key: value\n      foo: bar\n```\n\n\n## Authors and License\n\nCopyright © 2017-2020, Gwen Ivett, Geoff Franks, Ruben Koster, Konstantin\nTroshin, Konstantin Kiess, Andrei Krasnitski, Daniel Jones\n\nCopyright © 2022-present, Benjamin Gandon, Gstack\n\nLike Concourse, the BOSH config resource is released under the terms of the\n[Apache 2.0 license](LICENSE.txt).\n\n\u003c!--\n# Local Variables:\n# indent-tabs-mode: nil\n# End:\n--\u003e","permissions":{"read":true,"write":false,"admin":false},"media_types":["application/vnd.docker.container.image.v1+json"],"content_types":["image"],"categories":[],"immutable_tags_settings":{"enabled":false,"rules":[".*"]},"storage_size":590076383,"source":null}