diff options
author | Ikramullah, Ikram <ikram@research.att.com> | 2018-04-19 21:22:04 +0000 |
---|---|---|
committer | Ikramullah, Ikram <ikram@research.att.com> | 2018-04-19 21:22:30 +0000 |
commit | a6443749d8554e642b0db94bec67b829c97cb872 (patch) | |
tree | 85d5a1f665f66c8118120f9d27b42f78b0caa1dc /boot/oof_vm_init.sh | |
parent | d6734920b03a9da00d0436c543b8da39ab3ebc2b (diff) |
OOF Changes For Correct Music server_url
Issue-ID: INT-444
Change-Id: I03be9b04a6b4248c0efe0bd4c1d04d215cdc2a8b
Signed-off-by: Ikramullah, Ikram <ikram@research.att.com>
Diffstat (limited to 'boot/oof_vm_init.sh')
-rw-r--r-- | boot/oof_vm_init.sh | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/boot/oof_vm_init.sh b/boot/oof_vm_init.sh index 836aa346..e4dc2c88 100644 --- a/boot/oof_vm_init.sh +++ b/boot/oof_vm_init.sh @@ -1,17 +1,21 @@ #!/bin/bash +CERT=/opt/optf-has/aai.cer +KEY=/opt/optf-has/aai.key +BUNDLE=/opt/optf-has/aai_bundle.pem + NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) cd /opt/optf-has -git pull +#git pull COND_CONF=/opt/optf-has/conductor.conf LOG_CONF=/opt/optf-has/log.conf -#THE FOLLOWING LINE IS A PLACEHOLDER +#!!! THE FOLLOWING LINE IS A PLACEHOLDER !!! AAI_cert=/opt/optf-has/aai_cert.cer IMAGE_NAME="$NEXUS_DOCKER_REPO/onap/optf-has" @@ -39,7 +43,7 @@ mkdir -p /opt/optf-has/music/properties mkdir -p /opt/optf-has/music/logs # add music.properties file -cat >> /opt/optf-has/music/properties/music.properties << NEWFILE +cat > /opt/optf-has/music/properties/music.properties<<NEWFILE my.id=0 all.ids=0 my.public.ip=localhost @@ -88,19 +92,30 @@ docker run -d --rm --name music-tomcat --network music-net -p "8080:8080" -v mus docker network connect bridge music-tomcat; # Get MUSIC url -MUSIC_URL=$(docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat) +#MUSIC_URL=$(docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat) +MUSIC_URL=localhost # Set A&AI and MUSIC url inside OOF-HAS conductor.conf sed -i "138 s%.*%server_url = https://aai.api.simpledemo.onap.org:8443/aai%" $COND_CONF sed -i "141 s%.*%server_url_version = v13%" $COND_CONF -sed -i "250 s%.*%server_url = $MUSIC_URL:8080/MUSIC/rest/v2%" $COND_CONF +#sed -i "250 s%.*%server_url = $MUSIC_URL:8080/MUSIC/rest/v2%" $COND_CONF # Set A&AI authentication file locations inside OOF-HAS conductor.conf sed -i "153 s%.*%certificate_authority_bundle_file = $AAI_cert%" $COND_CONF + +echo "Values to data component" +echo $CERT +echo $KEY +echo $BUNDLE + # run optf-has docker run -d --name controller -v $COND_CONF:/usr/local/bin/conductor.conf -v $LOG_CONF:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-controller --config-file=/usr/local/bin/conductor.conf + docker run -d --name api -p "8091:8091" -v $COND_CONF:/usr/local/bin/conductor.conf -v $LOG_CONF:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf + docker run -d --name solver -v $COND_CONF:/usr/local/bin/conductor.conf -v $LOG_CONF:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-solver --config-file=/usr/local/bin/conductor.conf + docker run -d --name reservation -v $COND_CONF:/usr/local/bin/conductor.conf -v $LOG_CONF:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-reservation --config-file=/usr/local/bin/conductor.conf -docker run -d --name data -v $COND_CONF:/usr/local/bin/conductor.conf -v $LOG_CONF:/usr/local/bin/log.conf -v $CERT:/usr/local/bin/aai_cert.cer -v $KEY:/usr/local/bin/aai_key.key -v $BUNDLE:/usr/local/bin/bundle.pem ${IMAGE_NAME}:latest python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf
\ No newline at end of file + +docker run -d --name data -v $COND_CONF:/usr/local/bin/conductor.conf -v $LOG_CONF:/usr/local/bin/log.conf -v $CERT:/usr/local/bin/aai_cert.cer -v $KEY:/usr/local/bin/aai_key.key -v $BUNDLE:/usr/local/bin/bundle.pem ${IMAGE_NAME}:latest python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf |