Date
1 - 4 of 4
Deploy cf: Error filling in template `config.json.erb' for `consul_z1/0'
James Leavers
Hi,
I have used the stub found here: https://docs.cloudfoundry.org/deploying/cf-stub-vsphere.html Then edited it as suggested, before creating cf-deployment.yml with generate_deployment_manifest. With bosh deploy I get as far as 'Binding configuration' before it fails: Started preparing configuration > Binding configuration. Failed: Error filling in template `config.json.erb' for `consul_z1/0' (line 7: no implicit conversion of nil into String) (00:00:00) Does this mean that the generated manifest is not complete and should be edited manually, or something else..? For reference the consul section is as follows: jobs: - instances: 2 name: consul_z1 networks: - name: cf1 static_ips: - 192.168.1.28 - 192.168.1.29 persistent_disk: 1024 properties: consul: agent: mode: server metron_agent: zone: z1 resource_pool: small_z1 templates: - name: consul_agent release: cf - name: metron_agent release: cf update: max_in_flight: 1 serial: true bosh task nn --debug: D, [2015-10-07 13:16:14 #1403] [task:11] DEBUG -- DirectorJobRunner: (0.001174s) SELECT NULL D, [2015-10-07 13:16:14 #1403] [task:11] DEBUG -- DirectorJobRunner: (0.002384s) SELECT "stemcells".* FROM "stemcells" INNER JOIN "deployments_stemcells" ON (("deployments_stemcells"."stemcell_id" = "stemcells"."id") AND ("deployments_stemcells"."deployment_id" = 1)) D, [2015-10-07 13:16:14 #1403] [task:11] DEBUG -- DirectorJobRunner: Deleting lock: lock:deployment:cf-dev D, [2015-10-07 13:16:14 #1403] [] DEBUG -- DirectorJobRunner: Lock renewal thread exiting D, [2015-10-07 13:16:14 #1403] [task:11] DEBUG -- DirectorJobRunner: Deleted lock: lock:deployment:cf-dev I, [2015-10-07 13:16:14 #1403] [task:11] INFO -- DirectorJobRunner: sending update deployment error event D, [2015-10-07 13:16:14 #1403] [task:11] DEBUG -- DirectorJobRunner: SENT: hm.director.alert {"id":"1bf7bed5-b06d-45fe-9dc9-f15c14237c40","severity":3,"title":"director - error during update deployment","summary":"Error during update deployment for 'cf-dev' against Director '32a0bb3b-1a10-4f91-a90c-794da5968461': #<RuntimeError: Error filling in template `config.json.erb' for `consul_z1/0' (line 7: no implicit conversion of nil into String)>","created_at":1444223774} E, [2015-10-07 13:16:14 #1403] [task:11] ERROR -- DirectorJobRunner: Error filling in template `config.json.erb' for `consul_z1/0' (line 7: no implicit conversion of nil into String) Suggestions welcome - thanks. If there is a current working vSphere manifest out there that I can use for reference that might help too.
|
|
Chad Malfait
Hi James.
I was curious if you've found a solution? I am seeing the same issue. Thanks!
|
|
James Leavers
Hi,
As the error message implies, there was something missing - I thought I had double-checked everything before posting, but as usual, this was not the case :-) The encrypt_keys property had to be added - it is blank by default: properties: consul: encrypt_keys: [] In case anyone else comes across this thread, the following also need to be added: ** Environment config Ensure that you have an environment name in your cf-stub.yml, e.g. meta: environment: my-cf-env Otherwise you will end up with this: Failed: Error filling in template metron_agent.json.erb' https://github.com/cloudfoundry/cf-release/issues/690 ** HAProxy config By default it will be generated like this: properties: ha_proxy: null Which will result in this: Error filling in template `haproxy.config.erb' for `ha_proxy_z1/0' You can add a certificate as follows: ha_proxy: ssl_pem: | -----BEGIN CERTIFICATE----- -----END CERTIFICATE----- -----BEGIN PRIVATE KEY----- -----END PRIVATE KEY----- Regards James
|
|
Amit Kumar Gupta
Hey James,
toggle quoted messageShow quoted text
Thanks for raising this issue. We do have a systemic issue with the fact that our documentation is not versioned. The docs can become out of date as things change; and since they're not versioned, once they're updated to reflect the changes, there is no longer working documentation for older versions of our software. I will re-raise this issue with our docs team. As for the correct way to fill out the example stub to deploy cf using the scripts/generate_deployment_manifest script in the cf-release repo, what version of cf-release were you deploying, and what SHA of the repo do you have checked out? Also, do you intend to have unencrypted traffic with consul, and to the HA proxy? For instance, if for consul you intend to have unencrypted traffic, then rather than setting the encrypt_keys property, you should set the require_ssl property (to false). Otherwise, you should set encrypt_keys to a non-empty array, and also provide several SSL certs and keys. Best, Amit
On Mon, Oct 12, 2015 at 7:56 AM, James Leavers <james(a)cloudhelix.io> wrote:
Hi,
|
|