Re: Deploy cf: Error filling in template `config.json.erb' for `consul_z1/0'


Amit Kumar Gupta
 

Hey James,

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,

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

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.