You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/02/26 10:51:03 UTC
stratos git commit: Adding new deployment policy changes to
dependent-scaling sample
Repository: stratos
Updated Branches:
refs/heads/master-deployment-policy-fix-merge 4cf98ee49 -> 20ed30e39
Adding new deployment policy changes to dependent-scaling sample
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/20ed30e3
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/20ed30e3
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/20ed30e3
Branch: refs/heads/master-deployment-policy-fix-merge
Commit: 20ed30e398cb41df0690793418edb92991f2071c
Parents: 4cf98ee
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Thu Feb 26 15:20:53 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Thu Feb 26 15:20:53 2015 +0530
----------------------------------------------------------------------
.../sample-groups/artifacts/application-policy.json | 12 ++++++++++++
.../sample-groups/artifacts/application.json | 3 +++
.../sample-groups/artifacts/deployment-policy.json | 2 +-
.../sample-groups/artifacts/network-partition-2.json | 15 +++++++++++++++
.../sample-groups/artifacts/network-partition.json | 15 +++++++++++++++
.../sample-groups/scripts/common/deploy.sh | 10 +++++++++-
6 files changed, 55 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/20ed30e3/samples/applications/dependent-scaling/sample-groups/artifacts/application-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/artifacts/application-policy.json b/samples/applications/dependent-scaling/sample-groups/artifacts/application-policy.json
new file mode 100644
index 0000000..5aa91dd
--- /dev/null
+++ b/samples/applications/dependent-scaling/sample-groups/artifacts/application-policy.json
@@ -0,0 +1,12 @@
+{
+ "networkPartition":[
+ {
+ "id":"network-partition-1",
+ "activeByDefault":"true"
+ },
+ {
+ "id":"network-partition-2",
+ "activeByDefault":"false"
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/20ed30e3/samples/applications/dependent-scaling/sample-groups/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/artifacts/application.json b/samples/applications/dependent-scaling/sample-groups/artifacts/application.json
index 17c1aeb..a74c688 100644
--- a/samples/applications/dependent-scaling/sample-groups/artifacts/application.json
+++ b/samples/applications/dependent-scaling/sample-groups/artifacts/application.json
@@ -16,6 +16,7 @@
"subscribableInfo": {
"alias": "my-esb",
"autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-1",
"artifactRepository":{
"privateRepo":false,
"repoUrl":"https://github.com/imesh/stratos-esb-applications.git",
@@ -31,6 +32,7 @@
"subscribableInfo": {
"alias": "my-php",
"autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-1",
"artifactRepository":{
"privateRepo":false,
"repoUrl":"https://github.com/imesh/stratos-php-applications.git",
@@ -50,6 +52,7 @@
"subscribableInfo": {
"alias": "my-tomcat",
"autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-1",
"artifactRepository":{
"privateRepo":false,
"repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
http://git-wip-us.apache.org/repos/asf/stratos/blob/20ed30e3/samples/applications/dependent-scaling/sample-groups/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/artifacts/deployment-policy.json b/samples/applications/dependent-scaling/sample-groups/artifacts/deployment-policy.json
index d858aed..666c299 100644
--- a/samples/applications/dependent-scaling/sample-groups/artifacts/deployment-policy.json
+++ b/samples/applications/dependent-scaling/sample-groups/artifacts/deployment-policy.json
@@ -1,5 +1,5 @@
{
- "id": "deployment-policy-2",
+ "id": "deployment-policy-1",
"networkPartition": [
{
"id": "network-partition-1",
http://git-wip-us.apache.org/repos/asf/stratos/blob/20ed30e3/samples/applications/dependent-scaling/sample-groups/artifacts/network-partition-2.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/artifacts/network-partition-2.json b/samples/applications/dependent-scaling/sample-groups/artifacts/network-partition-2.json
new file mode 100644
index 0000000..0d07838
--- /dev/null
+++ b/samples/applications/dependent-scaling/sample-groups/artifacts/network-partition-2.json
@@ -0,0 +1,15 @@
+{
+ "id": "network-partition-2",
+ "partitions": [
+ {
+ "id": "partition-2",
+ "provider": "mock",
+ "property": [
+ {
+ "name": "region",
+ "value": "default"
+ }
+ ]
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/20ed30e3/samples/applications/dependent-scaling/sample-groups/artifacts/network-partition.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/artifacts/network-partition.json b/samples/applications/dependent-scaling/sample-groups/artifacts/network-partition.json
new file mode 100644
index 0000000..2a5b7ec
--- /dev/null
+++ b/samples/applications/dependent-scaling/sample-groups/artifacts/network-partition.json
@@ -0,0 +1,15 @@
+{
+ "id": "network-partition-1",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "provider": "mock",
+ "property": [
+ {
+ "name": "region",
+ "value": "default"
+ }
+ ]
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/20ed30e3/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh
index e419e4f..a4ff8e8 100755
--- a/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh
+++ b/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh
@@ -23,6 +23,14 @@ echo ${artifacts_path}/autoscaling-policy.json
echo "Adding autoscale policy..."
curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/autoscaling-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+echo "Adding network partitions..."
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/network-partition.json" -k -v -u admin:admin https://${host_ip}:9443/api/networkPartitions
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/network-partition-2.json" -k -v -u admin:admin https://${host_ip}:9443/api/networkPartitions
+
+echo "Adding deployment policy..."
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/deployment-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
+
+
echo "Adding tomcat cartridge..."
curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
@@ -43,4 +51,4 @@ curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/applicat
sleep 1
echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -d "@${iaas_artifacts_path}/deployment-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/dependency-scaling-groups-app/deploy
+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/dependency-scaling-groups-app/deploy