diff --git a/README.md b/README.md index 7f218a727..ec54bca9c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ * [Create an environment](https://bosh.io/docs/init.html) * [On Local machine (BOSH Lite)](https://bosh.io/docs/bosh-lite.html) + * [On Alibaba Cloud](https://bosh.io/docs/init-alicloud.html) * [On AWS](https://bosh.io/docs/init-aws.html) * [On Azure](https://bosh.io/docs/init-azure.html) * [On OpenStack](https://bosh.io/docs/init-openstack.html) @@ -29,8 +30,8 @@ ## Ops files - `bosh.yml`: Base manifest that is meant to be used with different CPI configurations -- `[aws|azure|docker|gcp|openstack|softlayer|vcloud|vsphere|virtualbox]/cpi.yml`: CPI configuration -- `[aws|azure|docker|gcp|openstack|softlayer|vcloud|vsphere|virtualbox]/cloud-config.yml`: Simple cloud configs +- `[alicloud|aws|azure|docker|gcp|openstack|softlayer|vcloud|vsphere|virtualbox]/cpi.yml`: CPI configuration +- `[alicloud|aws|azure|docker|gcp|openstack|softlayer|vcloud|vsphere|virtualbox]/cloud-config.yml`: Simple cloud configs - `jumpbox-user.yml`: Adds user `jumpbox` for SSH-ing into the Director (see [Jumpbox User](docs/jumpbox-user.md)) - `uaa.yml`: Deploys UAA and enables UAA user management in the Director - `credhub.yml`: Deploys CredHub and enables CredHub integration in the Director diff --git a/alicloud/cloud-config.yml b/alicloud/cloud-config.yml new file mode 100644 index 000000000..0357ac707 --- /dev/null +++ b/alicloud/cloud-config.yml @@ -0,0 +1,50 @@ +azs: +- name: z1 + cloud_properties: + availability_zone: ((zone)) +- name: z2 + cloud_properties: + availability_zone: ((zone)) +- name: z3 + cloud_properties: + availability_zone: ((zone)) + +vm_types: +- name: default + cloud_properties: + instance_type: ecs.sn1ne.large + ephemeral_disk: {size: 30_720} +- name: large + cloud_properties: + instance_type: ecs.sn1ne.xlarge + ephemeral_disk: {size: 51_200} + + +disk_types: +- name: default + disk_size: 20_480 +- name: large + disk_size: 51_200 + +networks: +- name: default + type: manual + subnets: + - range: ((internal_cidr)) + gateway: ((internal_gw)) + azs: [z1, z2, z3] + dns: [8.8.8.8] + reserved: [((internal_gw))/30] + cloud_properties: + vswitch_id: ((vswitch_id)) + security_group_ids: + - ((security_group_id)) +- name: vip + type: vip + +compilation: + workers: 5 + reuse_compilation_vms: true + az: z1 + vm_type: default + network: default diff --git a/alicloud/cpi.yml b/alicloud/cpi.yml new file mode 100644 index 000000000..bcf758755 --- /dev/null +++ b/alicloud/cpi.yml @@ -0,0 +1,124 @@ +--- +# CPI +- type: replace + path: /releases/- + value: + name: bosh-alicloud-cpi + version: 24.0.0 + url: https://github.com/cloudfoundry-incubator/bosh-alicloud-cpi-release/releases/download/v24.0.0/bosh-alicloud-cpi-release-24.0.0.tgz + sha1: 9ea843cc34ccf61d0c6809c9f6cdfd7da29bc7f1 + +# light stemcell +- type: replace + path: /resource_pools/name=vms/stemcell? + value: + url: https://bosh-alicloud-light-stemcells-eu.oss-eu-central-1.aliyuncs.com/light-bosh-stemcell-456.1-alicloud-kvm-ubuntu-xenial-go_agent.tgz + sha1: 43c227164ec9f5016b434fa2008c1448d25d2f01 + +# Configure ECS sizes +- type: replace + path: /resource_pools/name=vms/cloud_properties? + value: + availability_zone: ((zone)) + instance_type: "ecs.mn4.small" + instance_name: "bosh-director" + ephemeral_disk: {size: "51_200", category: "cloud_efficiency"} + system_disk: {size: "51_200", category: "cloud_efficiency"} + key_pair_name: ((key_pair_name)) + +- type: replace + path: /disk_pools/name=disks/cloud_properties? + value: + type: "cloud_efficiency" + instance_role: "director" + +- type: replace + path: /networks/name=default/subnets/0/cloud_properties? + value: + vswitch_id: ((vswitch_id)) + security_group_ids: [((security_group_id))] + internet_charge_type: "PayByTraffic" + +# Enable registry job +- type: replace + path: /instance_groups/name=bosh/jobs/- + value: + name: registry + release: bosh + +- type: replace + path: /instance_groups/name=bosh/properties/registry? + value: + address: ((internal_ip)) + host: ((internal_ip)) + db: # todo remove + host: 127.0.0.1 + user: postgres + password: ((postgres_password)) + database: bosh + adapter: postgres + http: + user: registry + password: ((registry_password)) + port: 25777 + username: registry + password: ((registry_password)) + port: 25777 + +# Add CPI job +- type: replace + path: /instance_groups/name=bosh/jobs/- + value: &cpi_job + name: alicloud_cpi + release: bosh-alicloud-cpi + +- type: replace + path: /instance_groups/name=bosh/properties/director/cpi_job? + value: alicloud_cpi + +- type: replace + path: /cloud_provider/template? + value: *cpi_job + +- type: replace + path: /instance_groups/name=bosh/properties/alicloud? + value: &alicloud + region: ((region)) + availability_zone: ((zone)) + access_key_id: ((access_key_id)) + access_key_secret: ((access_key_secret)) + +- type: replace + path: /cloud_provider/properties/alicloud? + value: *alicloud + +- type: replace + path: /cloud_provider/ssh_tunnel? + value: + host: ((internal_ip)) + port: 22 + user: vcap + private_key: ((private_key)) + +- type: replace + path: /variables/- + value: + name: registry_password + type: password + +# Replace ntp to China timezone +- type: replace + path: /instance_groups/name=bosh/properties/ntp? + value: &ntp + - server 0.cn.pool.ntp.org + - server 1.cn.pool.ntp.org + - server 2.cn.pool.ntp.org + - server 3.cn.pool.ntp.org + +- type: replace + path: /cloud_provider/properties/ntp? + value: &ntp + - server 0.cn.pool.ntp.org + - server 1.cn.pool.ntp.org + - server 2.cn.pool.ntp.org + - server 3.cn.pool.ntp.org \ No newline at end of file diff --git a/alicloud/oss-blobstore.yml b/alicloud/oss-blobstore.yml new file mode 100644 index 000000000..2d4ad2862 --- /dev/null +++ b/alicloud/oss-blobstore.yml @@ -0,0 +1,20 @@ +--- + +# Using Alibaba Cloud OSS Service as Bosh blobstore + +# Note: If you want to apply the current oss bucket for other blobstores, +# you can specify 'bucket_name' to oss bucket and its one directory, like "((bucket_name))/bosh-blobs", and then the directory "bosh-blobs" will store all of bosh blobs. +# +# 'host' is oss bucket endpoint, and its format is 'oss-.aliyuncs.com', like oss-cn-hangzhou.aliyuncs.com. + +- type: remove + path: /instance_groups/name=bosh/jobs/name=blobstore + +- type: replace + path: /instance_groups/name=bosh/properties/blobstore? + value: + provider: s3 + bucket_name: ((oss-bucket-name)) + host: ((oss-host)) + access_key_id: ((oss-access-key-id)) + secret_access_key: ((oss-access-key-secret)) \ No newline at end of file diff --git a/alicloud/releases-in-china.yml b/alicloud/releases-in-china.yml new file mode 100644 index 000000000..2d787bf04 --- /dev/null +++ b/alicloud/releases-in-china.yml @@ -0,0 +1,6 @@ +--- + +# CPI +- type: replace + path: /releases/name=bosh-alicloud-cpi/url? + value: https://bosh.oss-cn-hangzhou.aliyuncs.com/bosh-alicloud-cpi-release-24.0.0.tgz