aboutsummaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2018-04-26 18:52:14 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-26 18:52:14 +0000
commite0193690af1cd70026b5693c0138857e2a504111 (patch)
treea78de52f464ebac8cc353e9832d74df1de251f19 /boot
parentb53e0157ea5952f6b46f1ac5a36aac686c0e474e (diff)
parent1aeb87b74700cc26ce8e2e730cca8e868555c706 (diff)
Merge "Fix music url issues"
Diffstat (limited to 'boot')
-rw-r--r--boot/oof_vm_init.sh22
1 files changed, 18 insertions, 4 deletions
diff --git a/boot/oof_vm_init.sh b/boot/oof_vm_init.sh
index 4a0dde81..098d2cda 100644
--- a/boot/oof_vm_init.sh
+++ b/boot/oof_vm_init.sh
@@ -148,15 +148,30 @@ docker run -d --rm --name music-tomcat --network music-net -p "8080:8080" -v mus
# Connect tomcat to host bridge network so that its port can be seen.
docker network connect bridge music-tomcat;
+sleep 6;
+echo "Running onboarding curl command"
+curl -X POST \
+ http://localhost:8080/MUSIC/rest/v2/admin/onboardAppWithMusic \
+ -H 'Cache-Control: no-cache' \
+ -H 'Content-Type: application/json' \
+ -H 'Postman-Token: 7d2839f4-b032-487a-8998-4d1b27a932d7' \
+ -d '{
+"appname": "conductor",
+"userId" : "conductor",
+"isAAF" : false,
+"password" : "c0nduct0r"
+}
+'
+echo "Onboarding curl complete"
# Get MUSIC url
-#MUSIC_URL=$(docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat)
-MUSIC_URL=localhost
+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 = http://$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
@@ -178,4 +193,3 @@ docker run -d --name reservation -v $COND_CONF:/usr/local/bin/conductor.conf -v
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
-