From d60cdf2bd31e6a8143aa5bc36ec7b12414c68523 Mon Sep 17 00:00:00 2001 From: Marco Platania Date: Mon, 16 Apr 2018 17:40:02 -0400 Subject: [PATCH] Improve ONAP installation with Heat - Stop Music containers before starting new ones - Update maven settings.xml in aaf_install Change-Id: I96f5c1a3c403f1b55ecf91c67f6929ca141fbfcb Issue-ID: INT-444 Signed-off-by: Marco Platania --- boot/aaf_install.sh | 400 +++++++++++++++++++++++++++++++++++++++++++++++++- boot/music_vm_init.sh | 7 + 2 files changed, 406 insertions(+), 1 deletion(-) diff --git a/boot/aaf_install.sh b/boot/aaf_install.sh index bc7e28e5..0378a4e7 100644 --- a/boot/aaf_install.sh +++ b/boot/aaf_install.sh @@ -98,8 +98,406 @@ chmod +x /opt/authz/auth/auth-cass/docker/dinstall.sh chmod +x /opt/authz/auth/docker/drun.sh chmod +x /opt/authz/auth/docker/d.props +#Update maven settings +cat > /usr/share/maven/conf/settings.xml << EOF + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10_nexus + + + + + 10_nexus + http://repo.maven.apache.org/maven2/ + true + true + + + + + + 10_nexus + http://repo.maven.apache.org/maven2/ + true + true + + + + + + 20_openecomp-public + + + 20_openecomp-public + 20_openecomp-public + https://nexus.onap.org/content/repositories/public/ + + true + daily + + + false + + + + + + 20_openecomp-public + 20_openecomp-public + https://nexus.onap.org/content/repositories/public/ + + true + daily + + + false + + + + + + 30_openecomp-staging + + + 30_openecomp-staging + 30_openecomp-staging + https://nexus.onap.org/content/repositories/staging/ + + true + daily + + + false + + + + + + 30_openecomp-staging + 30_openecomp-staging + https://nexus.onap.org/content/repositories/staging/ + + true + daily + + + false + + + + + + 40_openecomp-release + + + 40_openecomp-release + 40_openecomp-release + https://nexus.onap.org/content/repositories/releases/ + + true + daily + + + false + + + + + + 40_openecomp-release + 40_openecomp-release + https://nexus.onap.org/content/repositories/releases/ + + true + daily + + + false + + + + + + + 50_openecomp-snapshots + + + 50_openecomp-snapshot + 50_openecomp-snapshot + https://nexus.onap.org/content/repositories/snapshots/ + + false + + + true + + + + + + 50_openecomp-snapshot + 50_openecomp-snapshot + https://nexus.onap.org/content/repositories/snapshots/ + + false + + + true + + + + + + 60_opendaylight-release + + + 60_opendaylight-mirror + 60_opendaylight-mirror + https://nexus.opendaylight.org/content/repositories/public/ + + true + daily + + + false + + + + + + 60_opendaylight-mirror + 60_opendaylight-mirror + https://nexus.opendaylight.org/content/repositories/public/ + + true + daily + + + false + + + + + + + 70_opendaylight-snapshots + + + 70_opendaylight-snapshot + 70_opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + 70_opendaylight-snapshot + 70_opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + + + 10_nexus + 20_openecomp-public + 30_openecomp-staging + 40_openecomp-release + 50_openecomp-snapshots + 60_opendaylight-release + 70_opendaylight-snapshots + + + + +EOF + cd /opt/authz -#Need to update /usr/share/maven/conf/settings.xml mvn install -Dmaven.test.skip=true # Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes diff --git a/boot/music_vm_init.sh b/boot/music_vm_init.sh index 372cd33e..2241ed13 100644 --- a/boot/music_vm_init.sh +++ b/boot/music_vm_init.sh @@ -14,4 +14,11 @@ docker pull $NEXUS_DOCKER_REPO/onap/music/music:$DOCKER_IMAGE_VERSION cd /opt/music/distribution/dockermusic git pull + +#Stop existing docker containers (if any) +if [ $(docker ps | wc -l) > 1 ]; then + ./music.sh stop + sleep 2 +fi + ./music.sh start \ No newline at end of file -- 2.16.6