Nise BOSH in Action


Published on

Published in: Technology

Nise BOSH in Action

  1. 1. Nise BOSH In ActionIwasaki Yudai @i_yudaiNTT Software Innovation Center2013-04-26
  2. 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 supportAgenda
  3. 3. Installing cf-release jobs with Nise BOSH
  4. 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. 5. Tool chain for distributed systems– Release engineering– Lifecycle management– Works with IaaS layers (CPI)• AWS, vSphere, vCloud and OpenStackWhat’s BOSH?(c) EMC & VMware
  6. 6. Photo by yeowatzup from worth trying
  7. 7. A lightweight BOSH (nearly) emulator– Works on a local machine– Without any CPIWhat’s Nise BOSH
  8. 8. ./bin/init– Stemcell-like environment builder./bin/nise-bosh– Package installer./bin/run-job– Job launcherMain Three ScriptsVMStemcelldea_next (Job template)common(Package)dea_next(Package)ruby(Package)Agent
  9. 9. Sets up Stemcell-like environment– Installs apt packages, create users and so on...Ported from Stemcell Builder stages– ≈ OS + bosh_agent + α= Basic VM imageVMStemcelldea_next (Job template)common(Package)dea_next(Package)ruby(Package)Agent
  10. 10. Installs packages and job templates– Automatically resolving dependencies– Running packaging scripts– Filling templates with deploy manifest./bin/nise-boshPackages:• References to source code• Packaging(installer) scriptsJob templates:• Package list• Configuration file/Control script/monitrc templates VMStemcelldea_next (Job template)common(Package)dea_next(Package)ruby(Package)Agent
  11. 11. Job launcher– Reads monitrc file from job templates• Resolving task dependencies– start/stop/status./bin/run-job
  12. 12. Entry on Cloud–README.mdHow To Use
  13. 13. Ubuntu 10.04 64bit– Recommended for cf-releaseExample: Installing dea_next (1)sudo apt-get install git-core# Clone Nise BOSH and initialize the environmentgit clone nise_boshsudo ./bin/initsudo reboot# Install ruby with rbenvcd ~git clone git:// ~/.rbenvecho export PATH="$HOME/.rbenv/bin:$PATH" >> ~/.bash_profileecho eval "$(rbenv init -)" >> ~/.bash_profileexec $SHELL –lgit clone ~/.rbenv/plugins/ruby-buildrbenv install 1.9.3-p327rbenv global 1.9.3-p327# Install required gemsgem install bundlergem install bosh_clirbenv rehashUbuntu 10.04 64bit is recommended for cf-release
  14. 14. Generating package archives– `bosh craete release` creates pre-packaged tar files in .dev_buildsExample: Installing dea_next (2)# Clone cf-releasegit clone cf-release./update # check out submodules# Create release packagesbosh create release –force # give ‘appcloud’ for the prompt
  15. 15. Deployment manifest– Compatible with BOSHExample: Install dea_next (3)vi ~/deploy.conf---properties:domain: vcap.menetworks:apps: defaultmanagement: defaultnats:user: natspassword: natsaddress: 4222dea_next:streaming_timeout: 60memory_mb: 4096memory_overcommit_factor: 1disk_mb: 32000disk_overcommit_factor: 1num_instances: 30
  16. 16. Installing dea_next job templateExample: Installing dea_next (4)cd ~/nise_boshsudo env PATH=$PATH bundle installsudo env PATH=$PATH bundle exec ./bin/nise-bosh ~/cf-release ~/deploy.confdea_next
  17. 17. Launching processesExample: Installing dea_next (5)sudo env PATH=$PATH bundle exec ./bin/run-job start
  18. 18. ./bin/nise-bosh has some options– See
  19. 19. DEA/NG and CCv1 compatibility
  20. 20. 2013-04-26Photo from of Buildpack
  21. 21. The Commitment
  22. 22. Rest In Peace CCv1
  23. 23. Reverted and works–– Copy runtimes from CCv1• ~/cloudfoundry/.deployments• Removed from cf-release•– Disable integrated Stager– Add runtimes in config fileThe Return of CCv1