Skip to content

Instantly share code, notes, and snippets.

@knm3000
Last active November 3, 2016 14:08
Show Gist options
  • Save knm3000/6a060f4397f9387383eab75357c1cce5 to your computer and use it in GitHub Desktop.
Save knm3000/6a060f4397f9387383eab75357c1cce5 to your computer and use it in GitHub Desktop.
Cloud Foundry Diego deployment on POWER platform

Deploying Cloud Foundry Diego to the POWER platform

Download the following bosh releases for POWER

Release name Download link
diego ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/diego-0.1487.0.tgz
etcd ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/etcd-78.tgz
garden-linux ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/garden-linux-0.342.0.tgz
cf release ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/cf-release-240-ppc64le.tar.gz
cflinuxfs2-rootfs ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/cflinuxfs2-rootfs-1.37.0.tgz

(optional) Steps for building these releases from source

https://gist.github.com/knm3000/8f08bc1845a49bbbe29931e61581c6c7

Upload these 5 releases for the deployment (example for diego release)

$ bosh upload release diego-0.1485.0.tgz
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Acting as user 'admin' on 'my-bosh'

Verifying manifest...
Extract manifest                                             OK
Manifest exists                                              OK
Release name/version                                         OK

File exists and readable                                     OK
Read package 'rep_windows' (1 of 21)                         OK
Package 'rep_windows' checksum                               OK
Read package 'bbs' (2 of 21)                                 OK
Package 'bbs' checksum                                       OK
Read package 'route_emitter' (3 of 21)                       OK
Package 'route_emitter' checksum                             OK
Read package 'windows_app_lifecycle' (4 of 21)               OK
Package 'windows_app_lifecycle' checksum                     OK
Read package 'healthcheck' (5 of 21)                         OK
Package 'healthcheck' checksum                               OK
Read package 'docker' (6 of 21)                              OK
Package 'docker' checksum                                    OK
Read package 'golang-windows' (7 of 21)                      OK
Package 'golang-windows' checksum                            OK
Read package 'canary' (8 of 21)                              OK
Package 'canary' checksum                                    OK
Read package 'file_server' (9 of 21)                         OK
Package 'file_server' checksum                               OK
Read package 'auctioneer' (10 of 21)                         OK
Package 'auctioneer' checksum                                OK
Read package 'cfdot' (11 of 21)                              OK
Package 'cfdot' checksum                                     OK
Read package 'benchmark-bbs' (12 of 21)                      OK
Package 'benchmark-bbs' checksum                             OK
Read package 'golang' (13 of 21)                             OK
Package 'golang' checksum                                    OK
Read package 'pid_utils' (14 of 21)                          OK
Package 'pid_utils' checksum                                 OK
Read package 'ssh_proxy' (15 of 21)                          OK
Package 'ssh_proxy' checksum                                 OK
Read package 'cf-cli' (16 of 21)                             OK
Package 'cf-cli' checksum                                    OK
Read package 'vizzini' (17 of 21)                            OK
Package 'vizzini' checksum                                   OK
Read package 'buildpack_app_lifecycle' (18 of 21)            OK
Package 'buildpack_app_lifecycle' checksum                   OK
Read package 'rep' (19 of 21)                                OK
Package 'rep' checksum                                       OK
Read package 'diego-sshd' (20 of 21)                         OK
Package 'diego-sshd' checksum                                OK
Read package 'docker_app_lifecycle' (21 of 21)               OK
Package 'docker_app_lifecycle' checksum                      OK
Package dependencies                                         OK
Checking jobs format                                         OK
Read job 'rep_windows' (1 of 11), version 350f93c388b4ff0e73b72e6c9d5a45dc3564ce84 OK
Job 'rep_windows' checksum                                   OK
Extract job 'rep_windows'                                    OK
Read job 'rep_windows' manifest                              OK
Check template 'drain.ps1.erb' for 'rep_windows'             OK
Check template 'start.ps1.erb' for 'rep_windows'             OK
Check template 'bbs_ca.crt.erb' for 'rep_windows'            OK
Check template 'trusted_certs.crt.erb' for 'rep_windows'     OK
Check template 'bbs_client.crt.erb' for 'rep_windows'        OK
Check template 'bbs_client.key.erb' for 'rep_windows'        OK
Job 'rep_windows' needs 'rep_windows' package                OK
Monit file for 'rep_windows'                                 OK
Read job 'bbs' (2 of 11), version 13f5592a98f986cebf441292bc07c31281651508 OK
Job 'bbs' checksum                                           OK
Extract job 'bbs'                                            OK
Read job 'bbs' manifest                                      OK
Check template 'bbs_ctl.erb' for 'bbs'                       OK
Check template 'bbs_as_vcap.erb' for 'bbs'                   OK
Check template 'etcd_ca.crt.erb' for 'bbs'                   OK
Check template 'etcd_client.crt.erb' for 'bbs'               OK
Check template 'etcd_client.key.erb' for 'bbs'               OK
Check template 'bbs_ca.crt.erb' for 'bbs'                    OK
Check template 'bbs_server.crt.erb' for 'bbs'                OK
Check template 'bbs_server.key.erb' for 'bbs'                OK
Check template 'sql_ca.crt.erb' for 'bbs'                    OK
Check template 'post-start.erb' for 'bbs'                    OK
Job 'bbs' needs 'pid_utils' package                          OK
Job 'bbs' needs 'bbs' package                                OK
Monit file for 'bbs'                                         OK
Read job 'route_emitter' (3 of 11), version 3c4dd9ad2ddeaa4d98220884257e8b36d5181166 OK
Job 'route_emitter' checksum                                 OK
Extract job 'route_emitter'                                  OK
Read job 'route_emitter' manifest                            OK
Check template 'route_emitter_ctl.erb' for 'route_emitter'   OK
Check template 'route_emitter_as_vcap.erb' for 'route_emitter' OK
Check template 'bbs_ca.crt.erb' for 'route_emitter'          OK
Check template 'bbs_client.crt.erb' for 'route_emitter'      OK
Check template 'bbs_client.key.erb' for 'route_emitter'      OK
Job 'route_emitter' needs 'pid_utils' package                OK
Job 'route_emitter' needs 'route_emitter' package            OK
Monit file for 'route_emitter'                               OK
Read job 'canary' (4 of 11), version 0bef926471fa854e5521497eec77bd7f0774b845 OK
Job 'canary' checksum                                        OK
Extract job 'canary'                                         OK
Read job 'canary' manifest                                   OK
Check template 'run.erb' for 'canary'                        OK
Job 'canary' needs 'cf-cli' package                          OK
Job 'canary' needs 'canary' package                          OK
Monit file for 'canary'                                      OK
Read job 'file_server' (5 of 11), version f8d7d9137cbc93adb470ac3ac02bc77bb0682f52 OK
Job 'file_server' checksum                                   OK
Extract job 'file_server'                                    OK
Read job 'file_server' manifest                              OK
Check template 'file_server_ctl.erb' for 'file_server'       OK
Check template 'file_server_as_vcap.erb' for 'file_server'   OK
Job 'file_server' needs 'pid_utils' package                  OK
Job 'file_server' needs 'file_server' package                OK
Job 'file_server' needs 'buildpack_app_lifecycle' package    OK
Job 'file_server' needs 'docker_app_lifecycle' package       OK
Job 'file_server' needs 'windows_app_lifecycle' package      OK
Monit file for 'file_server'                                 OK
Read job 'auctioneer' (6 of 11), version 550b0c424ec7694a8f21de405be1db3f7222da45 OK
Job 'auctioneer' checksum                                    OK
Extract job 'auctioneer'                                     OK
Read job 'auctioneer' manifest                               OK
Check template 'auctioneer_ctl.erb' for 'auctioneer'         OK
Check template 'auctioneer_as_vcap.erb' for 'auctioneer'     OK
Check template 'bbs_ca.crt.erb' for 'auctioneer'             OK
Check template 'bbs_client.crt.erb' for 'auctioneer'         OK
Check template 'bbs_client.key.erb' for 'auctioneer'         OK
Job 'auctioneer' needs 'pid_utils' package                   OK
Job 'auctioneer' needs 'auctioneer' package                  OK
Monit file for 'auctioneer'                                  OK
Read job 'cfdot' (7 of 11), version 7d9851cfe9e1c074ae93d983cefb44f5a2134c55 OK
Job 'cfdot' checksum                                         OK
Extract job 'cfdot'                                          OK
Read job 'cfdot' manifest                                    OK
Check template 'setup.erb' for 'cfdot'                       OK
Check template 'bbs_ca.crt.erb' for 'cfdot'                  OK
Check template 'bbs_client.crt.erb' for 'cfdot'              OK
Check template 'bbs_client.key.erb' for 'cfdot'              OK
Job 'cfdot' needs 'cfdot' package                            OK
Monit file for 'cfdot'                                       OK
Read job 'benchmark-bbs' (8 of 11), version 0a45366201c724ded34dabad0fd23b4c79ed812d OK
Job 'benchmark-bbs' checksum                                 OK
Extract job 'benchmark-bbs'                                  OK
Read job 'benchmark-bbs' manifest                            OK
Check template 'run.erb' for 'benchmark-bbs'                 OK
Check template 'etcd_ca.crt.erb' for 'benchmark-bbs'         OK
Check template 'etcd_client.crt.erb' for 'benchmark-bbs'     OK
Check template 'etcd_client.key.erb' for 'benchmark-bbs'     OK
Check template 'bbs_client.crt.erb' for 'benchmark-bbs'      OK
Check template 'bbs_client.key.erb' for 'benchmark-bbs'      OK
Job 'benchmark-bbs' needs 'golang' package                   OK
Job 'benchmark-bbs' needs 'benchmark-bbs' package            OK
Monit file for 'benchmark-bbs'                               OK
Read job 'ssh_proxy' (9 of 11), version a0d2f8804c354af59bb60ae4922168655e49c1c5 OK
Job 'ssh_proxy' checksum                                     OK
Extract job 'ssh_proxy'                                      OK
Read job 'ssh_proxy' manifest                                OK
Check template 'ssh_proxy_as_vcap.erb' for 'ssh_proxy'       OK
Check template 'ssh_proxy_ctl.erb' for 'ssh_proxy'           OK
Check template 'bbs_ca.crt.erb' for 'ssh_proxy'              OK
Check template 'bbs_client.crt.erb' for 'ssh_proxy'          OK
Check template 'bbs_client.key.erb' for 'ssh_proxy'          OK
Job 'ssh_proxy' needs 'pid_utils' package                    OK
Job 'ssh_proxy' needs 'ssh_proxy' package                    OK
Monit file for 'ssh_proxy'                                   OK
Read job 'vizzini' (10 of 11), version e24ffc01a9df55f1538c655e71e97e710eacd1e7 OK
Job 'vizzini' checksum                                       OK
Extract job 'vizzini'                                        OK
Read job 'vizzini' manifest                                  OK
Check template 'run.erb' for 'vizzini'                       OK
Check template 'bbs_client.crt.erb' for 'vizzini'            OK
Check template 'bbs_client.key.erb' for 'vizzini'            OK
Job 'vizzini' needs 'golang' package                         OK
Job 'vizzini' needs 'vizzini' package                        OK
Monit file for 'vizzini'                                     OK
Read job 'rep' (11 of 11), version 882086b29dc21fdb3e647385f273f349f8c48890 OK
Job 'rep' checksum                                           OK
Extract job 'rep'                                            OK
Read job 'rep' manifest                                      OK
Check template 'rep_ctl.erb' for 'rep'                       OK
Check template 'rep_as_vcap.erb' for 'rep'                   OK
Check template 'drain.erb' for 'rep'                         OK
Check template 'bbs_ca.crt.erb' for 'rep'                    OK
Check template 'trusted_certs.crt.erb' for 'rep'             OK
Check template 'ca_certs_for_downloads.crt.erb' for 'rep'    OK
Check template 'bbs_client.crt.erb' for 'rep'                OK
Check template 'bbs_client.key.erb' for 'rep'                OK
Check template 'post-start.erb' for 'rep'                    OK
Job 'rep' needs 'pid_utils' package                          OK
Job 'rep' needs 'rep' package                                OK
Monit file for 'rep'                                         OK

