summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-07-26 18:04:56 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-07-26 18:06:34 -0400
commitcc805e781c5c764860a1f801e637c6ed6e471f63 (patch)
treec2976903f21258a82b5557441d00a569731ecb4e
parenta9627f8c54b7e9d5712320621e8a0b748ad9baf4 (diff)
Prepare to deploy widget-ms docker container in Rackspace
Restore hardcoded image name ep:1610-1 due to demo/boot script file dependencies. Store image and container names in settings file; push and tag image for WMS at same time as portal and db. Issue: PORTAL-30 Change-Id: I349bfb91676dda0b4f106c6cab784dc6e6cec647 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
-rwxr-xr-xdeliveries/build_portalapps_dockers.sh2
-rwxr-xr-xdeliveries/createMaria.sh2
-rwxr-xr-xdeliveries/dbstart.sh8
-rwxr-xr-xdeliveries/dbstop.sh11
-rw-r--r--deliveries/etc.zipbin11434 -> 11429 bytes
-rwxr-xr-xdeliveries/new_start.sh6
-rwxr-xr-xdeliveries/new_stop.sh8
-rwxr-xr-xdeliveries/os_docker_push.sh25
-rwxr-xr-xdeliveries/os_docker_release.sh23
-rwxr-xr-xdeliveries/os_settings.sh11
-rwxr-xr-xdeliveries/widget_ms_start.sh9
-rwxr-xr-xdeliveries/widget_ms_stop.sh12
12 files changed, 85 insertions, 32 deletions
diff --git a/deliveries/build_portalapps_dockers.sh b/deliveries/build_portalapps_dockers.sh
index eba1cb6d..a45e55cc 100755
--- a/deliveries/build_portalapps_dockers.sh
+++ b/deliveries/build_portalapps_dockers.sh
@@ -101,7 +101,7 @@ fi
# build portal docker
cd $DELIV
PORTAL_DOCKER_CMD="
- docker build -t ${IMGNAME} ${PROXY_ARGS}
+ docker build -t ${EP_IMG_NAME} ${PROXY_ARGS}
--build-arg FE_DIR=$BUILD/public
--build-arg PORTAL_WAR=$BUILD/ecompportal-be-os.war
--build-arg SDK_WAR=$BUILD/epsdk-app-os.war
diff --git a/deliveries/createMaria.sh b/deliveries/createMaria.sh
index 0b3de0b7..84e6bb38 100755
--- a/deliveries/createMaria.sh
+++ b/deliveries/createMaria.sh
@@ -6,4 +6,4 @@ source $(dirname $0)/os_settings.sh
echo ${SCRIPT_DIR}
-docker build -t ecompdb:portal --build-arg SCRIPT_DIR="${SCRIPT_DIR}" --build-arg SDK_SCRIPT_DIR="${SDK_SCRIPT_DIR}" --build-arg DBC_SCRIPT_DIR="${DBC_SCRIPT_DIR}" --build-arg SCRIPT_COMMON_DIR="${SCRIPT_COMMON_DIR}" --build-arg SDK_COMMON_SCRIPT_DIR="${SDK_COMMON_SCRIPT_DIR}" --build-arg DBC_COMMON_SCRIPT_DIR="${DBC_COMMON_SCRIPT_DIR}" -f ./Dockerfile.mariadb .
+docker build -t ${DB_IMG_NAME} --build-arg SCRIPT_DIR="${SCRIPT_DIR}" --build-arg SDK_SCRIPT_DIR="${SDK_SCRIPT_DIR}" --build-arg DBC_SCRIPT_DIR="${DBC_SCRIPT_DIR}" --build-arg SCRIPT_COMMON_DIR="${SCRIPT_COMMON_DIR}" --build-arg SDK_COMMON_SCRIPT_DIR="${SDK_COMMON_SCRIPT_DIR}" --build-arg DBC_COMMON_SCRIPT_DIR="${DBC_COMMON_SCRIPT_DIR}" -f ./Dockerfile.mariadb .
diff --git a/deliveries/dbstart.sh b/deliveries/dbstart.sh
index eaea9c18..518a5485 100755
--- a/deliveries/dbstart.sh
+++ b/deliveries/dbstart.sh
@@ -1,3 +1,9 @@
+#!/bin/bash
+
+# Establish environment variables
+source $(dirname $0)/os_settings.sh
+
#docker create --name data_vol_portal -v /var/lib/mysql mariadb;
-docker run -d --volumes-from data_vol_portal -p 3306:3306 -e MYSQL_ROOT_PASSWORD=Aa123456 --net=host --name ecompdb_portal ecompdb:portal;
+echo "Running docker image ${DB_IMG_NAME} as name ${DB_CONT_NAME}"
+docker run -d --volumes-from data_vol_portal -p 3306:3306 -e MYSQL_ROOT_PASSWORD=Aa123456 --net=host --name ${DB_CONT_NAME} ${DB_IMG_NAME};
diff --git a/deliveries/dbstop.sh b/deliveries/dbstop.sh
index 319b28ba..9c5b73a7 100755
--- a/deliveries/dbstop.sh
+++ b/deliveries/dbstop.sh
@@ -1,2 +1,9 @@
-docker stop ecompdb_portal
-docker rm ecompdb_portal
+#!/bin/bash
+
+# Establish environment variables
+source $(dirname $0)/os_settings.sh
+
+echo "Stopping docker container named ${DB_CONT_NAME}"
+docker stop ${DB_CONT_NAME}
+echo "Removing docker container named ${DB_CONT_NAME}"
+docker rm ${DB_CONT_NAME}
diff --git a/deliveries/etc.zip b/deliveries/etc.zip
index 30e6898f..c03a151c 100644
--- a/deliveries/etc.zip
+++ b/deliveries/etc.zip
Binary files differ
diff --git a/deliveries/new_start.sh b/deliveries/new_start.sh
index 0710c83d..cffcda9b 100755
--- a/deliveries/new_start.sh
+++ b/deliveries/new_start.sh
@@ -11,8 +11,8 @@ PORTALPROPDIR=ECOMPPORTALAPP
SDKAPPPROPDIR=ECOMPSDKAPP
DBCAPPPROPDIR=ECOMPDBCAPP
#docker rm ep_1610
-echo "Running docker image ${IMGNAME} as name ${CONTNAME}"
-docker run -d --name ${CONTNAME} \
+echo "Running docker image ${EP_IMG_NAME} as name ${EP_CONT_NAME}"
+docker run -d --name ${EP_CONT_NAME} \
-p 8989:8080 -p 8010:8009 -p 8006:8005 \
-v ${BASEDIR}/etc/${PORTALPROPDIR}/system.properties:${PORTALDIR}/WEB-INF/conf/system.properties \
-v ${BASEDIR}/etc/${PORTALPROPDIR}/fusion.properties:${PORTALDIR}/WEB-INF/fusion/conf/fusion.properties \
@@ -26,4 +26,4 @@ docker run -d --name ${CONTNAME} \
-v ${BASEDIR}/etc/${DBCAPPPROPDIR}/dbcapp.properties:${DBCAPPDIR}/WEB-INF/dbcapp/dbcapp.properties \
-v ${BASEDIR}/etc/${DBCAPPPROPDIR}/fusion.properties:${DBCAPPDIR}/WEB-INF/fusion/conf/fusion.properties \
-v ${BASEDIR}/log:/opt/apache-tomcat-8.0.37/logs \
-${IMGNAME}
+${EP_IMG_NAME}
diff --git a/deliveries/new_stop.sh b/deliveries/new_stop.sh
index 6c4bf7a2..7693c035 100755
--- a/deliveries/new_stop.sh
+++ b/deliveries/new_stop.sh
@@ -3,7 +3,7 @@
# Establish environment variables
source $(dirname $0)/os_settings.sh
-echo "Stopping docker container named ${CONTNAME}"
-docker stop ${CONTNAME}
-echo "Removing docker container named ${CONTNAME}"
-docker rm ${CONTNAME}
+echo "Stopping docker container named ${EP_CONT_NAME}"
+docker stop ${EP_CONT_NAME}
+echo "Removing docker container named ${EP_CONT_NAME}"
+docker rm ${EP_CONT_NAME}
diff --git a/deliveries/os_docker_push.sh b/deliveries/os_docker_push.sh
index 04e245cd..2c41151d 100755
--- a/deliveries/os_docker_push.sh
+++ b/deliveries/os_docker_push.sh
@@ -1,5 +1,8 @@
#!/bin/bash
+# Establish environment variables
+source $(dirname $0)/os_settings.sh
+
./run.sh
REPO="nexus3.onap.org:10003"
@@ -10,18 +13,28 @@ LATEST="latest"
APPS_VERSION="${REPO}/openecomp/portalapps:${VERSION}"
DB_VERSION="${REPO}/openecomp/portaldb:${VERSION}"
+WMS_VERSION="${REPO}/openecomp/portalwms:${VERSION}"
APPS_LATEST="${REPO}/openecomp/portalapps:${LATEST}"
DB_LATEST="${REPO}/openecomp/portaldb:${LATEST}"
+WMS_LATEST="${REPO}/openecomp/portalwms:${LATEST}"
+
+# tag versions
+docker tag ${EP_IMG_NAME} ${APPS_VERSION}
+docker tag ${EP_IMG_NAME} ${APPS_LATEST}
-# tag version
-docker tag ep:1610-1 ${APPS_VERSION}
-docker tag ecompdb:portal ${DB_VERSION}
-docker tag ep:1610-1 ${APPS_LATEST}
-docker tag ecompdb:portal ${DB_LATEST}
+docker tag ${DB_IMG_NAME} ${DB_VERSION}
+docker tag ${DB_IMG_NAME} ${DB_LATEST}
+
+docker tag ${WMS_IMG_NAME} ${WMS_VERSION}
+docker tag ${WMS_IMG_NAME} ${WMS_LATEST}
# push
docker push ${APPS_VERSION}
-docker push ${DB_VERSION}
docker push ${APPS_LATEST}
+
+docker push ${DB_VERSION}
docker push ${DB_LATEST}
+
+docker push ${WMS_VERSION}
+docker push ${WMS_LATEST}
diff --git a/deliveries/os_docker_release.sh b/deliveries/os_docker_release.sh
index ba4ba235..91b5e187 100755
--- a/deliveries/os_docker_release.sh
+++ b/deliveries/os_docker_release.sh
@@ -1,5 +1,8 @@
#!/bin/bash
+# Establish environment variables
+source $(dirname $0)/os_settings.sh
+
./run.sh
REPO="nexus3.onap.org:10003"
@@ -10,18 +13,28 @@ LATEST="1.1-STAGING-latest"
APPS_VERSION="${REPO}/openecomp/portalapps:${VERSION}"
DB_VERSION="${REPO}/openecomp/portaldb:${VERSION}"
+WMS_VERSION="${REPO}/openecomp/portalwms:${VERSION}"
APPS_LATEST="${REPO}/openecomp/portalapps:${LATEST}"
DB_LATEST="${REPO}/openecomp/portaldb:${LATEST}"
+WMS_LATEST="${REPO}/openecomp/portalwms:${LATEST}"
# tag version
-docker tag ep:1610-1 ${APPS_VERSION}
-docker tag ecompdb:portal ${DB_VERSION}
-docker tag ep:1610-1 ${APPS_LATEST}
-docker tag ecompdb:portal ${DB_LATEST}
+docker tag ${EP_IMG_NAME} ${APPS_VERSION}
+docker tag ${EP_IMG_NAME} ${APPS_LATEST}
+
+docker tag ${DB_IMG_NAME} ${DB_VERSION}
+docker tag ${DB_IMG_NAME} ${DB_LATEST}
+
+docker tag ${WMS_IMG_NAME} ${WMS_VERSION}
+docker tag ${WMS_IMG_NAME} ${WMS_LATEST}
# push
docker push ${APPS_VERSION}
-docker push ${DB_VERSION}
docker push ${APPS_LATEST}
+
+docker push ${DB_VERSION}
docker push ${DB_LATEST}
+
+docker push ${WMS_VERSION}
+docker push ${WMS_LATEST}
diff --git a/deliveries/os_settings.sh b/deliveries/os_settings.sh
index f8b4f560..c4b7a95d 100755
--- a/deliveries/os_settings.sh
+++ b/deliveries/os_settings.sh
@@ -1,8 +1,13 @@
#!/bin/bash
-#IMGNAME=ep:1610-1
-IMGNAME=onap-portal:1.1.0
-CONTNAME=ep-1.1.0
+# This docker image name is hardcoded at the ONAP demo repository,
+# so changing it is nontrivial.
+EP_IMG_NAME=ep:1610-1
+EP_CONT_NAME=onap_portal
+DB_IMG_NAME=ecompdb:portal
+DB_CONT_NAME=ecompdb_portal
+WMS_IMG_NAME=widget-ms
+WMS_CONT_NAME=ecomp-portal-widget-ms
VERSION=1.1.0
ETCDIR=etc
WORKINGDIR=PROJECT
diff --git a/deliveries/widget_ms_start.sh b/deliveries/widget_ms_start.sh
index aa9da147..5e51aebe 100755
--- a/deliveries/widget_ms_start.sh
+++ b/deliveries/widget_ms_start.sh
@@ -1,5 +1,10 @@
+#!/bin/sh
+
+# Establish environment variables
+source $(dirname $0)/os_settings.sh
+
BASEDIR=/PROJECT/OpenSource/UbuntuEP
WIDGETMSAPPPROPDIR=ECOMPWIDGETMS
-echo "Starting ecomp-portal-widget-ms image in a new container !!!"
-docker run -d --name "ecomp-portal-widget-ms" -p 8082:8082 -v ${BASEDIR}/etc/${WIDGETMSAPPPROPDIR}/application.properties:/application.properties widget-ms
+echo "Running docker image ${WMS_IMG_NAME} as container ${WMS_CONT_NAME}"
+docker run -d --name ${WMS_CONT_NAME} -p 8082:8082 -v ${BASEDIR}/etc/${WIDGETMSAPPPROPDIR}/application.properties:/application.properties ${WMS_IMG_NAME}
diff --git a/deliveries/widget_ms_stop.sh b/deliveries/widget_ms_stop.sh
index 8c9abf56..dd5c9645 100755
--- a/deliveries/widget_ms_stop.sh
+++ b/deliveries/widget_ms_stop.sh
@@ -1,5 +1,9 @@
-echo "Stopping ecomp-portal-widget-ms container !!!"
-docker stop ecomp-portal-widget-ms
-echo "Removing docker image portal-widget-ms !!!"
-docker rm ecomp-portal-widget-ms
+#!/bin/bash
+# Establish environment variables
+source $(dirname $0)/os_settings.sh
+
+echo "Stopping docker container ${WMS_CONT_NAME}"
+docker stop ${WMS_CONT_NAME}
+echo "Removing docker image ${WMS_CONT_NAME}"
+docker rm ${WMS_CONT_NAME}