yes, it can be done.
Storage configuration (node1-datastore, node2-datastore, node3-datastore) and information about the resource pools (Pool01, Pool02, Pool03) and AZ (AZ01, AZ02, AZ03)need to be provided to bosh. My cpi.yml (https://github.com/cloudfoundry/bosh-deployment/blob/master/vsphere/cpi.yml) can be found below:
- name: cpi
path: /releases/-
type: replace
value:
name: bosh-vsphere-cpi
sha1: 25c53531bf9efeb86d093c2acded62f638e12f0f
url: https://bosh.io/d/github.com/cloudfoundry/bosh-vsphere-cpi-release?v=54.1.0
version: 54.1.0
- name: stemcell
path: /resource_pools/name=vms/stemcell?
type: replace
value:
sha1: 025432cad0600ee0c05d185bc64b88d250c65de4
url: https://bosh-core-stemcells.s3-accelerate.amazonaws.com/621.85/bosh-stemcell-621.85-vsphere-esxi-ubuntu-xenial-go_agent.tgz
- path: /resource_pools/name=vms/cloud_properties?
type: replace
value:
cpu: 2
disk: 40000
ram: 4096
- path: /networks/name=default/subnets/0/cloud_properties?
type: replace
value:
name: ((network_name))
- path: /instance_groups/name=bosh/jobs/-
type: replace
value:
name: vsphere_cpi
release: bosh-vsphere-cpi
- path: /instance_groups/name=bosh/properties/director/cpi_job?
type: replace
value: vsphere_cpi
- path: /cloud_provider/template?
type: replace
value:
name: vsphere_cpi
release: bosh-vsphere-cpi
- path: /instance_groups/name=bosh/properties/vcenter?
type: replace
value:
address: ((vcenter_ip))
datacenters:
- clusters:
- ((vcenter_cluster)): {}
- AZ01:
resource_pool: Pool01
- AZ02:
resource_pool: Pool02
- AZ03:
resource_pool: Pool03
datastore_pattern: ((vcenter_ds))
disk_path: ((vcenter_disks))
name: ((vcenter_dc))
persistent_datastore_pattern: ((vcenter_ds))
template_folder: ((vcenter_templates))
vm_folder: ((vcenter_vms))
password: ((vcenter_password))
user: ((vcenter_user))
- path: /cloud_provider/properties/vcenter?
type: replace
value:
address: ((vcenter_ip))
datacenters:
- clusters:
- ((vcenter_cluster)): {}
- AZ01:
resource_pool: Pool01
- AZ02:
resource_pool: Pool02
- AZ03:
resource_pool: Pool03
datastore_pattern: ((vcenter_ds))
disk_path: ((vcenter_disks))
name: ((vcenter_dc))
persistent_datastore_pattern: ((vcenter_ds))
template_folder: ((vcenter_templates))
vm_folder: ((vcenter_vms))
password: ((vcenter_password))
user: ((vcenter_user))
where vcenter_ds: node1-datastore|node2-datastore|node3-datastore
bosh cloud-config looks following:
azs:
- cloud_properties:
datacenters:
- clusters:
- AZ01:
resource_pool: Pool01
name: DC
name: z1
- cloud_properties:
datacenters:
- clusters:
- AZ02:
resource_pool: Pool02
name: DC
name: z2
- cloud_properties:
datacenters:
- clusters:
- AZ03:
resource_pool: Pool03
name: DC
name: z3
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…