Nise BOSH in Action

  • View
    2.612

  • Download
    2

Embed Size (px)

Transcript

  • 1.Nise BOSH In ActionIwasaki Yudai @i_yudaiNTT Software Innovation Center2013-04-26

2. Installing cf-release jobs with Nise BOSH Whats cf-release? Whats Nise BOSH? How to useDEA/NG and CCv1 compatibility How to revert BuildPack supportAgenda 3. Installing cf-release jobs with Nise BOSH 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...Whats cf-release? 5. Tool chain for distributed systems Release engineering Lifecycle management Works with IaaS layers (CPI) AWS, vSphere, vCloud and OpenStackWhats BOSH?(c) EMC & VMwarehttp://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 CPIWhats Nise BOSHhttps://github.com/nttlabs/nise_bosh 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. 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/initStemcell OS + bosh_agent + = Basic VM imageVMStemcelldea_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-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. Job launcher Reads monitrc file from job templates Resolving task dependencies start/stop/status./bin/run-job 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.mdHow To Use 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 https://github.com/nttlabs/nise_bosh.gitcd nise_boshsudo ./bin/initsudo reboot# Install ruby with rbenvcd ~git clone git://github.com/sstephenson/rbenv.git ~/.rbenvecho export PATH="$HOME/.rbenv/bin:$PATH" >> ~/.bash_profileecho eval "$(rbenv init -)" >> ~/.bash_profileexec $SHELL lgit clone https://github.com/sstephenson/ruby-build.git ~/.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. Generating package archives `bosh craete release` creates pre-packaged tar files in .dev_buildsExample: Installing dea_next (2)# Clone cf-releasegit clone https://github.com/cloudfoundry/cf-release.gitcd cf-release./update # check out submodules# Create release packagesbosh create release force # give appcloud for the prompt 15. Deployment manifest Compatible with BOSHExample: Install dea_next (3)vi ~/deploy.conf---properties:domain: vcap.menetworks:apps: defaultmanagement: defaultnats:user: natspassword: natsaddress: 127.0.0.1port: 4222dea_next:streaming_timeout: 60memory_mb: 4096memory_overcommit_factor: 1disk_mb: 32000disk_overcommit_factor: 1num_instances: 30 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. Launching processesExample: Installing dea_next (5)sudo env PATH=$PATH bundle exec ./bin/run-job start 18. ./bin/nise-bosh has some options See README.md 19. DEA/NG and CCv1 compatibility 20. 2013-04-26Photo from http://pdphoto.org/PictureDetail.php?mat=pdef&pg=8344CCv1DEA/NGStagerImpact of Buildpack 21. The Commitmenthttps://github.com/cloudfoundry/dea_ng/commit/169f2c7b9137196f3f6e2dac291417395aeba310 22. Rest In Peace CCv1 23. Reverted and works https://github.com/yudai/dea_ng/commit/ccce77553deff7cfc9b5a6191e12046207a42ced 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 fileThe Return of CCv1