You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2015/03/04 15:44:23 UTC

[3/3] stratos git commit: updating wordpress-extended-v2 sample

updating wordpress-extended-v2 sample


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/4d392b47
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/4d392b47
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/4d392b47

Branch: refs/heads/master
Commit: 4d392b471e4db4c591f365ef3a1e91b19fab9678
Parents: 8c1ccf3
Author: R-Rajkumar <rr...@gmail.com>
Authored: Wed Mar 4 20:00:57 2015 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Wed Mar 4 20:00:57 2015 +0530

----------------------------------------------------------------------
 .../wordpress-extended-v2/scripts/common/deploy.sh           | 8 +++++++-
 .../wordpress-extended-v2/scripts/common/undeploy.sh         | 3 +++
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/4d392b47/samples/applications/wordpress-extended-v2/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/common/deploy.sh b/samples/applications/wordpress-extended-v2/scripts/common/deploy.sh
index d87660e..a119b69 100755
--- a/samples/applications/wordpress-extended-v2/scripts/common/deploy.sh
+++ b/samples/applications/wordpress-extended-v2/scripts/common/deploy.sh
@@ -14,6 +14,7 @@ cartridges_groups_path=`cd "${script_path}/../../../../cartridges-groups"; pwd`
 autoscaling_policies_path=`cd "${script_path}/../../../../autoscaling-policies"; pwd`
 network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd`
 deployment_policies_path=`cd "${script_path}/../../../../deployment-policies"; pwd`
+application_policies_path=`cd "${script_path}/../../../../application-policies"; pwd`
 
 set -e
 
@@ -48,10 +49,15 @@ curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/
 
 sleep 1
 
+echo "Adding application policy..."
+curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies
+
+sleep 1
+
 echo "Creating application..."
 curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/application.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications
 
 sleep 1
 
 echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/application-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/wordpress-extended/deploy
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/wordpress-extended/deploy/application-policy-1

http://git-wip-us.apache.org/repos/asf/stratos/blob/4d392b47/samples/applications/wordpress-extended-v2/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/common/undeploy.sh b/samples/applications/wordpress-extended-v2/scripts/common/undeploy.sh
index c82fcae..f2078ce 100644
--- a/samples/applications/wordpress-extended-v2/scripts/common/undeploy.sh
+++ b/samples/applications/wordpress-extended-v2/scripts/common/undeploy.sh
@@ -31,3 +31,6 @@ echo "Removing network partitions..."
 curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-1
 curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-2
 
+echo "Removing application policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies/application-policy-1
+