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:15:08 UTC

[1/6] stratos git commit: updating nested-group sample

Repository: stratos
Updated Branches:
  refs/heads/master dbdd9a429 -> c20b79cc2


updating nested-group sample


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

Branch: refs/heads/master
Commit: bc00650ac62ce05f11b03c9faf914a4c71b1022a
Parents: dbdd9a4
Author: R-Rajkumar <rr...@gmail.com>
Authored: Wed Mar 4 20:34:40 2015 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Wed Mar 4 20:34:40 2015 +0530

----------------------------------------------------------------------
 .../artifacts/application-policy.json           | 12 ----------
 .../artifacts/autoscaling-policy.json           | 14 -----------
 .../artifacts/deployment-policy.json            | 25 --------------------
 .../nested-group/scripts/common/deploy.sh       |  8 ++++++-
 .../nested-group/scripts/common/undeploy.sh     |  6 ++++-
 5 files changed, 12 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/bc00650a/samples/applications/nested-group/artifacts/application-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/artifacts/application-policy.json b/samples/applications/nested-group/artifacts/application-policy.json
deleted file mode 100644
index 239d6d9..0000000
--- a/samples/applications/nested-group/artifacts/application-policy.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-   "networkPartition":[
-      {
-         "id":"network-partition-1",
-         "activeByDefault":"false"
-      },
-      {
-         "id":"network-partition-2",
-         "activeByDefault":"true"
-      }
-   ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/bc00650a/samples/applications/nested-group/artifacts/autoscaling-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/artifacts/autoscaling-policy.json b/samples/applications/nested-group/artifacts/autoscaling-policy.json
deleted file mode 100755
index b41726e..0000000
--- a/samples/applications/nested-group/artifacts/autoscaling-policy.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-1",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 80
-        },
-        "memoryConsumption": {
-            "threshold": 90
-        },
-        "loadAverage": {
-            "threshold": 50
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/bc00650a/samples/applications/nested-group/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/artifacts/deployment-policy.json b/samples/applications/nested-group/artifacts/deployment-policy.json
deleted file mode 100644
index e0a0bd6..0000000
--- a/samples/applications/nested-group/artifacts/deployment-policy.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-   "id": "deployment-policy-2",
-   "networkPartition": [
-       {
-           "id": "network-partition-1",
-           "partitionAlgo": "one-after-another",
-           "partitions": [
-               {
-                   "id": "partition-1",
-                   "max": 5
-               }
-           ]
-       },
-       {
-           "id": "network-partition-2",
-           "partitionAlgo": "one-after-another",
-           "partitions": [
-               {
-                   "id": "partition-1",
-                   "max": 5
-               }
-           ]
-       }
-   ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/bc00650a/samples/applications/nested-group/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/common/deploy.sh b/samples/applications/nested-group/scripts/common/deploy.sh
index f74b241..4e7f308 100755
--- a/samples/applications/nested-group/scripts/common/deploy.sh
+++ b/samples/applications/nested-group/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
 
@@ -47,10 +48,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/nested-group-app/deploy
\ No newline at end of file
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/nested-group-app/deploy/application-policy-1

http://git-wip-us.apache.org/repos/asf/stratos/blob/bc00650a/samples/applications/nested-group/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/common/undeploy.sh b/samples/applications/nested-group/scripts/common/undeploy.sh
index 2ab190b..038933e 100644
--- a/samples/applications/nested-group/scripts/common/undeploy.sh
+++ b/samples/applications/nested-group/scripts/common/undeploy.sh
@@ -22,4 +22,8 @@ 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/tomcat2
 
 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-1
+


[4/6] stratos git commit: updating single-group-v1 sample

Posted by ra...@apache.org.
updating single-group-v1 sample


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

Branch: refs/heads/master
Commit: c58be4d8816dbb748026e25938c15f407aad9b0c
Parents: 87f8b4e
Author: R-Rajkumar <rr...@gmail.com>
Authored: Wed Mar 4 20:40:39 2015 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Wed Mar 4 20:40:39 2015 +0530

----------------------------------------------------------------------
 .../single-group-v1/artifacts/application-policy.json |  8 --------
 .../single-group-v1/artifacts/autoscaling-policy.json | 14 --------------
 .../single-group-v1/scripts/common/deploy.sh          |  8 +++++++-
 .../single-group-v1/scripts/common/undeploy.sh        |  4 ++++
 4 files changed, 11 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/c58be4d8/samples/applications/single-group-v1/artifacts/application-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/artifacts/application-policy.json b/samples/applications/single-group-v1/artifacts/application-policy.json
deleted file mode 100644
index 2c73f9a..0000000
--- a/samples/applications/single-group-v1/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/c58be4d8/samples/applications/single-group-v1/artifacts/autoscaling-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/artifacts/autoscaling-policy.json b/samples/applications/single-group-v1/artifacts/autoscaling-policy.json
deleted file mode 100755
index b41726e..0000000
--- a/samples/applications/single-group-v1/artifacts/autoscaling-policy.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-1",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 80
-        },
-        "memoryConsumption": {
-            "threshold": 90
-        },
-        "loadAverage": {
-            "threshold": 50
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c58be4d8/samples/applications/single-group-v1/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/common/deploy.sh b/samples/applications/single-group-v1/scripts/common/deploy.sh
index 29371c0..daa2e4a 100755
--- a/samples/applications/single-group-v1/scripts/common/deploy.sh
+++ b/samples/applications/single-group-v1/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
 
@@ -43,9 +44,14 @@ 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
 
 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/single-group-v1/deploy
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-v1/deploy/application-policy-1
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/c58be4d8/samples/applications/single-group-v1/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/common/undeploy.sh b/samples/applications/single-group-v1/scripts/common/undeploy.sh
index 856b521..a6a09b9 100644
--- a/samples/applications/single-group-v1/scripts/common/undeploy.sh
+++ b/samples/applications/single-group-v1/scripts/common/undeploy.sh
@@ -29,3 +29,7 @@ curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://
 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-3
 
+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
+
+


[3/6] stratos git commit: updating single-group-group-scaling sample

Posted by ra...@apache.org.
updating single-group-group-scaling sample


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

Branch: refs/heads/master
Commit: 87f8b4e491886f894d914de6f053c23c3064b3bf
Parents: f889345
Author: R-Rajkumar <rr...@gmail.com>
Authored: Wed Mar 4 20:38:44 2015 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Wed Mar 4 20:38:44 2015 +0530

----------------------------------------------------------------------
 .../artifacts/application-policy.json                |  8 --------
 .../artifacts/autoscaling-policy.json                | 14 --------------
 .../artifacts/deployment-policy.json                 | 15 ---------------
 .../scripts/common/deploy.sh                         |  8 +++++++-
 .../scripts/common/undeploy.sh                       |  4 ++++
 5 files changed, 11 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/87f8b4e4/samples/applications/single-group-group-scaling/artifacts/application-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/artifacts/application-policy.json b/samples/applications/single-group-group-scaling/artifacts/application-policy.json
deleted file mode 100644
index 9d2c6a1..0000000
--- a/samples/applications/single-group-group-scaling/artifacts/application-policy.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-   "networkPartition":[
-      {
-         "id":"network-partition-1",
-         "activeByDefault":"true"
-      }
-   ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/87f8b4e4/samples/applications/single-group-group-scaling/artifacts/autoscaling-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/artifacts/autoscaling-policy.json b/samples/applications/single-group-group-scaling/artifacts/autoscaling-policy.json
deleted file mode 100755
index 057f5ce..0000000
--- a/samples/applications/single-group-group-scaling/artifacts/autoscaling-policy.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-1",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 80
-        },
-        "memoryConsumption": {
-            "threshold": 40
-        },
-        "loadAverage": {
-            "threshold": 40
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/87f8b4e4/samples/applications/single-group-group-scaling/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/artifacts/deployment-policy.json b/samples/applications/single-group-group-scaling/artifacts/deployment-policy.json
deleted file mode 100644
index 666c299..0000000
--- a/samples/applications/single-group-group-scaling/artifacts/deployment-policy.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-   "id": "deployment-policy-1",
-   "networkPartition": [
-      {
-         "id": "network-partition-1",
-         "partitionAlgo": "one-after-another",
-         "partitions": [
-            {
-               "id": "partition-1",
-               "max": 5
-            }
-         ]
-      }
-   ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/87f8b4e4/samples/applications/single-group-group-scaling/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/common/deploy.sh b/samples/applications/single-group-group-scaling/scripts/common/deploy.sh
index 4fcd9b7..b4df633 100755
--- a/samples/applications/single-group-group-scaling/scripts/common/deploy.sh
+++ b/samples/applications/single-group-group-scaling/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
 
@@ -40,10 +41,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/single-group-group-scaling/deploy
\ No newline at end of file
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-group-scaling/deploy/application-policy-1

http://git-wip-us.apache.org/repos/asf/stratos/blob/87f8b4e4/samples/applications/single-group-group-scaling/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/common/undeploy.sh b/samples/applications/single-group-group-scaling/scripts/common/undeploy.sh
index f8ad12b..7060ee1 100644
--- a/samples/applications/single-group-group-scaling/scripts/common/undeploy.sh
+++ b/samples/applications/single-group-group-scaling/scripts/common/undeploy.sh
@@ -22,3 +22,7 @@ curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://
 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
 
+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
+
+


[6/6] stratos git commit: updating single-group-v3 sample

Posted by ra...@apache.org.
updating single-group-v3 sample


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

Branch: refs/heads/master
Commit: c20b79cc2e62e8e6401aa8732932eca775573775
Parents: 6b96468
Author: R-Rajkumar <rr...@gmail.com>
Authored: Wed Mar 4 20:44:51 2015 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Wed Mar 4 20:44:51 2015 +0530

----------------------------------------------------------------------
 .../artifacts/application-policy.json                |  8 --------
 .../artifacts/autoscaling-policy.json                | 14 --------------
 .../single-group-v3/artifacts/deployment-policy.json | 15 ---------------
 .../single-group-v3/scripts/common/deploy.sh         |  8 +++++++-
 .../single-group-v3/scripts/common/undeploy.sh       |  7 ++++++-
 5 files changed, 13 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/stratos/blob/c20b79cc/samples/applications/single-group-v3/artifacts/autoscaling-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/artifacts/autoscaling-policy.json b/samples/applications/single-group-v3/artifacts/autoscaling-policy.json
deleted file mode 100755
index 830ae17..0000000
--- a/samples/applications/single-group-v3/artifacts/autoscaling-policy.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-1",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "upperLimit": 80
-        },
-        "memoryConsumption": {
-            "upperLimit": 90
-        },
-        "loadAverage": {
-            "upperLimit": 50
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c20b79cc/samples/applications/single-group-v3/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/artifacts/deployment-policy.json b/samples/applications/single-group-v3/artifacts/deployment-policy.json
deleted file mode 100644
index 666c299..0000000
--- a/samples/applications/single-group-v3/artifacts/deployment-policy.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-   "id": "deployment-policy-1",
-   "networkPartition": [
-      {
-         "id": "network-partition-1",
-         "partitionAlgo": "one-after-another",
-         "partitions": [
-            {
-               "id": "partition-1",
-               "max": 5
-            }
-         ]
-      }
-   ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c20b79cc/samples/applications/single-group-v3/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/common/deploy.sh b/samples/applications/single-group-v3/scripts/common/deploy.sh
index 41342af..9a22d41 100755
--- a/samples/applications/single-group-v3/scripts/common/deploy.sh
+++ b/samples/applications/single-group-v3/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
 
@@ -40,8 +41,13 @@ 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
 
 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/single-group-v3/deploy
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-v3/deploy/application-policy-1

http://git-wip-us.apache.org/repos/asf/stratos/blob/c20b79cc/samples/applications/single-group-v3/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/common/undeploy.sh b/samples/applications/single-group-v3/scripts/common/undeploy.sh
index cce2dd6..c70d646 100644
--- a/samples/applications/single-group-v3/scripts/common/undeploy.sh
+++ b/samples/applications/single-group-v3/scripts/common/undeploy.sh
@@ -20,4 +20,9 @@ echo "Removing cartridges..."
 curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat2
 
 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-1
+
+


[5/6] stratos git commit: updating single-group-v2 sample

Posted by ra...@apache.org.
updating single-group-v2 sample


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

Branch: refs/heads/master
Commit: 6b96468103645166532296f079b8d0eb72cf00fb
Parents: c58be4d
Author: R-Rajkumar <rr...@gmail.com>
Authored: Wed Mar 4 20:42:37 2015 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Wed Mar 4 20:42:37 2015 +0530

----------------------------------------------------------------------
 .../artifacts/application-policy.json                |  8 --------
 .../artifacts/autoscaling-policy.json                | 14 --------------
 .../single-group-v2/artifacts/deployment-policy.json | 15 ---------------
 .../single-group-v2/scripts/common/deploy.sh         |  8 +++++++-
 .../single-group-v2/scripts/common/undeploy.sh       |  8 +++++++-
 5 files changed, 14 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/6b964681/samples/applications/single-group-v2/artifacts/application-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/artifacts/application-policy.json b/samples/applications/single-group-v2/artifacts/application-policy.json
deleted file mode 100644
index 2c73f9a..0000000
--- a/samples/applications/single-group-v2/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/6b964681/samples/applications/single-group-v2/artifacts/autoscaling-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/artifacts/autoscaling-policy.json b/samples/applications/single-group-v2/artifacts/autoscaling-policy.json
deleted file mode 100755
index b41726e..0000000
--- a/samples/applications/single-group-v2/artifacts/autoscaling-policy.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-1",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 80
-        },
-        "memoryConsumption": {
-            "threshold": 90
-        },
-        "loadAverage": {
-            "threshold": 50
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b964681/samples/applications/single-group-v2/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/artifacts/deployment-policy.json b/samples/applications/single-group-v2/artifacts/deployment-policy.json
deleted file mode 100644
index d858aed..0000000
--- a/samples/applications/single-group-v2/artifacts/deployment-policy.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-   "id": "deployment-policy-2",
-   "networkPartition": [
-      {
-         "id": "network-partition-1",
-         "partitionAlgo": "one-after-another",
-         "partitions": [
-            {
-               "id": "partition-1",
-               "max": 5
-            }
-         ]
-      }
-   ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b964681/samples/applications/single-group-v2/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/common/deploy.sh b/samples/applications/single-group-v2/scripts/common/deploy.sh
index 62c6f60..475f202 100755
--- a/samples/applications/single-group-v2/scripts/common/deploy.sh
+++ b/samples/applications/single-group-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
 
@@ -46,8 +47,13 @@ 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
 
 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/single_group_v2/deploy
\ No newline at end of file
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single_group_v2/deploy/application-policy-1

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b964681/samples/applications/single-group-v2/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/common/undeploy.sh b/samples/applications/single-group-v2/scripts/common/undeploy.sh
index 2d29554..b47ac59 100644
--- a/samples/applications/single-group-v2/scripts/common/undeploy.sh
+++ b/samples/applications/single-group-v2/scripts/common/undeploy.sh
@@ -22,4 +22,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/tomcat2
 
 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-1
+
+
+


[2/6] stratos git commit: updating single-group-cartridge sample

Posted by ra...@apache.org.
updating single-group-cartridge sample


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

Branch: refs/heads/master
Commit: f8893459ab930459f85002b284836d61f63472e8
Parents: bc00650
Author: R-Rajkumar <rr...@gmail.com>
Authored: Wed Mar 4 20:36:36 2015 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Wed Mar 4 20:36:36 2015 +0530

----------------------------------------------------------------------
 .../single-group-cartridge/artifacts/application-policy.json | 8 --------
 .../single-group-cartridge/scripts/common/deploy.sh          | 8 +++++++-
 .../single-group-cartridge/scripts/common/undeploy.sh        | 2 ++
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/stratos/blob/f8893459/samples/applications/single-group-cartridge/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/common/deploy.sh b/samples/applications/single-group-cartridge/scripts/common/deploy.sh
index 92940b0..8382a83 100755
--- a/samples/applications/single-group-cartridge/scripts/common/deploy.sh
+++ b/samples/applications/single-group-cartridge/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
 
@@ -47,10 +48,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/cartridge-group-app/deploy
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/cartridge-group-app/deploy/application-policy-1

http://git-wip-us.apache.org/repos/asf/stratos/blob/f8893459/samples/applications/single-group-cartridge/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/common/undeploy.sh b/samples/applications/single-group-cartridge/scripts/common/undeploy.sh
index e338b5c..b97b398 100644
--- a/samples/applications/single-group-cartridge/scripts/common/undeploy.sh
+++ b/samples/applications/single-group-cartridge/scripts/common/undeploy.sh
@@ -31,5 +31,7 @@ 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