I successfully deployed full Cloud Foundry on top of vSphere based on this manual and used this manifest file like template (I change a lot of it because it's little bit out of date).
Now I realised that I need next version of Cloud Foundry cause space and org features and I started using *_ng templates for cloud controller and appropriate nodes.
I modify my BOSH manifest file and I found few issues with cloud controller DB.
According cloud_controller_ng.yml.erb
<% db = properties.ccdb_ng.databases.find { |db| db.tag == "cc" } %>
<% db_role = properties.ccdb_ng.roles.find { |role| role.tag == "admin" } %>
db:
database: postgres://<%= db_role.name %>:<%= db_role.password %>@<%= properties.ccdb_ng.address %>:<%= properties.ccdb_ng.port %>/<%= db.name %>
max_connections: <%= properties.ccdb_ng.max_connections || 32 %>
pool_timeout: <%= properties.ccdb_ng.pool_timeout || 10 %>
log_level: <%= properties.ccng.db_logging_level || "debug2" %>
It's require ccdb_ng
properties in manifest rather ccdb
(BTW. Why? When Cloud Foundry's next generation become current version this changes become useless. What I missed?):
- name: ccdb_postgres
template: postgres
instances: 1
resource_pool: infrastructure
persistent_disk: 2048
networks:
- name: default
static_ips:
- 192.168.2.12
properties:
db: ccdb_ng
...
ccdb_ng:
address: 192.168.2.12
port: 5524
pool_size: 10
roles:
- tag: admin
name: ccadmin
password: aaaBauWauZZb2
databases:
- tag: cc
name: appcloud
Like result I got an error
Preparing configuration
binding configuration: Error filling in template `batch.yml.erb' for `uaa/0' (line 5: undefined method `databases' for nil:NilClass) (00:00:00)
Error 1/1 00:00:00
Error 80006: Error filling in template `batch.yml.erb' for `uaa/0' (line 5: undefined method `databases' for nil:NilClass)
And that pointed me to this code:
<% cc_db = properties.ccdb.databases.find { |db| db.tag == "cc" } %>
<% cc_role = properties.ccdb.roles.find { |role| role.tag == "admin" } %>
How you can see it try to find ccdb
properties. Yes, I can change my manifest file but in this case cloud_controller_ng.yml.erb
can't found ccdb_ng
properties.
How can I modify my BOSH manifest file for CloudFoundry to avoid these issues?
I have lot of other questions about that but for now it's major one.