diff --git a/base/0-bosh-deployment.yml b/base/0-bosh-deployment.yml index cfe8159f..75535399 100644 --- a/base/0-bosh-deployment.yml +++ b/base/0-bosh-deployment.yml @@ -3,9 +3,9 @@ name: bosh releases: - name: bosh - version: "262.3" - url: https://s3.amazonaws.com/bosh-compiled-release-tarballs/bosh-262.3-ubuntu-trusty-3421.9-20170706-183731-831697577-20170706183736.tgz?versionId=7GmwKfufgb5JwWhJ.cwIWLnejOtm2Hu4 - sha1: 1eae3f06282417e54ebb199656458f9d6c38e2af + version: "263.2.0" + url: https://s3.amazonaws.com/bosh-compiled-release-tarballs/bosh-263.2.0-ubuntu-trusty-3445.7-20170915-052445-759948783-20170915052451.tgz?versionId=3kjVQuRK7JyrnbKEbKhLRi7qyo0wBXZJ + sha1: 37630c636a030454d55703cfdd495d733525353f resource_pools: - name: vms @@ -39,7 +39,6 @@ instance_groups: - {name: director, release: bosh} - {name: health_monitor, release: bosh} resource_pool: vms - persistent_disk_pool: disks networks: - name: default static_ips: [((internal_ip))] @@ -104,7 +103,7 @@ instance_groups: cloud_provider: mbus: https://mbus:((mbus_bootstrap_password))@((internal_ip)):6868 - cert: ((mbus_bootstrap_ssl)) + certificate: ((mbus_bootstrap_ssl)) properties: agent: {mbus: "https://mbus:((mbus_bootstrap_password))@0.0.0.0:6868"} blobstore: {provider: local, path: /var/vcap/micro_bosh/data/cache} diff --git a/base/base.yml b/base/base.yml index 46405ce5..f35c2875 100644 --- a/base/base.yml +++ b/base/base.yml @@ -15,7 +15,6 @@ instance_groups: - (( replace )) - name: (( grab params.bosh_network )) static_ips: [(( grab params.static_ip ))] - persistent_disk_pool: (( grab params.bosh_disk_pool )) vm_type: (( grab params.bosh_vm_type )) meta: @@ -56,11 +55,6 @@ update: update_watch_time: 30000-120000 serial: true -releases: -- name: bosh - url: (( concat "https://bosh.io/d/github.com/cloudfoundry/bosh?v=" releases.bosh.version )) - sha1: 31d2912d4320ce6079c190f2218c6053fd1e920f - stemcells: - alias: default os: (( grab params.stemcell_os )) diff --git a/hooks/subkit b/hooks/subkit index 48cde242..d1d18f73 100755 --- a/hooks/subkit +++ b/hooks/subkit @@ -23,6 +23,7 @@ for kit in $@; do ;; vsphere-cpi) CPI=$kit + CPI_INIT=vsphere-init ;; vcloud-cpi) CPI=$kit diff --git a/kit.yml b/kit.yml index f78710db..f14de812 100644 --- a/kit.yml +++ b/kit.yml @@ -108,6 +108,41 @@ params: param: aws_security_groups type: list + vsphere-cpi: + - ask: What is your vSphere user name? + description: The vSphere user name is used to authenticate BOSH to vSphere services + vault: vsphere:user + - ask: What is your vSphere password? + description: The vSphere password is used to authenticate BOSH to vSphere services + vault: vsphere:password + - ask: What is your vCenter host IP address? + description: The vCenter host address is where you can access all the serviced provided by vSphere + vault: vsphere:address + - ask: What is your vSphere Datacenter Name? + description: Bosh needs the name of vSphere datacenter it is placed to + param: vsphere_datacenter + - ask: What are your vSphere Clusters? + description: Bosh needs the name of at least one vSphere cluster to deploy to? + param: vsphere_clusters + type: list + min_count: 1 + - ask: What are your vSphere Ephemeral Datastores pattern? + description: Bosh uses ephemeral disk for the operating system and swap disk + param: vsphere_ephemeral_datastores + type: list + - ask: What are your vSphere Persistent Datastores pattern? + description: BOSH uses persistent disks to store data that needs to survive redeploy + param: vsphere_persistent_datastores + type: list + + vsphere-init: + - ask: What is your vSphere network name used for the BOSH? + description: Name of your vSphere network that BOSH being deployed to + param: vsphere_network + - ask: What is the vSphere persistent disk type that BOSH will use? + description: Persistent Disk Type for disk pool which will be used by BOSH to store data for successful redeploy + param: vsphere_disk_type + google-cpi: - ask: What are your GCP credentials? description: The json key to authenticate to GCP @@ -198,7 +233,7 @@ params: - ask: What is BOSH's default gateway? description: - This is the default gateway for the subnet that BOSh is deployed on + This is the default gateway for the subnet that BOSH is deployed on example: 10.0.1.1 param: default_gateway diff --git a/subkits/bosh-init/init.yml b/subkits/bosh-init/init.yml index a6d9a8a9..6b1c540c 100644 --- a/subkits/bosh-init/init.yml +++ b/subkits/bosh-init/init.yml @@ -14,6 +14,7 @@ instance_groups: - name: bosh resource_pool: (( grab params.bosh_vm_type )) vm_type: (( prune )) + persistent_disk_pool: (( grab params.bosh_disk_pool )) networks: - name: (( grab params.bosh_network )) @@ -26,7 +27,7 @@ networks: cloud_provider: mbus: (( concat "https://mbus:" meta.mbus_bootstrap_password "@" params.static_ip ":6868" )) - cert: (( vault meta.vault "/ssl/mbus:certificate" )) + certificate: (( vault meta.vault "/ssl/mbus:certificate" )) properties: agent: diff --git a/subkits/vsphere-cpi/params.yml b/subkits/vsphere-cpi/params.yml new file mode 100644 index 00000000..a89f9d11 --- /dev/null +++ b/subkits/vsphere-cpi/params.yml @@ -0,0 +1,7 @@ +--- +params: + vsphere_ephemeral_datastores: (( param "Enter your vSphere ephemeral datastore pattern" )) + vsphere_persistent_datastores: (( param "Enter your vSphere persistent datastore pattern" )) + vsphere_clusters: (( param "Enter your vSphere clusters" )) + vsphere_datacenter: (( param "Enter your vSphere Datacenter Name" )) + diff --git a/subkits/vsphere-cpi/vsphere.yml b/subkits/vsphere-cpi/vsphere.yml new file mode 100644 index 00000000..826bbfa7 --- /dev/null +++ b/subkits/vsphere-cpi/vsphere.yml @@ -0,0 +1,45 @@ +--- +meta: + vm_folder: (( concat params.env "/vms" )) + template_folder: (( concat params.env "/templates" )) + disk_path: (( concat params.env "/disks" )) + + joined_vsphere_ephemeral_datastores: (( join "|" params.vsphere_ephemeral_datastores )) + vsphere_ephemeral_datastores: (( concat "^(" meta.joined_vsphere_ephemeral_datastores ")$" )) + joined_vsphere_persistent_datastores: (( join "|" params.vsphere_persistent_datastores )) + vsphere_persistent_datastores: (( concat "^(" meta.joined_vsphere_persistent_datastores ")$" )) + +instance_groups: +- name: bosh + jobs: + - name: vsphere_cpi + release: bosh-vsphere-cpi + # In cloud config, define a disk_type using name: bosh + persistent_disk_type: bosh + # In cloud config, define a vm_type using name: small + vm_type: small + + properties: + vcenter: + user: (( vault meta.vault "/vsphere:user" )) + password: (( vault meta.vault "/vsphere:password" )) + address: (( vault meta.vault "/vsphere:address" )) + datacenters: + - name: (( grab params.vsphere_datacenter )) + vm_folder: (( grab meta.vm_folder )) + template_folder: (( grab meta.template_folder )) + disk_path: (( grab meta.disk_path )) + datastore_pattern: (( grab meta.vsphere_ephemeral_datastores )) + persistent_datastore_pattern: (( grab meta.vsphere_persistent_datastores )) + clusters: (( grab params.vsphere_clusters )) + + director: + cpi_job: vsphere_cpi + +releases: +- name: bosh-vsphere-cpi + version: 45 + sha1: b5f3c53c800d6c8a9182b263ec239a952f33ba67 + url: https://bosh.io/d/github.com/cloudfoundry-incubator/bosh-vsphere-cpi-release?v=45 + +variables: [] diff --git a/subkits/vsphere-init/init.yml b/subkits/vsphere-init/init.yml new file mode 100644 index 00000000..b533d2d6 --- /dev/null +++ b/subkits/vsphere-init/init.yml @@ -0,0 +1,28 @@ +--- +resource_pools: +- name: (( grab params.bosh_vm_type )) + cloud_properties: + cpu: (( grab params.vsphere_cpu )) + ram: (( grab params.vsphere_ram )) + disk: (( grab params.vsphere_disk )) + stemcell: (( grab meta.latest_stemcells.bosh-vsphere-esxi-ubuntu-trusty-go_agent )) + +networks: +- name: (( grab params.bosh_network )) + subnets: + - (( inline )) + - cloud_properties: + name: (( grab params.vsphere_network )) + +disk_pools: +- name: (( grab params.bosh_disk_pool )) + cloud_properties: + type: (( grab params.vsphere_disk_type )) + +cloud_provider: + template: + name: vsphere_cpi + release: bosh-vsphere-cpi + + properties: + vcenter: (( grab instance_groups.bosh.properties.vcenter )) diff --git a/subkits/vsphere-init/params.yml b/subkits/vsphere-init/params.yml new file mode 100644 index 00000000..52c90fb6 --- /dev/null +++ b/subkits/vsphere-init/params.yml @@ -0,0 +1,8 @@ +--- +params: + vsphere_cpu: 2 + vsphere_ram: 4096 + vsphere_disk: 40960 + + vsphere_network: (( param "Enter the vSphere network name" )) + vsphere_disk_type: (( param "Enthe the vSphere persistent disk type for disk pool" ))