Release info
------------
Name:    diego
Version: 0.1485.0

Packages
- rep_windows (2e676683f5896025341a1e92842294914fe1978b)
- bbs (6aa2bb0dacb61e9d147ff470bb83be50137844f3)
- route_emitter (40ffe6859748782df45200ab2762335c322b8979)
- windows_app_lifecycle (e078d259c8f3dfb17a09c96ef4392a7ab2e1d1b2)
- healthcheck (1ca4738d91181c221e7cf7c3cef1a4976f7f03e7)
- docker (3fa4468162b0e0b184e58659b11f7ea92957e2c2)
- golang-windows (1792f7c4693bbf260518ce1969c4e373dba223eb)
- canary (6ab43aca5a7a26e4ab9aba5af2072b57da8e9314)
- file_server (3ed5936a6eceea00d2c1fd996dc8e0b456a13a3d)
- auctioneer (1392967b83415bd94c291e9ff4b04314b3a73448)
- cfdot (937d3de1a2f2d884deffbcd15866e2f35aac85d0)
- benchmark-bbs (4b4ae25f39fc92334091bc4b02e99f4b9c2b14ad)
- golang (2214eb63c6de1459ac65e65277b83c52905e7336)
- pid_utils (47faf4ceaabf5f8199771110facf1dda941e7151)
- ssh_proxy (9517f7a8689715465e15e5e157c00b525432c4f9)
- cf-cli (5c076bfb40a6ddc3fe53495b3f2679310b69b8b8)
- vizzini (2a4b95f7d07ba1b9580251c3ca91324aa0219c5c)
- buildpack_app_lifecycle (c4730742bac873a793e697a037a10d54aeab0661)
- rep (1df484b5228d637dbdfdca2a6daac9fadc46b77d)
- diego-sshd (e61aae1cbaba0e685bc9cc80725a1230c52c993f)
- docker_app_lifecycle (c885bf5527dd4d992a3afc2fb2936f0db3e5a6af)

