summaryrefslogtreecommitdiffstats
path: root/catalog-fe/src/main/resources/scripts/install.sh
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-02-19 10:28:42 +0200
committerMichael Lando <ml636r@att.com>2017-02-19 10:51:01 +0200
commit451a3400b76511393c62a444f588a4ed15f4a549 (patch)
treee4f5873a863d1d3e55618eab48b83262f874719d /catalog-fe/src/main/resources/scripts/install.sh
parent5abfe4e1fb5fae4bbd5fbc340519f52075aff3ff (diff)
Initial OpenECOMP SDC commit
Change-Id: I0924d5a6ae9cdc161ae17c68d3689a30d10f407b Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-fe/src/main/resources/scripts/install.sh')
-rw-r--r--catalog-fe/src/main/resources/scripts/install.sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/catalog-fe/src/main/resources/scripts/install.sh b/catalog-fe/src/main/resources/scripts/install.sh
new file mode 100644
index 0000000000..bed9411795
--- /dev/null
+++ b/catalog-fe/src/main/resources/scripts/install.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+export JETTY_BASE=/home/jetty/base
+
+COMP=$1
+
+function usage() {
+ echo "$0 <fe | be>"
+}
+
+function exitOnError() {
+ if [ $1 -ne 0 ]
+ then
+ echo "Failed running task $2"
+ exit 2
+ fi
+}
+
+if [ $# -ne 1 ]
+then
+ usage
+ exit 1
+
+fi
+
+/opt/app/sdc/catalog-${COMP}/scripts/installJettyBase.sh
+exitOnError $? "installJettyBase"
+
+cd ${JETTY_BASE}
+exitOnError $? "move_to_base_dir"
+
+mkdir -p scripts
+
+cp /opt/app/sdc/catalog-${COMP}/scripts/* scripts
+exitOnError $? "copy_scripts_from_rpm"
+
+cp /opt/app/sdc/catalog-${COMP}/ext/jetty-ipaccess.xml etc
+exitOnError $? "override_jetty-ipaccess_module."
+
+cp /opt/app/sdc/catalog-${COMP}/catalog-${COMP}-*.war webapps
+exitOnError $? "copy_war"
+
+cp /opt/app/sdc/catalog-${COMP}/scripts/startJetty.sh .
+exitOnError $? "copy_startJetty"
+
+cp /opt/app/sdc/catalog-${COMP}/scripts/jvm.properties .
+exitOnError $? "copy_jvm_properties"
+
+./scripts/updateSslParams.sh ${JETTY_BASE}
+exitOnError $? "updateSslParams_script"
+
+#ONLY FOR BE
+#cp /opt/app/sdc/config/catalog-${COMP}/elasticsearch.yml config
+#exitOnError $? "copy_elasticsearch_yaml_to_config"
+
+mkdir -p ${JETTY_BASE}/config/catalog-${COMP}
+cp -r /opt/app/sdc/config/catalog-${COMP}/*.xml ${JETTY_BASE}/config/catalog-${COMP}
+exitOnError $? "copy_xml_files_to_config"
+
+cp -r /opt/app/sdc/config/catalog-${COMP}/*.yaml ${JETTY_BASE}/config/catalog-${COMP}
+exitOnError $? "copy_yaml_files_to_config"