Open drnic opened 7 years ago
One workaround might be to front-load the preparation of dependency releases - to extract releases
from the service instance manifest, and add them to the broker manifest's releases
section. Then the original operator - with their local git + local git credentials - can be responsible and capable of uploading all the releases.
$ si_manifest="$(wget -O- https://raw.githubusercontent.com/cppforlife/zookeeper-release/master/manifests/zookeeper.yml|bosh int - -o $example_dir/fixes.yml)"
$ echo "$(bosh int manifests/broker.yml --path /releases)\n$(bosh int <(echo "$si_manifest") --path /releases)"
- name: bosh-generic-sb
version: latest
- name: bpm
url: git+https://github.com/cloudfoundry-incubator/bpm-release
version: 0.1.0
- name: zookeeper
sha1: a863ef216ea75d22950703a3c924959cb20e59ba
url: https://bosh.io/d/github.com/cppforlife/zookeeper-release?v=0.0.7
version: 0.0.7
The following works for zookeeper:
function indent() {
c='s/^/ /'
case $(uname) in
Darwin) sed -l "$c";;
*) sed -u "$c";;
esac
}
si_manifest="$(wget -O- https://raw.githubusercontent.com/cppforlife/zookeeper-release/master/manifests/zookeeper.yml|bosh int - -o $example_dir/fixes.yml)"
releases="$(echo "$(bosh int manifests/broker.yml --path /releases)
$(bosh int <(echo "$si_manifest") --path /releases)")"
cat > $example_dir/releases.yml <<YAML
---
- type: replace
path: /releases
value:
$(echo "$releases" | indent)
YAML
echo "-----> `date`: Deploy"
( set -e
bosh -n -d zookeeper-broker deploy ./manifests/broker.yml \
-o ./manifests/dev.yml \
-o $example_dir/releases.yml \
...
--var-file si_manifest=<(echo "$si_manifest"|base64) \
...
Running zookeeper run.sh, the "create service instances" section failed: