SlideShare a Scribd company logo
1 of 71
Download to read offline
1
BOSH / CF Deployment
in modern ways
2017-09-12
Toshiaki Maki (@making)
Who am I ?
2
Toshiaki Maki (@making) https://blog.ik.am
Sr. Solutions Architect @Pivotal Japan
Spring Framework 💖
Cloud Foundry 💖
BOSH 💖
Topics
3
• BOSH CLI v2
• BOSH Boot Loader
• cf deployment
BOSH Deployment General Workflow
4
BOSH Deployment General Workflow
4
Infrastructure
LoaderBalancer
BOSH Deployment General Workflow
4
Infrastructure
LoaderBalancer
BOSH CLI
BOSH Deployment General Workflow
4
Infrastructure
Director
LoaderBalancer
BOSH CLI
BOSH Deployment General Workflow
4
Infrastructure
Director
LoaderBalancer
Cloud ConfigBOSH CLI
BOSH Deployment General Workflow
4
Infrastructure
Director
LoaderBalancer
Stemcell
Cloud ConfigBOSH CLI
BOSH Deployment General Workflow
4
Infrastructure
Director
LoaderBalancer
Stemcell
BOSH Release
Cloud ConfigBOSH CLI
BOSH Deployment General Workflow
4
Infrastructure
Director
LoaderBalancer
Stemcell
BOSH Release
Manifest
Cloud ConfigBOSH CLI
BOSH Deployment General Workflow
4
Infrastructure
Director
BOSH VMs
LoaderBalancer
BOSH VMs
BOSH VMs
Stemcell
BOSH Release
Manifest
Cloud ConfigBOSH CLI
BOSH Deployment General Workflow
4
Infrastructure
Director
BOSH VMs
LoaderBalancer
BOSH VMs
BOSH VMs
Stemcell
BOSH Release
Manifest
Cloud ConfigBOSH CLI
BOSH Deployment General Workflow
4
Infrastructure
Director
BOSH VMs
LoaderBalancer
BOSH VMs
BOSH VMs
Stemcell
BOSH Release
Manifest
Cloud ConfigBOSH CLI
BOSH Deployment General Workflow
4
Infrastructure
Director
BOSH VMs
LoaderBalancer
BOSH VMs
BOSH VMs
Stemcell
BOSH Release
Manifest
Cloud ConfigBOSH CLI
BOSH Deployment General Workflow
4
Infrastructure
Director
BOSH VMs
LoaderBalancer
BOSH VMs
BOSH VMs
Stemcell
BOSH Release
Manifest
Cloud ConfigBOSH CLI
BOSH CLI v2
5
• Executable binary 🙌 by Golang (Ruby for v1 ...😒)
• bosh create-env to initialize an environment
• operation-files
https://bosh.io/docs/cli-v2.html
$ brew install cloudfoundry/tap/bosh-cli
Differences v1 and v2
6
$ bosh target <Director IP>
$ bosh login <client> <secret>
$ bosh status
https://bosh.io/docs/cli-v2-diff.html
Before
$ export BOSH_CLIENT=<client>
$ export BOSH_CLIENT_SECRET=<secret>
$ export BOSH_CA_CERT=...
$ export BOSH_ENVIRONMENT=<Director IP>
$ bosh env
After
Differences v1 and v2
7
$ bosh update cloud-config cloud.yml
$ bosh upload stemcell stemcell.tgz
$ bosh upload release foo.tgz
$ bosh deployment foo.yml
$ bosh deploy
https://bosh.io/docs/cli-v2-diff.html
$ bosh update-cloud-config cloud.yml
$ bosh upload-stemcell stemcell.tgz
$ bosh upload-release foo.tgz
$ bosh deploy -d foo foo.yml
Before
After
Differences v1 and v2
8
$ bosh vms
$ bosh instances --ps
https://bosh.io/docs/cli-v2-diff.html
$ bosh vms
$ bosh instances --ps
Before
After
Differences v1 and v2
9
$ bosh deployment foo.yml
$ bosh logs job
https://bosh.io/docs/cli-v2-diff.html
$ bosh logs -d foo job
$ bosh logs -d foo job -f # tailing 🙌
Before
After
Maintaining YAML file (Before)
10
$ bosh deployment foo.yml
instance_groups:
- name: worker
instances: 1
vm_type: default
azs: [z1]
networks: [{name:default}]
Official YAML (from Github)
instance_groups:
- name: worker
instances: 1
vm_type: default
azs: [z1]
networks: [{name:private}]
instance_groups:
- name: worker
instances: 3
vm_type: m4.xlarge
azs: [z1, z2]
networks: [{name:default}]
Copy for my env1
Copy for my env2
Maintaining YAML file (After)
11
instance_groups:
- name: worker
instances: 1
vm_type: default
azs: [z1]
networks: [{name:default}]
Official YAML (from Github)
- type: replace
path: /instance_groups/name=worker/vm_type
value: m4.xlarge
- type: replace
path: /instance_groups/name=worker/instances
value: 3
- type: replace
path: /instance_groups/name=worker/azs/-
value: z2
Operation file (ops.yml) for my env
$ bosh deploy -d foo original.yml 
-o ops.yml
Operation files (YAML Composition)
12
$ bosh deploy -d foo foo.yml 
-o high-availalitiy.yml 
-o multi-az.yml 
-o enable-feature-X.yml 
-o change-vm-type-for-me.yml 
-o change-properties-for-me.yml
Operation files (YAML Composition)
12
$ bosh deploy -d foo foo.yml 
-o high-availalitiy.yml 
-o multi-az.yml 
-o enable-feature-X.yml 
-o change-vm-type-for-me.yml 
-o change-properties-for-me.yml
BOSH release maintainer can provide some
types of configuration without copy-and-paste.
Operation files (YAML Composition)
12
$ bosh deploy -d foo foo.yml 
-o high-availalitiy.yml 
-o multi-az.yml 
-o enable-feature-X.yml 
-o change-vm-type-for-me.yml 
-o change-properties-for-me.yml
You can maintain and compose
only your customizations ☺
BOSH release maintainer can provide some
types of configuration without copy-and-paste.
Download BOSH releases (Before)
13
releases:
- name: concourse
version: 3.4.1
- name: garden-runc
version: 1.6.0
bosh upload-release 
https://bosh.io/d/github.com/concourse/concourse?v=3.4.1
bosh upload-release 
https://bosh.io/d/github.com/cloudfoundry/garden-runc-release?v=1.6.0
bosh deploy -d concourse concourse.yml
Download BOSH releases (After)
14
releases:
- name: concourse
version: 3.4.1
url: https://bosh.io/d/github.com/concourse/concourse?v=3.4.1
sha1: b9c3cd85caccf0dae7406f8d7dfc237b4c698ce6
- name: garden-runc
version: 1.6.0
url: https://bosh.io/d/github.com/cloudfoundry/garden-runc-release?v=1.6.0
sha1: 58fbc64aff303e6d76899441241dd5dacef50cb7
bosh deploy -d concourse concourse.yml
Variables Interpolation
15
instance_groups:
- name: web
jobs:
- name: atc
release: concourse
properties:
basic_auth_username: admin
basic_auth_password: opensesami
🤔
Variables Interpolation
16
instance_groups:
- name: web
jobs:
- name: atc
release: concourse
properties:
basic_auth_username: admin
basic_auth_password: ((ui_password))
bosh deploy -d concourse concourse.yml -v ui_password=opensesami
Variables Interpolation
17
instance_groups:
- name: web
jobs:
- name: atc
release: concourse
properties:
basic_auth_username: admin
basic_auth_password: ((ui_password))
variables:
- name: ui_password
type: password
Variables Interpolation
18
bosh deploy -d concourse concourse.yml 
--vars-store ./creds.yml
ui_password: u98vzinh4y8gfcr1h6g0
creds.yml
Variables Interpolation + CredHub
19
bosh deploy -d concourse concourse.yml
https://github.com/cloudfoundry-incubator/credhub
Director CredHub
Director VM
/my-director/concourse/ui_password u98vzinh4y8gfcr1h6g0
How to provision Director?
20
Infrastructure
Director
BOSH VMs
LoaderBalancer
BOSH VMs
BOSH VMs
Stemcell
BOSH Release
Manifest
Cloud ConfigBOSH CLI
21
$ bosh-init your-env.yml
Bootstrapping BOSH Director (Before)
21
$ bosh-init your-env.yml
Bootstrapping BOSH Director (Before)
Copy from bosh.io
and
change environment
configuration
22
$ git clone https://github.com/cloudfoundry/bosh-deployment.git
$ bosh create-env bosh-deployment/bosh.yml 
--state=state.json 
--vars-store=creds.yml 
-o bosh-deployment/aws/cpi.yml 
-v director_name=bosh-1 
-v internal_cidr=10.0.0.0/24 
-v internal_gw=10.0.0.1 
-v internal_ip=10.0.0.6 
-v subnet_id=subnet-ait8g34t 
-v access_key_id=AKI... 
-v ...
Bootstrapping BOSH Director (After)
Base template
Environment
configuration
23
$ bosh create-env bosh-deployment/bosh.yml 
-o bosh-deployment/aws/cpi.yml 
-v director_name=bosh-1 
-v internal_cidr=10.0.0.0/24 
-v internal_gw=10.0.0.1 
-v internal_ip=10.0.0.6 
-v subnet_id=subnet-ait8g34t 
-v access_key_id=AKI... 
-v ...
BOSH Director for AWS
24
$ bosh create-env bosh-deployment/bosh.yml 
-o bosh-deployment/gcp/cpi.yml 
-v director_name=bosh-1 
-v internal_cidr=10.0.0.0/24 
-v internal_gw=10.0.0.1 
-v internal_ip=10.0.0.6 
-v project_id=moonlight-2389ry3 
--var-file gcp_credentials_json=~/Downloads/gcp.json 
-v ...
BOSH Director for GCP
25
$ bosh create-env bosh-deployment/bosh.yml 
-o bosh-deployment/gcp/cpi.yml 
-o bosh-deployment/uaa.yml 
-v director_name=bosh-1 
-v ...
BOSH Director with UAA
26
$ bosh create-env bosh-deployment/bosh.yml 
-o bosh-deployment/gcp/cpi.yml 
-o bosh-deployment/uaa.yml 
-o bosh-deployment/credhub.yml 
-v director_name=bosh-1 
-v ...
BOSH Director with UAA + CredHub
27
$ bosh create-env bosh-deployment/bosh.yml 
-o bosh-deployment/virtualbox/cpi.yml 
-o bosh-deployment/virtualbox/outbound-network.yml 
-o bosh-deployment/bosh-lite.yml 
-o bosh-deployment/bosh-lite-runc.yml 
-v ...
BOSH Director for VirtualBox (a.k.a BOSH Lite)
28
$ bosh create-env bosh-deployment/bosh.yml 
-o bosh-deployment/virtualbox/cpi.yml 
-o bosh-deployment/virtualbox/outbound-network.yml 
-o bosh-deployment/bosh-lite.yml 
-o bosh-deployment/bosh-lite-runc.yml 
-o bosh-deployment/uaa.yml 
-v ...
BOSH Lite with UAA
29
$ bosh create-env bosh-deployment/bosh.yml 
-o bosh-deployment/virtualbox/cpi.yml 
-o bosh-deployment/virtualbox/outbound-network.yml 
-o bosh-deployment/bosh-lite.yml 
-o bosh-deployment/bosh-lite-runc.yml 
-o bosh-deployment/uaa.yml 
-o bosh-deployment/credhub.yml 
-v ...
BOSH Lite with UAA + CredHub
30
$ bosh create-env bosh-deployment/bosh.yml 
-o bosh-deployment/gcp/cpi.yml 
-o bosh-deployment/bosh-lite.yml 
-o bosh-deployment/bosh-lite-runc.yml 
-o bosh-deployment/uaa.yml 
-o bosh-deployment/credhub.yml 
-v ...
BOSH Lite with UAA + CredHub for GCP
Concourse (Single VM) without BOSH Director
31
$ git clone https://github.com/concourse/concourse-deployment
$ bosh create-env concourse-deployment/concourse.yml 
-o concourse-deployment/infrastructures/virtualbox.yml 
--vars-store vbox-creds.yml 
--state vbox-state.json 
-v internal_cidr=192.168.50.0/24 
-v internal_gw=192.168.50.1 
-v internal_ip=192.168.50.4 
-v public_ip=192.168.50.4
Concourse (Single VM) without BOSH Director
32
$ git clone https://github.com/concourse/concourse-deployment
$ bosh create-env concourse-deployment/concourse.yml 
-o concourse-deployment//infrastructures/gcp.yml 
--vars-store gcp-creds.yml 
--state gcp-state.json 
-v gcp_credentials_json="'$gcp_credentials_json'" 
-v internal_cidr=... -v internal_gw=... 
-v internal_ip=... -v public_ip=... 
-v network=... -v project_id=... 
-v subnetwork=... -v tags=... 
-v zone=...
How to provision Infrastructure?
33
Infrastructure
Director
BOSH VMs
LoaderBalancer
BOSH VMs
BOSH VMs
Stemcell
BOSH Release
Manifest
Cloud ConfigBOSH CLI
BOSH Boot Loader (a.k.a. bbl)
34
• bbl bootstraps a CloudFoundry or Concourse
installation on AWS and GCP (and Azure).
• terraform is used internally
https://github.com/cloudfoundry/bosh-bootloader
$ brew install cloudfoundry/tap/bbl
Bootstrapping AWS
35
$ export BBL_IAAS=aws
$ export BBL_AWS_ACCESS_KEY_ID=...
$ export BBL_AWS_SECRET_ACCESS_KEY=...
$ export BBL_AWS_REGION=ap-northeast-1
$ bbl up
Bootstrapping GCP
36
$ export BBL_IAAS=gcp
$ export BBL_GCP_SERVICE_ACCOUNT_KEY=...
$ export BBL_GCP_PROJECT_ID=...
$ export BBL_GCP_REGION=asia-northeast1
$ export BBL_GCP_ZONE=asia-northeast1-a
$ bbl up
BOSH Director VM
37
AWS
GCP
Accessing to Director
38
$ eval $(bbl print-env)
$ bosh env
Bootstrapping without BOSH Director
39
$ bbl up --no-director
$ bosh create-env bosh-deployment/bosh.yml 
-o bosh-deployment/aws/cpi.yml 
-o bosh-deployment/uaa.yml 
-o bosh-deployment/credhub.yml 
-l <(bbl bosh-deployment-vars)
$ bosh update-cloud-config <(bbl cloud-config)
https://github.com/cloudfoundry/bosh-bootloader/blob/master/docs/advanced.md
Bootstrapping with Operation Files
40
$ bbl up --ops-file=bosh-deployment/uaa.yml
$ cat uaa.yml credhub.yml > your-ops.yml
$ bbl up --ops-file=your-ops.yml
Multi-ops file is not supported at this moment...
How to provision Infrastructure?
41
Infrastructure
Director
BOSH VMs
LoaderBalancer
BOSH VMs
BOSH VMs
Stemcell
BOSH Release
Manifest
Cloud ConfigBOSH CLI
How to provision Infrastructure?
41
Infrastructure
Director
BOSH VMs
LoaderBalancer
BOSH VMs
BOSH VMs
Stemcell
BOSH Release
Manifest
Cloud ConfigBOSH CLI
$ bbl create-lbs --type cf 
--cert cert.pem 
--key key.pem
# or
$ bbl create-lbs --type concourse
Load Balancer (--type cf)
42
GCP
AWS
(Tips) bosh ssh/logs after bbl
43
$ bbl ssh-key > bosh.pem
$ chmod 400 bosh.pem
$ bosh logs -f foo -d bar 
--gw-private-key bosh.pem
https://github.com/cloudfoundry/bosh-cli/issues/128
cf-deployment
44
$ bosh upload-stemcell https://bosh.io/d/stemcells/...
$ git clone https://github.com/cloudfoundry/cf-deployment.git
$ bosh deploy -d cf cf-deployment/cf-deployment.yml 
--vars-store cf-deployment-vars.yml 
-v system_domain=system.your-domain.example.com
assumes GCP as the default deployment environment.
cf-deployment
44
$ bosh upload-stemcell https://bosh.io/d/stemcells/...
$ git clone https://github.com/cloudfoundry/cf-deployment.git
$ bosh deploy -d cf cf-deployment/cf-deployment.yml 
--vars-store cf-deployment-vars.yml 
-v system_domain=system.your-domain.example.com
assumes GCP as the default deployment environment.
$ bosh update-cloud-config 
cf-deployment/bosh-lite/cloud-config.yml
$ bosh deploy -d cf cf-deployment/cf-deployment.yml 
--vars-store cf-deployment-vars.yml 
-o bosh-deployment/bosh-lite.yml
-v system_domain=bosh-lite.com
BOSH Lite ver.
cf-deployment
45
$ bosh deploy -d cf cf-deployment/cf-deployment.yml 
--vars-store cf-deployment-vars.yml 
-o cf-deployment/operations/aws.yml 
-o cf-deployment/operations/scale-to-one-az.yml 
-o cf-deployment/operations/use-s3-blobstore.yml 
-o cf-deployment/operations/use-latest-stemcell.yml 
-v system_domain=system.your-domain.example.com
cf-deployment
46
$ bosh deploy -d cf cf-deployment/cf-deployment.yml 
--vars-store cf-deployment-vars.yml 
-o cf-deployment/operations/aws.yml 
-o cf-deployment/operations/scale-to-one-az.yml 
-o cf-deployment/use-s3-blobstore.yml 
-o cf-deployment/operations/use-latest-stemcell.yml 
-o cf-deployment/operations/experimental/disable-etcd.yml 
-v system_domain=system.your-domain.example.com
CF on GCP
47
CF on AWS
48
cf login
49
$ PASWORD=`bosh int cf-deployment-vars.yml --
path /cf_admin_password`
$ cf login 
-a api.system.your-domain.example.com 
-u admin 
-p ${PASWORD} 
--skip-ssl-validation
cf-release will be deprecated
50
https://github.com/cloudfoundry/cf-deployment#purpose
Is production ready??
51
https://github.com/cloudfoundry/cf-deployment#readiness
Transition path from cf-release
52
https://github.com/cloudfoundry/cf-deployment-transition

