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/03 07:37:47 UTC
[1/3] stratos git commit: Adding tomcat-group.json
Repository: stratos
Updated Branches:
refs/heads/master f5272cc4c -> 7c88a15aa
Adding tomcat-group.json
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/69d61a82
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/69d61a82
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/69d61a82
Branch: refs/heads/master
Commit: 69d61a82dc7fb02f610749856e4b075728ad874f
Parents: e47c481
Author: Dinithi <di...@wso2.com>
Authored: Tue Mar 3 10:27:15 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Tue Mar 3 10:27:15 2015 +0530
----------------------------------------------------------------------
.../single-group-v2/artifacts/application.json | 6 +++---
.../single-group-v2/scripts/common/deploy.sh | 4 ++--
.../single-group-v2/scripts/common/undeploy.sh | 2 +-
samples/cartridges-groups/tomcat-group.json | 16 ++++++++++++++++
4 files changed, 22 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/69d61a82/samples/applications/single-group-v2/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/artifacts/application.json b/samples/applications/single-group-v2/artifacts/application.json
index c738a7f..df537bb 100644
--- a/samples/applications/single-group-v2/artifacts/application.json
+++ b/samples/applications/single-group-v2/artifacts/application.json
@@ -4,8 +4,8 @@
"components": {
"groups": [
{
- "name": "group6",
- "alias": "my-group6",
+ "name": "tomcat-group",
+ "alias": "my-tomcat-group",
"groupMinInstances": 1,
"groupMaxInstances": 1,
"deploymentPolicy":"deployment-policy-3",
@@ -63,7 +63,7 @@
],
"dependencies": {
"startupOrders": [
- "group.my-group6,cartridge.my-tomcat"
+ "group.my-tomcat-group,cartridge.my-tomcat"
],
"terminationBehaviour": "terminate-none"
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/69d61a82/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 7504859..62c6f60 100755
--- a/samples/applications/single-group-v2/scripts/common/deploy.sh
+++ b/samples/applications/single-group-v2/scripts/common/deploy.sh
@@ -41,8 +41,8 @@ curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat1
echo "Adding tomcat2 cartridge..."
curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-echo "Adding group6c group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
+echo "Adding tomcat-group group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/tomcat-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
sleep 1
http://git-wip-us.apache.org/repos/asf/stratos/blob/69d61a82/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 032d05e..2d29554 100644
--- a/samples/applications/single-group-v2/scripts/common/undeploy.sh
+++ b/samples/applications/single-group-v2/scripts/common/undeploy.sh
@@ -14,7 +14,7 @@ echo "Deleting application..."
curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single_group_v2
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/tomcat-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
http://git-wip-us.apache.org/repos/asf/stratos/blob/69d61a82/samples/cartridges-groups/tomcat-group.json
----------------------------------------------------------------------
diff --git a/samples/cartridges-groups/tomcat-group.json b/samples/cartridges-groups/tomcat-group.json
new file mode 100644
index 0000000..2bdcfb6
--- /dev/null
+++ b/samples/cartridges-groups/tomcat-group.json
@@ -0,0 +1,16 @@
+{
+ "name": "tomcat-group",
+ "groups": [
+ {
+ "name": "tomcat-group",
+ "cartridges": [
+ "tomcat1",
+ "tomcat2"
+ ]
+ }
+ ],
+ "dependencies": {
+ "terminationBehaviour": "terminate-all"
+ }
+}
+
[2/3] stratos git commit: Merge branch 'master' of
https://github.com/apache/stratos
Posted by ra...@apache.org.
Merge branch 'master' of https://github.com/apache/stratos
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5b6a0548
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5b6a0548
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5b6a0548
Branch: refs/heads/master
Commit: 5b6a0548b35ce2738e85a25eb1282263ecc6ead5
Parents: 69d61a8 f5272cc
Author: Dinithi <di...@wso2.com>
Authored: Tue Mar 3 10:28:45 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Tue Mar 3 10:28:45 2015 +0530
----------------------------------------------------------------------
.../artifacts/ec2/deployment-policy.json | 41 --------------
.../artifacts/kubernetes/deployment-policy.json | 42 ---------------
.../kubernetes/kubernetes-cluster.json | 56 --------------------
.../artifacts/mock/deployment-policy.json | 41 --------------
.../artifacts/openstack/deployment-policy.json | 41 --------------
5 files changed, 221 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/5b6a0548/samples/applications/single-group-v3/artifacts/ec2/deployment-policy.json
----------------------------------------------------------------------
diff --cc samples/applications/single-group-v3/artifacts/ec2/deployment-policy.json
index 2665e2e,2665e2e..0000000
deleted file mode 100644,100644
--- a/samples/applications/single-group-v3/artifacts/ec2/deployment-policy.json
+++ /dev/null
@@@ -1,41 -1,41 +1,0 @@@
--{
-- "applicationId": "single_group_v3",
-- "applicationPolicy": {
-- "networkPartition": [
-- {
-- "id": "network-partition-1",
-- "activeByDefault": "true",
-- "partitions": [
-- {
-- "id": "partition-1",
-- "provider": "ec2",
-- "property": [
-- {
-- "name": "region",
-- "value": "ap-southeast-1"
-- }
-- ]
-- }
-- ]
-- }
-- ]
-- },
-- "childPolicies": [
-- {
-- "alias": "mygroup6",
-- "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/5b6a0548/samples/applications/single-group-v3/artifacts/kubernetes/deployment-policy.json
----------------------------------------------------------------------
diff --cc samples/applications/single-group-v3/artifacts/kubernetes/deployment-policy.json
index c12e444,c12e444..0000000
deleted file mode 100644,100644
--- a/samples/applications/single-group-v3/artifacts/kubernetes/deployment-policy.json
+++ /dev/null
@@@ -1,42 -1,42 +1,0 @@@
--{
-- "applicationId": "single_group_v3",
-- "applicationPolicy": {
-- "networkPartition": [
-- {
-- "id":"network-partition-1",
-- "kubernetesClusterId":"kubernetes-cluster-1",
-- "activeByDefault": "true",
-- "partitions": [
-- {
-- "id": "partition-1",
-- "provider": "kubernetes",
-- "property": [
-- {
-- "name": "region",
-- "value": "default"
-- }
-- ]
-- }
-- ]
-- }
-- ]
-- },
-- "childPolicies": [
-- {
-- "alias": "mygroup6",
-- "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/5b6a0548/samples/applications/single-group-v3/artifacts/kubernetes/kubernetes-cluster.json
----------------------------------------------------------------------
diff --cc samples/applications/single-group-v3/artifacts/kubernetes/kubernetes-cluster.json
index 2988ed1,2988ed1..0000000
deleted file mode 100644,100644
--- a/samples/applications/single-group-v3/artifacts/kubernetes/kubernetes-cluster.json
+++ /dev/null
@@@ -1,56 -1,56 +1,0 @@@
--{
-- "clusterId": "kubernetes-cluster-1",
-- "description": "Kubernetes CoreOS cluster",
-- "kubernetesMaster": {
-- "hostId": "KubHostMaster1",
-- "hostname": "master.dev.kubernetes.example.org",
-- "privateIPAddress": "172.17.8.100",
-- "publicIPAddress": "172.17.8.100",
-- "property": [
-- ]
-- },
-- "portRange": {
-- "upper": "5000",
-- "lower": "4500"
-- },
-- "kubernetesHosts": [
-- {
-- "hostId": "KubHostSlave1",
-- "hostname": "slave1.dev.kubernetes.example.org",
-- "privateIPAddress": "172.17.8.101",
-- "publicIPAddress": "172.17.8.101",
-- "property": [
-- ]
-- },
-- {
-- "hostId": "KubHostSlave2",
-- "hostname": "slave2.dev.kubernetes.example.org",
-- "privateIPAddress": "172.17.8.102",
-- "publicIPAddress": "172.17.8.102",
-- "property": [
-- ]
-- }
-- ],
-- "property": [
-- {
-- "name": "payload_parameter.MB_IP",
-- "value": "172.17.8.1"
-- },
-- {
-- "name": "payload_parameter.MB_PORT",
-- "value": "1883"
-- },
-- {
-- "name": "payload_parameter.CEP_IP",
-- "value": "172.17.8.1"
-- },
-- {
-- "name": "payload_parameter.CEP_PORT",
-- "value": "7711"
-- },
-- {
-- "name": "payload_parameter.LOG_LEVEL",
-- "value": "DEBUG"
-- }
-- ]
--}
http://git-wip-us.apache.org/repos/asf/stratos/blob/5b6a0548/samples/applications/single-group-v3/artifacts/mock/deployment-policy.json
----------------------------------------------------------------------
diff --cc samples/applications/single-group-v3/artifacts/mock/deployment-policy.json
index f9d9d92,f9d9d92..0000000
deleted file mode 100644,100644
--- a/samples/applications/single-group-v3/artifacts/mock/deployment-policy.json
+++ /dev/null
@@@ -1,41 -1,41 +1,0 @@@
--{
-- "applicationId": "single_group_v3",
-- "applicationPolicy": {
-- "networkPartition": [
-- {
-- "id": "network-partition-1",
-- "activeByDefault": "true",
-- "partitions": [
-- {
-- "id": "partition-1",
-- "provider": "mock",
-- "property": [
-- {
-- "name": "region",
-- "value": "RegionOne"
-- }
-- ]
-- }
-- ]
-- }
-- ]
-- },
-- "childPolicies": [
-- {
-- "alias": "mygroup6",
-- "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/5b6a0548/samples/applications/single-group-v3/artifacts/openstack/deployment-policy.json
----------------------------------------------------------------------
diff --cc samples/applications/single-group-v3/artifacts/openstack/deployment-policy.json
index 13df308,13df308..0000000
deleted file mode 100644,100644
--- a/samples/applications/single-group-v3/artifacts/openstack/deployment-policy.json
+++ /dev/null
@@@ -1,41 -1,41 +1,0 @@@
--{
-- "applicationId": "single_group_v3",
-- "applicationPolicy": {
-- "networkPartition": [
-- {
-- "id": "network-partition-1",
-- "activeByDefault": "true",
-- "partitions": [
-- {
-- "id": "partition-1",
-- "provider": "openstack",
-- "property": [
-- {
-- "name": "region",
-- "value": "RegionOne"
-- }
-- ]
-- }
-- ]
-- }
-- ]
-- },
-- "childPolicies": [
-- {
-- "alias": "mygroup6",
-- "networkPartition": [
-- {
-- "id": "network-partition-1",
-- "partitionAlgo": "one-after-another",
-- "partitions": [
-- {
-- "id": "partition-1",
-- "max": 5
-- }
-- ]
-- }
-- ]
-- }
-- ]
--}
--
[3/3] stratos git commit: Fixing single-group-v3 sample application
Posted by ra...@apache.org.
Fixing single-group-v3 sample application
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/7c88a15a
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/7c88a15a
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/7c88a15a
Branch: refs/heads/master
Commit: 7c88a15aa99036da7df471b875f33310422a3631
Parents: 5b6a054
Author: Dinithi <di...@wso2.com>
Authored: Tue Mar 3 11:56:48 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Tue Mar 3 11:56:48 2015 +0530
----------------------------------------------------------------------
.../artifacts/application-policy.json | 8 +++++++
.../single-group-v3/artifacts/application.json | 11 +++++-----
.../artifacts/deployment-policy.json | 2 +-
.../single-group-v3/scripts/common/deploy.sh | 23 ++++++++++----------
.../single-group-v3/scripts/common/undeploy.sh | 9 +++-----
5 files changed, 30 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/7c88a15a/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
new file mode 100644
index 0000000..9d2c6a1
--- /dev/null
+++ b/samples/applications/single-group-v3/artifacts/application-policy.json
@@ -0,0 +1,8 @@
+{
+ "networkPartition":[
+ {
+ "id":"network-partition-1",
+ "activeByDefault":"true"
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/7c88a15a/samples/applications/single-group-v3/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/artifacts/application.json b/samples/applications/single-group-v3/artifacts/application.json
index 6f09754..a050de4 100644
--- a/samples/applications/single-group-v3/artifacts/application.json
+++ b/samples/applications/single-group-v3/artifacts/application.json
@@ -1,20 +1,21 @@
{
- "applicationId": "single_group_v3",
- "alias": "single_group_v3",
+ "applicationId": "single-group-v3",
+ "alias": "my-single-group-v3",
"components": {
"groups": [
{
- "name": "group6",
- "alias": "mygroup6",
+ "name": "tomcat2-group",
+ "alias": "my-tomcat2-group",
"groupMinInstances": 2,
"groupMaxInstances": 3,
+ "deploymentPolicy":"deployment-policy-1",
"cartridges": [
{
"type": "tomcat2",
"cartridgeMin": 1,
"cartridgeMax": 1,
"subscribableInfo": {
- "alias": "tom2group6",
+ "alias": "my-tomcat2",
"autoscalingPolicy": "autoscaling-policy-1",
"artifactRepository":{
"privateRepo":false,
http://git-wip-us.apache.org/repos/asf/stratos/blob/7c88a15a/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
index d858aed..666c299 100644
--- a/samples/applications/single-group-v3/artifacts/deployment-policy.json
+++ b/samples/applications/single-group-v3/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/7c88a15a/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 f462f2d..41342af 100755
--- a/samples/applications/single-group-v3/scripts/common/deploy.sh
+++ b/samples/applications/single-group-v3/scripts/common/deploy.sh
@@ -11,6 +11,9 @@ artifacts_path=`cd "${script_path}/../../artifacts"; pwd`
iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd`
cartridges_path=`cd "${script_path}/../../../../cartridges/${iaas}"; pwd`
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`
set -e
@@ -19,28 +22,26 @@ if [[ -z "${iaas}" ]]; then
exit
fi
-echo ${artifacts_path}/autoscaling-policy.json
+echo ${autoscaling_policies_path}/autoscaling-policy-1.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
+curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
-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
+echo "Adding network partitions..."
+curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u admin:admin https://${host_ip}:9443/api/networkPartitions
-echo "Adding tomcat1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+echo "Adding deployment policies..."
+curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
echo "Adding tomcat2 cartridge..."
curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-echo "Adding group6c group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
+echo "Adding tomcat2-group group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/tomcat2-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
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 "@${iaas_artifacts_path}/deployment-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" -d "@${artifacts_path}/application-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-v3/deploy
http://git-wip-us.apache.org/repos/asf/stratos/blob/7c88a15a/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 3ad5810..cce2dd6 100644
--- a/samples/applications/single-group-v3/scripts/common/undeploy.sh
+++ b/samples/applications/single-group-v3/scripts/common/undeploy.sh
@@ -6,20 +6,17 @@ 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/single_group_v3/undeploy
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-v3/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/single_group_v3
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-v3
echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group8
-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/tomcat2-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
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat1
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..."