Upload
cornelia-davis
View
761
Download
1
Tags:
Embed Size (px)
Citation preview
2© 2015 Pivotal Software, Inc. All rights reserved. 2© 2015 Pivotal Software, Inc. All rights reserved.
Declarative Infrastructure with Cloud Foundry BOSHGluecon 2015
Cornelia Davis, Director, Platform Engineering, Cloud Foundry @cdavisafcMay 20, 2015
3© 2015 Pivotal Software, Inc. All rights reserved. 3© 2015 Pivotal Software, Inc. All rights reserved.
Demo
4© Copyright 2015 Pivotal. All rights reserved.
All that is in the Elastic Runtime
The ERS is deployed and
managed as a cluster of
VMs
Pivotal CF Elastic Runtime
Dynamic Router
OAuth 2.0 Server (UAA)
Health Manager
Application Execution (DEA)
Warden
Build Packs
Login Server
Cloud Controller
Blob Store
Message Bus(NATS)
Sys Log
Serv
ices
and
Bro
kers
Collector Loggregator
ROUTING
AUTHENTICATION
APP LIFECYCLE
APP STORAGE& EXECUTION
MESSAGING
METRICS & LOGGING
Pivotal CF OpsManager/BOSH
5© Copyright 2015 Pivotal. All rights reserved.
BOSH Manages VM Clusters
Pivotal CF Elastic Runtime
Dynamic Router
OAuth 2.0 Server (UAA)
Health Manager
Application Execution (DEA)
Warden
Build Packs
Login Server
Cloud Controller
Blob Store
Message Bus(NATS)
Sys Log
MyS
QL
Collector Loggregator
ROUTING
AUTHENTICATION
APP LIFECYCLE
APP STORAGE& EXECUTION
MESSAGING
METRICS & LOGGING
Pivotal CF OpsManager/BOSH
Rabb
it M
Q
Riak
Redi
s
Cass
andr
a
Clou
dbee
s Je
nkin
s
7© Copyright 2015 Pivotal. All rights reserved.7
Provision services, not machines
Enables continuous delivery
Cloud-agnostic view of Platform Ops
Holistic Toolchain for “rule them all"
Eliminate bespoke automation on top of config management
Why BOSH
8© Copyright 2015 Pivotal. All rights reserved.8
The BOSH Architecture
Very similar to ERS architecture itself
Director as analogy to Cloud Controller
Different CPIs exist per IaaS implementationWorkers responsible for executing tasks as dictated by Director
10© Copyright 2013 Pivotal. All rights reserved.
In the Elastic Runtime
Rout
erBlobstore
Cloud Controller
etcd
Cell Cell Cell
Pivotal Cloud FoundryElastic Runtime
Access App
DBServicecredentialscreds
Converger & Auctioneer
Desired State
credscreds
Actual State
11© Copyright 2013 Pivotal. All rights reserved.
In BOSH
IaaSPivotal CF Operations Manager
PaaS Ops
Health Manager
AGENT
DEA
AGENT
Cloud Controller
AGENT
Message Bus
Health Monitor
Responses:
pager
monitoring
ressurector
…
BOSH Director
Desired State Actual State
12© Copyright 2013 Pivotal. All rights reserved.
VMs are Monitored
IaaSPivotal CF Operations Manager
PaaS Ops
Health Manager
AGENT
DEA
AGENT
Cloud Controller
AGENT
Message Bus
Health Monitor
Responses:
pager
monitoring
ressurector
…
BOSH Director
Desired State Actual State
13© Copyright 2013 Pivotal. All rights reserved.
VMs are Monitored
IaaSPivotal CF Operations Manager
PaaS Ops
Health Manager
AGENT
DEA
AGENT
Cloud Controller
AGENT
Message Bus
Health Monitor
Responses:
pager
monitoring
ressurector
…
BOSH Director
Desired State Actual StateCPI
14© 2015 Pivotal Software, Inc. All rights reserved.
Platform
Services (stateful): Run in virtual machines
Applications (stateless): Run in containers
Cloud Foundry manages transformations between existing and desired system states, using immutable infrastructure.
Amend
(Re)deploy
(Re)configure
(Re)connect
Monitor
Current State Desired
State
15© Copyright 2013 Pivotal. All rights reserved. 15© Copyright 2013 Pivotal. All rights reserved.
BOSH Details
16© 2015 Pivotal Software, Inc. All rights reserved.
Cloud-native Application Platform (3rd Platform)
Elastic Runtime
Agile Microservices
Elastic Hadoop
Jenkins Service
(CI)
Redis
Pivotal Cloud Foundry Operations Manager (BOSH)
KV Store
VMware EC2 OpenstackMediates to the infrastructure, drawing from pools of resources
Rabbit MQ Produces and
manages the specified topologies
17© 2015 Pivotal Software, Inc. All rights reserved.
BOSH to Infrastructureresource_pools:
- name: infrastructure
network: default
size: 6
stemcell:
name: bosh-stemcell
version: 0.4.6
cloud_properties:
cpu: 1
disk: 8192
ram: 4096
Specify:– Pools of VMs– Pools of networks
Nodes declared in the topology will draw from the resources
networks:
- name: default
subnets:
- reserved:
- 172.31.220.2 - 172.31.220.10
static:
- 172.31.220.11 - 172.31.220.100
range: 172.31.220.0/22
gateway: 172.31.220.1
...
18© 2015 Pivotal Software, Inc. All rights reserved.
Cluster Topology
Specify:
Jobs (VMs)– Attributes – i.e. how many– Resource pool consumption
Properties– i.e. Wordpress needs the ip
address of MySQL
19© 2015 Pivotal Software, Inc. All rights reserved.
BOSH Deployment Manifestjobs:
- name: mysql
template: mysql
instances: 1
resource_pool: common-resource-pool
persistent_disk: 10240
networks:
- name: wordpress-network
static_ips:
- 10.244.0.2
- name: wordpress
template: wordpress
instances: 1
...
properties:
mysql:
address: 10.244.0.2
password: rootpass
wordpress:
admin: [email protected]
servers:
- 10.244.0.6
servername: 10.244.0.10
db:
name: wp
user: wordpress
pass: w0rdpr3ss
...
20© 2015 Pivotal Software, Inc. All rights reserved.
BOSH Release
Packages: Bits installed onto VMs– Reference source and blobs– List dependencies– Installation scripts
Jobs: Processes started on VMs– Templates: parameters instantiated at deployment time– Start scripts
Release = collection of packages and jobs
20
Release
21© 2015 Pivotal Software, Inc. All rights reserved.
Message Bus
Deploying the CF Runtime with Cloud Foundry BOSH
IaaSCloud Foundry
Operations Manager/BOSH
DB
BOSH Director
Blobs
Health MonitorDeployment
• Packages• Blobs• Source
• Jobs• Manifest
Deploy my CF
Worker VMs
Messaging
Target VMHealth Manager
Target VMCloud Controller
Target VM
Operator
22© 2015 Pivotal Software, Inc. All rights reserved. 22© 2015 Pivotal Software, Inc. All rights reserved.
Demo
24© 2015 Pivotal Software, Inc. All rights reserved. 24© 2015 Pivotal Software, Inc. All rights reserved.
Demo
27© 2015 Pivotal Software, Inc. All rights reserved.27
How do canary deployments work
Manifest
No downtime, atomic rolling
update
28© 2015 Pivotal Software, Inc. All rights reserved.
Different Flavors of BOSH
Microbosh – all BOSH components on a single VM
Full BOSH– Deployed with Microbosh– Each component is a job, hence separate VM
bosh-lite– You can run this on your laptop. Warden (linux container) CPI– http://github.com/cloudfoundry/bosh-lite
29© 2015 Pivotal Software, Inc. All rights reserved.
Summary
Cloud Foundry is– OSS– Both the Elastic Runtime and BOSH– Eventual consistency is core tenet– Governed by the Cloud Foundry Foundation – a Linux Foundation
Numerous vendors commercial distributions
Declarative, Immutable, Repeatable Infrastructure!
30© 2015 Pivotal Software, Inc. All rights reserved. 30© Copyright 2015 Pivotal. All rights reserved.
Thank You