From commits-return-4892-archive-asf-public=cust-asf.ponee.io@openwhisk.apache.org Tue Jun 5 22:29:30 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 34C7E180625 for ; Tue, 5 Jun 2018 22:29:30 +0200 (CEST) Received: (qmail 90065 invoked by uid 500); 5 Jun 2018 20:29:29 -0000 Mailing-List: contact commits-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list commits@openwhisk.apache.org Received: (qmail 90054 invoked by uid 99); 5 Jun 2018 20:29:29 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2018 20:29:29 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id B462D82A32; Tue, 5 Jun 2018 20:29:28 +0000 (UTC) Date: Tue, 05 Jun 2018 20:29:28 +0000 To: "commits@openwhisk.apache.org" Subject: [incubator-openwhisk] branch master updated: Update the document regarding Open JDK and Oracle JDK (#3720) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152823056825.6361.11941789011474746073@gitbox.apache.org> From: houshengbo@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-openwhisk X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 4ec2806d584e4f180abbaac7900162342d78909e X-Git-Newrev: 5aa8fc7fa6a09f219f704d301541b213b9aa07c8 X-Git-Rev: 5aa8fc7fa6a09f219f704d301541b213b9aa07c8 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. houshengbo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git The following commit(s) were added to refs/heads/master by this push: new 5aa8fc7 Update the document regarding Open JDK and Oracle JDK (#3720) 5aa8fc7 is described below commit 5aa8fc7fa6a09f219f704d301541b213b9aa07c8 Author: Vincent AuthorDate: Tue Jun 5 16:29:07 2018 -0400 Update the document regarding Open JDK and Oracle JDK (#3720) Our documents need to be changed to point according to the usage of Open JDK or Oracle JDK. This PR adds the instructions to install either of them as the Java environment of OpenWhisk. Partially-closes: apache/incubator-openwhisk-release#169 --- README.md | 2 ++ tools/macos/README.md | 20 +++++++++++++++++++- tools/ubuntu-setup/README.md | 11 +++++++++++ tools/ubuntu-setup/all.sh | 5 ++++- tools/ubuntu-setup/java8.sh | 18 ++++++++++++++---- tools/vagrant/Vagrantfile | 2 +- 6 files changed, 51 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 172580c..842178f 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ wsk action invoke /whisk.system/utils/echo -p message hello --result These steps were tested on Mac OS X El Capitan, Ubuntu 14.04.3 LTS and Windows using Vagrant. For more information about using OpenWhisk on Vagrant see the [tools/vagrant/README.md](tools/vagrant/README.md) +During the Vagrant setup, Open JDK 8 is used as the default Java environment. If you would like to use Oracle JDK 8, please change the line "su vagrant -c 'source all.sh'" into "su vagrant -c 'source all.sh oracle'" in tools/vagrant/Vagrantfile. + ### Native development Docker must be natively installed in order to build and deploy OpenWhisk. diff --git a/tools/macos/README.md b/tools/macos/README.md index 4298b58..c4cef3a 100644 --- a/tools/macos/README.md +++ b/tools/macos/README.md @@ -27,7 +27,7 @@ If you prefer to use Docker-machine, you can follow instructions in [docker-mach The following are required to build and deploy OpenWhisk from a Mac host: - [Docker 1.12.0](https://docs.docker.com/docker-for-mac/) -- [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) +- [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or [Open JDK 8](https://adoptopenjdk.net/releases.html#x64_mac) - [Scala 2.11](http://scala-lang.org/download/) - [Ansible 2.5.2](http://docs.ansible.com/ansible/intro_installation.html) @@ -54,6 +54,24 @@ sudo easy_install pip sudo -H pip install docker==2.2.1 ansible==2.5.2 jinja2==2.9.6 couchdb==1.1 httplib2==0.9.2 requests==2.10.0' | bash ``` +The above section of command installs Oracle JDK 8 as the default Java environment. If you would like to install Open JDK 8 instead of Oracle JDK 8, please run the following section. + +``` +echo ' +# install homebrew +/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +# install for finding alternative versions (Open JDK 8) +brew tap AdoptOpenJDK/openjdk +# install Open JDK 8 +brew install adoptopenjdk-openjdk8 +# install scala +brew install scala +# install pip +sudo easy_install pip +# install script prerequisites +sudo -H pip install docker==2.2.1 ansible==2.5.2 jinja2==2.9.6 couchdb==1.1 httplib2==0.9.2 requests==2.10.0' | bash +``` + # Build ``` cd /your/path/to/openwhisk diff --git a/tools/ubuntu-setup/README.md b/tools/ubuntu-setup/README.md index e563beb..ceabcd7 100644 --- a/tools/ubuntu-setup/README.md +++ b/tools/ubuntu-setup/README.md @@ -32,11 +32,22 @@ The commands below should be executed on the host machine for single VM/server d # Change current directory to openwhisk cd openwhisk + ``` + +Open JDK 8 is installed by running the following script as the default Java environment. + ``` # Install all required software (cd tools/ubuntu-setup && ./all.sh) ``` +If you choose to install Oracle JDK 8 instead of Open JDK 8, please run the following script. + + ``` + # Install all required software + (cd tools/ubuntu-setup && ./all.sh oracle) + ``` + If you are deploying OpenWhisk in a distributed environment across multiple VMs, then follow the instructions in [ansible/README_DISTRIBUTED.md](../../ansible/README_DISTRIBUTED.md) to complete the deployment. Otherwise, continue with the instructions below. ### Select a data store diff --git a/tools/ubuntu-setup/all.sh b/tools/ubuntu-setup/all.sh index 2f84d57..21a37ff 100755 --- a/tools/ubuntu-setup/all.sh +++ b/tools/ubuntu-setup/all.sh @@ -25,6 +25,9 @@ set -e set -x + +JAVA_SOURCE=${1:-"open"} + SOURCE="${BASH_SOURCE[0]}" SCRIPTDIR="$( dirname "$SOURCE" )" @@ -35,7 +38,7 @@ echo "*** installing python dependences" /bin/bash "$SCRIPTDIR/pip.sh" echo "*** installing java" -/bin/bash "$SCRIPTDIR/java8.sh" +/bin/bash "$SCRIPTDIR/java8.sh" $JAVA_SOURCE echo "*** installing ansible" /bin/bash "$SCRIPTDIR/ansible.sh" diff --git a/tools/ubuntu-setup/java8.sh b/tools/ubuntu-setup/java8.sh index 73770f4..bda7090 100755 --- a/tools/ubuntu-setup/java8.sh +++ b/tools/ubuntu-setup/java8.sh @@ -19,10 +19,20 @@ set -e set -x -if [ "$(lsb_release -cs)" == "trusty" ]; then +JAVA_SOURCE=${1:-"open"} + +if [ "$JAVA_SOURCE" != "oracle" ] ; then + if [ "$(lsb_release -cs)" == "trusty" ]; then + sudo apt-get install -y software-properties-common python-software-properties + sudo add-apt-repository ppa:jonathonf/openjdk -y + sudo apt-get update + fi + + sudo apt-get install openjdk-8-jdk -y +else sudo apt-get install -y software-properties-common python-software-properties - sudo add-apt-repository ppa:jonathonf/openjdk -y + sudo add-apt-repository ppa:webupd8team/java -y sudo apt-get update -fi -sudo apt-get install openjdk-8-jdk -y + sudo apt-get install oracle-java8-installer -y +fi diff --git a/tools/vagrant/Vagrantfile b/tools/vagrant/Vagrantfile index 2494dd9..77764a5 100644 --- a/tools/vagrant/Vagrantfile +++ b/tools/vagrant/Vagrantfile @@ -87,7 +87,7 @@ Vagrant.configure('2') do |config| echo PATH=${PATH}:${HOME}/bin:${OPENWHISK_HOME}/tools/build >> /etc/environment cd ${OPENWHISK_HOME} cd tools/ubuntu-setup - su vagrant -c 'source all.sh' + su vagrant -c 'source all.sh oracle' echo "`date`: ubuntu-setup-end" >> /tmp/vagrant-times.txt SCRIPT -- To stop receiving notification emails like this one, please contact houshengbo@apache.org.