Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export INSTALL_DIR="/home/users/Jose/brooklyn-managed-processes/installs/VanillaSoftwareProcess_0.0.0_lgl5w"
- mkdir -p $INSTALL_DIR
- cd $INSTALL_DIR
- test -f BROOKLYN && exit 0
- #!/bin/bash
- # Script to install the Agreement and the T4C Rules
- # It requires AGREEMENT_B64 SLA_IP SLA_PORT and SLA_AGREEMENT_UUID
- # It requires T4C_RULES_B64 MODACLOUDS_TOWER4CLOUDS_MANAGER_IP,
- # MODACLOUDS_TOWER4CLOUDS_MANAGER_PORT, SLA_IP SLA_PORT and SLA_UUID
- SLA_ENDPOINT="http://$SLA_IP:$SLA_PORT"
- T4C_ENDPOINT="http://$MODACLOUDS_TOWER4CLOUDS_MANAGER_IP:$MODACLOUDS_TOWER4CLOUDS_MANAGER_PORT"
- SLA_ENDPOINT="http://$SLA_IP:$SLA_PORT"
- # Install Agreement
- echo Installing Agreement to SeaClouds SLA
- echo $AGREEMENT_B64 | base64 --decode | curl -X POST "$SLA_ENDPOINT/seaclouds/agreements?agreementId=$SLA_AGREEMENT_UUID" -H"Content-type: application/xml" -d @-
- echo Installing Monitoring Rules into T4C
- echo $T4C_RULES_B64 | base64 --decode | curl -X POST "$T4C_ENDPOINT/v1/monitoring-rules" -d @-
- # Notify rules installed
- echo Starting Rule enforcement on the SeaClouds SLA
- curl -X POST "$SLA_ENDPOINT/seaclouds/commands/rulesready?agreementId=$SLA_UUID"
- date > $INSTALL_DIR/BROOKLYN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement