Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-1770

Let the user specify which JDK package to be installed in vagrantconfig.yaml

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 1.0.0
    • Component/s: vm
    • Labels:
      None

      Description

      Currently we specify fixed JDK package names in bigtop-deploy/vm/vagrant-puppet-docker/provision.sh for centos and debian only. We should let user choose what JDK version they'd like to be installed.

        Activity

        Hide
        evans_ye Evans Ye added a comment -

        Hey jay vyas. Thanks for the review!
        I've committed this

        Show
        evans_ye Evans Ye added a comment - Hey jay vyas . Thanks for the review! I've committed this
        Hide
        jayunit100 jay vyas added a comment -

        +1

        Show
        jayunit100 jay vyas added a comment - +1
        Hide
        cos Konstantin Boudnik added a comment -

        How does it look like? Shall we commit?

        Show
        cos Konstantin Boudnik added a comment - How does it look like? Shall we commit?
        Hide
        oflebbe Olaf Flebbe added a comment -

        Thanks. Will test this evening.

        Show
        oflebbe Olaf Flebbe added a comment - Thanks. Will test this evening.
        Hide
        cos Konstantin Boudnik added a comment -

        Sounds like a good idea. Thanks for taking time and explaining!

        Show
        cos Konstantin Boudnik added a comment - Sounds like a good idea. Thanks for taking time and explaining!
        Hide
        evans_ye Evans Ye added a comment - - edited

        This aim to enable the possibility that BigTop users can have arbitrary JDK version specified for their own environment. Although we officially support OpenJDK7 only, but that doesn't mean users can't use OpenJDK8 or OracleJDK if they are well aware of the compatibility for each Hadoop components they'd like to adopt.

        From the feature completeness aspect, the vagrant-puppet-vm provisioner does not support Debian since the JDK package name is fixed in its Vagrantfile:

        cat > /etc/puppet/hieradata/site.yaml << EOF
        bigtop::hadoop_head_node: #{bigtop_master}
        hadoop::hadoop_storage_dirs: [/data/1, /data/2]
        bigtop::bigtop_repo_uri: #{repo}
        bigtop::jdk_package_name: java-1.7.0-openjdk-devel.x86_64
        hadoop_cluster_node::cluster_components: #{components}
        

        For better UX, we should allow users to change the value in vagrantconfig.yaml.

        And to simplify the code and increase the readability, I'd like to remove the if-else clause in provision.sh.

        # Prepare puppet configuration file
        if [ -f /etc/debian_version ] ; then
            apt-get -y install puppet-module-puppetlabs-stdlib
            jdk="openjdk-7-jdk"
        else
            cd /etc/puppet/modules && puppet module install puppetlabs/stdlib
            jdk="java-1.7.0-openjdk-devel.x86_64"
        fi
        

        Puppet module installation can be replaced by bigtop_toolchain(TODO), while JDK can be specified in vagrantconfig.yaml.

        Show
        evans_ye Evans Ye added a comment - - edited This aim to enable the possibility that BigTop users can have arbitrary JDK version specified for their own environment. Although we officially support OpenJDK7 only, but that doesn't mean users can't use OpenJDK8 or OracleJDK if they are well aware of the compatibility for each Hadoop components they'd like to adopt. From the feature completeness aspect, the vagrant-puppet-vm provisioner does not support Debian since the JDK package name is fixed in its Vagrantfile: cat > /etc/puppet/hieradata/site.yaml << EOF bigtop::hadoop_head_node: #{bigtop_master} hadoop::hadoop_storage_dirs: [/data/1, /data/2] bigtop::bigtop_repo_uri: #{repo} bigtop::jdk_package_name: java-1.7.0-openjdk-devel.x86_64 hadoop_cluster_node::cluster_components: #{components} For better UX, we should allow users to change the value in vagrantconfig.yaml. And to simplify the code and increase the readability, I'd like to remove the if-else clause in provision.sh . # Prepare puppet configuration file if [ -f /etc/debian_version ] ; then apt-get -y install puppet-module-puppetlabs-stdlib jdk= "openjdk-7-jdk" else cd /etc/puppet/modules && puppet module install puppetlabs/stdlib jdk= "java-1.7.0-openjdk-devel.x86_64" fi Puppet module installation can be replaced by bigtop_toolchain(TODO), while JDK can be specified in vagrantconfig.yaml.
        Hide
        cos Konstantin Boudnik added a comment -

        Same here: what's the aim of this functionality? Thanks!

        Show
        cos Konstantin Boudnik added a comment - Same here: what's the aim of this functionality? Thanks!
        Hide
        oflebbe Olaf Flebbe added a comment -

        The patch looks ok to me, but I am wondering about the use case.

        Show
        oflebbe Olaf Flebbe added a comment - The patch looks ok to me, but I am wondering about the use case.
        Hide
        evans_ye Evans Ye added a comment -

        Patch uploaded. Generally, this is to extend the flexibility for users to do the Hadoop CI tests.

        Show
        evans_ye Evans Ye added a comment - Patch uploaded. Generally, this is to extend the flexibility for users to do the Hadoop CI tests.

          People

          • Assignee:
            evans_ye Evans Ye
            Reporter:
            evans_ye Evans Ye
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development