juju-solutions / bundle-apache-hadoop-spark-zeppelin

Bundle for analyzing data with Apache Spark and Apache Hadoop
Apache License 2.0
2 stars 6 forks source link

Bundle fails install - openjdk-8-jdk LXD environment #7

Open rblaine95 opened 7 years ago

rblaine95 commented 7 years ago

When deploying this bundle on a localhost LXD platform, the hadoop units try to install openjdk-8-jdk and continuously fails.
Deploying the same bundle on an Azure platform has no errors and installs openjdk-7-jdk instead.

rblaine95 commented 6 years ago

java-installer-a4d52ba0.sh has an error in the find_java method --

find_java() {
    if [[ -z "$JAVA_HOME" ]]; then
        export JAVA_HOME=$(find $1 -name $2 | head -n1)
    fi
}

The find returns 2 entries: /usr/lib/jvm/java-8-openjdk-amd64 and /usr/share/gdb/auto-load/usr/lib/jvm/java-8-openjdk-amd64. The order of these entries differs between machines (For some reason, when I deploy this on a locally hosted machine the /usr/share entry is first whereas the /usr/lib entry is second. This causes java to break).

To Fix: Pipe the output of the find through a sort. This will ensure that /usr/lib will always be at the top. Otherwise set $1 to /usr/lib instead of /usr/.

find_java() {
    if [[ -z "$JAVA_HOME" ]]; then
        export JAVA_HOME=$(find $1 -name $2 | sort | head -n1)
    fi
}

Also please upgrade this to Xenial (and please update the Zeppelin mirror. Zeppelin 0.5.2 is way too out of date. We need 0.7.2). I have been fighting with the Apache Bigtop Spark Processing deployment for several days because I need an R interpreter and, for some idiotic reason, the official Apache Bigtop Zeppelin JuJu Charm doesn't support R in any straightforward way.

To update the Zeppelin mirror, modify resources.yaml and replace the current Zeppelin entries with:

"zeppelin-x86_64":
    "url": "http://www-eu.apache.org/dist/zeppelin/zeppelin-0.7.2/zeppelin-0.7.2-bin-all.tgz"
    "hash": "068acacdf00321ddb298cb31b9e676be2e72f2de985e78a95d239bdcf37a85037eacdb24b00b692f5cefe904f18f624648e9eb6cc4cfff67425c442e2a2caa7c"
    "hash_type": "sha512"