Closed cwlbraa closed 6 years ago
I definitely see the value in allowing the user to more easily use these two resources together (especially for more than one bosh deployment). I worry about adding an additional method to reconfiguring the deployment
on put
. The workaround to adding this feature could look something like this
- task: update-source-file
config:
platform: linux
image_resource:
type: docker-image
source:
repository: ubuntu
tag: "14.04"
run:
path: /bin/sh
args:
- -c
- |
set -e
cp bbl-state/bdr_source_file source-with-deployment-name
echo "deployment: best-deployment-name" >> source-with-deployment-name/bdr_source_file
dir: ""
outputs:
- name: source-with-deployment-name
path: ""
- put: dynamically-configured-bosh-deployment-resource
params:
source_file: source-with-deployment-name/bdr_source_file
manifest: $CF_DEPLOYMENT/manifest.yml
Happy to hear what others think about these two options 👍
Follow up here after talking with @simonjjones about this some more. An alternative to the two paths above would be to use define a bosh-deployment-resource
per deployment you would like to interact with. In this case you could do something like:
resources:
- type: bosh-deployment-resource
name: cf
source:
deployment: cf
- type: bosh-deployment-resource
name: concourse
source:
deployment: concourse
- type: bbl-state-resource
name: bbl-state
source:
...
- type: pool-resource
name: concourse-pool-of-bosh-directors
source:
...
jobs:
- name: deploy-cf
plan:
- put: bbl-state
params:
command: up
name: fresh-director
- put: cf
params:
source_file: bbl-state/bdr_source_file
manifest: cf/manifest.yml
....
- name: deploy-concourse
plan:
- get: concourse-pool-of-bosh-directors
passed: step-where-we-acquired
- put: concourse
params:
source_file: concourse-pool-of-bosh-directors/metadata
manifest: concourse/manifest.yml
@cwlbraa and friends wdyt?
I'd be happy if the second one is already supported.
Should work as described! Closing the issue, but feel free to reopen it if something you discover along the way makes this less desirable 😄
Following our discussion this morning surrounding https://github.com/cloudfoundry/bosh-deployment-resource/issues/11 and dynamic
get
s, we mostly decided that dynamically configuredget
s for concourse resources are generally not tenable, at least without some external state provider.In light of that, we did a bit of sketching as to what might be missing from the
bosh-deployment-resource
to make interop with apool-resource
andbbl-state-resource
simple.What we realized is that the only deployment-specific field on "source" for
bosh-deployment-resource
is "deployment_name", so if a user could set it in put and have that override source configuration, we could support both of the following configuration shapes with minimal friction.Would this be difficult? We'd be happy to have a run at PR'ing it. @evanfarrar @rowanjacobs