Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.17 KB | None | 0 0
  1. export INSTALL_DIR="/home/users/Jose/brooklyn-managed-processes/installs/VanillaSoftwareProcess_0.0.0_lgl5w"
  2. mkdir -p $INSTALL_DIR
  3. cd $INSTALL_DIR
  4. test -f BROOKLYN && exit 0
  5.  
  6. #!/bin/bash
  7. # Script to install the Agreement and the T4C Rules
  8. # It requires AGREEMENT_B64 SLA_IP SLA_PORT and SLA_AGREEMENT_UUID
  9. # It requires T4C_RULES_B64 MODACLOUDS_TOWER4CLOUDS_MANAGER_IP,
  10. # MODACLOUDS_TOWER4CLOUDS_MANAGER_PORT, SLA_IP SLA_PORT and SLA_UUID
  11.  
  12.  
  13. SLA_ENDPOINT="http://$SLA_IP:$SLA_PORT"
  14. T4C_ENDPOINT="http://$MODACLOUDS_TOWER4CLOUDS_MANAGER_IP:$MODACLOUDS_TOWER4CLOUDS_MANAGER_PORT"
  15. SLA_ENDPOINT="http://$SLA_IP:$SLA_PORT"
  16.  
  17. # Install Agreement
  18. echo Installing Agreement to SeaClouds SLA
  19. echo $AGREEMENT_B64 | base64 --decode | curl -X POST "$SLA_ENDPOINT/seaclouds/agreements?agreementId=$SLA_AGREEMENT_UUID" -H"Content-type: application/xml" -d @-
  20.  
  21. echo Installing Monitoring Rules into T4C
  22. echo $T4C_RULES_B64 | base64 --decode | curl -X POST "$T4C_ENDPOINT/v1/monitoring-rules" -d @-
  23.  
  24. # Notify rules installed
  25. echo Starting Rule enforcement on the SeaClouds SLA
  26. curl -X POST "$SLA_ENDPOINT/seaclouds/commands/rulesready?agreementId=$SLA_UUID"
  27.  
  28. date > $INSTALL_DIR/BROOKLYN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement