ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiaoke Zhang <xia...@arcadiadata.com>
Subject optional (blankable) configuration in custom ambari stacks
Date Fri, 03 Jun 2016 23:28:11 GMT
Hi,

I am trying to create a custom stack for Ambari,  I am using version
2.2.1.1 on centos.

ambari-agent-2.2.1.1-70
ambari-server-2.2.1.1-70

One problem I ran into is creating an optionally empty parameter for my
service.
srv_ssl_cert and srv_ssl_key. Both are optional. If you don't have it, the
service would then run it on http instead of https.

I tried to put this in my configuration.

-- metainfo.xml
<configuration-dependencies>
       <config-type>my-config</config-type>
 </configuration-dependencies>

--- my-config

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
  <property require-input="false" >
    <name>srv_ssl_cert</name>
    <value></value>
    <description>
      Path on disk for SSL certificate in PEM format.
    </description>
  </property>
  <property require-input="false" >
    <name>srv_ssl_key</name>
    <value></value>
    <description>
      Path on disk for SSL key in PEM format.
    </description>
  </property>
</configuration>


Unfortunately, it doesn't work.  Even though some of the ambari workshop
examples uses require-input="false".
https://github.com/randerzander/r-service/blob/master/configuration/r-config.xml

I tried without the empty <value></value> , ambari just don't show any
thing at all.

I realize I can make it a special value like "none" or "n/a" or ship a with
a default self signed certificate.  Just wondering if ambari has the
capability to support optional and "blank able" parameters.

Thanks for any advice.

Mime
View raw message