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/25 15:27:14 UTC
stratos git commit: Fix dependent-scaling/sample-groups sample
Repository: stratos
Updated Branches:
refs/heads/master e661d2c45 -> 0b81b1647
Fix dependent-scaling/sample-groups sample
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/0b81b164
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/0b81b164
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/0b81b164
Branch: refs/heads/master
Commit: 0b81b1647b10c719f5c7cfac5dabd49b42b242de
Parents: e661d2c
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed Feb 25 19:57:03 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed Feb 25 19:57:03 2015 +0530
----------------------------------------------------------------------
.../sample-groups/artifacts/application.json | 16 ++++++++--------
.../artifacts/ec2/deployment-policy.json | 6 +++---
.../artifacts/kubernetes/deployment-policy.json | 6 +++---
.../artifacts/mock/deployment-policy.json | 6 +++---
.../artifacts/openstack/deployment-policy.json | 6 +++---
.../sample-groups/scripts/common/deploy.sh | 6 +++---
.../sample-groups/scripts/common/undeploy.sh | 8 ++++----
samples/cartridges-groups/esb-php-group.json | 15 +++++++++++++++
samples/cartridges-groups/group6c2.json | 15 ---------------
9 files changed, 42 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/0b81b164/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 7a2e7e9..17c1aeb 100644
--- a/samples/applications/dependent-scaling/sample-groups/artifacts/application.json
+++ b/samples/applications/dependent-scaling/sample-groups/artifacts/application.json
@@ -1,11 +1,11 @@
{
- "applicationId": "sample-groups-app",
- "alias": "sample-groups-app",
+ "applicationId": "dependency-scaling-groups-app",
+ "alias": "my-dependency-scaling-groups-app",
"components": {
"groups": [
{
- "name": "group6",
- "alias": "mygroup6",
+ "name": "esb-php-group",
+ "alias": "my-esb-php-group",
"groupMinInstances": 1,
"groupMaxInstances": 2,
"cartridges": [
@@ -14,7 +14,7 @@
"cartridgeMin": 1,
"cartridgeMax": 2,
"subscribableInfo": {
- "alias": "esbgroup6",
+ "alias": "my-esb",
"autoscalingPolicy": "autoscaling-policy-1",
"artifactRepository":{
"privateRepo":false,
@@ -29,7 +29,7 @@
"cartridgeMin": 1,
"cartridgeMax": 2,
"subscribableInfo": {
- "alias": "phpgroup6",
+ "alias": "my-php",
"autoscalingPolicy": "autoscaling-policy-1",
"artifactRepository":{
"privateRepo":false,
@@ -48,7 +48,7 @@
"cartridgeMin": 2,
"cartridgeMax": 4,
"subscribableInfo": {
- "alias": "mytomcat",
+ "alias": "my-tomcat",
"autoscalingPolicy": "autoscaling-policy-1",
"artifactRepository":{
"privateRepo":false,
@@ -61,7 +61,7 @@
],
"dependencies": {
"scalingDependants": [
- "group.group6, cartridge.tomcat"
+ "group.my-esb-php-group, cartridge.my-tomcat"
],
"terminationBehaviour": "terminate-none"
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/0b81b164/samples/applications/dependent-scaling/sample-groups/artifacts/ec2/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/artifacts/ec2/deployment-policy.json b/samples/applications/dependent-scaling/sample-groups/artifacts/ec2/deployment-policy.json
index a69515e..2dd03ad 100644
--- a/samples/applications/dependent-scaling/sample-groups/artifacts/ec2/deployment-policy.json
+++ b/samples/applications/dependent-scaling/sample-groups/artifacts/ec2/deployment-policy.json
@@ -1,5 +1,5 @@
{
- "applicationId": "sample-groups-app",
+ "applicationId": "dependency-scaling-groups-app",
"applicationPolicy": {
"networkPartition": [
{
@@ -22,7 +22,7 @@
},
"childPolicies": [
{
- "alias": "mytomcat",
+ "alias": "my-tomcat",
"networkPartition": [
{
"id": "network-partition-1",
@@ -37,7 +37,7 @@
]
},
{
- "alias": "mygroup6",
+ "alias": "my-esb-php-group",
"networkPartition": [
{
"id": "network-partition-1",
http://git-wip-us.apache.org/repos/asf/stratos/blob/0b81b164/samples/applications/dependent-scaling/sample-groups/artifacts/kubernetes/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/artifacts/kubernetes/deployment-policy.json b/samples/applications/dependent-scaling/sample-groups/artifacts/kubernetes/deployment-policy.json
index 01044f3..996f234 100644
--- a/samples/applications/dependent-scaling/sample-groups/artifacts/kubernetes/deployment-policy.json
+++ b/samples/applications/dependent-scaling/sample-groups/artifacts/kubernetes/deployment-policy.json
@@ -1,5 +1,5 @@
{
- "applicationId": "sample-groups-app",
+ "applicationId": "dependency-scaling-groups-app",
"applicationPolicy": {
"networkPartition": [
{
@@ -23,7 +23,7 @@
},
"childPolicies": [
{
- "alias": "mytomcat",
+ "alias": "my-tomcat",
"networkPartition": [
{
"id": "network-partition-1",
@@ -38,7 +38,7 @@
]
},
{
- "alias": "mygroup6",
+ "alias": "my-esb-php-group",
"networkPartition": [
{
"id": "network-partition-1",
http://git-wip-us.apache.org/repos/asf/stratos/blob/0b81b164/samples/applications/dependent-scaling/sample-groups/artifacts/mock/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/artifacts/mock/deployment-policy.json b/samples/applications/dependent-scaling/sample-groups/artifacts/mock/deployment-policy.json
index 23310ee..fe747fd 100644
--- a/samples/applications/dependent-scaling/sample-groups/artifacts/mock/deployment-policy.json
+++ b/samples/applications/dependent-scaling/sample-groups/artifacts/mock/deployment-policy.json
@@ -1,5 +1,5 @@
{
- "applicationId": "sample-groups-app",
+ "applicationId": "dependency-scaling-groups-app",
"applicationPolicy": {
"networkPartition": [
{
@@ -22,7 +22,7 @@
},
"childPolicies": [
{
- "alias": "mytomcat",
+ "alias": "my-tomcat",
"networkPartition": [
{
"id": "network-partition-1",
@@ -37,7 +37,7 @@
]
},
{
- "alias": "mygroup6",
+ "alias": "my-esb-php-group",
"networkPartition": [
{
"id": "network-partition-1",
http://git-wip-us.apache.org/repos/asf/stratos/blob/0b81b164/samples/applications/dependent-scaling/sample-groups/artifacts/openstack/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/artifacts/openstack/deployment-policy.json b/samples/applications/dependent-scaling/sample-groups/artifacts/openstack/deployment-policy.json
index 42f477d..813282d 100644
--- a/samples/applications/dependent-scaling/sample-groups/artifacts/openstack/deployment-policy.json
+++ b/samples/applications/dependent-scaling/sample-groups/artifacts/openstack/deployment-policy.json
@@ -1,5 +1,5 @@
{
- "applicationId": "sample-groups-app",
+ "applicationId": "dependency-scaling-groups-app",
"applicationPolicy": {
"networkPartition": [
{
@@ -22,7 +22,7 @@
},
"childPolicies": [
{
- "alias": "mytomcat",
+ "alias": "my-tomcat",
"networkPartition": [
{
"id": "network-partition-1",
@@ -37,7 +37,7 @@
]
},
{
- "alias": "mygroup6",
+ "alias": "myesb-php-group",
"networkPartition": [
{
"id": "network-partition-1",
http://git-wip-us.apache.org/repos/asf/stratos/blob/0b81b164/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 6a7a496..e419e4f 100755
--- a/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh
+++ b/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh
@@ -32,8 +32,8 @@ curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/esb.jso
echo "Adding php cartridge..."
curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/php.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-echo "Adding group6c2 group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
+echo "Adding esb-php-group group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/esb-php-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
sleep 1
@@ -43,4 +43,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/sample-groups-app/deploy
+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
http://git-wip-us.apache.org/repos/asf/stratos/blob/0b81b164/samples/applications/dependent-scaling/sample-groups/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/common/undeploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/common/undeploy.sh
index 0273fbf..a69d60d 100644
--- a/samples/applications/dependent-scaling/sample-groups/scripts/common/undeploy.sh
+++ b/samples/applications/dependent-scaling/sample-groups/scripts/common/undeploy.sh
@@ -6,15 +6,15 @@ host_port=9443
set -e
echo "Undeploying application..."
-curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/sample-groups-app/undeploy
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/dependency-scaling-groups-app/undeploy
sleep 10
echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/sample-groups-app
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/dependency-scaling-groups-app
echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group6
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/esb-php-group
echo "Removing cartridges..."
curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat
@@ -22,4 +22,4 @@ 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/php
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
http://git-wip-us.apache.org/repos/asf/stratos/blob/0b81b164/samples/cartridges-groups/esb-php-group.json
----------------------------------------------------------------------
diff --git a/samples/cartridges-groups/esb-php-group.json b/samples/cartridges-groups/esb-php-group.json
new file mode 100644
index 0000000..30e776f
--- /dev/null
+++ b/samples/cartridges-groups/esb-php-group.json
@@ -0,0 +1,15 @@
+{
+ "name": "esb-php-group",
+ "groupScalingEnabled": "true",
+ "cartridges": [
+ "esb",
+ "php"
+ ],
+ "dependencies": {
+ "startupOrders": [
+ "cartridge.my-esb,cartridge.my-php"
+ ],
+ "terminationBehaviour": "terminate-all"
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/0b81b164/samples/cartridges-groups/group6c2.json
----------------------------------------------------------------------
diff --git a/samples/cartridges-groups/group6c2.json b/samples/cartridges-groups/group6c2.json
deleted file mode 100644
index cbba72b..0000000
--- a/samples/cartridges-groups/group6c2.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "group6",
- "groupScalingEnabled": "true",
- "cartridges": [
- "esb",
- "php"
- ],
- "dependencies": {
- "startupOrders": [
- "cartridge.esb,cartridge.php"
- ],
- "terminationBehaviour": "terminate-all"
- }
-}
-