Bonus topics ... (not today)
53
• CredHub
• BOSH Backup and Restore (a.k.a. bbr)
Summary
54
• bbl up to bootstrap IaaS
• bosh create-env to provision BOSH Director
• bosh deploy -d cf cf.yml to deploy a cluster (Cloud
Foundry)
• bosh deploy -d cf cf.yml -o ops.yml to compose
configuration
Thank you!

More Related Content

What's hot

What's hot (20)

Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Kubernetes API - deep dive into the kube-apiserver
Kubernetes API - deep dive into the kube-apiserverKubernetes API - deep dive into the kube-apiserver
Kubernetes API - deep dive into the kube-apiserver
 
Puppet Camp London Fall 2015 - Service Discovery and Puppet
Puppet Camp London Fall 2015 - Service Discovery and PuppetPuppet Camp London Fall 2015 - Service Discovery and Puppet
Puppet Camp London Fall 2015 - Service Discovery and Puppet
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
DevOps with Serverless
DevOps with ServerlessDevOps with Serverless
DevOps with Serverless
 
10 Laravel packages everyone should know
10 Laravel packages everyone should know10 Laravel packages everyone should know
10 Laravel packages everyone should know
 
Hosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceHosting Your Own OTA Update Service
Hosting Your Own OTA Update Service
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 
A Series of Fortunate Events: Building an Operator in Java
A Series of Fortunate Events: Building an Operator in JavaA Series of Fortunate Events: Building an Operator in Java
A Series of Fortunate Events: Building an Operator in Java
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
 
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
 