Jobs
- rep_windows (350f93c388b4ff0e73b72e6c9d5a45dc3564ce84)
- bbs (13f5592a98f986cebf441292bc07c31281651508)
- route_emitter (3c4dd9ad2ddeaa4d98220884257e8b36d5181166)
- canary (0bef926471fa854e5521497eec77bd7f0774b845)
- file_server (f8d7d9137cbc93adb470ac3ac02bc77bb0682f52)
- auctioneer (550b0c424ec7694a8f21de405be1db3f7222da45)
- cfdot (7d9851cfe9e1c074ae93d983cefb44f5a2134c55)
- benchmark-bbs (0a45366201c724ded34dabad0fd23b4c79ed812d)
- ssh_proxy (a0d2f8804c354af59bb60ae4922168655e49c1c5)
- vizzini (e24ffc01a9df55f1538c655e71e97e710eacd1e7)
- rep (882086b29dc21fdb3e647385f273f349f8c48890)

License
- license (62afca73e44f065731bb106885309c23ac5e0522)

Checking if can repack release for faster upload...
rep_windows (2e676683f5896025341a1e92842294914fe1978b) SKIP
bbs (6aa2bb0dacb61e9d147ff470bb83be50137844f3) SKIP
route_emitter (40ffe6859748782df45200ab2762335c322b8979) SKIP
windows_app_lifecycle (e078d259c8f3dfb17a09c96ef4392a7ab2e1d1b2) SKIP
healthcheck (1ca4738d91181c221e7cf7c3cef1a4976f7f03e7) SKIP
docker (3fa4468162b0e0b184e58659b11f7ea92957e2c2) SKIP
golang-windows (1792f7c4693bbf260518ce1969c4e373dba223eb) SKIP
canary (6ab43aca5a7a26e4ab9aba5af2072b57da8e9314) SKIP
file_server (3ed5936a6eceea00d2c1fd996dc8e0b456a13a3d) SKIP
auctioneer (1392967b83415bd94c291e9ff4b04314b3a73448) SKIP
cfdot (937d3de1a2f2d884deffbcd15866e2f35aac85d0) SKIP
benchmark-bbs (4b4ae25f39fc92334091bc4b02e99f4b9c2b14ad) SKIP
golang (2214eb63c6de1459ac65e65277b83c52905e7336) SKIP
pid_utils (47faf4ceaabf5f8199771110facf1dda941e7151) SKIP
ssh_proxy (9517f7a8689715465e15e5e157c00b525432c4f9) SKIP
cf-cli (5c076bfb40a6ddc3fe53495b3f2679310b69b8b8) SKIP
vizzini (2a4b95f7d07ba1b9580251c3ca91324aa0219c5c) SKIP
buildpack_app_lifecycle (c4730742bac873a793e697a037a10d54aeab0661) SKIP
rep (1df484b5228d637dbdfdca2a6daac9fadc46b77d) SKIP
diego-sshd (e61aae1cbaba0e685bc9cc80725a1230c52c993f) SKIP
docker_app_lifecycle (c885bf5527dd4d992a3afc2fb2936f0db3e5a6af) SKIP
rep_windows (350f93c388b4ff0e73b72e6c9d5a45dc3564ce84) UPLOAD
bbs (13f5592a98f986cebf441292bc07c31281651508) UPLOAD
route_emitter (3c4dd9ad2ddeaa4d98220884257e8b36d5181166) UPLOAD
canary (0bef926471fa854e5521497eec77bd7f0774b845) UPLOAD
file_server (f8d7d9137cbc93adb470ac3ac02bc77bb0682f52) UPLOAD
auctioneer (550b0c424ec7694a8f21de405be1db3f7222da45) UPLOAD
cfdot (7d9851cfe9e1c074ae93d983cefb44f5a2134c55) UPLOAD
benchmark-bbs (0a45366201c724ded34dabad0fd23b4c79ed812d) UPLOAD
ssh_proxy (a0d2f8804c354af59bb60ae4922168655e49c1c5) UPLOAD
vizzini (e24ffc01a9df55f1538c655e71e97e710eacd1e7) UPLOAD
rep (882086b29dc21fdb3e647385f273f349f8c48890) UPLOAD
Release repacked (new size is 32.8K)

Uploading release
release-repac:  96% |oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo    |  31.6KB   4.1MB/s ETA:  00:00:00
Director task 411
  Started extracting release > Extracting release. Done (00:00:00)

  Started verifying manifest > Verifying manifest. Done (00:00:00)

  Started resolving package dependencies > Resolving package dependencies. Done (00:00:00)

  Started processing 21 existing packages > Processing 21 existing packages. Done (00:00:00)

  Started processing 11 existing jobs > Processing 11 existing jobs. Done (00:00:00)

  Started release has been created > diego/0.1485.0. Done (00:00:00)

Task 411 done

Started         2016-10-26 08:44:06 UTC
Finished        2016-10-26 08:44:07 UTC
Duration        00:00:01
release-repac:  96% |oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo    |  31.6KB  14.4KB/s Time: 00:00:02

Release uploaded

Verify the releases for Diego deployment

$ bosh releases
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Acting as user 'admin' on 'my-bosh'

+-------------------+------------+-------------+
| Name              | Versions   | Commit Hash |
+-------------------+------------+-------------+
| cf                | 239+dev.10 | 8da019e8    |
|                   | 239+dev.11 | 8da019e8    |
|                   | 240*       | 1b88d9e4+   |
| cflinuxfs2-rootfs | 1.33.0*    | bb726940+   |
| diego             | 0.1485.0*  | 34f7894d+   |
| etcd              | 69*        | 7349d455+   |
| garden-linux      | 0.342.0*   | c5c9e0a5+   |
| garden-runc       | 0.8.0      | 3b33d0dd+   |
+-------------------+------------+-------------+
(*) Currently deployed
(+) Uncommitted changes

Releases total: 6

Create a new deployment

$ bosh deploy
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Acting as user 'admin' on deployment 'cf-diego' on 'my-bosh'
Getting deployment properties from director...
Unable to get properties list from director, trying without it...

Detecting deployment changes
----------------------------
resource_pools:
- name: small_z1
  network: cf_private
  stemcell:
    name: bosh-openstack-kvm-ubuntu-trusty-go_agent-raw
    version: '3232'
  cloud_properties:
    availability_zone: nova
    instance_type: m1.small
    api_key: ******************************
    auth_url: https://openpower-controller.osuosl.org:5000/v2.0
    default_key_name: power_id_rsa
    default_security_groups:
    - default
    ignore_server_availability_zone: true
    tenant: Cloud Foundry
    username: konstantinm
