forked from open-power-ref-design/accelerated-db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·96 lines (78 loc) · 2.8 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Copyright 2016 IBM Corp.
#
# All Rights Reserved.
#
# Licensed 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.
set -e
#
#Cluster Genesis repository
#
GENESIS_REMOTE="https://github.com/open-power-ref-design-toolkit/cluster-genesis.git"
GENESIS_LOCAL="cluster-genesis"
GENESIS_COMMIT="582332e310170d1317edb5bf82b81d21b0628d4f"
GENESIS_VERSION="release-1.2"
GENESIS_FULL=$(pwd)/$GENESIS_LOCAL
#
#Operations Manager repository
#
OPSMGR_REMOTE="https://github.com/open-power-ref-design-toolkit/opsmgr.git"
OPSMGR_LOCAL="opsmgr"
OPSMGR_COMMIT="f7449bc318325914b52a0624bfb7f01acd408f90"
OPSMGR_VERSION="branch-v3"
OPSMGR_FULL=$(pwd)/$OPSMGR_LOCAL
ACCEL_DB_HOME=$(pwd)
DKMS_LOCATION="http://mirrors.kernel.org/ubuntu/pool/main/d/dkms/dkms_2.2.0.3-2ubuntu11_all.deb"
CUDA_REPO="https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda-repo-ubuntu1604-8-0-local_8.0.44-1_ppc64el-deb"
PACKAGE_DIR="playbooks/packages"
DYNAMIC_INVENTORY=$GENESIS_FULL/"scripts/python/yggdrasil/inventory.py"
ACTIVATE_FILE=".accel-activate"
CUDA_FILE=${PACKAGE_DIR}/cuda8.deb
DKMS_FILE=${PACKAGE_DIR}/dkms.deb
#pull cluster-genesis into project directory
./setup_git_repo.sh "${GENESIS_REMOTE}" "${GENESIS_LOCAL}" "${GENESIS_COMMIT}"
#pull OpsMgr into project directory
./setup_git_repo.sh "${OPSMGR_REMOTE}" "${OPSMGR_LOCAL}" "${OPSMGR_COMMIT}"
#apply any patches to genesis.
./patch_source.sh "${GENESIS_LOCAL}"
mkdir -p ${PACKAGE_DIR}
#Download Cuda Repo
if [ ! -f ${CUDA_FILE} ];
then
echo "Downloading Cuda repository"
wget ${CUDA_REPO} -O ${CUDA_FILE}
else
echo "SKIPPING: Cuda repo already downloaded"
fi
if [ ! -f ${DKMS_FILE} ];
then
echo "Downloading dkms package"
wget ${DKMS_LOCATION} -O ${DKMS_FILE}
else
echo "SKIPPING: dkms package already downloaded"
fi
#call cluster genesis install script
cd ${GENESIS_LOCAL}
scripts/install.sh
cd ..
export DYNAMIC_INVENTORY
echo "DYNAMIC " $DYNAMIC_INVENTORY
#
# Move variables to activate file to be sourced by deploy.sh
# This allows us to not require the user to export the variables
# manually, and can be run in a separate environment than the
# install.sh script.
#
echo 'DYNAMIC_INVENTORY='$DYNAMIC_INVENTORY > ${ACTIVATE_FILE}
echo 'GENESIS_FULL='$GENESIS_FULL >> ${ACTIVATE_FILE}
echo 'ACCEL_DB_HOME='$ACCEL_DB_HOME >> ${ACTIVATE_FILE}
echo 'OPSMGR_FULL='$OPSMGR_FULL >> ${ACTIVATE_FILE}