0

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.

Eddie
  • 9,696
  • 4
  • 45
  • 58
y4roslav
  • 347
  • 1
  • 3
  • 10

1 Answers1

0

Do you have a properties section in the manifest, like in this example;

https://gist.github.com/3148465

For properties.ccdb NOT to evaluate as nil, there would need to be a ccdb entry in the properties section.

Dan Higham
  • 3,974
  • 16
  • 15
  • Yes, I do. I know that it require this properties (ccdb) but from other hand cloud_controller_ng require properties.ccdb_ng – y4roslav Jan 12 '13 at 23:42
  • My manifest file [https://gist.github.com/4521103](https://gist.github.com/4521103). How can I modify it to provides ccdb_ng and ccdb properties? For me it make no sense. – y4roslav Jan 12 '13 at 23:54
  • 1
    I think this question will yield a better answer on the BOSH users google group - https://groups.google.com/a/cloudfoundry.org/forum/?fromgroups#!forum/bosh-users the BOSH guys are always pretty quick to answer. – Dan Higham Jan 13 '13 at 12:10