stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From man...@apache.org
Subject [2/4] stratos git commit: Refining group-scaling application
Date Fri, 06 Feb 2015 04:55:16 GMT
Refining group-scaling application


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

Branch: refs/heads/master
Commit: 6b3a7fc54a70f3f6589e886da39b6faa62eb00c7
Parents: 4a99b29
Author: Vishanth <vishanth911@gmail.com>
Authored: Fri Feb 6 09:24:26 2015 +0530
Committer: Manula Thantriwatte <manula@apache.org>
Committed: Fri Feb 6 04:54:52 2015 +0000

----------------------------------------------------------------------
 samples/applications/group-scaling/README.md    |  7 +-
 .../artifacts/ec2/app_deployment_policy.json    | 71 ++++++++++++++++++
 .../kubernetes/app_deployment_policy.json       | 72 ++++++++++++++++++
 .../kubernetes/kubernetes-cluster.json          | 55 ++++++++++++++
 .../artifacts/mock/app_deployment_policy.json   | 71 ++++++++++++++++++
 .../openstack/app_deployment_policy.json        | 71 ++++++++++++++++++
 .../ec2/artifacts/app_deployment_policy.json    | 71 ------------------
 .../group-scaling/iaases/ec2/deploy.sh          | 69 -----------------
 .../group-scaling/iaases/ec2/undeploy.sh        | 34 ---------
 .../artifacts/app_deployment_policy.json        | 72 ------------------
 .../artifacts/kubernetes-cluster.json           | 55 --------------
 .../group-scaling/iaases/kubernetes/deploy.sh   | 78 --------------------
 .../group-scaling/iaases/kubernetes/undeploy.sh | 38 ----------
 .../mock/artifacts/app_deployment_policy.json   | 71 ------------------
 .../group-scaling/iaases/mock/deploy.sh         | 69 -----------------
 .../group-scaling/iaases/mock/undeploy.sh       | 34 ---------
 .../artifacts/app_deployment_policy.json        | 71 ------------------
 .../group-scaling/iaases/openstack/deploy.sh    | 69 -----------------
 .../group-scaling/iaases/openstack/undeploy.sh  | 34 ---------
 .../group-scaling/scripts/common/deploy.sh      | 55 ++++++++++++++
 .../group-scaling/scripts/common/undeploy.sh    | 29 ++++++++
 .../group-scaling/scripts/ec2/deploy.sh         |  9 +++
 .../group-scaling/scripts/ec2/undeploy.sh       |  8 ++
 .../group-scaling/scripts/kubernetes/deploy.sh  | 15 ++++
 .../scripts/kubernetes/undeploy.sh              | 13 ++++
 .../group-scaling/scripts/mock/deploy.sh        |  9 +++
 .../group-scaling/scripts/mock/undeploy.sh      |  8 ++
 .../group-scaling/scripts/openstack/deploy.sh   |  9 +++
 .../group-scaling/scripts/openstack/undeploy.sh |  8 ++
 29 files changed, 506 insertions(+), 769 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/README.md b/samples/applications/group-scaling/README.md
index 14bf510..1443d02 100644
--- a/samples/applications/group-scaling/README.md
+++ b/samples/applications/group-scaling/README.md
@@ -1,4 +1,4 @@
-Group-Scaling
+Group Scaling
 ===========
 
 Application folder structure
@@ -7,13 +7,12 @@ Application folder structure
 -- scripts/common/ Common scripts for all iaases
 -- scripts/<iaas> IaaS specific scripts
 
-
 How to run
 ----------
 cd scripts/<iaas>/
 ./deploy.sh
 
-How to updeploy
-----------
+How to undeploy
+---------------
 cd scripts/<iaas>/
 ./undeploy.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/artifacts/ec2/app_deployment_policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/artifacts/ec2/app_deployment_policy.json b/samples/applications/group-scaling/artifacts/ec2/app_deployment_policy.json
