-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from aliyun/master
[NEW PROVIDER] Support to deploy bosh on Alibaba Cloud
- Loading branch information
Showing
5 changed files
with
203 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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-<regionId>.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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |