1. Nise BOSH In Action
Iwasaki Yudai @i_yudai
NTT Software Innovation Center
2013-04-26
2. Installing cf-release jobs with Nise BOSH
– What’s cf-release?
– What’s Nise BOSH?
– How to use
DEA/NG and CCv1 compatibility
– How to revert BuildPack support
Agenda
4. Preconfigured CF source code set
– For installation with BOSH
– Well-tested by many users
– Portable
• Minimum dependencies on apt packages
• Including mysqlclient, imagemagick and so on...
What’s cf-release?
5. Tool chain for distributed systems
– Release engineering
– Lifecycle management
– Works with IaaS layers (CPI)
• AWS, vSphere, vCloud and OpenStack
What’s BOSH?
(c) EMC & VMware
http://docs.cloudfoundry.com/docs/running/bosh/
6. Photo by yeowatzup from http://www.flickr.com/photos/yeowatzup/173818958/
Heavybut worth trying
7. A lightweight BOSH (nearly) emulator
– Works on a local machine
– Without any CPI
What’s Nise BOSH
https://github.com/nttlabs/nise_bosh
8. ./bin/init
– Stemcell-like environment builder
./bin/nise-bosh
– Package installer
./bin/run-job
– Job launcher
Main Three Scripts
VM
Stemcell
dea_next (Job template)
common
(Package)
dea_next
(Package)
ruby
(Package)
Agent
9. Sets up Stemcell-like environment
– Installs apt packages, create users and so on...
Ported from Stemcell Builder stages
– https://github.com/cloudfoundry/bosh/tree/master/stemcell_builder/
./bin/init
Stemcell ≈ OS + bosh_agent + α
= Basic VM image
VM
Stemcell
dea_next (Job template)
common
(Package)
dea_next
(Package)
ruby
(Package)
Agent
10. Installs packages and job templates
– Automatically resolving dependencies
– Running packaging scripts
– Filling templates with deploy manifest
./bin/nise-bosh
Packages:
• References to source code
• Packaging(installer) scripts
Job templates:
• Package list
• Configuration file/Control script/monitrc templates VM
Stemcell
dea_next (Job template)
common
(Package)
dea_next
(Package)
ruby
(Package)
Agent
12. Entry on Cloud Foundry.com
– http://blog.cloudfoundry.com/2013/04/15/ntt-contributes-nise-bosh-a-tool-to-speed-up-bosh-development/
README.md
How To Use
13. Ubuntu 10.04 64bit
– Recommended for cf-release
Example: Installing dea_next (1)
sudo apt-get install git-core
# Clone Nise BOSH and initialize the environment
git clone https://github.com/nttlabs/nise_bosh.git
cd nise_bosh
sudo ./bin/init
sudo reboot
# Install ruby with rbenv
cd ~
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
exec $SHELL –l
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 1.9.3-p327
rbenv global 1.9.3-p327
# Install required gems
gem install bundler
gem install bosh_cli
rbenv rehash
Ubuntu 10.04 64bit is recommended for cf-release
14. Generating package archives
– `bosh craete release` creates pre-
packaged tar files in .dev_builds
Example: Installing dea_next (2)
# Clone cf-release
git clone https://github.com/cloudfoundry/cf-release.git
cd cf-release
./update # check out submodules
# Create release packages
bosh create release –force # give ‘appcloud’ for the prompt
23. Reverted and works
– https://github.com/yudai/dea_ng/commit/ccce77553deff7cfc9b5
a6191e12046207a42ced
– Copy runtimes from CCv1
• ~/cloudfoundry/.deployments
• Removed from cf-release
• https://github.com/cloudfoundry/cf-release/commit/82984735556f931caacf010cf7b52a59032c401f
– Disable integrated Stager
– Add runtimes in config file
The Return of CCv1