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 16:24:50 UTC

[2/4] stratos git commit: updating tomcat-single-signon sample

updating tomcat-single-signon sample


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

Branch: refs/heads/master
Commit: 654a161a6a6ac4ed2a0c963b9cc4f81364925778
Parents: 4c57aba
Author: R-Rajkumar <rr...@gmail.com>
Authored: Wed Mar 4 20:52:04 2015 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Wed Mar 4 20:52:04 2015 +0530

----------------------------------------------------------------------
 .../artifacts/application-policy.json                     |  8 --------
 .../tomcat-single-signon/scripts/common/deploy.sh         | 10 ++++++++--
 .../tomcat-single-signon/scripts/common/undeploy.sh       |  8 +++++++-
 3 files changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/654a161a/samples/applications/tomcat-single-signon/artifacts/application-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/artifacts/application-policy.json b/samples/applications/tomcat-single-signon/artifacts/application-policy.json
deleted file mode 100644
index 2c73f9a..0000000
--- a/samples/applications/tomcat-single-signon/artifacts/application-policy.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-   "networkPartition":[
-      {
-         "id":"network-partition-3",
-         "activeByDefault":"true"
-      }
-   ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/654a161a/samples/applications/tomcat-single-signon/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/common/deploy.sh b/samples/applications/tomcat-single-signon/scripts/common/deploy.sh
index 07dd56d..dfe1a29 100755
--- a/samples/applications/tomcat-single-signon/scripts/common/deploy.sh
+++ b/samples/applications/tomcat-single-signon/scripts/common/deploy.sh
@@ -13,6 +13,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
 
@@ -39,10 +40,15 @@ curl -X POST -H "Content-Type: application/json" -d "@${iaas_cartridges_path}/ws
 
 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
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/application-2.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/tomcat-single-signon/deploy
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/tomcat-single-signon/deploy/application-policy-2

http://git-wip-us.apache.org/repos/asf/stratos/blob/654a161a/samples/applications/tomcat-single-signon/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/common/undeploy.sh b/samples/applications/tomcat-single-signon/scripts/common/undeploy.sh
index 8ba2646..3b04551 100644
--- a/samples/applications/tomcat-single-signon/scripts/common/undeploy.sh
+++ b/samples/applications/tomcat-single-signon/scripts/common/undeploy.sh
@@ -18,4 +18,10 @@ curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://
 curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/wso2-is
 
 echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
\ No newline at end of file
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
+
+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-2
+
+
+