Ambari Forum

HDP using Puppet

  • #23958
    Ray Roberts
    Participant

    I’m currently administering a HDP cluster and some of our users are claiming they need to use JDK 7 (not open JDK). I know this isn’t supported yet, however I’m not sure I have much of a choice, as they’re pretty demanding :)

    I’m noticing that HDP is putting open jdk in /usr/jdk/jdk1.6.0 even after I’ve wiped that directory. I have seen some references to puppet in Ambari directories. Is Ambari using puppet?

    If so, how can I modify which version is pushed?

    -Ray

to create new topics or reply. | New User Registration

  • Author
    Replies
  • #23964
    abdelrahman
    Moderator

    Hi Ray,

    How is your day so far? It is not recommended to use the JDK 7. It will fail. But you may want to take a look at the following files:
    Under:
    /var/lib/ambari-agent
    files :

    puppet/modules/hdp/manifests/java/package.pp:
    puppet/modules/hdp/manifests/params.pp:
    puppet/modules/hdp-zookeeper/files/zkServer.sh:

    Thanks
    -Abdelrahman

    #23965
    Ray Roberts
    Participant

    Abdelrahman,

    Thanks,

    So, it sound like Ambari IS using puppet…… We use puppet throughout our enterprise and didn’t notice puppet was installed on the data nodes, as I had to install the puppet agent to tie these nodes into our enterprise puppet master. Is the ambari-agent pushing these configs then? How is ambari leveraging puppet?

    What exactly will fail?

    -Ray

    #23967
    Seth Lyubich
    Moderator

    Hi Ray,

    You should be able to specify custom Java location during installation. Please see:

    http://docs.hortonworks.com/HDPDocuments/HDP1/HDP-1.2.3.1/bk_using_Ambari_book/content/ambari-chap2-2-1.html

    However, JDK 7 was not tested yet and we would not be able to support this configuration.

    Also, puppet that Ambari is using is part of ambari-agent and should not interfere with your puppet.

    Hope this helps,

    Thanks,
    Seth

    #23974
    Ray Roberts
    Participant

    Sef,

    Thanks for your response.

    So, does this mean I cannot change it now that HDP is installed?

    Can I run ambari-server setup after installation? For example: ambari-server setup –j /usr/java/default

    Thanks,

    -Ray

    #23977
    abdelrahman
    Moderator

    Hi Ray,

    That is correct. But before you run this command. Are you trying to setup a new cluster? If not please backup the psql database just in-case. I have run the command and it works fine.

    ambari-server setup –j /usr/java/default
    Using python /usr/bin/python2.6
    Run postgresql initdb
    Run postgresql start
    Starting postgresql service: [ OK ]
    Setup ambari-server
    Checking SELinux…
    SELinux status is ‘enabled’
    SELinux mode is ‘permissive’
    WARNING: SELinux is set to ‘permissive’ mode and temporarily disabled. You should disable SELinux permanently.
    OK to continue [y/n] (y)? y
    Checking iptables…
    iptables is disabled now
    Checking PostgreSQL…
    Configuring database…
    Configuring PostgreSQL…
    Backup for pg_hba found, reconfiguration not required
    Checking JDK…
    Completing setup…
    Ambari Server ‘setup’ finished successfully

    Thanks
    -Abdelrhaman

    #31446
    Ray Roberts
    Participant

    Abdelrhaman,

    I tried using ‘ambari-server setup –j /my/jdk/home’ , however, it still downloads jdk-6u21 and asks for me to accept the oracle license. Shouldn’t it see my java installed and not ask this?

    Thanks,

    -Ray

    #31510
    Robert
    Participant

    Hi Ray,
    Based on Abdelrahman’s post, it could be that ambari needs it to be in /usr/java/default

    Regards,
    Robert

    #31511
    Ray Roberts
    Participant

    Robert,

    Thanks for the reply.

    I tried both paths, including /usr/java/default

    It behaves the same way, no matter the location.

    -Ray

    #46194
    Carlos Diaz
    Participant

    Hi Ray,

    I’m experiencing the exact same issue. The developers want to use JDK 1.7 yet Ambari uses jdk1.6.0_31 by default.

    Were you able to figure out how to swap the jdk sucessfully? I tried going through the ambari-server setup -j <path to my jdk> as described here, but things are still starting up with JDK 1.6.0_31.

    -Carlos

    #46196
    Jeff Sposetti
    Moderator

    Hi Carlos + Ray, Can you confirm which ambari version you tried this on? ambari-server –version

    Latest release is Ambari 1.4.2 supports JDK 7, with you installing the JDK before running setup and using the -j option. Ambari Server should not still download JDK 1.6 during setup if you specify -j during “ambari-server setup -j /the/jdk/path”

    http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.0.8.0/bk_using_Ambari_book/content/ambari-chap2-1.html
    http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.0.8.0/bk_using_Ambari_book/content/ambari-chap2-2-1.html

    #46197
    Ray Roberts
    Participant

    Jeff, Carlos,

    I was able to install the latest (1.4.2) using JDK 7 with no issues.

    The other thing I did was modify /etc/ambari-server/conf/ambari.properties

    I commented the section pertaining to java. I can’t recall the exact section since I’m not around the server at the moment, however it was pretty obvious. I remember this causing me problems if I didn’t do it, Ambari would try to install JDK 1.6 if I didn’t modify the properties file.

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.