- name: diego_z1
  network: cf_private
  stemcell:
    name: bosh-openstack-kvm-ubuntu-trusty-go_agent-raw
    version: '3232'
  cloud_properties:
    availability_zone: nova
    instance_type: m1.medium
    api_key: ******************************
    auth_url: https://openpower-controller.osuosl.org:5000/v2.0
    default_key_name: power_id_rsa
    default_security_groups:
    - default
    ignore_server_availability_zone: true
    tenant: Cloud Foundry
    username: konstantinm
- name: diego_cell_z1
  network: cf_private
  stemcell:
    name: bosh-openstack-kvm-ubuntu-trusty-go_agent-raw
    version: '3232'
  cloud_properties:
    availability_zone: nova
    instance_type: m1.medium
    api_key: ******************************
    auth_url: https://openpower-controller.osuosl.org:5000/v2.0
    default_key_name: power_id_rsa
    default_security_groups:
    - default
    ignore_server_availability_zone: true
    tenant: Cloud Foundry
    username: konstantinm

compilation:
  workers: 6
  network: cf_private
  reuse_compilation_vms: true
  cloud_properties:
    availability_zone: nova
    instance_type: m1.small

networks:
- name: cf_private
  type: manual
  subnets:
  - range: 172.16.1.0/24
    gateway: 172.16.1.1
    dns:
    - 8.8.8.8
    reserved:
    - 172.16.1.2 - 172.16.1.149
    static:
    - 172.16.1.150 - 172.16.1.155
    cloud_properties:
      net_id: 88888830-f442-406a-8256-11cc62f9b2c6
- name: cf_public
  type: manual
  subnets:
  - range: 172.16.1.0/24
    gateway: 172.16.1.1
    dns:
    - 8.8.8.8
    reserved:
    - 172.16.1.2 - 172.16.1.149
    cloud_properties:
      net_id: 88888830-f442-406a-8256-11cc62f9b2c6
      security_groups:
      - default
- name: elastic
  type: vip
  cloud_properties: {}

releases:
- name: diego
  version: 0.1485.0
- name: etcd
  version: '69'
- name: garden-linux
  version: 0.342.0
- name: cf
  version: '240'
- name: cflinuxfs2-rootfs
  version: 1.33.0

update:
  canaries: 1
  max_in_flight: 1
  serial: false
  canary_watch_time: 30000-600000
  update_watch_time: 5000-600000

jobs:
- name: nats_z1
  instances: 1
  resource_pool: small_z1
  templates:
  - name: nats
    release: cf
  - name: nats_stream_forwarder
    release: cf
  - name: metron_agent
    release: cf
  networks:
  - name: cf_private
    static_ips:
    - 172.16.1.153
- name: etcd_z1
  instances: 1
  resource_pool: small_z1
  persistent_disk: 10240
  templates:
  - name: etcd
    release: cf
  - name: etcd_metrics_server
    release: cf
  - name: metron_agent
    release: cf
  networks:
  - name: cf_private
    static_ips:
    - 172.16.1.154
  properties:
    etcd_metrics_server:
      nats:
        machines:
        - "<redacted>"
        password: "<redacted>"
        username: "<redacted>"
- name: consul_z1
  instances: 1
  persistent_disk: 1024
  resource_pool: small_z1
  templates:
  - name: metron_agent
    release: cf
  - name: consul_agent
    release: cf
  networks:
  - name: cf_private
    static_ips:
    - 172.16.1.155
  properties:
    consul:
      agent:
        mode: "<redacted>"
- name: diego_cell_z1
  instances: 1
  resource_pool: diego_cell_z1
  templates:
  - name: consul_agent
    release: cf
  - name: rep
    release: diego
  - name: garden
    release: garden-linux
  - name: cflinuxfs2-rootfs-setup
    release: cflinuxfs2-rootfs
  - name: metron_agent
    release: cf
  networks:
  - name: cf_private
  update:
    serial: true
    max_in_flight: 1
  properties:
    metron_agent:
      zone: "<redacted>"
    diego:
      rep:
        zone: "<redacted>"
- name: diego_brain_z1
  instances: 1
  resource_pool: diego_z1
  templates:
  - name: consul_agent
    release: cf
  - name: etcd
    release: etcd
  - name: bbs
    release: diego
  - name: auctioneer
    release: diego
  - name: stager
    release: cf
  - name: nsync
    release: cf
  - name: tps
    release: cf
  - name: cc_uploader
    release: cf
  - name: file_server
    release: diego
  - name: route_emitter
    release: diego
  - name: metron_agent
    release: cf
  persistent_disk: 20480
  networks:
  - name: cf_private
  update:
    serial: true
    max_in_flight: 1
  properties:
    consul:
      agent:
        services:
          etcd: {}
    metron_agent:
      zone: "<redacted>"
- name: blobstore_z1
  instances: 1
  persistent_disk: 10240
  resource_pool: small_z1
  templates:
  - name: blobstore
    release: cf
  - name: metron_agent
    release: cf
  - name: route_registrar
    release: cf
  - name: consul_agent
    release: cf
  networks:
  - name: cf_private
  properties:
    consul:
      agent:
        services:
          blobstore: {}
    route_registrar:
      routes:
      - name: "<redacted>"
        port: "<redacted>"
        registration_interval: "<redacted>"
        tags:
          component: "<redacted>"
        uris:
        - "<redacted>"
- name: postgres_z1
  instances: 1
  persistent_disk: 1024
  resource_pool: small_z1
  templates:
  - name: postgres
    release: cf
  - name: metron_agent
    release: cf
  networks:
  - name: cf_private
    static_ips:
    - 172.16.1.151
  update:
    serial: true
- name: api_z1
  instances: 1
  resource_pool: small_z1
  templates:
  - name: cloud_controller_ng
    release: cf
  - name: cloud_controller_worker
    release: cf
  - name: cloud_controller_clock
    release: cf
  - name: metron_agent
    release: cf
  - name: route_registrar
    release: cf
  - name: consul_agent
    release: cf
  - name: go-buildpack
    release: cf
  - name: binary-buildpack
    release: cf
  - name: nodejs-buildpack
    release: cf
  - name: ruby-buildpack
    release: cf
  - name: java-buildpack
    release: cf
  - name: php-buildpack
    release: cf
  - name: python-buildpack
    release: cf
  - name: staticfile-buildpack
    release: cf
  networks:
  - name: cf_private
  properties:
    consul:
      agent:
        services:
          cloud_controller_ng: {}
    route_registrar:
      routes:
      - name: "<redacted>"
        registration_interval: "<redacted>"
        port: "<redacted>"
        uris:
        - "<redacted>"
- name: ha_proxy_z1
  instances: 1
  resource_pool: small_z1
  templates:
  - name: haproxy
    release: cf
  - name: consul_agent
    release: cf
  - name: metron_agent
    release: cf
  networks:
  - name: elastic
    static_ips:
    - 140.211.168.100
  - name: cf_public
    default:
    - gateway
    - dns
  properties:
    ha_proxy:
      ssl_pem: "<redacted>"
    router:
      servers:
      - "<redacted>"
