Build Your Very Own Private Cloud Foundry: Matt Stine Community Engineer, Cloud Foundry Twitter: @mstine
Build Your Very Own Private Cloud Foundry: Matt Stine Community Engineer, Cloud Foundry Twitter: @mstine
MATT STINE
COMMUNITY ENGINEER, CLOUD FOUNDRY
[email protected]
HTTP://CLOUDFOUNDRY.ORG
TWITTER: @MSTINE
Agenda
CF Architecture - Quick Overview
What is BOSH? Why BOSH?
BOSH Architecture
BOSH Releases
BOSH Deployments
CF to BOSH: cf-release
[:vsphere, :openstack, :aws].each { |iaas| iaas.deploy_cf }
Messaging
Build
Packs
DEA
Pool
Router
e.
co
m
kt
g.
ac
m
ap
p1
.m
DEV
A
TEST
S
m
co
e.
m
ac
g.
MARKETING ORG
n
.e
p2
ap
Load balancing
Maintain routing table
Access logs
app3.finance.acme.co
m
ROUTER
ENGINEERING ORG
FINANCE ORG
PROD
S
DEV
A
TEST
A
PROD
DEV
A
PLATFORM
TEST
PROD
A
UAA
Token Server
ID Server (User management)
OAuth Scopes (Groups)
Login Server
UAA Database
SAML support (for SSO integration) and Active Directory support
with the VMWare SSO Appliance
Access auditing
Cloud Controller
App expected state
Permissions/Auth
Orgs/Spaces/Users
Services management
App placement
App desired state convergence
Auditing/Journaling
Billing events
Blob storage
Messaging (NATS)
Non-Persistent messaging
Pub/Sub
Queues (app events)
Directed messages (INBOX)
Router
App
App
App
App
DEA/Warden
DEA/Warden
Health Manager
HealthManager
SCHEDULER
App
App
Schedule
Observation
App
App
HARMONIZER
Observes
Observes
App
Trigger
Harmonization
Desired
State
NUDGER
Bulk API
App
Actual
State
NATS
NATS
Cloud
Controller
NATS
DEA
Service Broker
Advertising service catalog
Makes create/delete/bind/unbind calls to service
nodes
CF Architecture: Why?
Component Isolation
Scalability
Fault Tolerance
Pre-provisioned Capacity (Containers / Warden)
What about?
BOSH!
(Bosh Outer SHell)
What is BOSH?
Why BOSH?
Provision services, not machines
Eliminate bespoke automation on top of configuration
management
BOSH Architecture
BOSH Architecture
Director
Core orchestrating component
Controls:
creation/deletion of VMs, Disks, Networks
software deployment
lifecycle events for software and services
Via:
Cloud Provider Interface
Director-Agent Interaction
Agent
Carries out instructions from the Director
Fetches packages/jobs from Blobstore
Installs packages/jobs onto VM
Starts/monitors jobs via Monit
Health Monitor
Receives from Agent:
VM health status
Agent lifecycle events
Triggers:
Alerts (Email, CloudWatch, DataDog, PagerDuty, ...)
Resurrection!
Stemcells
Pleuripotent VMs
Base VM filesystem image
Never booted
Currently ~Ubuntu 10.04.4 LTS
Embedded BOSH Agent
Blobstore
Options:
EMC Atmos
S3
OpenStack Swift
Simple/Local
configure_networks
create_disk
delete_disk
attach_disk
snapshot_disk
delete_snapshot
detach_disk
get_disks
BOSH Releases
Redis
Release Manifest
redis-boshrelease/releases/redis-1.yml
Package
redis-boshrelease/packages/redis/spec
Packages
redis-boshrelease/packages/redis/packaging
Jobs
redis-boshrelease/jobs/redis/spec
Jobs
http://mmonit.com/monit
redis-boshrelease/jobs/redis/monit
Jobs
redis-boshrelease/jobs/redis/templates/bin/redis_ctl
Jobs
redis-boshrelease/jobs/redis/templates/conf/redis.conf.erb
BOSH Agent
Director
VM
CPI
Agent Boots
Director
VM
NATS
VM
NATS
VM
VM
HTTP
Blobstore
VM
BOSH Deployments
Deployment Manifests
The mapping of a BOSH release to infrastructure
Specifies:
Release
Compilation VMs
Update (canary) settings
Network configuration
Resource pools (VM templates)
Jobs
Job Properties
redis-boshrelease/examples/aws-solo.yml
redis-boshrelease/examples/aws-solo.yml
redis-boshrelease/examples/aws-solo.yml
redis-boshrelease/examples/aws-solo.yml
cf-release
Release Manifest
cf-release/releases/cf-release-134.yml
Package
cf-release/packages/gorouter/spec
Package
cf-release/packages/gorouter/packaging
Job
cf-release/jobs/gorouter/spec
Jobs
http://mmonit.com/monit
cf-release/jobs/gorouter/monit
Jobs
cf-release/jobs/gorouter/templates/gorouter_ctl.erb
Jobs
cf-release/jobs/gorouter/templates/gorouter_yml.erb
vSphere 101
Minimum Lab HW:
6 Cores (12 threads)
64 GB RAM
4 TB Disk
vSphere 5.1 (2 ESXi hosts, 1 vCenter)
can get 30 day evals!
iSCSI Data Store (http://www.openfiler.com/)
Available IP addresses = 2X number of VMs
https://github.com/cloudfoundry-community/vsphere-home-lab
BOSH Bootstrap
Provide vCenter Credentials (via http://fog.io/)
Provide Network Settings
Provide vCenter Settings (Datacenter, Cluster, ...)
Provide NTP Settings
Provide MicroBOSH VM Sizing
Provision MicroBOSH!
BOSH Prepare CF
http://xip.io
BOSH Create CF
AWS 101
Requirements:
AWS Credentials
Capacity to provision 8 servers and 3 elastic IPs
Approximately $0.42/hour you keep it running (useast-1/us-west-1)
BOSH Bootstrap
Provide AWS Credentials (via http://fog.io/)
Provide AWS Region
Provision MicroBOSH!
BOSH Prepare CF
BOSH Create CF
OpenStack 101
Requirements:
OpenStack Credentials
Capacity to provision 8 servers and 3 floating IPs
Manually configured security group for CF
BOSH Bootstrap
Provide OpenStack Credentials (via http://fog.io/)
Provide OpenStack Region (optional)
Provision MicroBOSH!
BOSH Prepare CF
BOSH Create CF
Web Console UI
Edit src/main/resources/
styx.properties
cf push!
THANK YOU!
MATT STINE
COMMUNITY ENGINEER, CLOUD FOUNDRY
[email protected]
HTTP://WWW.CLOUDFOUNDRY.COM
TWITTER: @MSTINE