London Node.js User Group - Cloud-native Node.js
London Node.js User Group - Cloud-native Node.jsLondon Node.js User Group - Cloud-native Node.js
London Node.js User Group - Cloud-native Node.js
 
Extending the Kube API
Extending the Kube APIExtending the Kube API
Extending the Kube API
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
 
以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用
 
ApacheCon NA - Apache Camel K: a cloud-native integration platform
ApacheCon NA - Apache Camel K: a cloud-native integration platformApacheCon NA - Apache Camel K: a cloud-native integration platform
ApacheCon NA - Apache Camel K: a cloud-native integration platform
 
Cloud native - CI/CD
Cloud native - CI/CDCloud native - CI/CD
Cloud native - CI/CD
 
Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...
 

Viewers also liked (6)

はまる!!JPA #glassfish_jp #javaee
はまる!!JPA #glassfish_jp #javaeeはまる!!JPA #glassfish_jp #javaee
はまる!!JPA #glassfish_jp #javaee
 
はじめてのJPA
はじめてのJPAはじめてのJPA
はじめてのJPA
 
Spring Bootで変わる Javaアプリ開発! #jsug
Spring Bootで変わる Javaアプリ開発! #jsugSpring Bootで変わる Javaアプリ開発! #jsug
Spring Bootで変わる Javaアプリ開発! #jsug
 
