climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject [1/5] climate git commit: CLIMATE-548 Vagrant references should not exist in easy-ocw ubuntu script
Date Fri, 05 Dec 2014 04:59:21 GMT
Repository: climate
Updated Branches:
  refs/heads/master 9bcae948c -> c8d49eb32


CLIMATE-548 Vagrant references should not exist in easy-ocw ubuntu script


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/ea719279
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/ea719279
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/ea719279

Branch: refs/heads/master
Commit: ea719279d9e257001d82bf9407fb9bfbe0985571
Parents: a8d84b1
Author: Lewis John McGibbney <lewis.j.mcgibbney@jpl.nasa.gov>
Authored: Thu Nov 13 15:42:29 2014 -0800
Committer: Lewis John McGibbney <lewis.j.mcgibbney@jpl.nasa.gov>
Committed: Thu Nov 13 15:42:29 2014 -0800

----------------------------------------------------------------------
 easy-ocw/install-ubuntu-12_04.sh | 189 ---------------------------------
 easy-ocw/install-ubuntu.sh       | 191 ++++++++++++++++++++++++++++++++++
 ocw-vm/init-ocw-vm.sh            |   2 +-
 3 files changed, 192 insertions(+), 190 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/ea719279/easy-ocw/install-ubuntu-12_04.sh
----------------------------------------------------------------------
diff --git a/easy-ocw/install-ubuntu-12_04.sh b/easy-ocw/install-ubuntu-12_04.sh
deleted file mode 100755
index 2270eb0..0000000
--- a/easy-ocw/install-ubuntu-12_04.sh
+++ /dev/null
@@ -1,189 +0,0 @@
-#!/bin/bash
-#
-# 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.
-
-help()
-{
-cat << ENDHELP
-
-Easy OCW assists with the building of the Apache Open Climate Workbench and its dependencies
-
-Flags:
-    -h  Display this help message.
-    -e  Install and configure a virtualenv environment before installation.
-    -q  Quiet install. User prompts are removed (when possible).
-
-It is recommended that you pass -e when running this script. If you don't, parts
-of this installation will pollute your global Python install. If you're unsure,
-pass -e just to be safe!
-
-ENDHELP
-}
-
-header()
-{
-    echo
-    echo $1
-}
-
-task()
-{
-    echo " - " $1
-}
-
-subtask()
-{
-    echo "     " $1
-}
-
-echo
-echo "---------------------------------------------------------------------------"
-echo "                         Welcome to Easy OCW"
-echo "---------------------------------------------------------------------------"
-echo
-
-WITH_VIRTUAL_ENV=0
-WITH_HOMEBREW=0
-WITH_INTERACT=1
-
-while getopts ":h :e :q" FLAG
-do
-    case $FLAG in
-        h)
-            help
-            exit 1
-            ;;
-        e)
-            WITH_VIRTUAL_ENV=1
-            ;;
-        q)
-            WITH_INTERACT=0
-            ;;
-        ?)
-            help
-            exit 1
-            ;;
-    esac
-done
-
-if [ $WITH_INTERACT == 1 ]; then
-cat << ENDINTRO
-A number of dependencies for OCW will now be installed. Please check the wiki
-for a complete list of dependencies. Additionally, please read the wiki for
-useful installation guidelines and information that may be pertinent to your
-situation. All of this can be found at http://s.apache.org/3p2
-
-ENDINTRO
-
-if [ $WITH_VIRTUAL_ENV != 1 ]; then
-cat << VIRTUALENV_WARNING
-It is highly recommended that you allow Easy OCW to install the dependencies
-into a virtualenv environment to ensure that your global Python install is
-not affected. If you're unsure, you should pass the -e flag
-to this script. If you aren't concerned, or you want to create your own
-virtualenv environment, then feel free to ignore this message.
-
-VIRTUALENV_WARNING
-fi
-
-read -p "Press [ENTER] to begin installation ..."
-fi
-
-header "Checking for pip ..."
-if [ ! command -v pip >/dev/null 2>&1 ]; then
-    task "Unable to locate pip."
-    task "Installing Pip"
-    sudo apt-get install python-pip >> install_log
-    subtask "done"
-fi
-
-if [ $WITH_VIRTUAL_ENV == 1 ]; then
-    header "Setting up a virtualenv ..."
-
-    # Check if virtualenv is installed. If it's not, we'll install it for the user.
-    if ! command -v virtualenv >/dev/null 2>&1; then
-        task "Installing virtualenv ..."
-        sudo apt-get install -y python-virtualenv >> install_log
-        subtask "done"
-    fi
-
-    # Create a new environment for OCW work
-    task "Creating a new environment ..."
-    virtualenv ocw >> install_log
-    source ocw/bin/activate
-    subtask "done"
-fi
-
-# Install Continuum Analytics Anaconda Python distribution. This gives
-# almost all the dependencies that OCW needs in a single, easy to
-# install package.
-
-header "Installing Anaconda Python distribution ..."
-echo
-echo "*** NOTE *** When asked to update your PATH, you should respond YES."
-read -p "Press [ENTER] to continue ..."
-
-cd
-task "Downloading Anaconda ..."
-wget -O Anaconda-1.9.2-Linux-x86_64.sh "http://repo.continuum.io/archive/Anaconda-1.9.2-Linux-x86_64.sh"
2> install_log
-subtask "done"
-
-task "Installing ..."
-bash Anaconda-1.9.2-Linux-x86_64.sh
-export PATH="/home/vagrant/anaconda/bin:$PATH"
-subtask "done"
-
-# Install Basemap. Conda cannot be used for this install since
-# it fails to analyse the dependencies (at the time of writing). This
-# will install it manually. At some point, this should be replaced with
-# 'conda install basemap' once it is working again!
-header "Handling Basemap install ..."
-
-cd
-task "Downloading basemap ..."
-wget -O basemap-1.0.7.tar.gz "http://sourceforge.net/projects/matplotlib/files/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz/download"
2> install_log
-tar xzf basemap-1.0.7.tar.gz >> install_log
-subtask "done"
-
-# Install GEOS
-task "Installing GEOS dependency ..."
-cd basemap-1.0.7/geos-3.3.3
-export GEOS_DIR=/usr/local
-./configure --prefix=$GEOS_DIR >> install_log
-sudo make >> install_log
-sudo make install >> install_log
-subtask "done"
-
-# Install basemap
-task "Installing Basemap ..."
-cd ..
-python setup.py install >> install_log
-subtask "done"
-
-cd
-
-# Install miscellaneous Python packages needed for OCW. Some of these
-# can be installed with Conda, but since none of them have an annoying
-# compiled component we just installed them with Pip.
-header "Installing additional Python packages"
-pip install -r ocw-pip-dependencies.txt >> install_log
-
-# Ensure that the climate code is included in the Python Path
-header "Updating PYTHONPATH ..."
-echo "export PYTHONPATH=/home/vagrant/climate:/home/vagrant/climate/ocw/:/home/vagrant/climate/rcmet/src/main/python/rcmes"
>> /home/vagrant/.bashrc
-subtask "done"

