!!注意!!
この記事は古いです。こちらを参照してください。今まで、ずっとインストールに失敗してMicroPCFに逃げていたけれど、やっぱりCloud Foundryを学ぶ上でBOSHは避けて通れないので、再挑戦。 ようやくうまくいったので、メモ。とりあえず手順だけ。コマンドの意味の説明は追々。
インストール時の環境は以下です。
- OS X El Capitan (10.11.1)
- iMac (Retina 5K, 27-inch, Late 2015) 3.3 GHz Intel Core i5, 32 GB 1867 MHz DDR3
- Vagrant 1.7.4
- VirtualBox 5.0.10r104061
- BOSH-Lite 9000.85.0
- Cloud Foundry v226
$ sudo gem install bosh_cli --no-ri --no-rdoc
$ mkdir workspace
$ cd workspace
$ git clone https://github.com/cloudfoundry/bosh-lite.git
$ vagrant up --provider=virtualbox
$ export no_proxy=xip.io,192.168.50.4
$ bosh target 192.168.50.4 lite
admin/admin
$ bosh login
admin/admin
$ bin/add-route
+ old_ips=10.244.0.0/19
+ ips=10.244.0.0/16
+ gw=192.168.50.4
+ echo 'Adding the following route entry to your local route table to enable direct container access: 10.244.0.0/16 via 192.168.50.4. Your sudo password may be required.'
++ uname
+ '[' Darwin = Darwin ']'
+ sudo route delete -net 10.244.0.0/19 192.168.50.4
Password:
route: writing to routing socket: not in table
delete net 10.244.0.0: gateway 192.168.50.4: not in table
+ sudo route delete -net 10.244.0.0/16 192.168.50.4
route: writing to routing socket: not in table
delete net 10.244.0.0: gateway 192.168.50.4: not in table
+ sudo route add -net 10.244.0.0/16 192.168.50.4
add net 10.244.0.0: gateway 192.168.50.4
$ cd ..
$ git clone https://github.com/cloudfoundry/cf-release.git
$ cd cf-release
$ git checkout v226
$ bosh upload release https://bosh.io/d/github.com/cloudfoundry/cf-release?v=226
ログは https://gist.github.com/making/4115a4e4ea61fe5fa7b0
$ ./scripts/update
ログは https://gist.github.com/making/9968a23abc2dac12aec0
$ sudo gem install bundler
$ wget https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.7/spiff_darwin_amd64.zip
$ unzip spiff_darwin_amd64.zip
$ mv spiff /usr/local/bin/
$ sudo ./scripts/generate-bosh-lite-dev-manifest
Deployment set to `/Users/maki/workspace/cf-release/bosh-lite/deployments/cf.yml'
$ bosh upload stemcell https://s3.amazonaws.com/bosh-warden-stemcells/bosh-stemcell-3147-warden-boshlite-ubuntu-trusty-go_agent.tgz
Acting as user 'admin' on 'Bosh Lite Director'
Using remote stemcell `https://s3.amazonaws.com/bosh-warden-stemcells/bosh-stemcell-3147-warden-boshlite-ubuntu-trusty-go_agent.tgz'
Director task 4
Started update stemcell
Started update stemcell > Downloading remote stemcell. Done (00:04:53)
Started update stemcell > Extracting stemcell archive. Done (00:00:03)
Started update stemcell > Verifying stemcell manifest. Done (00:00:00)
Started update stemcell > Checking if this stemcell already exists. Done (00:00:00)
Started update stemcell > Uploading stemcell bosh-warden-boshlite-ubuntu-trusty-go_agent/3147 to the cloud. Done (00:00:10)
Started update stemcell > Save stemcell bosh-warden-boshlite-ubuntu-trusty-go_agent/3147 (d9c47c25-b5f8-4f06-7531-9244dc207653). Done (00:00:00)
Done update stemcell (00:05:06)
Task 4 done
Started 2016-01-05 12:51:38 UTC
Finished 2016-01-05 12:56:44 UTC
Duration 00:05:06
Stemcell uploaded and created.
$ bosh stemcells
Acting as user 'admin' on 'Bosh Lite Director'
+---------------------------------------------+---------------+---------+--------------------------------------+
| Name | OS | Version | CID |
+---------------------------------------------+---------------+---------+--------------------------------------+
| bosh-warden-boshlite-ubuntu-trusty-go_agent | ubuntu-trusty | 3147 | d9c47c25-b5f8-4f06-7531-9244dc207653 |
+---------------------------------------------+---------------+---------+--------------------------------------+
(*) Currently in-use
Stemcells total: 1
$ bosh deploy
ログは https://gist.github.com/making/bc00f5a7acc727104bbd
$ bosh vms
Acting as user 'admin' on 'Bosh Lite Director'
Deployment `cf-warden'
Director task 10
Task 10 done
+---------------------------------------------------------------------------+---------+-----+-----------+--------------+
| VM | State | AZ | VM Type | IPs |
+---------------------------------------------------------------------------+---------+-----+-----------+--------------+
| api_z1/0 (937db9a9-6ccb-4911-a461-4498a4c02438) | running | n/a | large_z1 | 10.244.0.134 |
| consul_z1/0 (94b921ab-1707-4bd8-9210-3c98916c244b) | running | n/a | small_z1 | 10.244.0.54 |
| doppler_z1/0 (e24d76f4-b4e1-4635-bbea-41b4505a5a94) | running | n/a | medium_z1 | 10.244.0.142 |
| etcd_z1/0 (b2a266e6-398b-4267-b320-1d7ede34c279) | running | n/a | medium_z1 | 10.244.0.42 |
| ha_proxy_z1/0 (b76a8bee-1625-4494-91cc-130f034877f3) | running | n/a | router_z1 | 10.244.0.34 |
| hm9000_z1/0 (57d26dc9-efe4-404f-9098-d53e05f245b2) | running | n/a | medium_z1 | 10.244.0.138 |
| loggregator_trafficcontroller_z1/0 (5c74c7d6-9042-43e4-b65e-9ad0efd39e84) | running | n/a | small_z1 | 10.244.0.146 |
| nats_z1/0 (04d0adc1-8285-48b7-8402-308b417a1f86) | running | n/a | medium_z1 | 10.244.0.6 |
| postgres_z1/0 (5883ff27-1dcb-46e7-88ea-7dcca97d1ea6) | running | n/a | medium_z1 | 10.244.0.30 |
| router_z1/0 (49768ef4-51d6-4f54-a64e-f14443c3eaa1) | running | n/a | router_z1 | 10.244.0.22 |
| runner_z1/0 (78ef9673-a2d3-4d3b-b4af-53f72cae7597) | running | n/a | runner_z1 | 10.244.0.26 |
| uaa_z1/0 (87d561fc-e996-4fe2-a976-cb30cde240e6) | running | n/a | medium_z1 | 10.244.0.130 |
+---------------------------------------------------------------------------+---------+-----+-----------+--------------+
VMs total: 12
$ cf login -a api.bosh-lite.com -u admin -p admin --skip-ssl-validation
API endpoint: api.bosh-lite.com
Authenticating...
OK
API endpoint: https://api.bosh-lite.com (API version: 2.44.0)
User: admin
No org or space targeted, use 'cf target -o ORG -s SPACE'
できた\(^o^)/ あとは前記事の内容と同じですね。
bosh upload
は各々一回こけたのですが、再度実行すればうまくいきました。
次は次世代アーキテクチャのDiegoをデプロイする。