- Given a bosh director
- Create service-accounts for master and worker link and save the name into a var file.
cat <deploymentName.cc>.vars
cfcr_master_service_account_address: bbl-158293-cfcr-master@cf-pcf-kubo.iam.gserviceaccount.com
cfcr_worker_service_account_address: bbl-158293-cfcr-worker@cf-pcf-kubo.iam.gserviceaccount.com
Note: These accounts are different per cfcr deployment (NOT per director)
- Modify the cloud config to include vm extensions, we can do that by using generic config of type cloud
cat vm_extensions.yml
vm_extensions:
- cloud_properties:
service_account: ((cfcr_master_service_account_address))
tags:
- ((cfcr_master_target_pool))
target_pool: ((cfcr_master_target_pool))
name: cfcrWithCC-cfcr-master-cloud-properties
- cloud_properties:
service_account: ((cfcr_worker_service_account_address))
name: cfcrWithCC-cfcr-worker-cloud-properties
bosh int vm_extensions.yml -l <deploymentName.cc.vars > vm_extension_<deploymentName>.yml
bosh update-config --type cloud --name <deploymentName> vm_extensions_<deploymentName>.yml
Basically that file is same content as this link but isolated in a different cloud-config. Finally the config of type cloud should look like that
vm_extensions:
- cloud_properties:
service_account: bbl-158293-cfcr-master@cf-pcf-kubo.iam.gserviceaccount.com #<--created in step 2
tags:
- bbl-158293331-cfcr-tcp-public
target_pool: bbl-158293331-cfcr-tcp-public
name: cfcrWithCC-cfcr-master-cloud-properties #<--- should be unique per deployment
- cloud_properties:
service_account: bbl-158293-cfcr-worker@cf-pcf-kubo.iam.gserviceaccount.com #<--created in step 2
name: cfcrWithCC-cfcr-worker-cloud-properties #<--- should be unique per deployment
- Deploy CFCR
bosh deploy -d cfcrWithCC ${KD}/manifests/cfcr.yml -o ${KD}/manifests/ops-files/rename.yml \
-o ${KD}/manifests/ops-files/iaas/gcp/cloud-provider.yml
-o cfcr-ops.yml -l cfcr.vars
where the cloud-provider.yml should look like
- type: replace
path: /instance_groups/name=master/vm_extensions?/-
value: ((deployment_name))-cfcr-master-cloud-properties
- type: replace
path: /instance_groups/name=worker/vm_extensions?/-
value: ((deployment_name))-cfcr-worker-cloud-properties
<plus the content of kd/manifests/ops-files/iaas/gcp/cloud-provider.yml >