- name: doppler_z1
  instances: 1
  resource_pool: small_z1
  templates:
  - name: doppler
    release: cf
  - name: metron_agent
    release: cf
  - name: syslog_drain_binder
    release: cf
  networks:
  - name: cf_private
  properties:
    doppler:
      zone: "<redacted>"
    doppler_endpoint:
      shared_secret: "<redacted>"
- name: loggregator_trafficcontroller_z1
  instances: 1
  resource_pool: small_z1
  templates:
  - name: loggregator_trafficcontroller
    release: cf
  - name: metron_agent
    release: cf
  - name: route_registrar
    release: cf
  networks:
  - name: cf_private
  properties:
    traffic_controller:
      zone: "<redacted>"
    route_registrar:
      routes:
      - name: "<redacted>"
        registration_interval: "<redacted>"
        port: "<redacted>"
        uris:
        - "<redacted>"
      - name: "<redacted>"
        registration_interval: "<redacted>"
        port: "<redacted>"
        uris:
        - "<redacted>"
- name: uaa_z1
  instances: 1
  resource_pool: small_z1
  templates:
  - name: uaa
    release: cf
  - name: metron_agent
    release: cf
  - name: route_registrar
    release: cf
  networks:
  - name: cf_private
  properties:
    login:
      catalina_opts: "<redacted>"
    route_registrar:
      routes:
      - name: "<redacted>"
        registration_interval: "<redacted>"
        port: "<redacted>"
        uris:
        - "<redacted>"
        - "<redacted>"
        - "<redacted>"
        - "<redacted>"
    uaa:
      admin:
        client_secret: "<redacted>"
      batch:
        password: "<redacted>"
        username: "<redacted>"
      cc:
        client_secret: "<redacted>"
      scim:
        userids_enabled: "<redacted>"
        users:
        - name: "<redacted>"
          password: "<redacted>"
          groups:
          - "<redacted>"
          - "<redacted>"
          - "<redacted>"
          - "<redacted>"
          - "<redacted>"
          - "<redacted>"
    uaadb:
      address: "<redacted>"
      databases:
      - name: "<redacted>"
        tag: "<redacted>"
      db_scheme: "<redacted>"
      port: "<redacted>"
      roles:
      - name: "<redacted>"
        password: "<redacted>"
        tag: "<redacted>"
- name: router_z1
  instances: 1
  resource_pool: small_z1
  templates:
  - name: gorouter
    release: cf
  - name: metron_agent
    release: cf
  - name: consul_agent
    release: cf
  networks:
  - name: cf_private
    static_ips:
    - 172.16.1.152
  properties:
    dropsonde:
      enabled: "<redacted>"

name: cf-diego

director_uuid: 504c8d24-ec34-4e41-9898-9a2f77f17a2e