実例で学ぶ、明日から使えるSpring Boot Tips #jsug
実例で学ぶ、明日から使えるSpring Boot Tips #jsug実例で学ぶ、明日から使えるSpring Boot Tips #jsug
実例で学ぶ、明日から使えるSpring Boot Tips #jsug
 
マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07
マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07
マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07
 
Spring Framework 5.0による Reactive Web Application #JavaDayTokyo
Spring Framework 5.0による Reactive Web Application #JavaDayTokyoSpring Framework 5.0による Reactive Web Application #JavaDayTokyo
Spring Framework 5.0による Reactive Web Application #JavaDayTokyo
 

Similar to BOSH / CF Deployment in modern ways #cf_tokyo

Ensemble oscon 2011
Ensemble oscon 2011Ensemble oscon 2011
Ensemble oscon 2011
OSCON Byrum
 
Concourse bosh orchestration cloud foundry
Concourse bosh orchestration cloud foundryConcourse bosh orchestration cloud foundry
Concourse bosh orchestration cloud foundry
SrinivasaHelavar
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
andymccurdy
 
Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)
LumoSpark
 

Similar to BOSH / CF Deployment in modern ways #cf_tokyo (20)

Ensemble oscon 2011
Ensemble oscon 2011Ensemble oscon 2011
Ensemble oscon 2011
 
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
 
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
 
