You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nemo.apache.org by ta...@apache.org on 2021/07/01 07:11:00 UTC

[incubator-nemo] branch master updated: [MINOR] Installation Script (#308)

This is an automated email from the ASF dual-hosted git repository.

taegeonum pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nemo.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ce3ccb  [MINOR] Installation Script (#308)
4ce3ccb is described below

commit 4ce3ccbacedc4b7b90e02b56499320011780000b
Author: Won Wook SONG <ws...@gmail.com>
AuthorDate: Thu Jul 1 16:10:54 2021 +0900

    [MINOR] Installation Script (#308)
    
    **Major changes:**
    - Adds an installation script to the Nemo repository
    
    **Minor changes to note:**
    - None
    
    **Tests for the changes:**
    - Tested on my Mac and ubuntu machine
    
    **Other comments:**
    - None
---
 README.md           |  4 ++++
 bin/install_nemo.sh | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)

diff --git a/README.md b/README.md
index d92bbcd..fd61c4b 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,10 @@ Please refer to the [Contribution guideline](.github/CONTRIBUTING.md) to contrib
 
 ## Nemo prerequisites and setup
 
+### Simple installation
+
+Run `$ ./bin/install_nemo.sh` on the Nemo home directory. This script includes the actions described below.
+
 ### Prerequisites
 * Java 8 or later (tested on Java 8 and Java 11)
 * Maven
diff --git a/bin/install_nemo.sh b/bin/install_nemo.sh
new file mode 100755
index 0000000..508fcb8
--- /dev/null
+++ b/bin/install_nemo.sh
@@ -0,0 +1,54 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#!/usr/bin/env bash
+
+# Run this script at NEMO_HOME as `bin/install_nemo.sh`
+
+if [[ "$OSTYPE" == "linux-gnu"* ]]; then # Linux
+  # Install prerequisites (maven, java8, protobuf)
+  sudo add-apt-repository ppa:snuspl/protobuf-250
+  sudo apt update
+  sudo apt install maven openjdk-8-jdk protobuf-compiler=2.5.0-9xenial1
+
+elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX
+  # Install or update brew
+  which -s brew
+  if [[ $? != 0 ]] ; then
+      # Install Homebrew
+      ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+  else
+      brew update
+  fi
+
+  # Install prerequisites (maven, java8, protobuf)
+  brew install maven
+  brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
+  wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2
+  tar xvf protobuf-2.5.0.tar.bz2
+  pushd protobuf-2.5.0
+  ./configure CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 -g' LDFLAGS='-stdlib=libc++' LIBS="-lc++ -lc++abi"
+  make -j 4
+  sudo make install
+  popd
+
+else
+  echo "Unsupported OS type $OSTYPE for the installation script"
+fi
+
+mvn clean install -T1C