分布式cloudfoundry部署之前,需要下载所有nisebosh需要的软件包
找一台10.04 ubuntu,内存4g,硬盘为40g的虚拟机用于下载cloudfoundry需要的包。
在你的机器上root下用户下执行下面两条命令。
sudoapt-get install curl
bash <<(curl -s -k -B https://raw.githubusercontent.com/yudai/cf_nise_installer/${INSTALLER_BRANCH:-master}/scripts/bootstrap.sh)
然后把cf—nise—bosher目录和vcap目录打包作为其他节点的安装包。
root@ubuntu:~#tar -Jxvf cf_nise_installer.tar.xz cf_nise_installer/
root@ubuntu:/var#tar -Jxvf vcap.tar.xz vcap/
部署之前先把ip地址和cloudfoundry组件对应规划好,以及就是域名也事先规划好,然后修改template.yml文件,主要是properties的修改。拷贝到各个虚拟机上。
| Ip地址 | Cloudfoundry组件 |
1 | Nats | 10.0.0.180 |
2 | Ccdb&uaadb | 10.0.0.181 |
3 | Cloudcontroller | 10.0.0.182 |
4 | uaa | 10.0.0.183 |
5 | goRouter | 10.0.0.184 |
6 | Loggregator&traffic_log | 10.0.0.185 |
7 | Hm9000&etcd | 10.0.0.186 |
8 | haproxy | 10.0.0.187 |
9 | dea | 10.0.0.188 |
域名:hae2.ubuntu.com |
下面附上properties部分的修改,然后每个节点的修改只需要修改job部分即可
properties:
networks:
apps: default
domain: hae2.ubuntu.com
ssl:
skip_cert_verify: true
system_domain: hae2.ubuntu.com
system_domain_organization: DevBox
app_domains:
- hae2.ubuntu.com
disk_quota_enabled: true
nats:
user: nats
password: c1oudc0w
address: 10.0.0.180
port: 4222
machines:
- 10.0.0.180
- 10.0.0.177
dea_next: {}
logger_endpoint:
shared_secret: c1oudc0w
cc: &cc
bulk_api_password: c1oudc0w
srv_api_uri: https://api.hae2.ubuntu.com
db_logging_level: debug2
ccng.logging_level: debug2
db_encryption_key: c1oudc0w
quota_definitions:
default:
memory_limit: 10240
total_services: 100
non_basic_services_allowed:true
total_routes: 1000
trial_db_allowed: true
hm9000_noop: false
staging_upload_user: uploaduser
staging_upload_password:c1oudc0w
install_buildpacks:
- name: java_buildpack
package: buildpack_java
- name: ruby_buildpack
package: buildpack_ruby
- name: nodejs_buildpack
package: buildpack_nodejs
ccng: *cc
ccdb: &ccdb
db_scheme: postgres
address: 10.0.0.181
port: 5524
roles:
- tag: admin
name: ccadmin
password: c1oudc0w
databases:
- tag: cc
name: ccdb
citext: true
ccdb_ng: *ccdb
uaadb:
db_scheme: postgresql
address: 10.0.0.181
port: 5524
roles:
- tag: admin
name: uaaadmin
password: c1oudc0w
databases:
- tag: uaa
name: uaadb
citext: true
databases:
db_scheme: postgres
address: 10.0.0.181
port: 5524
roles:
- tag: admin
name: ccadmin
password: c1oudc0w
- tag: admin
name: uaaadmin
password: c1oudc0w
databases:
- tag: cc
name: ccdb
citext: true
- tag: uaa
name: uaadb
citext: true
db: databases
uaa:
login:
addnew: true
url: http://uaa.hae2.ubuntu.com
catalina_opts: -Xmx384m-XX:MaxPermSize=128m
jwt:
signing_key: |
-----BEGIN RSA PRIVATEKEY-----
MIICXAIBAAKBgQDHFr+KICms+tuT1OXJwhCUmR2dKVy7psa8xzElSyzqx7oJyfJ1
JZyOzToj9T5SfTIq396agbHJWVfYphNahvZ/7uMXqHxf+ZH9BL1gk9Y6kCnbM5R6
0gfwjyW1/dQPjOzn9N394zd2FJoFHwdq9Qs0wBugspULZVNRxq7veq/fzwIDAQAB
AoGBAJ8dRTQFhIllbHx4GLbpTQsWXJ6w4hZvskJKCLM/o8R4n+0W45pQ1xEiYKdA
Z/DRcnjltylRImBD8XuLL8iYOQSZXNMb1h3g5/UGbUXLmCgQLOUUlnYt34QOQm+0
KvUqfMSFBbKMsYBAoQmNdTHBaz3dZa8ON9hh/f5TT8u0OWNRAkEA5opzsIXv+52J
duc1VGyX3SwlxiE2dStW8wZqGiuLH142n6MKnkLU4ctNLiclw6BZePXFZYIK+AkE
xQ+k16je5QJBAN0TIKMPWIbbHVr5rkdUqOyezlFFWYOwnMmw/BKa1d3zp54VP/P8
+5aQ2d4sMoKEOfdWH7UqMe3FszfYFvSu5KMCQFMYeFaaEEP7Jn8rGzfQ5HQd44ek
lQJqmq6CE2BXbY/i34FuvPcKU70HEEygY6Y9d8J3o6zQ0K9SYNu+pcXt4lkCQA3h
jJQQe5uEGJTExqed7jllQ0khFJzLMx0K6tj0NeeIzAaGCQz13oo2sCdeGRHO4aDh
HH6Qlq/6UOV5wP8+GAcCQFgRCcB+hrje8hfEEefHcFpyKH+5g1Eu1k0mLrxK2zd+
4SlotYRHgPCEubokb2S1zfZDWIXW3HmggnGgM949TlY=
-----END RSA PRIVATEKEY-----
verification_key: |
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHFr+KICms+tuT1OXJwhCUmR2d
KVy7psa8xzElSyzqx7oJyfJ1JZyOzToj9T5SfTIq396agbHJWVfYphNahvZ/7uMX
qHxf+ZH9BL1gk9Y6kCnbM5R60gfwjyW1/dQPjOzn9N394zd2FJoFHwdq9Qs0wBug
spULZVNRxq7veq/fzwIDAQAB
-----END PUBLIC KEY-----
cc:
client_secret: c1oudc0w
admin:
client_secret: c1oudc0w
batch:
username: batch-username
password: c1oudc0w
clients: {}
scim:
users:
-admin|c1oudc0w|scim.write,scim.read,openid,cloud_controller.admin
etcd:
machines:
- 10.0.0.186
router:
port: 8888
status:
port: 18888
user: gorouter
password: c1oudc0w
servers:
z1:
- 10.0.0.184
z2:
- 10.0.0.175
login:
enabled: true
loggregator:
status:
user: loggregator
password: c1oudc0w
port: 5768
incoming_port: 3456
outgoing_port: 38080
servers:
default:
- 10.0.0.185
traffic_controller:
zone: default
status:
user: trafic_controller
password: c1oudc0w
port: 6789
incoming_port: 13456
outgoing_port: 48080
loggregator_endpoint:
shared_secret: c1oudc0w
host: 10.0.0.185
ha_proxy:
ssl_pem: |
-----BEGIN CERTIFICATE-----
MIICLzCCAZgCCQCSoIG3LoeSMTANBgkqhkiG9w0BAQUFADBcMQswCQYDVQQGEwJV
UzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDVNhbiB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