Install Concourse CI with BOSH
Install Concourse CI with BOSHInstall Concourse CI with BOSH
Install Concourse CI with BOSH
 
Concourse bosh orchestration cloud foundry
Concourse bosh orchestration cloud foundryConcourse bosh orchestration cloud foundry
Concourse bosh orchestration cloud foundry
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-Translator
 
Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment Tactics
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
Ansible with oci
Ansible with ociAnsible with oci
Ansible with oci
 
Writing your Third Plugin
Writing your Third PluginWriting your Third Plugin
Writing your Third Plugin
 
Manage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cliManage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cli
 
Deploying WP Multisite to Heroku
Deploying WP Multisite to HerokuDeploying WP Multisite to Heroku
Deploying WP Multisite to Heroku
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
 
Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)
 
Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating System
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_code
 
How to Contribute Code to MySQL?
How to Contribute Code to MySQL?How to Contribute Code to MySQL?
How to Contribute Code to MySQL?
 

More from Toshiaki Maki

Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3techConsumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
Toshiaki Maki
 

More from Toshiaki Maki (20)

From Spring Boot 2.2 to Spring Boot 2.3 #jsug
From Spring Boot 2.2 to Spring Boot 2.3 #jsugFrom Spring Boot 2.2 to Spring Boot 2.3 #jsug
From Spring Boot 2.2 to Spring Boot 2.3 #jsug
 
Concourse x Spinnaker #concourse_tokyo
Concourse x Spinnaker #concourse_tokyoConcourse x Spinnaker #concourse_tokyo
Concourse x Spinnaker #concourse_tokyo
 
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1tServerless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
 
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
 
Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1
Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1
Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1
 
Spring Boot Actuator 2.0 & Micrometer
Spring Boot Actuator 2.0 & MicrometerSpring Boot Actuator 2.0 & Micrometer
Spring Boot Actuator 2.0 & Micrometer
 
Open Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpOpen Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjp
 
Spring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsugSpring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsug
 
Zipkin Components #zipkin_jp
Zipkin Components #zipkin_jpZipkin Components #zipkin_jp
Zipkin Components #zipkin_jp
 
Spring ❤️ Kotlin #jjug
Spring ❤️ Kotlin #jjugSpring ❤️ Kotlin #jjug
Spring ❤️ Kotlin #jjug
 
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3
 
Managing your Docker image continuously with Concourse CI
Managing your Docker image continuously with Concourse CIManaging your Docker image continuously with Concourse CI
Managing your Docker image continuously with Concourse CI
 
Data Microservices with Spring Cloud Stream, Task, and Data Flow #jsug #spri...
Data Microservices with Spring Cloud Stream, Task,  and Data Flow #jsug #spri...Data Microservices with Spring Cloud Stream, Task,  and Data Flow #jsug #spri...
Data Microservices with Spring Cloud Stream, Task, and Data Flow #jsug #spri...
 
Short Lived Tasks in Cloud Foundry #cfdtokyo
Short Lived Tasks in Cloud Foundry #cfdtokyoShort Lived Tasks in Cloud Foundry #cfdtokyo
Short Lived Tasks in Cloud Foundry #cfdtokyo
 
Team Support in Concourse CI 2.0 #concourse_tokyo
Team Support in Concourse CI 2.0 #concourse_tokyoTeam Support in Concourse CI 2.0 #concourse_tokyo
Team Support in Concourse CI 2.0 #concourse_tokyo
 
From Zero to Hero with REST and OAuth2 #jjug
From Zero to Hero with REST and OAuth2 #jjugFrom Zero to Hero with REST and OAuth2 #jjug
From Zero to Hero with REST and OAuth2 #jjug
 
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3techConsumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
 
Implement Service Broker with Spring Boot #cf_tokyo
Implement Service Broker with Spring Boot #cf_tokyoImplement Service Broker with Spring Boot #cf_tokyo
Implement Service Broker with Spring Boot #cf_tokyo
 
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
 
Concourse CI Meetup Demo
Concourse CI Meetup DemoConcourse CI Meetup Demo
Concourse CI Meetup Demo
 

Recently uploaded

Recently uploaded (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

BOSH / CF Deployment in modern ways #cf_tokyo

  • 1. 1 BOSH / CF Deployment in modern ways 2017-09-12 Toshiaki Maki (@making)
  • 2. Who am I ? 2 Toshiaki Maki (@making) https://blog.ik.am Sr. Solutions Architect @Pivotal Japan Spring Framework 💖 Cloud Foundry 💖 BOSH 💖
  • 3. Topics 3 • BOSH CLI v2 • BOSH Boot Loader • cf deployment
  • 5. BOSH Deployment General Workflow 4 Infrastructure LoaderBalancer
  • 6. BOSH Deployment General Workflow 4 Infrastructure LoaderBalancer BOSH CLI
  • 7. BOSH Deployment General Workflow 4 Infrastructure Director LoaderBalancer BOSH CLI
  • 8. BOSH Deployment General Workflow 4 Infrastructure Director LoaderBalancer Cloud ConfigBOSH CLI
  • 9. BOSH Deployment General Workflow 4 Infrastructure Director LoaderBalancer Stemcell Cloud ConfigBOSH CLI
  • 10. BOSH Deployment General Workflow 4 Infrastructure Director LoaderBalancer Stemcell BOSH Release Cloud ConfigBOSH CLI
  • 11. BOSH Deployment General Workflow 4 Infrastructure Director LoaderBalancer Stemcell BOSH Release Manifest Cloud ConfigBOSH CLI
  • 12. BOSH Deployment General Workflow 4 Infrastructure Director BOSH VMs LoaderBalancer BOSH VMs BOSH VMs Stemcell BOSH Release Manifest Cloud ConfigBOSH CLI
  • 13. BOSH Deployment General Workflow 4 Infrastructure Director BOSH VMs LoaderBalancer BOSH VMs BOSH VMs Stemcell BOSH Release Manifest Cloud ConfigBOSH CLI
  • 14. BOSH Deployment General Workflow 4 Infrastructure Director BOSH VMs LoaderBalancer BOSH VMs BOSH VMs Stemcell BOSH Release Manifest Cloud ConfigBOSH CLI
  • 15. BOSH Deployment General Workflow 4 Infrastructure Director BOSH VMs LoaderBalancer BOSH VMs BOSH VMs Stemcell BOSH Release Manifest Cloud ConfigBOSH CLI
  • 16. BOSH Deployment General Workflow 4 Infrastructure Director BOSH VMs LoaderBalancer BOSH VMs BOSH VMs Stemcell BOSH Release Manifest Cloud ConfigBOSH CLI
  • 17. BOSH CLI v2 5 • Executable binary 🙌 by Golang (Ruby for v1 ...😒) • bosh create-env to initialize an environment • operation-files https://bosh.io/docs/cli-v2.html $ brew install cloudfoundry/tap/bosh-cli
  • 18. Differences v1 and v2 6 $ bosh target <Director IP> $ bosh login <client> <secret> $ bosh status https://bosh.io/docs/cli-v2-diff.html Before $ export BOSH_CLIENT=<client> $ export BOSH_CLIENT_SECRET=<secret> $ export BOSH_CA_CERT=... $ export BOSH_ENVIRONMENT=<Director IP> $ bosh env After
  • 19. Differences v1 and v2 7 $ bosh update cloud-config cloud.yml $ bosh upload stemcell stemcell.tgz $ bosh upload release foo.tgz $ bosh deployment foo.yml $ bosh deploy https://bosh.io/docs/cli-v2-diff.html $ bosh update-cloud-config cloud.yml $ bosh upload-stemcell stemcell.tgz $ bosh upload-release foo.tgz $ bosh deploy -d foo foo.yml Before After
  • 20. Differences v1 and v2 8 $ bosh vms $ bosh instances --ps https://bosh.io/docs/cli-v2-diff.html $ bosh vms $ bosh instances --ps Before After
  • 21. Differences v1 and v2 9 $ bosh deployment foo.yml $ bosh logs job https://bosh.io/docs/cli-v2-diff.html $ bosh logs -d foo job $ bosh logs -d foo job -f # tailing 🙌 Before After
  • 22. Maintaining YAML file (Before) 10 $ bosh deployment foo.yml instance_groups: - name: worker instances: 1 vm_type: default azs: [z1] networks: [{name:default}] Official YAML (from Github) instance_groups: - name: worker instances: 1 vm_type: default azs: [z1] networks: [{name:private}] instance_groups: - name: worker instances: 3 vm_type: m4.xlarge azs: [z1, z2] networks: [{name:default}] Copy for my env1 Copy for my env2
  • 23. Maintaining YAML file (After) 11 instance_groups: - name: worker instances: 1 vm_type: default azs: [z1] networks: [{name:default}] Official YAML (from Github) - type: replace path: /instance_groups/name=worker/vm_type value: m4.xlarge - type: replace path: /instance_groups/name=worker/instances value: 3 - type: replace path: /instance_groups/name=worker/azs/- value: z2 Operation file (ops.yml) for my env $ bosh deploy -d foo original.yml -o ops.yml
  • 24. Operation files (YAML Composition) 12 $ bosh deploy -d foo foo.yml -o high-availalitiy.yml -o multi-az.yml -o enable-feature-X.yml -o change-vm-type-for-me.yml -o change-properties-for-me.yml
  • 25. Operation files (YAML Composition) 12 $ bosh deploy -d foo foo.yml -o high-availalitiy.yml -o multi-az.yml -o enable-feature-X.yml -o change-vm-type-for-me.yml -o change-properties-for-me.yml BOSH release maintainer can provide some types of configuration without copy-and-paste.
  • 26. Operation files (YAML Composition) 12 $ bosh deploy -d foo foo.yml -o high-availalitiy.yml -o multi-az.yml -o enable-feature-X.yml -o change-vm-type-for-me.yml -o change-properties-for-me.yml You can maintain and compose only your customizations ☺ BOSH release maintainer can provide some types of configuration without copy-and-paste.
  • 27. Download BOSH releases (Before) 13 releases: - name: concourse version: 3.4.1 - name: garden-runc version: 1.6.0 bosh upload-release https://bosh.io/d/github.com/concourse/concourse?v=3.4.1 bosh upload-release https://bosh.io/d/github.com/cloudfoundry/garden-runc-release?v=1.6.0 bosh deploy -d concourse concourse.yml
  • 28. Download BOSH releases (After) 14 releases: - name: concourse version: 3.4.1 url: https://bosh.io/d/github.com/concourse/concourse?v=3.4.1 sha1: b9c3cd85caccf0dae7406f8d7dfc237b4c698ce6 - name: garden-runc version: 1.6.0 url: https://bosh.io/d/github.com/cloudfoundry/garden-runc-release?v=1.6.0 sha1: 58fbc64aff303e6d76899441241dd5dacef50cb7 bosh deploy -d concourse concourse.yml
  • 29. Variables Interpolation 15 instance_groups: - name: web jobs: - name: atc release: concourse properties: basic_auth_username: admin basic_auth_password: opensesami 🤔
  • 30. Variables Interpolation 16 instance_groups: - name: web jobs: - name: atc release: concourse properties: basic_auth_username: admin basic_auth_password: ((ui_password)) bosh deploy -d concourse concourse.yml -v ui_password=opensesami
  • 31. Variables Interpolation 17 instance_groups: - name: web jobs: - name: atc release: concourse properties: basic_auth_username: admin basic_auth_password: ((ui_password)) variables: - name: ui_password type: password
  • 32. Variables Interpolation 18 bosh deploy -d concourse concourse.yml --vars-store ./creds.yml ui_password: u98vzinh4y8gfcr1h6g0 creds.yml
  • 33. Variables Interpolation + CredHub 19 bosh deploy -d concourse concourse.yml https://github.com/cloudfoundry-incubator/credhub Director CredHub Director VM /my-director/concourse/ui_password u98vzinh4y8gfcr1h6g0
  • 34. How to provision Director? 20 Infrastructure Director BOSH VMs LoaderBalancer BOSH VMs BOSH VMs Stemcell BOSH Release Manifest Cloud ConfigBOSH CLI
  • 36. 21 $ bosh-init your-env.yml Bootstrapping BOSH Director (Before) Copy from bosh.io and change environment configuration
  • 37. 22 $ git clone https://github.com/cloudfoundry/bosh-deployment.git $ bosh create-env bosh-deployment/bosh.yml --state=state.json --vars-store=creds.yml -o bosh-deployment/aws/cpi.yml -v director_name=bosh-1 -v internal_cidr=10.0.0.0/24 -v internal_gw=10.0.0.1 -v internal_ip=10.0.0.6 -v subnet_id=subnet-ait8g34t -v access_key_id=AKI... -v ... Bootstrapping BOSH Director (After) Base template Environment configuration
  • 38. 23 $ bosh create-env bosh-deployment/bosh.yml -o bosh-deployment/aws/cpi.yml -v director_name=bosh-1 -v internal_cidr=10.0.0.0/24 -v internal_gw=10.0.0.1 -v internal_ip=10.0.0.6 -v subnet_id=subnet-ait8g34t -v access_key_id=AKI... -v ... BOSH Director for AWS
  • 39. 24 $ bosh create-env bosh-deployment/bosh.yml -o bosh-deployment/gcp/cpi.yml -v director_name=bosh-1 -v internal_cidr=10.0.0.0/24 -v internal_gw=10.0.0.1 -v internal_ip=10.0.0.6 -v project_id=moonlight-2389ry3 --var-file gcp_credentials_json=~/Downloads/gcp.json -v ... BOSH Director for GCP
  • 40. 25 $ bosh create-env bosh-deployment/bosh.yml -o bosh-deployment/gcp/cpi.yml -o bosh-deployment/uaa.yml -v director_name=bosh-1 -v ... BOSH Director with UAA
  • 41. 26 $ bosh create-env bosh-deployment/bosh.yml -o bosh-deployment/gcp/cpi.yml -o bosh-deployment/uaa.yml -o bosh-deployment/credhub.yml -v director_name=bosh-1 -v ... BOSH Director with UAA + CredHub
  • 42. 27 $ bosh create-env bosh-deployment/bosh.yml -o bosh-deployment/virtualbox/cpi.yml -o bosh-deployment/virtualbox/outbound-network.yml -o bosh-deployment/bosh-lite.yml -o bosh-deployment/bosh-lite-runc.yml -v ... BOSH Director for VirtualBox (a.k.a BOSH Lite)
  • 43. 28 $ bosh create-env bosh-deployment/bosh.yml -o bosh-deployment/virtualbox/cpi.yml -o bosh-deployment/virtualbox/outbound-network.yml -o bosh-deployment/bosh-lite.yml -o bosh-deployment/bosh-lite-runc.yml -o bosh-deployment/uaa.yml -v ... BOSH Lite with UAA
  • 44. 29 $ bosh create-env bosh-deployment/bosh.yml -o bosh-deployment/virtualbox/cpi.yml -o bosh-deployment/virtualbox/outbound-network.yml -o bosh-deployment/bosh-lite.yml -o bosh-deployment/bosh-lite-runc.yml -o bosh-deployment/uaa.yml -o bosh-deployment/credhub.yml -v ... BOSH Lite with UAA + CredHub
  • 45. 30 $ bosh create-env bosh-deployment/bosh.yml -o bosh-deployment/gcp/cpi.yml -o bosh-deployment/bosh-lite.yml -o bosh-deployment/bosh-lite-runc.yml -o bosh-deployment/uaa.yml -o bosh-deployment/credhub.yml -v ... BOSH Lite with UAA + CredHub for GCP
  • 46. Concourse (Single VM) without BOSH Director 31 $ git clone https://github.com/concourse/concourse-deployment $ bosh create-env concourse-deployment/concourse.yml -o concourse-deployment/infrastructures/virtualbox.yml --vars-store vbox-creds.yml --state vbox-state.json -v internal_cidr=192.168.50.0/24 -v internal_gw=192.168.50.1 -v internal_ip=192.168.50.4 -v public_ip=192.168.50.4
  • 47. Concourse (Single VM) without BOSH Director 32 $ git clone https://github.com/concourse/concourse-deployment $ bosh create-env concourse-deployment/concourse.yml -o concourse-deployment//infrastructures/gcp.yml --vars-store gcp-creds.yml --state gcp-state.json -v gcp_credentials_json="'$gcp_credentials_json'" -v internal_cidr=... -v internal_gw=... -v internal_ip=... -v public_ip=... -v network=... -v project_id=... -v subnetwork=... -v tags=... -v zone=...
  • 48. How to provision Infrastructure? 33 Infrastructure Director BOSH VMs LoaderBalancer BOSH VMs BOSH VMs Stemcell BOSH Release Manifest Cloud ConfigBOSH CLI
  • 49. BOSH Boot Loader (a.k.a. bbl) 34 • bbl bootstraps a CloudFoundry or Concourse installation on AWS and GCP (and Azure). • terraform is used internally https://github.com/cloudfoundry/bosh-bootloader $ brew install cloudfoundry/tap/bbl
  • 50. Bootstrapping AWS 35 $ export BBL_IAAS=aws $ export BBL_AWS_ACCESS_KEY_ID=... $ export BBL_AWS_SECRET_ACCESS_KEY=... $ export BBL_AWS_REGION=ap-northeast-1 $ bbl up
  • 51. Bootstrapping GCP 36 $ export BBL_IAAS=gcp $ export BBL_GCP_SERVICE_ACCOUNT_KEY=... $ export BBL_GCP_PROJECT_ID=... $ export BBL_GCP_REGION=asia-northeast1 $ export BBL_GCP_ZONE=asia-northeast1-a $ bbl up
  • 53. Accessing to Director 38 $ eval $(bbl print-env) $ bosh env
  • 54. Bootstrapping without BOSH Director 39 $ bbl up --no-director $ bosh create-env bosh-deployment/bosh.yml -o bosh-deployment/aws/cpi.yml -o bosh-deployment/uaa.yml -o bosh-deployment/credhub.yml -l <(bbl bosh-deployment-vars) $ bosh update-cloud-config <(bbl cloud-config) https://github.com/cloudfoundry/bosh-bootloader/blob/master/docs/advanced.md
  • 55. Bootstrapping with Operation Files 40 $ bbl up --ops-file=bosh-deployment/uaa.yml $ cat uaa.yml credhub.yml > your-ops.yml $ bbl up --ops-file=your-ops.yml Multi-ops file is not supported at this moment...
  • 56. How to provision Infrastructure? 41 Infrastructure Director BOSH VMs LoaderBalancer BOSH VMs BOSH VMs Stemcell BOSH Release Manifest Cloud ConfigBOSH CLI
  • 57. How to provision Infrastructure? 41 Infrastructure Director BOSH VMs LoaderBalancer BOSH VMs BOSH VMs Stemcell BOSH Release Manifest Cloud ConfigBOSH CLI $ bbl create-lbs --type cf --cert cert.pem --key key.pem # or $ bbl create-lbs --type concourse
  • 58. Load Balancer (--type cf) 42 GCP AWS
  • 59. (Tips) bosh ssh/logs after bbl 43 $ bbl ssh-key > bosh.pem $ chmod 400 bosh.pem $ bosh logs -f foo -d bar --gw-private-key bosh.pem https://github.com/cloudfoundry/bosh-cli/issues/128
  • 60. cf-deployment 44 $ bosh upload-stemcell https://bosh.io/d/stemcells/... $ git clone https://github.com/cloudfoundry/cf-deployment.git $ bosh deploy -d cf cf-deployment/cf-deployment.yml --vars-store cf-deployment-vars.yml -v system_domain=system.your-domain.example.com assumes GCP as the default deployment environment.
  • 61. cf-deployment 44 $ bosh upload-stemcell https://bosh.io/d/stemcells/... $ git clone https://github.com/cloudfoundry/cf-deployment.git $ bosh deploy -d cf cf-deployment/cf-deployment.yml --vars-store cf-deployment-vars.yml -v system_domain=system.your-domain.example.com assumes GCP as the default deployment environment. $ bosh update-cloud-config cf-deployment/bosh-lite/cloud-config.yml $ bosh deploy -d cf cf-deployment/cf-deployment.yml --vars-store cf-deployment-vars.yml -o bosh-deployment/bosh-lite.yml -v system_domain=bosh-lite.com BOSH Lite ver.
  • 62. cf-deployment 45 $ bosh deploy -d cf cf-deployment/cf-deployment.yml --vars-store cf-deployment-vars.yml -o cf-deployment/operations/aws.yml -o cf-deployment/operations/scale-to-one-az.yml -o cf-deployment/operations/use-s3-blobstore.yml -o cf-deployment/operations/use-latest-stemcell.yml -v system_domain=system.your-domain.example.com
  • 63. cf-deployment 46 $ bosh deploy -d cf cf-deployment/cf-deployment.yml --vars-store cf-deployment-vars.yml -o cf-deployment/operations/aws.yml -o cf-deployment/operations/scale-to-one-az.yml -o cf-deployment/use-s3-blobstore.yml -o cf-deployment/operations/use-latest-stemcell.yml -o cf-deployment/operations/experimental/disable-etcd.yml -v system_domain=system.your-domain.example.com
  • 66. cf login 49 $ PASWORD=`bosh int cf-deployment-vars.yml -- path /cf_admin_password` $ cf login -a api.system.your-domain.example.com -u admin -p ${PASWORD} --skip-ssl-validation
  • 67. cf-release will be deprecated 50 https://github.com/cloudfoundry/cf-deployment#purpose
  • 69. Transition path from cf-release 52 https://github.com/cloudfoundry/cf-deployment-transition

  • 70. Bonus topics ... (not today) 53 • CredHub • BOSH Backup and Restore (a.k.a. bbr)
  • 71. Summary 54 • bbl up to bootstrap IaaS • bosh create-env to provision BOSH Director • bosh deploy -d cf cf.yml to deploy a cluster (Cloud Foundry) • bosh deploy -d cf cf.yml -o ops.yml to compose configuration Thank you!