Pivotal CF
http://run.pivotal.io
Cloud-Foundry Samples
https://github.com/cloudfoundry-samples
Bluemix
https://console.ng.bluemix.net
Twelve-Factor App for SaaS
http://12factor.net/ko/
Bosh-lite 설치
Pre-requirement
Virtualbox / Vagrant 설치
Vagrant - https://www.vagrantup.com/
Bosh-lite 다운로드
$ git clone https://github.com/cloudfoundry/bosh-lite
Vagrant 이미지 생성
$ vagrant up --provider=virtualbox
vagrant 접속 - 127.0.0.1:2222 (vagrant/vagrant)
Bosh-lite 이미지
1. 기반 다운로드
sudo apt-get update
sudo apt-get install build-essential ruby ruby-dev libxml2-dev libsqlite3-dev libxslt1-dev libpq-dev libmysqlclient-dev zlib1g-dev
sudo apt-get install curl
Ruby 설치
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --ruby
2. Go 설치
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.6.2.linux-amd64.tar.gz
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
sudo gem install bundle --no-document
sudo gem install rake
// Bosh-client 설치
sudo gem install bosh_cli --no-ri --no-rdoc
Bosh Stemcell 다운로드
bosh download public stemcell bosh-stemcell-389-warden-boshlite-ubuntu-trusty-go_agent.tgz
Bosh 로그인
$ bosh target 192.168.50.4 lite
Target set to `Bosh Lite Director'
Your username: admin
Enter password: *****
Logged in as `admin'
Bosh Stemcell 업로드
bosh upload stemcell bosh-stemcell-389-warden-boshlite-ubuntu-trusty-go_agent.tgz
CF/Diego 소스 다운로드
1. CF 소스 다운로드 및 업데이트
cd ~/workspace
git clone https://github.com/cloudfoundry/cf-release
cd ~/workspace/cf-release
git checkout -b v226
./scripts/update
2. Diego 소스 다운로드 및 업데이트
git clone https://github.com/cloudfoundry-incubator/diego-release
cd ~/workspace/diego-release
git checkout -b 0.1442.0
./scripts/update
CF배포
1. Spiff 설치
wget https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.7/spiff_linux_amd64.zip
unzip spiff_linux_amd64.zip
sudo cp spiff /usr/local/bin
2. CF 설정 파일 생성(cf.yml)
cd ~/workspace/cf-release
sudo ./scripts/generate-bosh-lite-dev-manifest
sudo chown vagrant:vagrant ./bosh-lite/deployments
3. CF 설정 파일 수정 (Diego 설치때만)
vi bosh-lite/deployments/cf.yml
default_to_diego_backend: true
4. CF배포
bosh -n upload release releases/cf-226.yml
bosh -n deploy
bosh deploy
용량 줄이는법
bosh-lite/deployment/cf.yml
%s/medium/small/g
%s/large/small/g
%s/xsmall/small/g
Diego 배포
1. Diego 설정 파일 생성
cd ~/workspace/diego-release
./scripts/generate-bosh-lite-manifests
참고자료
http://www.storagestory.com/470
https://blogs.msdn.microsoft.com/eva/?p=1363
https://github.com/OpenPaaSRnD