new file mode 100644
index 0000000..ae2f4ca
--- /dev/null
+++ b/samples/applications/group-scaling/artifacts/ec2/app_deployment_policy.json
@@ -0,0 +1,71 @@
+{
+    "applicationId": "appscaling",
+    "applicationPolicy": {
+        "networkPartition": [
+            {
+                "id": "EC2-P1",
+                "activeByDefault": "true",
+                "partitions": [
+                    {
+                        "id": "P1",
+                        "provider": "ec2",
+                        "property": [
+                            {
+                                "name": "region",
+                                "value": "ap-southeast-1"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    },
+    "childPolicies": [
+        {
+            "alias": "myc4",
+            "networkPartition": [
+                {
+                    "id": "EC2-P1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 2
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "group1c1",
+            "networkPartition": [
+                {
+                    "id": "EC2-P1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 4
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup2",
+            "networkPartition": [
+                {
+                    "id": "EC2-P1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 2
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/artifacts/kubernetes/app_deployment_policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/artifacts/kubernetes/app_deployment_policy.json b/samples/applications/group-scaling/artifacts/kubernetes/app_deployment_policy.json
new file mode 100644
index 0000000..cf28ad7
--- /dev/null
+++ b/samples/applications/group-scaling/artifacts/kubernetes/app_deployment_policy.json
@@ -0,0 +1,72 @@
+{
+    "applicationId": "appscaling",
+    "applicationPolicy": {
+        "networkPartition": [
+            {
+                "id":"network-p1",
+                "kubernetesClusterId":"kubernetes-cluster-1",
+                "activeByDefault": "true",
+                "partitions": [
+                    {
+                        "id": "P1",
+                        "provider": "kubernetes",
+                        "property": [
+                            {
+                                "name": "region",
+                                "value": "default"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    },
+    "childPolicies": [
+        {
+            "alias": "myc4",
+            "networkPartition": [
+                {
+                    "id": "network-p1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 2
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "group1c1",
+            "networkPartition": [
+                {
+                    "id": "network-p1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 4
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup2",
+            "networkPartition": [
+                {
+                    "id": "network-p1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 2
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/artifacts/kubernetes/kubernetes-cluster.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/artifacts/kubernetes/kubernetes-cluster.json b/samples/applications/group-scaling/artifacts/kubernetes/kubernetes-cluster.json
new file mode 100644
index 0000000..228eeb3
--- /dev/null
+++ b/samples/applications/group-scaling/artifacts/kubernetes/kubernetes-cluster.json
@@ -0,0 +1,55 @@
+{
+      "clusterId": "kubernetes-cluster-1",
+      "description": "Kubernetes CoreOS cluster",
+      "kubernetesMaster": {
+                  "hostId" : "KubHostMaster1",
+                  "hostname" : "master.dev.kubernetes.example.org",
+                  "hostIpAddress" : "172.17.8.100",
+                  "property" : [
+                  ]
+        },
+
+        "portRange" : {
+           "upper": "5000",
+           "lower": "4500"
+        },
+
+        "kubernetesHosts": [
+              {
+                     "hostId" : "KubHostSlave1",
+                     "hostname" : "slave1.dev.kubernetes.example.org",
+                     "hostIpAddress" : "172.17.8.101",
+                     "property" : [
+                     ]
+                },
+                {
+                     "hostId" : "KubHostSlave2",
+                     "hostname" : "slave2.dev.kubernetes.example.org",
+                     "hostIpAddress" : "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/6b3a7fc5/samples/applications/group-scaling/artifacts/mock/app_deployment_policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/artifacts/mock/app_deployment_policy.json b/samples/applications/group-scaling/artifacts/mock/app_deployment_policy.json
new file mode 100644
index 0000000..e0b7b99
--- /dev/null
+++ b/samples/applications/group-scaling/artifacts/mock/app_deployment_policy.json
@@ -0,0 +1,71 @@
+{
+    "applicationId": "appscaling",
+    "applicationPolicy": {
+        "networkPartition": [
+            {
+                "id": "openstack_R1",
+                "activeByDefault": "true",
+                "partitions": [
+                    {
+                        "id": "P1",
+                        "provider": "mock",
+                        "property": [
+                            {
+                                "name": "region",
+                                "value": "RegionOne"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    },
+    "childPolicies": [
+        {
+            "alias": "myc4",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 2
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "group1c1",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 4
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup2",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 2
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/artifacts/openstack/app_deployment_policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/artifacts/openstack/app_deployment_policy.json b/samples/applications/group-scaling/artifacts/openstack/app_deployment_policy.json
new file mode 100644
index 0000000..aa873aa
--- /dev/null
+++ b/samples/applications/group-scaling/artifacts/openstack/app_deployment_policy.json
@@ -0,0 +1,71 @@
+{
+    "applicationId": "appscaling",
+    "applicationPolicy": {
+        "networkPartition": [
+            {
+                "id": "openstack_R1",
+                "activeByDefault": "true",
+                "partitions": [
+                    {
+                        "id": "P1",
+                        "provider": "openstack",
+                        "property": [
+                            {
+                                "name": "region",
+                                "value": "RegionOne"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    },
+    "childPolicies": [
+        {
+            "alias": "myc4",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 2
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "group1c1",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 4
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup2",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 2
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/ec2/artifacts/app_deployment_policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/ec2/artifacts/app_deployment_policy.json b/samples/applications/group-scaling/iaases/ec2/artifacts/app_deployment_policy.json
deleted file mode 100644
index ae2f4ca..0000000
--- a/samples/applications/group-scaling/iaases/ec2/artifacts/app_deployment_policy.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-    "applicationId": "appscaling",
-    "applicationPolicy": {
-        "networkPartition": [
-            {
-                "id": "EC2-P1",
-                "activeByDefault": "true",
-                "partitions": [
-                    {
-                        "id": "P1",
-                        "provider": "ec2",
-                        "property": [
-                            {
-                                "name": "region",
-                                "value": "ap-southeast-1"
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    },
-    "childPolicies": [
-        {
-            "alias": "myc4",
-            "networkPartition": [
-                {
-                    "id": "EC2-P1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 2
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "group1c1",
-            "networkPartition": [
-                {
-                    "id": "EC2-P1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 4
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup2",
-            "networkPartition": [
-                {
-                    "id": "EC2-P1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 2
-                        }
-                    ]
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/ec2/deploy.sh b/samples/applications/group-scaling/iaases/ec2/deploy.sh
deleted file mode 100755
index b3a8e2d..0000000
--- a/samples/applications/group-scaling/iaases/ec2/deploy.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/bash
-
-export iaas="ec2"						#[openstack, ec2, mock, kubernetes]
-export host_ip="localhost"
-
-export artifacts_path="../../artifacts"
-export cartridges_path="../../../../cartridges/${iaas}"
-export cartridges_groups_path="../../../../cartridges-groups"
-
-set -e
-
-# Adding autoscale policy
-pushd ${artifacts_path}
-    # Adding c1 autoscale policy
-echo "Adding c1 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c1.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c2 autoscale policy
-echo "Adding c2 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c2.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c3 autoscale policy
-echo "Adding c3 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c4 autoscale policy
-echo "Adding c4 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c4.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-popd
-
-# Adding cartridges
-pushd ${cartridges_path}
-	# Adding c3 cartridge
-echo "Adding c3 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c4 cartridge
-echo "Adding c4 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c4.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c1 cartridge
-echo "Adding c1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c2 cartridge
-echo "Adding c2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c2.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-popd
-
-# Adding groups
-pushd ${cartridges_groups_path}
-	# Adding group1
-echo "Adding group1 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-popd
-
-sleep 3
-
-# Creating application
-pushd ${artifacts_path}
-echo "Creating application..."
-curl -X POST -H "Content-Type: application/json" -d @'composite_application.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications
-popd
-
-sleep 3
-
-# Deploy application
-echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -d@'artifacts/app_deployment_policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling/deploy

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/ec2/undeploy.sh b/samples/applications/group-scaling/iaases/ec2/undeploy.sh
deleted file mode 100644
index e9f7de9..0000000
--- a/samples/applications/group-scaling/iaases/ec2/undeploy.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-export host_ip="localhost"
-
-set -e
-
-# Undeploying application
-echo "Undeploying application..."
-curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling/undeploy
-
-sleep 30
-
-# Deleting application
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling
-
-# Removing groups
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group1
-
-# Removing cartridges
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c4
-
-# Removing autoscale policies
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c4
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/kubernetes/artifacts/app_deployment_policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/kubernetes/artifacts/app_deployment_policy.json b/samples/applications/group-scaling/iaases/kubernetes/artifacts/app_deployment_policy.json
deleted file mode 100644
index cf28ad7..0000000
--- a/samples/applications/group-scaling/iaases/kubernetes/artifacts/app_deployment_policy.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-    "applicationId": "appscaling",
-    "applicationPolicy": {
-        "networkPartition": [
-            {
-                "id":"network-p1",
-                "kubernetesClusterId":"kubernetes-cluster-1",
-                "activeByDefault": "true",
-                "partitions": [
-                    {
-                        "id": "P1",
-                        "provider": "kubernetes",
-                        "property": [
-                            {
-                                "name": "region",
-                                "value": "default"
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    },
-    "childPolicies": [
-        {
-            "alias": "myc4",
-            "networkPartition": [
-                {
-                    "id": "network-p1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 2
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "group1c1",
-            "networkPartition": [
-                {
-                    "id": "network-p1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 4
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup2",
-            "networkPartition": [
-                {
-                    "id": "network-p1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 2
-                        }
-                    ]
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/kubernetes/artifacts/kubernetes-cluster.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/kubernetes/artifacts/kubernetes-cluster.json b/samples/applications/group-scaling/iaases/kubernetes/artifacts/kubernetes-cluster.json
deleted file mode 100644
index 228eeb3..0000000
--- a/samples/applications/group-scaling/iaases/kubernetes/artifacts/kubernetes-cluster.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
-      "clusterId": "kubernetes-cluster-1",
-      "description": "Kubernetes CoreOS cluster",
-      "kubernetesMaster": {
-                  "hostId" : "KubHostMaster1",
-                  "hostname" : "master.dev.kubernetes.example.org",
-                  "hostIpAddress" : "172.17.8.100",
-                  "property" : [
-                  ]
-        },
-
-        "portRange" : {
-           "upper": "5000",
-           "lower": "4500"
-        },
-
-        "kubernetesHosts": [
-              {
-                     "hostId" : "KubHostSlave1",
-                     "hostname" : "slave1.dev.kubernetes.example.org",
-                     "hostIpAddress" : "172.17.8.101",
-                     "property" : [
-                     ]
-                },
-                {
-                     "hostId" : "KubHostSlave2",
-                     "hostname" : "slave2.dev.kubernetes.example.org",
-                     "hostIpAddress" : "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/6b3a7fc5/samples/applications/group-scaling/iaases/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/kubernetes/deploy.sh b/samples/applications/group-scaling/iaases/kubernetes/deploy.sh
deleted file mode 100755
index e3631f6..0000000
--- a/samples/applications/group-scaling/iaases/kubernetes/deploy.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/bash
-
-export iaas="kubernetes"						#[openstack, ec2, mock, kubernetes]
-export host_ip="localhost"
-
-export artifacts_path="../../artifacts"
-export cartridges_path="../../../../cartridges/${iaas}"
-export cartridges_groups_path="../../../../cartridges-groups"
-
-set -e
-
-# Adding autoscale policy
-pushd ${artifacts_path}
-    # Adding c1 autoscale policy
-echo "Adding c1 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c1.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c2 autoscale policy
-echo "Adding c2 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c2.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c3 autoscale policy
-echo "Adding c3 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c4 autoscale policy
-echo "Adding c4 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c4.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-popd
-
-# Adding cartridges
-pushd ${cartridges_path}
-	# Adding c3 cartridge
-echo "Adding c3 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c4 cartridge
-echo "Adding c4 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c4.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c1 cartridge
-echo "Adding c1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c2 cartridge
-echo "Adding c2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c2.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-popd
-
-sleep 3
-
-# Adding kubernetes cluster
-echo "Adding kubernetes cluster..."
-curl -X POST -H "Content-Type: application/json" -d @'artifacts/kubernetes-cluster.json' -k -u admin:admin https://${host_ip}:9443/api/kubernetesClusters
-
-sleep 2
-
-
-# Adding groups
-pushd ${cartridges_groups_path}
-	# Adding group1
-echo "Adding group1 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-popd
-
-sleep 3
-
-# Creating application
-pushd ${artifacts_path}
-echo "Creating application..."
-curl -X POST -H "Content-Type: application/json" -d @'composite_application.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications
-popd
-
-sleep 3
-
-# Deploy application
-echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -d@'artifacts/app_deployment_policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling/deploy

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/kubernetes/undeploy.sh b/samples/applications/group-scaling/iaases/kubernetes/undeploy.sh
deleted file mode 100644
index 8d4ec05..0000000
--- a/samples/applications/group-scaling/iaases/kubernetes/undeploy.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-export host_ip="localhost"
-
-set -e
-
-# Undeploying application
-echo "Undeploying application..."
-curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling/undeploy
-
-sleep 5
-
-# Deleting application
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling
-
-# Removing groups
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group1
-
-# Removing cartridges
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c4
-
-# Removing kubernetes
-echo "Removing kubernetes cluster..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/kubernetesClusters/kubernetes-cluster-1
-
-# Removing autoscale policies
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c4
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/mock/artifacts/app_deployment_policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/mock/artifacts/app_deployment_policy.json b/samples/applications/group-scaling/iaases/mock/artifacts/app_deployment_policy.json
deleted file mode 100644
index e0b7b99..0000000
--- a/samples/applications/group-scaling/iaases/mock/artifacts/app_deployment_policy.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-    "applicationId": "appscaling",
-    "applicationPolicy": {
-        "networkPartition": [
-            {
-                "id": "openstack_R1",
-                "activeByDefault": "true",
-                "partitions": [
-                    {
-                        "id": "P1",
-                        "provider": "mock",
-                        "property": [
-                            {
-                                "name": "region",
-                                "value": "RegionOne"
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    },
-    "childPolicies": [
-        {
-            "alias": "myc4",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 2
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "group1c1",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 4
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup2",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 2
-                        }
-                    ]
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/mock/deploy.sh b/samples/applications/group-scaling/iaases/mock/deploy.sh
deleted file mode 100755
index 119e1d5..0000000
--- a/samples/applications/group-scaling/iaases/mock/deploy.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/bash
-
-export iaas="mock"						#[openstack, ec2, mock, kubernetes]
-export host_ip="localhost"
-
-export artifacts_path="../../artifacts"
-export cartridges_path="../../../../cartridges/${iaas}"
-export cartridges_groups_path="../../../../cartridges-groups"
-
-set -e
-
-# Adding autoscale policy
-pushd ${artifacts_path}
-    # Adding c1 autoscale policy
-echo "Adding c1 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c1.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c2 autoscale policy
-echo "Adding c2 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c2.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c3 autoscale policy
-echo "Adding c3 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c4 autoscale policy
-echo "Adding c4 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c4.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-popd
-
-# Adding cartridges
-pushd ${cartridges_path}
-	# Adding c3 cartridge
-echo "Adding c3 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c4 cartridge
-echo "Adding c4 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c4.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c1 cartridge
-echo "Adding c1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c2 cartridge
-echo "Adding c2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c2.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-popd
-
-# Adding groups
-pushd ${cartridges_groups_path}
-	# Adding group1
-echo "Adding group1 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-popd
-
-sleep 3
-
-# Creating application
-pushd ${artifacts_path}
-echo "Creating application..."
-curl -X POST -H "Content-Type: application/json" -d @'composite_application.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications
-popd
-
-sleep 3
-
-# Deploy application
-echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -d@'artifacts/app_deployment_policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling/deploy

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/mock/undeploy.sh b/samples/applications/group-scaling/iaases/mock/undeploy.sh
deleted file mode 100644
index c0e6219..0000000
--- a/samples/applications/group-scaling/iaases/mock/undeploy.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-export host_ip="localhost"
-
-set -e
-
-# Undeploying application
-echo "Undeploying application..."
-curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling/undeploy
-
-sleep 5
-
-# Deleting application
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling
-
-# Removing groups
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group1
-
-# Removing cartridges
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c4
-
-# Removing autoscale policies
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c4
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/openstack/artifacts/app_deployment_policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/openstack/artifacts/app_deployment_policy.json b/samples/applications/group-scaling/iaases/openstack/artifacts/app_deployment_policy.json
deleted file mode 100644
index aa873aa..0000000
--- a/samples/applications/group-scaling/iaases/openstack/artifacts/app_deployment_policy.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-    "applicationId": "appscaling",
-    "applicationPolicy": {
-        "networkPartition": [
-            {
-                "id": "openstack_R1",
-                "activeByDefault": "true",
-                "partitions": [
-                    {
-                        "id": "P1",
-                        "provider": "openstack",
-                        "property": [
-                            {
-                                "name": "region",
-                                "value": "RegionOne"
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    },
-    "childPolicies": [
-        {
-            "alias": "myc4",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 2
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "group1c1",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 4
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup2",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 2
-                        }
-                    ]
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/openstack/deploy.sh b/samples/applications/group-scaling/iaases/openstack/deploy.sh
deleted file mode 100755
index b0e598d..0000000
--- a/samples/applications/group-scaling/iaases/openstack/deploy.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/bash
-
-export iaas="openstack"						#[openstack, ec2, mock, kubernetes]
-export host_ip="localhost"
-
-export artifacts_path="../../artifacts"
-export cartridges_path="../../../../cartridges/${iaas}"
-export cartridges_groups_path="../../../../cartridges-groups"
-
-set -e
-
-# Adding autoscale policy
-pushd ${artifacts_path}
-    # Adding c1 autoscale policy
-echo "Adding c1 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c1.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c2 autoscale policy
-echo "Adding c2 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c2.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c3 autoscale policy
-echo "Adding c3 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-
-    # Adding c4 autoscale policy
-echo "Adding c4 autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy-c4.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-popd
-
-# Adding cartridges
-pushd ${cartridges_path}
-	# Adding c3 cartridge
-echo "Adding c3 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c4 cartridge
-echo "Adding c4 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c4.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c1 cartridge
-echo "Adding c1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding c2 cartridge
-echo "Adding c2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'c2.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-popd
-
-# Adding groups
-pushd ${cartridges_groups_path}
-	# Adding group1
-echo "Adding group1 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-popd
-
-sleep 3
-
-# Creating application
-pushd ${artifacts_path}
-echo "Creating application..."
-curl -X POST -H "Content-Type: application/json" -d @'composite_application.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications
-popd
-
-sleep 3
-
-# Deploy application
-echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -d@'artifacts/app_deployment_policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling/deploy

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/iaases/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/iaases/openstack/undeploy.sh b/samples/applications/group-scaling/iaases/openstack/undeploy.sh
deleted file mode 100644
index e9f7de9..0000000
--- a/samples/applications/group-scaling/iaases/openstack/undeploy.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-export host_ip="localhost"
-
-set -e
-
-# Undeploying application
-echo "Undeploying application..."
-curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling/undeploy
-
-sleep 30
-
-# Deleting application
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/applications/appscaling
-
-# Removing groups
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group1
-
-# Removing cartridges
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/c4
-
-# Removing autoscale policies
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies/autoscale_policy_c4
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/common/deploy.sh b/samples/applications/group-scaling/scripts/common/deploy.sh
new file mode 100644
index 0000000..bc88d2d
--- /dev/null
+++ b/samples/applications/group-scaling/scripts/common/deploy.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+iaas=$1
+host_ip="localhost"
+host_port=9443
+
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+artifacts_path="${script_path}/../../artifacts"
+iaas_artifacts_path="${script_path}/../../artifacts/${iaas}"
+cartridges_path="${script_path}/../../../../cartridges/${iaas}"
+cartridges_groups_path="${script_path}/../../../../cartridges-groups"
+
+set -e
+
+if [[ -z "${iaas}" ]]; then
+    echo "Usage: deploy.sh [iaas]"
+    exit
+fi
+
+echo "Adding autoscale policy c1..."
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/autoscaling-policy-c1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+echo "Adding autoscale policy c2..."
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/autoscaling-policy-c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+echo "Adding autoscale policy c3..."
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/autoscaling-policy-c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+echo "Adding autoscale policy c4..."
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/autoscaling-policy-c4.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+echo "Adding c1 cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding c2 cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding c3 cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding c4 cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c4.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding group1 group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group1.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}/composite_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}/app_deployment_policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/complex-app/deploy

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/common/undeploy.sh b/samples/applications/group-scaling/scripts/common/undeploy.sh
new file mode 100644
index 0000000..2749bbe
--- /dev/null
+++ b/samples/applications/group-scaling/scripts/common/undeploy.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+host_ip="localhost"
+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/appscaling/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/appscaling
+
+echo "Removing groups..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group1
+
+echo "Removing cartridges..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c1
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c2
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c3
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c4
+
+echo "Removing autoscale policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscale-policy-c1
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscale-policy-c2
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscale-policy-c3
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscale-policy-c4
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/ec2/deploy.sh b/samples/applications/group-scaling/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..62063a2
--- /dev/null
+++ b/samples/applications/group-scaling/scripts/ec2/deploy.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+iaas="ec2"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
+
+pushd ${common_folder}
+bash deploy.sh ${iaas}
+popd
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/ec2/undeploy.sh b/samples/applications/group-scaling/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..b05cf9f
--- /dev/null
+++ b/samples/applications/group-scaling/scripts/ec2/undeploy.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
+
+pushd ${common_folder}
+bash undeploy.sh
+popd
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/kubernetes/deploy.sh b/samples/applications/group-scaling/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..31909af
--- /dev/null
+++ b/samples/applications/group-scaling/scripts/kubernetes/deploy.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+host_ip="localhost"
+host_port=9443
+iaas="kubernetes"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
+iaas_artifacts_path="${script_path}/../../artifacts/${iaas}"
+
+echo "Adding kubernetes cluster..."
+curl -X POST -H "Content-Type: application/json" -d "@${iaas_artifacts_path}/kubernetes-cluster.json" -k -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters
+
+pushd ${common_folder}
+bash deploy.sh ${iaas}
+popd
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/kubernetes/undeploy.sh b/samples/applications/group-scaling/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..3dc8e34
--- /dev/null
+++ b/samples/applications/group-scaling/scripts/kubernetes/undeploy.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+host_ip="localhost"
+host_port=9443
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
+
+pushd ${common_folder}
+bash undeploy.sh
+popd
+
+echo "Removing kubernetes cluster..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters/kubernetes-cluster-1

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/mock/deploy.sh b/samples/applications/group-scaling/scripts/mock/deploy.sh
new file mode 100755
index 0000000..d9620f9
--- /dev/null
+++ b/samples/applications/group-scaling/scripts/mock/deploy.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+iaas="mock"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
+
+pushd ${common_folder}
+bash deploy.sh ${iaas}
+popd

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/mock/undeploy.sh b/samples/applications/group-scaling/scripts/mock/undeploy.sh
new file mode 100644
index 0000000..b05cf9f
--- /dev/null
+++ b/samples/applications/group-scaling/scripts/mock/undeploy.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
+
+pushd ${common_folder}
+bash undeploy.sh
+popd
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/openstack/deploy.sh b/samples/applications/group-scaling/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..1588a45
--- /dev/null
+++ b/samples/applications/group-scaling/scripts/openstack/deploy.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+iaas="openstack"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
+
+pushd ${common_folder}
+bash deploy.sh ${iaas}
+popd
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/6b3a7fc5/samples/applications/group-scaling/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/openstack/undeploy.sh b/samples/applications/group-scaling/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..b05cf9f
--- /dev/null
+++ b/samples/applications/group-scaling/scripts/openstack/undeploy.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
+
+pushd ${common_folder}
+bash undeploy.sh
+popd
\ No newline at end of file


Mime
View raw message