10-20-2017 12:45 PM
We are using Cloudera Director 2.6.0 to deploy our clusters.
Currently, we define customer specific parameters at the top of the customer config file like so:
environmentName: "customerX Environment"
Further down in the file, we reference these configs like so:
This works like a charm, but we would prefer to manage customer specific settings separate from the client config file.
According to HOCON spec, we should be able to include these customer specifc settings like so:
Has anyone confirmed that this works? Using required throws the following error in the director client application.log:
[2017-10-20 14:46:04.600 -0400] ERROR [main] - com.cloudera.launchpad.Application: Failed to initialize application context
com.typesafe.config.ConfigException$Parse: customer-config/c32/c32.conf: 1: expecting include parameter to be quoted filename, file(), classpath(), or url(). No spaces are allowed before the open paren. Not expecting: 'required(file('
Removing the "required" directive gets rid of this error, but then we run into errors trying to resolve the substitutions - which leads me to think our properties file isn't getting included.
Are there any examples of this that I can reference. Anyone else had luck doing this?
10-24-2017 08:16 AM
Thanks lyin. That did the trick. Any reason why the spec syntax did not work? Is there another HOCON spec out there that I should be referencing?
10-26-2017 09:57 AM
include file(...) should work but I believe it requires the full file path.
The current latest version of Director (Director 2.6) is on typesafe config version 1.2 which doens't have support for required. You can refer to the following spec to see what's supported in this verison: https://github.com/lightbend/config/blob/v1.2.0/HOCON.md