http://git-wip-us.apache.org/repos/asf/climate/blob/ea719279/easy-ocw/install-ubuntu.sh
----------------------------------------------------------------------
diff --git a/easy-ocw/install-ubuntu.sh b/easy-ocw/install-ubuntu.sh
new file mode 100755
index 0000000..c7ba99a
--- /dev/null
+++ b/easy-ocw/install-ubuntu.sh
@@ -0,0 +1,191 @@
+#!/bin/bash
+#
+# 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.
+
+help()
+{
+cat << ENDHELP
+
+Easy OCW assists with the building of the Apache Open Climate Workbench and its dependencies
+
+Flags:
+    -h  Display this help message.
+    -e  Install and configure a virtualenv environment before installation.
+    -q  Quiet install. User prompts are removed (when possible).
+
+It is recommended that you pass -e when running this script. If you don't, parts
+of this installation will pollute your global Python install. If you're unsure,
+pass -e just to be safe!
+
+N.B. This install script has been tested against Ubuntu 12.04 and 14.04.
+Please report problems with this script to dev@climate.apache.org
+ENDHELP
+}
+
+header()
+{
+    echo
+    echo $1
+}
+
+task()
+{
+    echo " - " $1
+}
+
+subtask()
+{
+    echo "     " $1
+}
+
+echo
+echo "---------------------------------------------------------------------------"
+echo "                         Welcome to Easy OCW"
+echo "---------------------------------------------------------------------------"
+echo
+
+WITH_VIRTUAL_ENV=0
+WITH_HOMEBREW=0
+WITH_INTERACT=1
+
+while getopts ":h :e :q" FLAG
+do
+    case $FLAG in
+        h)
+            help
+            exit 1
+            ;;
+        e)
+            WITH_VIRTUAL_ENV=1
+            ;;
+        q)
+            WITH_INTERACT=0
+            ;;
+        ?)
+            help
+            exit 1
+            ;;
+    esac
+done
+
+if [ $WITH_INTERACT == 1 ]; then
+cat << ENDINTRO
+A number of dependencies for OCW will now be installed. Please check the wiki
+for a complete list of dependencies. Additionally, please read the wiki for
+useful installation guidelines and information that may be pertinent to your
+situation. All of this can be found at http://s.apache.org/3p2
+
+ENDINTRO
+
+if [ $WITH_VIRTUAL_ENV != 1 ]; then
+cat << VIRTUALENV_WARNING
+It is highly recommended that you allow Easy OCW to install the dependencies
+into a virtualenv environment to ensure that your global Python install is
+not affected. If you're unsure, you should pass the -e flag
+to this script. If you aren't concerned, or you want to create your own
+virtualenv environment, then feel free to ignore this message.
+
+VIRTUALENV_WARNING
+fi
+
+read -p "Press [ENTER] to begin installation ..."
+fi
+
+header "Checking for pip ..."
+if [ ! command -v pip >/dev/null 2>&1 ]; then
+    task "Unable to locate pip."
+    task "Installing Pip"
+    sudo apt-get install python-pip >> install_log
+    subtask "done"
+fi
+
+if [ $WITH_VIRTUAL_ENV == 1 ]; then
+    header "Setting up a virtualenv ..."
+
+    # Check if virtualenv is installed. If it's not, we'll install it for the user.
+    if ! command -v virtualenv >/dev/null 2>&1; then
+        task "Installing virtualenv ..."
+        sudo apt-get install -y python-virtualenv >> install_log
+        subtask "done"
+    fi
+
+    # Create a new environment for OCW work
+    task "Creating a new environment ..."
+    virtualenv ocw >> install_log
+    source ocw/bin/activate
+    subtask "done"
+fi
+
+# Install Continuum Analytics Anaconda Python distribution. This gives
+# almost all the dependencies that OCW needs in a single, easy to
+# install package.
+
+header "Installing Anaconda Python distribution ..."
+echo
+echo "*** NOTE *** When asked to update your PATH, you should respond YES."
+read -p "Press [ENTER] to continue ..."
+
+cd
+task "Downloading Anaconda ..."
+wget -O Anaconda-1.9.2-Linux-x86_64.sh "http://repo.continuum.io/archive/Anaconda-1.9.2-Linux-x86_64.sh"
2> install_log
+subtask "done"
+
+task "Installing ..."
+bash Anaconda-1.9.2-Linux-x86_64.sh
+export PATH="${HOME}/anaconda/bin:$PATH"
+subtask "done"
+
+# Install Basemap. Conda cannot be used for this install since
+# it fails to analyse the dependencies (at the time of writing). This
+# will install it manually. At some point, this should be replaced with
+# 'conda install basemap' once it is working again!
+header "Handling Basemap install ..."
+
+cd
+task "Downloading basemap ..."
+wget -O basemap-1.0.7.tar.gz "http://sourceforge.net/projects/matplotlib/files/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz/download"
2> install_log
+tar xzf basemap-1.0.7.tar.gz >> install_log
+subtask "done"
+
+# Install GEOS
+task "Installing GEOS dependency ..."
+cd basemap-1.0.7/geos-3.3.3
+export GEOS_DIR=/usr/local
+./configure --prefix=$GEOS_DIR >> install_log
+sudo make >> install_log
+sudo make install >> install_log
+subtask "done"
+
+# Install basemap
+task "Installing Basemap ..."
+cd ..
+python setup.py install >> install_log
+subtask "done"
+
+cd
+
+# Install miscellaneous Python packages needed for OCW. Some of these
+# can be installed with Conda, but since none of them have an annoying
+# compiled component we just installed them with Pip.
+header "Installing additional Python packages"
+pip install -r ocw-pip-dependencies.txt >> install_log
+
+# Ensure that the climate code is included in the Python Path
+header "Updating PYTHONPATH ..."
+echo "export PYTHONPATH=${HOME}/climate:${HOME}/climate/ocw" >> /home/.bashrc
+subtask "done"

http://git-wip-us.apache.org/repos/asf/climate/blob/ea719279/ocw-vm/init-ocw-vm.sh
----------------------------------------------------------------------
diff --git a/ocw-vm/init-ocw-vm.sh b/ocw-vm/init-ocw-vm.sh
index 658a494..7a71dee 100755
--- a/ocw-vm/init-ocw-vm.sh
+++ b/ocw-vm/init-ocw-vm.sh
@@ -50,7 +50,7 @@ cp climate/easy-ocw/install-ubuntu-12_04.sh .
 # Copy the requirements files for conda and pip used by Easy-OCW
 cp climate/easy-ocw/*.txt .
 
-bash install-ubuntu-12_04.sh -q
+bash install-ubuntu.sh -q
 
 # Set symlink for the UI frontend code
 cd climate/ocw-ui/backend


Mime
View raw message