properties:
  router:
    route_services_secret: "<redacted>"
    ssl_skip_validation: "<redacted>"
  networks:
    apps: "<redacted>"
  app_domains:
  - "<redacted>"
  cc:
    allow_app_ssh_access: "<redacted>"
    default_to_diego_backend: "<redacted>"
    internal_api_user: "<redacted>"
    buildpacks:
      blobstore_type: "<redacted>"
      webdav_config:
        blobstore_timeout: "<redacted>"
        password: "<redacted>"
        private_endpoint: "<redacted>"
        public_endpoint: "<redacted>"
        secret: "<redacted>"
        username: "<redacted>"
    droplets:
      blobstore_type: "<redacted>"
      webdav_config:
        blobstore_timeout: "<redacted>"
        password: "<redacted>"
        private_endpoint: "<redacted>"
        public_endpoint: "<redacted>"
        secret: "<redacted>"
        username: "<redacted>"
    external_port: "<redacted>"
    packages:
      blobstore_type: "<redacted>"
      webdav_config:
        blobstore_timeout: "<redacted>"
        password: "<redacted>"
        private_endpoint: "<redacted>"
        public_endpoint: "<redacted>"
        secret: "<redacted>"
        username: "<redacted>"
    resource_pool:
      blobstore_type: "<redacted>"
      webdav_config:
        blobstore_timeout: "<redacted>"
        password: "<redacted>"
        private_endpoint: "<redacted>"
        public_endpoint: "<redacted>"
        secret: "<redacted>"
        username: "<redacted>"
    bulk_api_password: "<redacted>"
    db_encryption_key: "<redacted>"
    default_running_security_groups:
    - "<redacted>"
    - "<redacted>"
    default_staging_security_groups:
    - "<redacted>"
    - "<redacted>"
    install_buildpacks:
    - name: "<redacted>"
      package: "<redacted>"
    - name: "<redacted>"
      package: "<redacted>"
    - name: "<redacted>"
      package: "<redacted>"
    - name: "<redacted>"
      package: "<redacted>"
    - name: "<redacted>"
      package: "<redacted>"
    - name: "<redacted>"
      package: "<redacted>"
    - name: "<redacted>"
      package: "<redacted>"
    - name: "<redacted>"
      package: "<redacted>"
    internal_api_password: "<redacted>"
    quota_definitions:
      default:
        memory_limit: "<redacted>"
        non_basic_services_allowed: "<redacted>"
        total_routes: "<redacted>"
        total_services: "<redacted>"
    security_group_definitions:
    - name: "<redacted>"
      rules:
      - destination: "<redacted>"
        protocol: "<redacted>"
      - destination: "<redacted>"
        protocol: "<redacted>"
      - destination: "<redacted>"
        protocol: "<redacted>"
      - destination: "<redacted>"
        protocol: "<redacted>"
      - destination: "<redacted>"
        protocol: "<redacted>"
    - name: "<redacted>"
      rules:
      - destination: "<redacted>"
        ports: "<redacted>"
        protocol: "<redacted>"
      - destination: "<redacted>"
        ports: "<redacted>"
        protocol: "<redacted>"
    srv_api_uri: "<redacted>"
    staging_upload_password: "<redacted>"
    staging_upload_user: "<redacted>"
  ccdb:
    address: "<redacted>"
    databases:
    - name: "<redacted>"
      tag: "<redacted>"
    db_scheme: "<redacted>"
    port: "<redacted>"
    roles:
    - name: "<redacted>"
      password: "<redacted>"
      tag: "<redacted>"
  consul:
    agent:
      log_level: "<redacted>"
      domain: "<redacted>"
      servers:
        lan:
        - "<redacted>"
    encrypt_keys:
    - "<redacted>"
    ca_cert: "<redacted>"
    server_cert: "<redacted>"
    agent_cert: "<redacted>"
    server_key: "<redacted>"
    agent_key: "<redacted>"
  blobstore:
    admin_users:
    - password: "<redacted>"
      username: "<redacted>"
    secure_link:
      secret: "<redacted>"
    tls:
      cert: "<redacted>"
      private_key: "<redacted>"
      ca_cert: "<redacted>"
  databases:
    databases:
    - name: "<redacted>"
      tag: "<redacted>"
      citext: "<redacted>"
    - name: "<redacted>"
      tag: "<redacted>"
      citext: "<redacted>"
    port: "<redacted>"
    roles:
    - name: "<redacted>"
      password: "<redacted>"
      tag: "<redacted>"
    - name: "<redacted>"
      password: "<redacted>"
      tag: "<redacted>"
  description: "<redacted>"
  domain: "<redacted>"
  etcd:
    advertise_urls_dns_suffix: "<redacted>"
    cluster:
    - name: "<redacted>"
      instances: "<redacted>"
    machines:
    - "<redacted>"
    peer_require_ssl: "<redacted>"
    require_ssl: "<redacted>"
  logger_endpoint:
    port: "<redacted>"
  loggregator:
    etcd:
      machines:
      - "<redacted>"
  loggregator_endpoint:
    shared_secret: "<redacted>"
  metron_agent:
    zone: "<redacted>"
    deployment: "<redacted>"
    dropsonde_incoming_port: "<redacted>"
  metron_endpoint:
    shared_secret: "<redacted>"
  nats:
    machines:
    - "<redacted>"
    password: "<redacted>"
    port: "<redacted>"
    user: "<redacted>"
  ssl:
    skip_cert_verify: "<redacted>"
  system_domain: "<redacted>"
  system_domain_organization: "<redacted>"
  uaa:
    clients:
      cf:
        access-token-validity: "<redacted>"
        authorities: "<redacted>"
        authorized-grant-types: "<redacted>"
        autoapprove: "<redacted>"
        override: "<redacted>"
        refresh-token-validity: "<redacted>"
        scope: "<redacted>"
      cc-service-dashboards:
        authorities: "<redacted>"
        authorized-grant-types: "<redacted>"
        scope: "<redacted>"
        secret: "<redacted>"
      cloud_controller_username_lookup:
        authorities: "<redacted>"
        authorized-grant-types: "<redacted>"
        secret: "<redacted>"
      cc_routing:
        authorities: "<redacted>"
        secret: "<redacted>"
        authorized-grant-types: "<redacted>"
      gorouter:
        authorities: "<redacted>"
        authorized-grant-types: "<redacted>"
        secret: "<redacted>"
      tcp_emitter:
        authorities: "<redacted>"
        authorized-grant-types: "<redacted>"
        secret: "<redacted>"
      tcp_router:
        authorities: "<redacted>"
        authorized-grant-types: "<redacted>"
        secret: "<redacted>"
      doppler:
        authorities: "<redacted>"
        secret: "<redacted>"
      login:
        authorities: "<redacted>"
        authorized-grant-types: "<redacted>"
        redirect-uri: "<redacted>"
        scope: "<redacted>"
        secret: "<redacted>"
      servicesmgmt:
        authorities: "<redacted>"
        authorized-grant-types: "<redacted>"
        autoapprove: "<redacted>"
        redirect-uri: "<redacted>"
        scope: "<redacted>"
        secret: "<redacted>"
    jwt:
      signing_key: "<redacted>"
      verification_key: "<redacted>"
    ssl:
      port: "<redacted>"
    url: "<redacted>"
  capi:
    nsync:
      bbs:
        ca_cert: "<redacted>"
        client_cert: "<redacted>"
        client_key: "<redacted>"
        require_ssl: "<redacted>"
      cc:
        base_url: "<redacted>"
        basic_auth_password: "<redacted>"
      diego_privileged_containers: "<redacted>"
    tps:
      bbs:
        ca_cert: "<redacted>"
        client_cert: "<redacted>"
        client_key: "<redacted>"
        require_ssl: "<redacted>"
      cc:
        base_url: "<redacted>"
        basic_auth_password: "<redacted>"
      traffic_controller_url: "<redacted>"
    tps_listener:
      bbs:
        ca_cert: "<redacted>"
        client_cert: "<redacted>"
        client_key: "<redacted>"
        require_ssl: "<redacted>"
      cc:
        base_url: "<redacted>"
        basic_auth_password: "<redacted>"
    stager:
      bbs:
        ca_cert: "<redacted>"
        client_cert: "<redacted>"
        client_key: "<redacted>"
        require_ssl: "<redacted>"
      cc:
        base_url: "<redacted>"
        basic_auth_password: "<redacted>"
  diego:
    auctioneer:
      bbs:
        ca_cert: "<redacted>"
        client_cert: "<redacted>"
        client_key: "<redacted>"
        require_ssl: "<redacted>"
    bbs:
      active_key_label: "<redacted>"
      encryption_keys:
      - label: "<redacted>"
        passphrase: "<redacted>"
      ca_cert: "<redacted>"
      etcd:
        ca_cert: "<redacted>"
        client_cert: "<redacted>"
        client_key: "<redacted>"
        require_ssl: "<redacted>"
      require_ssl: "<redacted>"
      server_cert: "<redacted>"
      server_key: "<redacted>"
    converger:
      bbs:
        ca_cert: "<redacted>"
        client_cert: "<redacted>"
        client_key: "<redacted>"
        require_ssl: "<redacted>"
    rep:
      bbs:
        ca_cert: "<redacted>"
        client_cert: "<redacted>"
        client_key: "<redacted>"
        require_ssl: "<redacted>"
      preloaded_rootfses:
      - "<redacted>"
    executor:
      memory_capacity_mb: "<redacted>"
      disk_capacity_mb: "<redacted>"
    route_emitter:
      bbs:
        ca_cert: "<redacted>"
        client_cert: "<redacted>"
        client_key: "<redacted>"
        require_ssl: "<redacted>"
      nats:
        machines:
        - "<redacted>"
        password: "<redacted>"
        port: "<redacted>"
        user: "<redacted>"
    ssl:
      skip_cert_verify: "<redacted>"
  garden:
    graph_cleanup_threshold_in_mb: "<redacted>"
    persistent_image_list:
    - "<redacted>"
    deny_networks:
    - "<redacted>"
Please review all changes carefully

Deploying
---------
Are you sure you want to deploy? (type 'yes' to continue): yes

