<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Using include statement in Cloudera Director HOCON config to import customer properties in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Using-include-statement-in-Cloudera-Director-HOCON-config-to/m-p/61140#M1388</link>
    <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using Cloudera Director&amp;nbsp;&lt;SPAN&gt;2.6.0 to deploy our clusters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Currently, we define customer specific parameters at the top of the customer config file like so:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;customer-params {&lt;BR /&gt;name: "customerX"&lt;BR /&gt;environmentName: "customerX Environment"&lt;BR /&gt;subnetId: "subnet-cjkkd00se"&lt;BR /&gt;securityGroupsIds: "sg-1se36d6c,sg-c8f372ba"&lt;BR /&gt;dbHost: "customerX-postgres.cesosptkafdpf.us-east-1.rds.amazonaws.com"&lt;BR /&gt;dbUser: postgres&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Further down in the file, we reference these configs like so:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;name: ${customer-params.name}&lt;BR /&gt;environmentName: ${customer-params.environmentName}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This works like a charm, but we would prefer to manage customer specific settings separate from the client config file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;According to&amp;nbsp;&lt;A href="https://github.com/lightbend/config/blob/master/HOCON.md#include-semantics-merging" target="_self"&gt;HOCON&lt;/A&gt;&amp;nbsp;spec, we should be able to include these customer specifc settings like so:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;include required(file("customer.properties"))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;include file("customer.properties")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Has anyone confirmed that this works?&amp;nbsp; Using required throws the following error in the director client application.log:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[2017-10-20 14:46:04.600 -0400] ERROR [main] - com.cloudera.launchpad.Application: Failed to initialize application context&lt;BR /&gt;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('&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;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.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Are there any examples of this that I can reference. Anyone else had luck doing this?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 15:25:29 GMT</pubDate>
    <dc:creator>dturner</dc:creator>
    <dc:date>2022-09-16T15:25:29Z</dc:date>
    <item>
      <title>Using include statement in Cloudera Director HOCON config to import customer properties</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-include-statement-in-Cloudera-Director-HOCON-config-to/m-p/61140#M1388</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using Cloudera Director&amp;nbsp;&lt;SPAN&gt;2.6.0 to deploy our clusters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Currently, we define customer specific parameters at the top of the customer config file like so:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;customer-params {&lt;BR /&gt;name: "customerX"&lt;BR /&gt;environmentName: "customerX Environment"&lt;BR /&gt;subnetId: "subnet-cjkkd00se"&lt;BR /&gt;securityGroupsIds: "sg-1se36d6c,sg-c8f372ba"&lt;BR /&gt;dbHost: "customerX-postgres.cesosptkafdpf.us-east-1.rds.amazonaws.com"&lt;BR /&gt;dbUser: postgres&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Further down in the file, we reference these configs like so:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;name: ${customer-params.name}&lt;BR /&gt;environmentName: ${customer-params.environmentName}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This works like a charm, but we would prefer to manage customer specific settings separate from the client config file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;According to&amp;nbsp;&lt;A href="https://github.com/lightbend/config/blob/master/HOCON.md#include-semantics-merging" target="_self"&gt;HOCON&lt;/A&gt;&amp;nbsp;spec, we should be able to include these customer specifc settings like so:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;include required(file("customer.properties"))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;include file("customer.properties")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Has anyone confirmed that this works?&amp;nbsp; Using required throws the following error in the director client application.log:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[2017-10-20 14:46:04.600 -0400] ERROR [main] - com.cloudera.launchpad.Application: Failed to initialize application context&lt;BR /&gt;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('&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;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.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Are there any examples of this that I can reference. Anyone else had luck doing this?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 15:25:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-include-statement-in-Cloudera-Director-HOCON-config-to/m-p/61140#M1388</guid>
      <dc:creator>dturner</dc:creator>
      <dc:date>2022-09-16T15:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using include statement in Cloudera Director HOCON config to import customer properties</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-include-statement-in-Cloudera-Director-HOCON-config-to/m-p/61145#M1389</link>
      <description>&lt;P&gt;try&lt;/P&gt;&lt;PRE&gt;include "someother.conf"&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Oct 2017 21:52:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-include-statement-in-Cloudera-Director-HOCON-config-to/m-p/61145#M1389</guid>
      <dc:creator>lyin</dc:creator>
      <dc:date>2017-10-20T21:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using include statement in Cloudera Director HOCON config to import customer properties</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-include-statement-in-Cloudera-Director-HOCON-config-to/m-p/61208#M1390</link>
      <description>&lt;P&gt;Thanks lyin.&amp;nbsp; That did the trick.&amp;nbsp; Any reason why the spec syntax did not work?&amp;nbsp; Is there another HOCON spec out there that I should be referencing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 15:16:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-include-statement-in-Cloudera-Director-HOCON-config-to/m-p/61208#M1390</guid>
      <dc:creator>dturner</dc:creator>
      <dc:date>2017-10-24T15:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using include statement in Cloudera Director HOCON config to import customer properties</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-include-statement-in-Cloudera-Director-HOCON-config-to/m-p/61273#M1391</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;include file(...)&lt;/FONT&gt; should work but I believe it requires the full file path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current latest version of Director (Director 2.6) is on typesafe config version 1.2 which doens't have support for &lt;FONT face="courier new,courier"&gt;required&lt;/FONT&gt;. You can refer to the following&amp;nbsp;spec to see what's supported in this verison: &lt;A href="https://github.com/lightbend/config/blob/v1.2.0/HOCON.md" target="_blank"&gt;https://github.com/lightbend/config/blob/v1.2.0/HOCON.md&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 16:57:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-include-statement-in-Cloudera-Director-HOCON-config-to/m-p/61273#M1391</guid>
      <dc:creator>aarman</dc:creator>
      <dc:date>2017-10-26T16:57:37Z</dc:date>
    </item>
  </channel>
</rss>

