aboutsummaryrefslogtreecommitdiffstats
path: root/lib/_installers
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2018-04-16 15:21:12 -0700
committerVictor Morales <victor.morales@intel.com>2018-04-16 15:21:12 -0700
commit8be83219fd8fc9983ac90a700b25c35555f45c49 (patch)
tree442a5363ddc5a910e241d6025899f96f5ef065a7 /lib/_installers
parent11815c2b45224455643c8cb08f9d524fabc7ac92 (diff)
Update AAI script
The get_aai_images function was not reflecting the latest changes to build and retrieve AAI images, as consequence the deployment of their services fails. This change also includes the installation of go and its tools. Change-Id: Ic14da77078459c0f63ba517c36c0dcd1cfca64e8 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: INT-470
Diffstat (limited to 'lib/_installers')
-rwxr-xr-xlib/_installers81
1 files changed, 80 insertions, 1 deletions
diff --git a/lib/_installers b/lib/_installers
index 4011119..45fbd84 100755
--- a/lib/_installers
+++ b/lib/_installers
@@ -173,7 +173,7 @@ function install_docker {
# install_docker_compose() - Download and install docker-engine
function install_docker_compose {
- local docker_compose_version=${1:-1.12.0}
+ local docker_compose_version=${1:-1.21.0}
if [ ! -d /opt/docker ]; then
mkdir /opt/docker
curl -L https://github.com/docker/compose/releases/download/$docker_compose_version/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
@@ -218,3 +218,82 @@ function _install_ODL {
rm -rf "/opt/distribution-karaf-"$odl_version".tar.gz"
fi
}
+
+# install_go() - Install GoLang package
+function install_go {
+ if is_package_installed golang-go; then
+ return
+ fi
+ source /etc/os-release || source /usr/lib/os-release
+ case ${ID,,} in
+ *suse)
+ ;;
+ ubuntu|debian)
+ install_package software-properties-common
+ add-apt-repository -y ppa:gophers/archive
+ ;;
+ rhel|centos|fedora)
+ ;;
+ esac
+ update_repos
+
+ install_package golang-go
+}
+
+# install_dep() - Install dep GoLand tool
+function install_dep {
+ install_go
+ curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
+}
+
+# install_hadoop() - Function that installs Hadoop
+function install_hadoop {
+ local release=titan
+ local version=1.0.0
+ local filename=$release-$version-hadoop1
+ local dest_folder=/opt/hadoop/current
+
+ if [ ! -d $dest_folder ]; then
+ curl http://s3.thinkaurelius.com/downloads/$release/$filename.zip -o /tmp/${filename}.zip
+ install_package unzip
+ mkdir -p $dest_folder
+ unzip /tmp/${filename}.zip -d $dest_folder
+ fi
+
+ pushd $dest_folder/${filename}
+ # Change commitlog_directory and data_file_directories values (https://stackoverflow.com/a/26856246/1707651)
+ sed -i "s|db/cassandra/data|/tmp/data|g" conf/cassandra/cassandra.yaml
+ sed -i "s|db/cassandra/commitlog|/tmp/commitlog|g" conf/cassandra/cassandra.yaml
+
+ install_java
+ ./bin/titan.sh start
+ popd
+}
+
+# install_haproxy() - Function that install HAProxy
+function install_haproxy {
+ if is_package_installed haproxy; then
+ return
+ fi
+ source /etc/os-release || source /usr/lib/os-release
+ case ${ID,,} in
+ *suse)
+ ;;
+ ubuntu|debian)
+ install_package software-properties-common
+ add-apt-repository -y ppa:vbernat/haproxy-1.7
+ update_repos
+ install_package haproxy
+ cp /var/onap/files/haproxy.cfg /etc/haproxy/
+ cp /var/onap/files/aai.pem /etc/ssl/private/
+ chmod 640 /etc/ssl/private/aai.pem
+ chown root:ssl-cert /etc/ssl/private/aai.pem
+ mkdir -p /usr/local/etc/haproxy
+ #echo "127.0.0.1 localhost aai-traversal.api.simpledemo.openecomp.org aai-resources.api.simpledemo.openecomp.org" >> /etc/hosts
+
+ service haproxy restart
+ ;;
+ rhel|centos|fedora)
+ ;;
+ esac
+}