Director task 413
Deprecation: Ignoring cloud config. Manifest contains 'networks' section.

  Started preparing deployment > Preparing deployment. Done (00:00:01)  
  Started preparing package compilation > Finding packages to compile. Done (00:00:01)

  Started creating missing vms
  Started creating missing vms > nats_z1/0 (35702522-4065-4452-9540-f9a2c453dde0)
  Started creating missing vms > consul_z1/0 (e89490d9-3c77-4b0b-b7b6-4c8e83a3b94c)
  Started creating missing vms > etcd_z1/0 (1902e301-a3f6-4f65-ad72-89e77dc3e317). Done (00:01:32)
  Started creating missing vms > diego_cell_z1/0 (197be18e-806e-4e5d-bf1c-d9c22b95aaa5)
     Done creating missing vms > nats_z1/0 (35702522-4065-4452-9540-f9a2c453dde0) (00:01:40)
  Started creating missing vms > diego_brain_z1/0 (72fb46db-d0f8-4179-b14e-7191840bf3c9)
     Done creating missing vms > consul_z1/0 (e89490d9-3c77-4b0b-b7b6-4c8e83a3b94c) (00:01:40)
  Started creating missing vms > blobstore_z1/0 (e0b4ab5b-e36a-4530-ad4b-48280a4c55d7)
     Done creating missing vms > diego_cell_z1/0 (197be18e-806e-4e5d-bf1c-d9c22b95aaa5) (00:01:26)
  Started creating missing vms > postgres_z1/0 (33b87b66-9035-4b01-ad56-0ffa16504654)
     Done creating missing vms > blobstore_z1/0 (e0b4ab5b-e36a-4530-ad4b-48280a4c55d7) (00:01:32)
  Started creating missing vms > api_z1/0 (d8099b78-aa10-4cf4-bdae-9b7c76e5e881)
     Done creating missing vms > diego_brain_z1/0 (72fb46db-d0f8-4179-b14e-7191840bf3c9) (00:01:34)
  Started creating missing vms > ha_proxy_z1/0 (7c5fe0ce-ec38-438e-ac37-be1a95efe407)
     Done creating missing vms > postgres_z1/0 (33b87b66-9035-4b01-ad56-0ffa16504654) (00:01:28)
  Started creating missing vms > doppler_z1/0 (5a9d769f-ecd3-4bb1-9563-fe79e34614dd)
     Done creating missing vms > ha_proxy_z1/0 (7c5fe0ce-ec38-438e-ac37-be1a95efe407) (00:01:29)
  Started creating missing vms > loggregator_trafficcontroller_z1/0 (df069b35-e0e8-48e3-b3c2-cbeb1f190566)
     Done creating missing vms > api_z1/0 (d8099b78-aa10-4cf4-bdae-9b7c76e5e881) (00:01:33)
  Started creating missing vms > uaa_z1/0 (cdb84ae7-8a4d-471b-a42e-ba6ec8e94b66)
     Done creating missing vms > doppler_z1/0 (5a9d769f-ecd3-4bb1-9563-fe79e34614dd) (00:01:27)
  Started creating missing vms > router_z1/0 (f42c18ac-6cb4-42e7-825c-f8ec9fc5c88f)
     Done creating missing vms > loggregator_trafficcontroller_z1/0 (df069b35-e0e8-48e3-b3c2-cbeb1f190566) (00:01:34)
     Done creating missing vms > uaa_z1/0 (cdb84ae7-8a4d-471b-a42e-ba6ec8e94b66) (00:01:32)
     Done creating missing vms > router_z1/0 (f42c18ac-6cb4-42e7-825c-f8ec9fc5c88f) (00:01:25)
     Done creating missing vms (00:07:18)

  Started updating job nats_z1 > nats_z1/0 (35702522-4065-4452-9540-f9a2c453dde0) (canary)
  Started updating job consul_z1 > consul_z1/0 (e89490d9-3c77-4b0b-b7b6-4c8e83a3b94c) (canary)
  Started updating job etcd_z1 > etcd_z1/0 (1902e301-a3f6-4f65-ad72-89e77dc3e317) (canary)
     Done updating job nats_z1 > nats_z1/0 (35702522-4065-4452-9540-f9a2c453dde0) (canary) (00:00:51)
     Done updating job consul_z1 > consul_z1/0 (e89490d9-3c77-4b0b-b7b6-4c8e83a3b94c) (canary) (00:01:12)
     Done updating job etcd_z1 > etcd_z1/0 (1902e301-a3f6-4f65-ad72-89e77dc3e317) (canary) (00:01:18)
  Started updating job diego_cell_z1 > diego_cell_z1/0 (197be18e-806e-4e5d-bf1c-d9c22b95aaa5) (canary). Done (00:03:50)
  Started updating job diego_brain_z1 > diego_brain_z1/0 (72fb46db-d0f8-4179-b14e-7191840bf3c9) (canary). Done (00:01:33)
  Started updating job blobstore_z1 > blobstore_z1/0 (e0b4ab5b-e36a-4530-ad4b-48280a4c55d7) (canary). Done (00:01:20)
  Started updating job postgres_z1 > postgres_z1/0 (33b87b66-9035-4b01-ad56-0ffa16504654) (canary). Done (00:01:05)
  Started updating job loggregator_trafficcontroller_z1 > loggregator_trafficcontroller_z1/0 (df069b35-e0e8-48e3-b3c2-cbeb1f190566) (canary)
  Started updating job doppler_z1 > doppler_z1/0 (5a9d769f-ecd3-4bb1-9563-fe79e34614dd) (canary)
  Started updating job uaa_z1 > uaa_z1/0 (cdb84ae7-8a4d-471b-a42e-ba6ec8e94b66) (canary)
  Started updating job api_z1 > api_z1/0 (d8099b78-aa10-4cf4-bdae-9b7c76e5e881) (canary)
  Started updating job ha_proxy_z1 > ha_proxy_z1/0 (7c5fe0ce-ec38-438e-ac37-be1a95efe407) (canary)
  Started updating job router_z1 > router_z1/0 (f42c18ac-6cb4-42e7-825c-f8ec9fc5c88f) (canary)
     Done updating job loggregator_trafficcontroller_z1 > loggregator_trafficcontroller_z1/0 (df069b35-e0e8-48e3-b3c2-cbeb1f190566) (canary) (00:00:47)
     Done updating job doppler_z1 > doppler_z1/0 (5a9d769f-ecd3-4bb1-9563-fe79e34614dd) (canary) (00:00:49)
     Done updating job router_z1 > router_z1/0 (f42c18ac-6cb4-42e7-825c-f8ec9fc5c88f) (canary) (00:00:57)
     Done updating job ha_proxy_z1 > ha_proxy_z1/0 (7c5fe0ce-ec38-438e-ac37-be1a95efe407) (canary) (00:01:01)
     Done updating job uaa_z1 > uaa_z1/0 (cdb84ae7-8a4d-471b-a42e-ba6ec8e94b66) (canary) (00:02:49)
     Done updating job api_z1 > api_z1/0 (d8099b78-aa10-4cf4-bdae-9b7c76e5e881) (canary) (00:05:09)

Task 413 done

Started         2016-10-26 09:07:51 UTC
Finished        2016-10-26 09:29:30 UTC
Duration        00:21:39

Deployed 'cf-diego' to 'my-bosh'

Verify the deployment

$ bosh deployments
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Acting as user 'admin' on 'my-bosh'

+----------+--------------------------+----------------------------------------------------+--------------+
| Name     | Release(s)               | Stemcell(s)                                        | Cloud Config |
+----------+--------------------------+----------------------------------------------------+--------------+
| cf-diego | cf/240                   | bosh-openstack-kvm-ubuntu-trusty-go_agent-raw/3232 | none         |
|          | cflinuxfs2-rootfs/1.33.0 |                                                    |              |
|          | diego/0.1485.0           |                                                    |              |
|          | etcd/69                  |                                                    |              |
|          | garden-linux/0.342.0     |                                                    |              |
+----------+--------------------------+----------------------------------------------------+--------------+

