X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=boot%2Foof_vm_init.sh;h=7b0cc4c9a05c1bc500574d7de1d37905bc555426;hb=91afd14ddca72fa6b1b2d204ed83b5a3a4a981b4;hp=098d2cda06cc7563e441221c07d99d09410cd3bc;hpb=1aeb87b74700cc26ce8e2e730cca8e868555c706;p=demo.git diff --git a/boot/oof_vm_init.sh b/boot/oof_vm_init.sh index 098d2cda..7b0cc4c9 100644 --- a/boot/oof_vm_init.sh +++ b/boot/oof_vm_init.sh @@ -171,7 +171,8 @@ MUSIC_URL=$(docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddre # 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 = http://$MUSIC_URL:8080/MUSIC/rest/v2%" $COND_CONF +sed -i "257 s%.*%server_url = http://$MUSIC_URL:8080/MUSIC/rest/v2%" $COND_CONF +sed -i "284 s%.*%replication_factor = 1%" $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 @@ -193,3 +194,38 @@ 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 +sleep 10 + +echo "Inserting healthcheck plan" + +curl -X POST \ + http://localhost:8080/MUSIC/rest/v2/keyspaces/conductor/tables/plans/rows/ \ + -H 'Cache-Control: no-cache' \ + -H 'Content-Type: application/json' \ + -H 'Postman-Token: 502781e8-d588-475d-b181-c2e26625ac95' \ + -H 'X-minorVersion: 3' \ + -H 'X-patchVersion: 0' \ + -H 'ns: conductor' \ + -H 'password: c0nduct0r' \ + -H 'userId: conductor' \ + -d '{ + "consistencyInfo": { + "type": "eventual" + }, + "values": { + "id" : "healthcheck", + "created": 1479482603641, + "message": "", + "name": "foo", + "recommend_max": 1, + "solution": "{\"healthcheck\": \" healthcheck\"}", + "status": "done", + "template": "{\"healthcheck\": \"healthcheck\"}", + "timeout": 3600, + "translation": "{\"healthcheck\": \" healthcheck\"}", + "updated": 1484324150629 + } +} +' + +echo "Healthcheck plan inserted" \ No newline at end of file