<?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 Re: puppet setup of Ambari ssl in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107270#M54587</link>
    <description>&lt;P&gt;Unfortunately the method does not work on ambari-server 2.4.2.0-136.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2017 20:33:00 GMT</pubDate>
    <dc:creator>vladislav_falfu</dc:creator>
    <dc:date>2017-02-21T20:33:00Z</dc:date>
    <item>
      <title>puppet setup of Ambari ssl</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107267#M54584</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;Trying to implement puppet ssl setup for Ambari, but had not found any manual how to configure ssl for ambari not using "ambari-server setup-security" as specified here &lt;A href="https://community.hortonworks.com/articles/39865/enabling-https-for-ambariserver-and-troubleshootin.html"&gt;https://community.hortonworks.com/articles/39865/enabling-https-for-ambariserver-and-troubleshootin.html&lt;/A&gt;. I assume that only options needed to make ssl working are:&lt;/P&gt;&lt;P&gt;1) Keystore for ambari services:&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;ssl.trustStore.path=&amp;lt;path-to-keystore-file&amp;gt;&lt;/P&gt;&lt;P&gt;ssl.trustStore.type=jks&lt;/P&gt;&lt;P&gt;ssl.trustStore.password=&amp;lt;keystore-password-here&amp;gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;2) HTTPS options:&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;client.api.ssl.port=8443&lt;/P&gt;&lt;P&gt;api.ssl=true&lt;/P&gt;&lt;P&gt;client.api.ssl.cert_name=https.crt&lt;/P&gt;&lt;P&gt;client.api.ssl.key_name=https.key&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Isn`t it simpler to use nginx with ssl in front of ambari to provide https?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Just tried to make a manual setup with generating certificates and filling the needed fields in /etc/ambari-server/conf/ambari.properties, afterwards started "ambari-server setup -s", but got "ambari-server restart" failed with error about problem with certificates and truststore. Seems it makes some transformations in process of running setup.&lt;/P&gt;&lt;P&gt;Found out that there are some options for ambari-server setup-security option:&lt;/P&gt;&lt;P&gt;1) Configure https: "ambari-server setup-security --security-option=setup-https --api-ssl=true --import-cert-path=/etc/ambari-server/certs/localhost.crt --import-key-path=/etc/ambari-server/certs/localhost.key --pem-password=hadoop --api-ssl-port=8443"&lt;/P&gt;&lt;P&gt;2) Configure trustedstore: "ambari-server setup-security --security-option=setup-truststore --truststore-reconfigure --truststore-type=jks --truststore-password=hadoop --truststore-path=/etc/ambari-server/certs/ambari-server-truststore"&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 22:41:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107267#M54584</guid>
      <dc:creator>vladislav_falfu</dc:creator>
      <dc:date>2017-02-15T22:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: puppet setup of Ambari ssl</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107268#M54585</link>
      <description>&lt;P&gt;I had a similar issue writing Chef recipe, what I did was the following:&lt;/P&gt;&lt;P&gt;Run the steps with Ambari, populate the ambari.properties so it is functional, then take that ambari.properties file and use as template in Chef and add variables where values change. I am not familiar with puppet and unaware of template concept is available but if it does that's one way. For reference, here's my example in Chef &lt;A href="https://github.com/dbist/smartsense-chef/blob/master/templates/default/hst-agent.ini.erb" target="_blank"&gt;https://github.com/dbist/smartsense-chef/blob/master/templates/default/hst-agent.ini.erb&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 07:22:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107268#M54585</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2017-02-16T07:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: puppet setup of Ambari ssl</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107269#M54586</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervit&lt;/A&gt;. I had finally found a way how to make it puppet-friendly.&lt;/P&gt;&lt;P&gt;There are two groups of parameters that should be considered. Unfortunately not all of them are described in documentation, so had to look here(https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java) and here (https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/python/ambari_server/setupSecurity.py). Also some hints can be found here &lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Enable+HTTPS+and+LDAPS+together" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Enable+HTTPS+and+LDAPS+together&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;1) HTTPS itself:&lt;/P&gt;&lt;PRE&gt;api.ssl=true
client.api.ssl.cert_name=localhost.crt
client.api.ssl.key_name=localhost.key
client.api.ssl.port=8443
client.api.ssl.keystore_name=https.keystore.p12
client.api.ssl.keystore_type=pkcs12
client.api.ssl.crt_pass=hadoop
client.api.ssl.cert_pass_file=localhost.pass.txt

security.server.keys_dir=/etc/ambari-server/certs/
&lt;/PRE&gt;&lt;P&gt;2) trusted store:&lt;/P&gt;&lt;PRE&gt;ssl.trustStore.password=hadoop
ssl.trustStore.path=/etc/ambari-server/certs/localhost.truststore.jks
ssl.trustStore.type=jks
&lt;/PRE&gt;&lt;P&gt;If the configuration is done after the ambari-server is configured, then the ambari-server should be restarted. If it is done before, then just normally run ambari-server setup.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1) No need to change trusted store if host is using some external CA. For instance, letsencrypt. It is already supported in latest versions of java.&lt;/P&gt;&lt;P&gt;2) Option "client.api.ssl.crt_pass" had not been working for me, but "client.api.ssl.cert_pass_file" was ok.&lt;/P&gt;&lt;P&gt;3) The keystore and truststore use different formats, because keytool does not support direct creation of keystore in jks format. Only via import of jks.&lt;/P&gt;&lt;P&gt;I was more interested in setting puppet environment. However for setup without "ambari-server setup-security" call one can use following steps:&lt;/P&gt;&lt;PRE&gt;mkdir /etc/ambari-server/certs
cd /etc/ambari-server/certs/
export AMBARI_SERVER_HOSTNAME=localhost
export AMBARI_CERT_PASS=hadoop

----- HTTPS
openssl genrsa -passout pass:$AMBARI_CERT_PASS -out $AMBARI_SERVER_HOSTNAME.key 2048
openssl req -new -key $AMBARI_SERVER_HOSTNAME.key -out $AMBARI_SERVER_HOSTNAME.csr -subj "/C=IN/ST=One/L=Two/O=hwx/CN=$AMBARI_SERVER_HOSTNAME"
openssl x509 -req -days 365 -in $AMBARI_SERVER_HOSTNAME.csr -signkey $AMBARI_SERVER_HOSTNAME.key -out $AMBARI_SERVER_HOSTNAME.crt
openssl pkcs12 -export -in $AMBARI_SERVER_HOSTNAME.crt -inkey $AMBARI_SERVER_HOSTNAME.key -certfile $AMBARI_SERVER_HOSTNAME.crt -out $AMBARI_SERVER_HOSTNAME.keystore.p12 -password pass:$AMBARI_CERT_PASS
echo "$AMBARI_CERT_PASS" &amp;gt; $AMBARI_SERVER_HOSTNAME.pass.txt
------ Services
keytool -trustcacerts -import -file $AMBARI_SERVER_HOSTNAME.crt -alias ambari-server -keystore $AMBARI_SERVER_HOSTNAME.truststore.jks&lt;/PRE&gt;&lt;P&gt;and add following lines in ambari.properties:&lt;/P&gt;&lt;PRE&gt;api.ssl=true
client.api.ssl.cert_name=localhost.crt
client.api.ssl.key_name=localhost.key
client.api.ssl.port=8443
client.api.ssl.keystore_name=localhost.keystore.p12
client.api.ssl.keystore_type=pkcs12
client.api.ssl.crt_pass=hadoop
client.api.ssl.cert_pass_file=localhost.pass.txt

security.server.keys_dir=/etc/ambari-server/certs/

ssl.trustStore.password=hadoop
ssl.trustStore.path=/etc/ambari-server/certs/localhost.truststore.jks
ssl.trustStore.type=jks
&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Feb 2017 20:40:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107269#M54586</guid>
      <dc:creator>vladislav_falfu</dc:creator>
      <dc:date>2017-02-16T20:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: puppet setup of Ambari ssl</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107270#M54587</link>
      <description>&lt;P&gt;Unfortunately the method does not work on ambari-server 2.4.2.0-136.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 20:33:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107270#M54587</guid>
      <dc:creator>vladislav_falfu</dc:creator>
      <dc:date>2017-02-21T20:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: puppet setup of Ambari ssl</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107271#M54588</link>
      <description>&lt;P&gt;for 2.4.2.0-136 several additional parameters should be considered:&lt;/P&gt;&lt;PRE&gt;client.api.ssl.truststore_name=localhost.jks
client.api.ssl.truststore_type=jks
client.api.ssl.keys_dir=/etc/ambari-server/certs/&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2017 23:00:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/puppet-setup-of-Ambari-ssl/m-p/107271#M54588</guid>
      <dc:creator>vladislav_falfu</dc:creator>
      <dc:date>2017-02-21T23:00:34Z</dc:date>
    </item>
  </channel>
</rss>