Deployments total: 1
$ bosh vms
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Acting as user 'admin' on 'my-bosh'
Deployment 'cf-diego'

Director task 449

Task 449 done

+---------------------------------------------------------------------------+---------+-----+---------------+-----------------+
| VM                                                                        | State   | AZ  | VM Type       | IPs             |
+---------------------------------------------------------------------------+---------+-----+---------------+-----------------+
| api_z1/0 (79377423-eee8-4c55-b1ec-3b67d4b16e24)                           | running | n/a | small_z1      | 172.16.1.159    |
| blobstore_z1/0 (7ff71444-db44-46b4-ab1b-867560bf8177)                     | running | n/a | small_z1      | 172.16.1.158    |
| consul_z1/0 (2602ca79-65fa-47d0-90bb-93232fca13e5)                        | running | n/a | small_z1      | 172.16.1.155    |
| diego_brain_z1/0 (a4035921-3441-4590-8fb6-0003746fcc40)                   | running | n/a | diego_z1      | 172.16.1.157    |
| diego_cell_z1/0 (f51ad1a5-0ca8-40e3-90e8-7281858f9e60)                    | running | n/a | diego_cell_z1 | 172.16.1.156    |
| doppler_z1/0 (cd44db9c-0504-4efb-bf73-8d5ab1c5bc12)                       | running | n/a | small_z1      | 172.16.1.160    |
| etcd_z1/0 (ce4e3336-7d36-4395-892c-0a4c8c2f5da3)                          | running | n/a | small_z1      | 172.16.1.154    |
| ha_proxy_z1/0 (05a813dc-589c-4131-a50d-feda1f8701c7)                      | running | n/a | small_z1      | 172.16.1.150    |
|                                                                           |         |     |               | 140.211.168.100 |
| loggregator_trafficcontroller_z1/0 (6801f3b1-c95d-4eda-9678-39066351ac4d) | running | n/a | small_z1      | 172.16.1.161    |
| nats_z1/0 (95369766-11b0-4419-a14f-73db64b63e8b)                          | running | n/a | small_z1      | 172.16.1.153    |
| postgres_z1/0 (a3aadc80-1d23-4af3-bce2-5bdb53576994)                      | running | n/a | small_z1      | 172.16.1.151    |
| router_z1/0 (f43b2001-3ee5-4635-919c-20f2bc3749bd)                        | running | n/a | small_z1      | 172.16.1.152    |
| uaa_z1/0 (1cdb1fdc-11df-433b-ab17-16db9394d021)                           | running | n/a | small_z1      | 172.16.1.162    |
+---------------------------------------------------------------------------+---------+-----+---------------+-----------------+

VMs total: 13

Run a container in Cloud Foundry Diego deployment on POWER platform

Golang https server application httpserver.go

package main

import (
    "fmt"
    "net/http"
    "time"
)

func handler(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, "Diego container on POWER platform\n\n%s\n", time.Now())
}

func main() {
    http.HandleFunc("/", handler)
    http.ListenAndServe(":8080", nil)
}

Dockerfile for httpserver application

FROM ppc64le/golang:1.7.1

RUN mkdir -p /go
RUN mkdir -p /go/src
RUN mkdir -p /go/src/httpserver
ENV GOPATH /go

# Copy the local package files to the container's workspace.
ADD . /go/src/httpserver

# Build httpserver.
RUN go install httpserver

# Run the httpserver command when the container starts.
ENTRYPOINT $GOPATH/bin/httpserver

# Document that the service listens on port 8080.
EXPOSE 8080

Build docker image and publish it to docker hub

$ sudo docker build -t knm3000/httpserver .
$ sudo docker login
$ sudo docker push knm3000/httpserver

Login to Cloud Foundry

$ cf login -a https://api.140.211.168.100.xip.io --skip-ssl-validation
API endpoint: https://api.140.211.168.100.xip.io

Email> admin

Password>
Authenticating...
OK

Targeted org default_organization



API endpoint:   https://api.140.211.168.100.xip.io (API version: 2.59.0)
User:           admin
Org:            default_organization
Space:          No space targeted, use 'cf target -s SPACE'

Create space

$ cf create-space space01
Creating space space01 in org default_organization as admin...
OK
Assigning role RoleSpaceManager to user admin in org default_organization / space space01 as admin...
OK
Assigning role RoleSpaceDeveloper to user admin in org default_organization / space space01 as admin...
OK

TIP: Use 'cf target -o "default_organization" -s "space01"' to target new space

Target new space

$ cf target -o "default_organization" -s "space01"

API endpoint:   https://api.140.211.168.100.xip.io (API version: 2.59.0)
User:           admin
Org:            default_organization
Space:          space01

Enable docker support

$ cf enable-feature-flag diego_docker
Setting status of diego_docker as admin...

OK

Feature diego_docker Enabled.

Pushing the docker image from docker hub to Diego

$ cf push httpserver -o knm3000/httpserver
Updating app httpserver in org default_organization / space space01 as admin...
OK


Starting app httpserver in org default_organization / space space01 as admin...
Creating container
Successfully created container
Staging...
Staging process started ...
Staging process finished
Exit status 0
Staging Complete
Destroying container
Successfully destroyed container

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running

App started


OK

App httpserver was started using this command `/bin/sh -c $GOPATH/bin/httpserver `

Showing health and status for app httpserver in org default_organization / space space01 as admin...
OK

requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: httpserver.140.211.168.100.xip.io
last uploaded: Thu Oct 27 15:16:37 UTC 2016
stack: cflinuxfs2
buildpack: unknown

     state     since                    cpu    memory        disk         details
#0   running   2016-10-27 03:17:47 PM   0.0%   10.9M of 1G   1.3M of 1G

Checking the status of all cf diego applications

$ cf apps
Getting apps in org default_organization / space space01 as admin...
OK

name         requested state   instances   memory   disk   urls
httpserver   started           1/1         1G       1G     httpserver.140.211.168.100.xip.io

Checking the status of the httpserver application

$ cf app httpserver
Showing health and status for app httpserver in org default_organization / space space01 as admin...
OK

requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: httpserver.140.211.168.100.xip.io
last uploaded: Thu Oct 27 15:16:37 UTC 2016
stack: cflinuxfs2
buildpack: unknown

     state     since                    cpu    memory        disk         details
#0   running   2016-10-27 03:17:47 PM   0.0%   12.6M of 1G   1.3M of 1G

Verification using curl

$ curl httpserver.140.211.168.100.xip.io
Diego container on POWER platform

2016-10-27 11:27:04.094849 +0000 UTC

Verification in the web browser http://httpserver.140.211.168.100.xip.io/

Image of web browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment