Está en la página 1de 16

Zurich University

of Applied Sciences

School of
Engineering
InIT Institute of Applied
Information Technology

CloudFoundry on OpenStack

Lightning Talk at SwissOpenStack User Group Mee=ng


19.2.2013
Christof.Mar=@zhaw.ch
#ICCLab / ZHAW
www.cloudcomp.ch

Outline

CloudFoundry
Installa=on op=ons
BOSH
BOSH Components
BOSH Bootstrap

19.02.13

ICCLab - www.cloudcomp.ch

CloudFoundry (very brief)

Frameworks / Run=mes

19.02.13

ICCLab - www.cloudcomp.ch

CloudFoundry Architecture

Source: NTT Communica=ons, cloudfoundry.org

19.02.13

ICCLab - www.cloudcomp.ch

CloudFoundry Architecture
Highly redundant (distributed state, self-
healing, horizontally scalable)
Scaling in Number of VMs
from one Micro-CloudFoundry (no redundancy)
over hundreds Private PaaS
to thousands Public PaaS Provider
cloudfoundry.com, Ac=veState, AppFog, Joyent, ...

19.02.13

ICCLab - www.cloudcomp.ch

Installa=on Op=ons
manual installa=on
possible, but really, really not recommended

dev_setup (simple chef based setup)


outdated, likely to be deprecated soon
there is an Opscode version, status unknown

Bosh Bootstrapper (Micro-BOSH based)


recommended for developers or small installa=ons

BOSH (Produc=on Grade)


recommended for medium to large installa=ons
19.02.13

ICCLab - www.cloudcomp.ch

What is BOSH
Bosh Outer Shell (don't ask me where it exactly comes from)

Automated installa=on Infrastructure (like Chef, Puppet, ...)


specialized to run
on Cloud Scale (thousands of VMs)
on top of IaaS Frameworks (OpenStack, AWS, VMware,...)
abstracted using a Cloud Provider Interface (CPI)

Sobware Deployment, Congura=on and Update

Op=mized to minimize Down=me


Support for mul=ple VM roles
Release Management with Versioning
Ac=ve Monitoring and Aler=ng

used to run cloudfoundry.com since launch


19.02.13

ICCLab - www.cloudcomp.ch

Produc=on Grade CloudFoundry

Source: hgp://de.slideshare.net/ramnivas2/cloudfoundry-architecture

19.02.13

ICCLab - www.cloudcomp.ch

IaaS neutral by design


BOSH
Cloud Provider Interface (CPI)

community

19.02.13

by Piston

ICCLab - www.cloudcomp.ch

BOSH Architecture
simple BS server
S3
Atmos (EMC)

Source:
hgp://cloudfoundry.github.com/docs/running/deploying-cf/components/

19.02.13

10

BOSH Components
Manifest
Deployment Manifest

Deployment
Manifest
Deployment
Manifest
Release name
& version

Release nname
ame && v ersion
version
Release
Stemcells
t
o
u
se
Stemcells to
to use
se
Stemcells
Number oof f VuVMs
Ms for
for each
ach Job
Job

Number
Number of VMs for eeach
Job
Descrip=on of environment
Network
Service congura=ons
Specic to the infrastructure
(e.g. dierent zones/areas like
development, qa, stress, staging,
produc=on)

Environments
Congura=on
Congura=on
Congura=on
Sobware Packages
Sobware Packages
Sobware
Packages
Stemcell
Stemcell
Stemcell
DB & Blobstore

Releases
Stemcells
Stemcell

Stemcell
Stemcell
containing
VM Image
VM Image
Image containing
containing
VM

Base
O
Base OOS S S
Base
BOSH AAgent
gent
BOSH
BOSH
Agent

Specic for the environment


(e.g. IaaS brand)

BOSH
CPI

Deployments
Running VMs with installed,
Running VMs with installed,
Running
VMs w
ith installed,
congured
packages
& services
congured packages & services
congured packages & services

Release

Release
Release
Descrip7on
Name
Name
Name
Version

Version
Version

So.ware PPackages
ackages
So.ware
So.ware
P
ackages
External/Internal
External/Internal
External/Internal
Dependencies
Dependencies
Dependencies

Jobs
Jobs
Jobs
List of Instruc=ons to
List of Instruc=ons to

List
of Instruc=ons
build,
install and to
build, install and
build,
install paackages
nd
congure
congure packages
congure
packages
Sobware
Packages
Sobware Packages
Sobware
Packages
Congura=on
Templates
Congura=on Templates
Congura=on
T
emplates
Scripts
Scripts
Scripts
For the public CF Release descrip=ons
are provided, but can extended to
include addi=onal services

In the underlying IaaS Environment

19.02.13

ICCLab - www.cloudcomp.ch

11

Example Release Deni=on


---
jobs:
packages:
- name: atmos_gateway
- name: atmos_gateway
version: 9
version: 25
sha1: 5b890af74235d7a3b6217a94f889f17a56c187ab
sha1: 9cb8fa4f742e3996fe407612la3c950b57a0505
- name: backup_manager
dependencies:
version: 12
- ruby
sha1: bd0edcc744c9851d07ed01ba25b83524d886361a
- sqlite
- name: ccdb_postgres
- name: backup_manager
version: 6
version: 28
sha1: 6a421086557cd1e584b4d5306e647acdbe744e4e
sha1: cfe77af5aaab1b33d266670777251558358a857e
- name: cloud_controller
dependencies:
version: 47
- sqlite
sha1: e40a473f8ae6a759ee2a3408b8d8234e527c50
- ruby
- name: collector
- name: cloud_controller
version: 5
version: 65
sha1: 40bec25b5bd2d27ee821aeca0cd6495b28357159
sha1: f2dcd178ee68207904025f1aa12279542452878c
...
dependencies:
- libpq
- mysqlclient
- sqlite
- ruby
- insight_agent
...
for public CF see: hgps://github.com/cloudfoundry/cf-release/tree/master/releases
19.02.13

ICCLab - www.cloudcomp.ch

12

Example manifest for Micro-CF


---
deployment: micro
release:
name: micro
version: 13
congura=on_hash: {}
proper=es:
micro: true
domain: vcap.me
env:
networks:
apps: local
management: local
dea:
max_memory: 2048
dea_next:
memory_mb: 2048
disk_mb: 8192
num_instances: 16
router:
client_inac=vity_=meout: 600
app_inac=vity_=meout: 600
local_route: 127.0.0.1
status:
port: 8080
user:
password:

....
cc:
descrip=on: "VMware's Micro Cloud Applica=on Plaporm"
srv_api_uri: hgp://api.vcap.me
password:
token:
allow_debug: true
allow_registra=on: true
admins:
- admin@vcap.me
admin_account_capacity:
memory: 2048
app_uris: 32
services: 16
apps: 16
default_account_capacity:
memory: 2048
app_uris: 32
services: 16
apps: 16
new_stager_percent: 100
staging_upload_user:
staging_upload_password:
....

hgps://github.com/cloudfoundry/cf-release/blob/master/micro/manifest.yml
19.02.13

ICCLab - www.cloudcomp.ch

13

Bootstrapping CF with BOSH


1.
Install MicroBOSH
MicroBOSH
(All of BOSH in
1 VM)

2.
Install MicroBOSH
BOSH
(DB, Blobstore,
Director +
Worker Nodes)
5.. VMs

3.
Install CloudFoundry
CloudFoundry
(Services + DEA
VMs)
100-5000VMs

Use ocial new documenta=on:


hgp://cloudfoundry.github.com/docs/running/deploying-cf/openstack/

or simpler BOSH Bootstrap
hgps://github.com/StarkAndWayne/bosh-bootstrap

# gem install bosh-bootstrap
# bosh-bootstrap deploy --latest-stemcell
19.02.13

ICCLab - www.cloudcomp.ch

14

Zero to CF in a few hours


# on your laptop
gem install bosh-bootstrap
bosh-bootstrap deploy
# prompts for AWS/OpenStack creden=als
# and some other elds that you can
# just press Enter for.

# SSH into incep=on VM
bosh-bootstrap ssh

git cong --global user.email "you@example.com"
git cong --global user.name "Your Name"

sudo gem install bosh-cloudfoundry
export TMPDIR=/var/vcap/store/tmp
bosh cf prepare system produc7on
# prompts for a DNS host for your CloudFoundry, such as
mycompany.com
# will generate a new IP address
# now setup your DNS for *.mycompany.com => new IP
address
# the re-run:
bosh cf prepare system produc7on

# use special "cf deploy" to install VMC & create ini=al VMC
user
bosh cf deploy

# now we can grow our single VM deployment

bosh cf change deas 100
bosh cf add service postgresql
bosh deploy


hgps://github.com/StarkAndWayne/bosh-cloudfoundry

19.02.13

ICCLab - www.cloudcomp.ch

15

Ques=ons

We are hiring!!!

For more infos see:


hgp://www.cloudcomp.ch/2012/06/icclab-open-posi=ons/
19.02.13

ICCLab - www.cloudcomp.ch

16

También podría gustarte