You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ma...@apache.org on 2015/02/05 09:50:44 UTC

stratos git commit: Refactor more-complext-application sample according to the standard

Repository: stratos
Updated Branches:
  refs/heads/master 07cfd499b -> c43278ca3


Refactor more-complext-application sample according to the standard


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

Branch: refs/heads/master
Commit: c43278ca3dd4425e2cb5125776e8ef55101b84da
Parents: 07cfd49
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Thu Feb 5 08:50:11 2015 +0000
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Thu Feb 5 08:50:11 2015 +0000

----------------------------------------------------------------------
 samples/applications/more-complex-app/README.md |  17 +-
 .../more-complex-app/artifacts/application.json | 196 +++++++++++++++++++
 .../artifacts/application_definition.json       | 196 -------------------
 .../artifacts/autoscale-policy.json             |  14 --
 .../artifacts/autoscaling-policy.json           |  14 ++
 .../artifacts/ec2/deployment-policy.json        |  87 ++++++++
 .../artifacts/kubernetes/deployment-policy.json |  88 +++++++++
 .../kubernetes/kubernetes-cluster.json          |  55 ++++++
 .../artifacts/mock/deployment-policy.json       |  87 ++++++++
 .../artifacts/openstack/deployment-policy.json  |  87 ++++++++
 .../iaases/ec2/artifacts/deployment-policy.json |  87 --------
 .../more-complex-app/iaases/ec2/deploy.sh       |  57 ------
 .../more-complex-app/iaases/ec2/undeploy.sh     |  30 ---
 .../kubernetes/artifacts/deployment-policy.json |  88 ---------
 .../artifacts/kubernetes-cluster.json           |  55 ------
 .../iaases/kubernetes/deploy.sh                 |  66 -------
 .../iaases/kubernetes/undeploy.sh               |  34 ----
 .../mock/artifacts/deployment-policy.json       |  87 --------
 .../more-complex-app/iaases/mock/deploy.sh      |  57 ------
 .../more-complex-app/iaases/mock/undeploy.sh    |  30 ---
 .../openstack/artifacts/deployment-policy.json  |  87 --------
 .../more-complex-app/iaases/openstack/deploy.sh |  57 ------
 .../iaases/openstack/undeploy.sh                |  30 ---
 .../more-complex-app/scripts/common/deploy.sh   |  47 +++++
 .../more-complex-app/scripts/common/undeploy.sh |  27 +++
 .../more-complex-app/scripts/ec2/deploy.sh      |   9 +
 .../more-complex-app/scripts/ec2/undeploy.sh    |   8 +
 .../scripts/kubernetes/deploy.sh                |  15 ++
 .../scripts/kubernetes/undeploy.sh              |  13 ++
 .../more-complex-app/scripts/mock/deploy.sh     |   9 +
 .../more-complex-app/scripts/mock/undeploy.sh   |   8 +
 .../scripts/openstack/deploy.sh                 |   9 +
 .../scripts/openstack/undeploy.sh               |   8 +
 33 files changed, 777 insertions(+), 982 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/README.md b/samples/applications/more-complex-app/README.md
index cda8e5f..4e3bc4d 100644
--- a/samples/applications/more-complex-app/README.md
+++ b/samples/applications/more-complex-app/README.md
@@ -1,11 +1,14 @@
 more-complex-app
 ================
 
-i) Using these artifacts you can deploy the more complex application.
-
-ii) In this deployment scenario, it deployed two groups which are nested.
-
-iii) In the groups we have added more that one startup orders.
-
-iv) You can simply run the deploy.sh and deploy this complex application.
+Application folder structure
+----------------------------
+-- artifacts/<iaas>/ IaaS specific artifacts
+-- scripts/common/ Common scripts for all iaases
+-- scripts/<iaas> IaaS specific scripts
+
+How to run
+----------
+cd scripts/<iaas>/
+./deploy.sh
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/artifacts/application.json b/samples/applications/more-complex-app/artifacts/application.json
new file mode 100644
index 0000000..7d9ea16
--- /dev/null
+++ b/samples/applications/more-complex-app/artifacts/application.json
@@ -0,0 +1,196 @@
+{
+    "applicationId": "app_boo",
+    "alias": "app_boo_r2",
+    "components": {
+        "groups": [
+            {
+                "name": "group6",
+                "alias": "mygroup6",
+                "groupMinInstances": 1,
+                "groupMaxInstances": 1,
+                "groups": [
+                    {
+                        "name": "group7",
+                        "alias": "mygroup7",
+                        "groupMinInstances": 1,
+                        "groupMaxInstances": 1,
+                        "cartridges": [
+                            {
+                                "type": "tomcat1",
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "subscribableInfo": {
+                                    "alias": "group7tom1",
+                                    "autoscalingPolicy": "autoscale_policy_1",
+                                    "artifactRepository":{
+                                        "privateRepo":false,
+                                        "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
+                                        "repoUsername":"",
+                                        "repoPassword":""
+                                    }
+                                }
+
+                            },
+                            {
+                                "type": "tomcat2",
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "subscribableInfo": {
+                                    "alias": "group7tom2",
+                                    "autoscalingPolicy": "autoscale_policy_1",
+                                    "artifactRepository":{
+                                        "privateRepo":false,
+                                        "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
+                                        "repoUsername":"",
+                                        "repoPassword":""
+                                    }
+                                }
+                            }
+                        ]
+                    },
+                    {
+                        "name": "group8",
+                        "alias": "mygroup8",
+                        "groupMinInstances": 1,
+                        "groupMaxInstances": 1,
+                        "cartridges": [
+                            {
+                                "type": "tomcat1",
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "subscribableInfo": {
+                                    "alias": "group8tom",
+                                    "autoscalingPolicy": "autoscale_policy_1",
+                                    "artifactRepository":{
+                                        "privateRepo":false,
+                                        "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
+                                        "repoUsername":"",
+                                        "repoPassword":""
+                                    }
+                                }
+                            }
+                        ]
+                    }
+                ],
+                "cartridges": [
+                    {
+                        "type": "tomcat2",
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "subscribableInfo": {
+                            "alias": "group6tom",
+                            "autoscalingPolicy": "autoscale_policy_1",
+                            "artifactRepository":{
+                                "privateRepo":false,
+                                "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
+                                "repoUsername":"",
+                                "repoPassword":""
+                            }
+                        }
+                    }
+                ]
+            },
+            {
+                "name": "group8",
+                "alias": "mygroup8",
+                "groupMinInstances": 1,
+                "groupMaxInstances": 1,
+                "groups": [
+                    {
+                        "name": "group9",
+                        "alias": "mygroup9",
+                        "groupMinInstances": 1,
+                        "groupMaxInstances": 1,
+                        "cartridges": [
+                            {
+                                "type": "tomcat1",
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "subscribableInfo": {
+                                    "alias": "group9tom",
+                                    "autoscalingPolicy": "autoscale_policy_1",
+                                    "artifactRepository":{
+                                        "privateRepo":false,
+                                        "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
+                                        "repoUsername":"",
+                                        "repoPassword":""
+                                    }
+                                }
+                            }
+                        ]
+                    }
+                ],
+                "cartridges": [
+                    {
+                        "type": "tomcat1",
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "subscribableInfo": {
+                            "alias": "group8tom1",
+                            "autoscalingPolicy": "autoscale_policy_1",
+                            "artifactRepository":{
+                                "privateRepo":false,
+                                "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
+                                "repoUsername":"",
+                                "repoPassword":""
+                            }
+                        }
+                    },
+                    {
+                        "type": "tomcat2",
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "subscribableInfo": {
+                            "alias": "group8tom2",
+                            "autoscalingPolicy": "autoscale_policy_1",
+                            "artifactRepository":{
+                                "privateRepo":false,
+                                "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
+                                "repoUsername":"",
+                                "repoPassword":""
+                            }
+                        }
+                    }
+                ]
+            }
+        ],
+        "cartridges": [
+            {
+                "type": "tomcat",
+                "cartridgeMin": 1,
+                "cartridgeMax": 2,
+                "subscribableInfo": {
+                    "alias": "mytomcat1",
+                    "autoscalingPolicy": "autoscale_policy_1",
+                    "artifactRepository":{
+                        "privateRepo":false,
+                        "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
+                        "repoUsername":"",
+                        "repoPassword":""
+                    }
+                }
+            },
+            {
+                "type": "tomcat1",
+                "cartridgeMin": 1,
+                "cartridgeMax": 2,
+                "subscribableInfo": {
+                    "alias": "mytomcat2",
+                    "autoscalingPolicy": "autoscale_policy_1",
+                    "artifactRepository":{
+                        "privateRepo":false,
+                        "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
+                        "repoUsername":"",
+                        "repoPassword":""
+                    }
+                }
+            }
+        ],
+        "dependencies": {
+            "startupOrders": [
+                "group.group6,cartridge.tomcat,group.group8"
+            ],
+            "terminationBehaviour": "terminate-all"
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/artifacts/application_definition.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/artifacts/application_definition.json b/samples/applications/more-complex-app/artifacts/application_definition.json
deleted file mode 100644
index 7d9ea16..0000000
--- a/samples/applications/more-complex-app/artifacts/application_definition.json
+++ /dev/null
@@ -1,196 +0,0 @@
-{
-    "applicationId": "app_boo",
-    "alias": "app_boo_r2",
-    "components": {
-        "groups": [
-            {
-                "name": "group6",
-                "alias": "mygroup6",
-                "groupMinInstances": 1,
-                "groupMaxInstances": 1,
-                "groups": [
-                    {
-                        "name": "group7",
-                        "alias": "mygroup7",
-                        "groupMinInstances": 1,
-                        "groupMaxInstances": 1,
-                        "cartridges": [
-                            {
-                                "type": "tomcat1",
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "subscribableInfo": {
-                                    "alias": "group7tom1",
-                                    "autoscalingPolicy": "autoscale_policy_1",
-                                    "artifactRepository":{
-                                        "privateRepo":false,
-                                        "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
-                                        "repoUsername":"",
-                                        "repoPassword":""
-                                    }
-                                }
-
-                            },
-                            {
-                                "type": "tomcat2",
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "subscribableInfo": {
-                                    "alias": "group7tom2",
-                                    "autoscalingPolicy": "autoscale_policy_1",
-                                    "artifactRepository":{
-                                        "privateRepo":false,
-                                        "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
-                                        "repoUsername":"",
-                                        "repoPassword":""
-                                    }
-                                }
-                            }
-                        ]
-                    },
-                    {
-                        "name": "group8",
-                        "alias": "mygroup8",
-                        "groupMinInstances": 1,
-                        "groupMaxInstances": 1,
-                        "cartridges": [
-                            {
-                                "type": "tomcat1",
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "subscribableInfo": {
-                                    "alias": "group8tom",
-                                    "autoscalingPolicy": "autoscale_policy_1",
-                                    "artifactRepository":{
-                                        "privateRepo":false,
-                                        "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
-                                        "repoUsername":"",
-                                        "repoPassword":""
-                                    }
-                                }
-                            }
-                        ]
-                    }
-                ],
-                "cartridges": [
-                    {
-                        "type": "tomcat2",
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "subscribableInfo": {
-                            "alias": "group6tom",
-                            "autoscalingPolicy": "autoscale_policy_1",
-                            "artifactRepository":{
-                                "privateRepo":false,
-                                "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
-                                "repoUsername":"",
-                                "repoPassword":""
-                            }
-                        }
-                    }
-                ]
-            },
-            {
-                "name": "group8",
-                "alias": "mygroup8",
-                "groupMinInstances": 1,
-                "groupMaxInstances": 1,
-                "groups": [
-                    {
-                        "name": "group9",
-                        "alias": "mygroup9",
-                        "groupMinInstances": 1,
-                        "groupMaxInstances": 1,
-                        "cartridges": [
-                            {
-                                "type": "tomcat1",
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "subscribableInfo": {
-                                    "alias": "group9tom",
-                                    "autoscalingPolicy": "autoscale_policy_1",
-                                    "artifactRepository":{
-                                        "privateRepo":false,
-                                        "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
-                                        "repoUsername":"",
-                                        "repoPassword":""
-                                    }
-                                }
-                            }
-                        ]
-                    }
-                ],
-                "cartridges": [
-                    {
-                        "type": "tomcat1",
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "subscribableInfo": {
-                            "alias": "group8tom1",
-                            "autoscalingPolicy": "autoscale_policy_1",
-                            "artifactRepository":{
-                                "privateRepo":false,
-                                "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
-                                "repoUsername":"",
-                                "repoPassword":""
-                            }
-                        }
-                    },
-                    {
-                        "type": "tomcat2",
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "subscribableInfo": {
-                            "alias": "group8tom2",
-                            "autoscalingPolicy": "autoscale_policy_1",
-                            "artifactRepository":{
-                                "privateRepo":false,
-                                "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
-                                "repoUsername":"",
-                                "repoPassword":""
-                            }
-                        }
-                    }
-                ]
-            }
-        ],
-        "cartridges": [
-            {
-                "type": "tomcat",
-                "cartridgeMin": 1,
-                "cartridgeMax": 2,
-                "subscribableInfo": {
-                    "alias": "mytomcat1",
-                    "autoscalingPolicy": "autoscale_policy_1",
-                    "artifactRepository":{
-                        "privateRepo":false,
-                        "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
-                        "repoUsername":"",
-                        "repoPassword":""
-                    }
-                }
-            },
-            {
-                "type": "tomcat1",
-                "cartridgeMin": 1,
-                "cartridgeMax": 2,
-                "subscribableInfo": {
-                    "alias": "mytomcat2",
-                    "autoscalingPolicy": "autoscale_policy_1",
-                    "artifactRepository":{
-                        "privateRepo":false,
-                        "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
-                        "repoUsername":"",
-                        "repoPassword":""
-                    }
-                }
-            }
-        ],
-        "dependencies": {
-            "startupOrders": [
-                "group.group6,cartridge.tomcat,group.group8"
-            ],
-            "terminationBehaviour": "terminate-all"
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/artifacts/autoscale-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/artifacts/autoscale-policy.json b/samples/applications/more-complex-app/artifacts/autoscale-policy.json
deleted file mode 100755
index 9e9ad99..0000000
--- a/samples/applications/more-complex-app/artifacts/autoscale-policy.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscale_policy_1",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 80
-        },
-        "memoryConsumption": {
-            "threshold": 90
-        },
-        "loadAverage": {
-            "threshold": 50
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/artifacts/autoscaling-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/artifacts/autoscaling-policy.json b/samples/applications/more-complex-app/artifacts/autoscaling-policy.json
new file mode 100755
index 0000000..959defc
--- /dev/null
+++ b/samples/applications/more-complex-app/artifacts/autoscaling-policy.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscale-policy-1",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 80
+        },
+        "memoryConsumption": {
+            "threshold": 90
+        },
+        "loadAverage": {
+            "threshold": 50
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/artifacts/ec2/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/artifacts/ec2/deployment-policy.json b/samples/applications/more-complex-app/artifacts/ec2/deployment-policy.json
new file mode 100644
index 0000000..9592a35
--- /dev/null
+++ b/samples/applications/more-complex-app/artifacts/ec2/deployment-policy.json
@@ -0,0 +1,87 @@
+{
+    "applicationId": "app_boo",
+    "applicationPolicy": {
+        "applicationId": "app_boo_r4",
+        "networkPartition": [
+            {
+                "id": "EC2-P1",
+                "activeByDefault": "true",
+                "partitions": [
+                    {
+                        "id": "P1",
+                        "provider": "ec2",
+                        "property": [
+                            {
+                                "name": "region",
+                                "value": "ap-southeast-1"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    },
+    "childPolicies": [
+        {
+            "alias": "mytomcat2",
+            "networkPartition": [
+                {
+                    "id": "EC2-P1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mytomcat1",
+            "networkPartition": [
+                {
+                    "id": "EC2-P1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup6",
+            "networkPartition": [
+                {
+                    "id": "EC2-P1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup88",
+            "networkPartition": [
+                {
+                    "id": "EC2-P1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/artifacts/kubernetes/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/artifacts/kubernetes/deployment-policy.json b/samples/applications/more-complex-app/artifacts/kubernetes/deployment-policy.json
new file mode 100644
index 0000000..9bb1027
--- /dev/null
+++ b/samples/applications/more-complex-app/artifacts/kubernetes/deployment-policy.json
@@ -0,0 +1,88 @@
+{
+    "applicationId": "app_boo",
+    "applicationPolicy": {
+        "applicationId": "app_boo_r4",
+        "networkPartition": [
+            {
+                "id":"network-p1",
+                "kubernetesClusterId":"kubernetes-cluster-1",
+                "activeByDefault": "true",
+                "partitions": [
+                    {
+                        "id": "P1",
+                        "provider": "kubernetes",
+                        "property": [
+                            {
+                                "name": "region",
+                                "value": "default"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    },
+    "childPolicies": [
+        {
+            "alias": "mytomcat2",
+            "networkPartition": [
+                {
+                    "id": "network-p1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mytomcat1",
+            "networkPartition": [
+                {
+                    "id": "network-p1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup6",
+            "networkPartition": [
+                {
+                    "id": "network-p1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup8",
+            "networkPartition": [
+                {
+                    "id": "network-p1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/artifacts/kubernetes/kubernetes-cluster.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/artifacts/kubernetes/kubernetes-cluster.json b/samples/applications/more-complex-app/artifacts/kubernetes/kubernetes-cluster.json
new file mode 100644
index 0000000..228eeb3
--- /dev/null
+++ b/samples/applications/more-complex-app/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/c43278ca/samples/applications/more-complex-app/artifacts/mock/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/artifacts/mock/deployment-policy.json b/samples/applications/more-complex-app/artifacts/mock/deployment-policy.json
new file mode 100644
index 0000000..38bc5a6
--- /dev/null
+++ b/samples/applications/more-complex-app/artifacts/mock/deployment-policy.json
@@ -0,0 +1,87 @@
+{
+    "applicationId": "app_boo",
+    "applicationPolicy": {
+        "applicationId": "app_boo_r4",
+        "networkPartition": [
+            {
+                "id": "openstack_R1",
+                "activeByDefault": "true",
+                "partitions": [
+                    {
+                        "id": "P1",
+                        "provider": "mock",
+                        "property": [
+                            {
+                                "name": "region",
+                                "value": "RegionOne"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    },
+    "childPolicies": [
+        {
+            "alias": "mytomcat2",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mytomcat1",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup6",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup8",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/artifacts/openstack/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/artifacts/openstack/deployment-policy.json b/samples/applications/more-complex-app/artifacts/openstack/deployment-policy.json
new file mode 100644
index 0000000..d4d3936
--- /dev/null
+++ b/samples/applications/more-complex-app/artifacts/openstack/deployment-policy.json
@@ -0,0 +1,87 @@
+{
+    "applicationId": "app_boo",
+    "applicationPolicy": {
+        "applicationId": "app_boo_r4",
+        "networkPartition": [
+            {
+                "id": "openstack_R1",
+                "activeByDefault": "true",
+                "partitions": [
+                    {
+                        "id": "P1",
+                        "provider": "openstack",
+                        "property": [
+                            {
+                                "name": "region",
+                                "value": "RegionOne"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    },
+    "childPolicies": [
+        {
+            "alias": "mytomcat2",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mytomcat1",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup6",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "alias": "mygroup8",
+            "networkPartition": [
+                {
+                    "id": "openstack_R1",
+                    "partitionAlgo": "one-after-another",
+                    "partitions": [
+                        {
+                            "id": "P1",
+                            "max": 5
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/ec2/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/ec2/artifacts/deployment-policy.json b/samples/applications/more-complex-app/iaases/ec2/artifacts/deployment-policy.json
deleted file mode 100644
index 9592a35..0000000
--- a/samples/applications/more-complex-app/iaases/ec2/artifacts/deployment-policy.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
-    "applicationId": "app_boo",
-    "applicationPolicy": {
-        "applicationId": "app_boo_r4",
-        "networkPartition": [
-            {
-                "id": "EC2-P1",
-                "activeByDefault": "true",
-                "partitions": [
-                    {
-                        "id": "P1",
-                        "provider": "ec2",
-                        "property": [
-                            {
-                                "name": "region",
-                                "value": "ap-southeast-1"
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    },
-    "childPolicies": [
-        {
-            "alias": "mytomcat2",
-            "networkPartition": [
-                {
-                    "id": "EC2-P1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mytomcat1",
-            "networkPartition": [
-                {
-                    "id": "EC2-P1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup6",
-            "networkPartition": [
-                {
-                    "id": "EC2-P1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup88",
-            "networkPartition": [
-                {
-                    "id": "EC2-P1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/ec2/deploy.sh b/samples/applications/more-complex-app/iaases/ec2/deploy.sh
deleted file mode 100755
index 40d591a..0000000
--- a/samples/applications/more-complex-app/iaases/ec2/deploy.sh
+++ /dev/null
@@ -1,57 +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}
-echo "Adding autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'1utoscale-policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-popd
-
-# Adding cartridges
-pushd ${cartridges_path}
-	# Adding tomcat cartridge
-echo "Adding tomcat cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding tomcat1 cartridge
-echo "Adding tomcat1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding tomcat2 cartridge
-echo "Adding tomcat2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat2.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-popd
-
-# Adding groups
-pushd ${cartridges_groups_path}
-	# Adding group6c3
-echo "Adding group6c3 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group6c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-
-	# Adding group8c3
-echo "Adding group8c3 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group8c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-popd
-
-sleep 5
-
-# Creating application
-pushd ${artifacts_path}
-echo "Creating application..."
-curl -X POST -H "Content-Type: application/json" -d @'application-definition.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/deployment-policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications/app_boo/deploy
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/ec2/undeploy.sh b/samples/applications/more-complex-app/iaases/ec2/undeploy.sh
deleted file mode 100644
index dcffc89..0000000
--- a/samples/applications/more-complex-app/iaases/ec2/undeploy.sh
+++ /dev/null
@@ -1,30 +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/app_boo/undeploy
-
-sleep 40
-
-# Deleting application
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/applications/app_boo
-
-# Removing groups
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group8
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group6
-
-# Removing cartridges
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat2
-
-# 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_1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/kubernetes/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/kubernetes/artifacts/deployment-policy.json b/samples/applications/more-complex-app/iaases/kubernetes/artifacts/deployment-policy.json
deleted file mode 100644
index 9bb1027..0000000
--- a/samples/applications/more-complex-app/iaases/kubernetes/artifacts/deployment-policy.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
-    "applicationId": "app_boo",
-    "applicationPolicy": {
-        "applicationId": "app_boo_r4",
-        "networkPartition": [
-            {
-                "id":"network-p1",
-                "kubernetesClusterId":"kubernetes-cluster-1",
-                "activeByDefault": "true",
-                "partitions": [
-                    {
-                        "id": "P1",
-                        "provider": "kubernetes",
-                        "property": [
-                            {
-                                "name": "region",
-                                "value": "default"
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    },
-    "childPolicies": [
-        {
-            "alias": "mytomcat2",
-            "networkPartition": [
-                {
-                    "id": "network-p1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mytomcat1",
-            "networkPartition": [
-                {
-                    "id": "network-p1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup6",
-            "networkPartition": [
-                {
-                    "id": "network-p1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup8",
-            "networkPartition": [
-                {
-                    "id": "network-p1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/kubernetes/artifacts/kubernetes-cluster.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/kubernetes/artifacts/kubernetes-cluster.json b/samples/applications/more-complex-app/iaases/kubernetes/artifacts/kubernetes-cluster.json
deleted file mode 100644
index 228eeb3..0000000
--- a/samples/applications/more-complex-app/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/c43278ca/samples/applications/more-complex-app/iaases/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/kubernetes/deploy.sh b/samples/applications/more-complex-app/iaases/kubernetes/deploy.sh
deleted file mode 100755
index 77cfd7e..0000000
--- a/samples/applications/more-complex-app/iaases/kubernetes/deploy.sh
+++ /dev/null
@@ -1,66 +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}
-echo "Adding autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-popd
-
-# Adding cartridges
-pushd ${cartridges_path}
-	# Adding tomcat cartridge
-echo "Adding tomcat cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding tomcat1 cartridge
-echo "Adding tomcat1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding tomcat2 cartridge
-echo "Adding tomcat2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat2.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 group6c3
-echo "Adding group6c3 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group6c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-
-	# Adding group8c3
-echo "Adding group8c3 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group8c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-popd
-
-sleep 5
-
-# Creating application
-pushd ${artifacts_path}
-echo "Creating application..."
-curl -X POST -H "Content-Type: application/json" -d @'application-definition.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/deployment-policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications/app_boo/deploy
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/kubernetes/undeploy.sh b/samples/applications/more-complex-app/iaases/kubernetes/undeploy.sh
deleted file mode 100644
index 9eda009..0000000
--- a/samples/applications/more-complex-app/iaases/kubernetes/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/app_boo/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/app_boo
-
-# Removing groups
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group8
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group6
-
-# Removing cartridges
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat2
-
-# 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_1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/mock/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/mock/artifacts/deployment-policy.json b/samples/applications/more-complex-app/iaases/mock/artifacts/deployment-policy.json
deleted file mode 100644
index 38bc5a6..0000000
--- a/samples/applications/more-complex-app/iaases/mock/artifacts/deployment-policy.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
-    "applicationId": "app_boo",
-    "applicationPolicy": {
-        "applicationId": "app_boo_r4",
-        "networkPartition": [
-            {
-                "id": "openstack_R1",
-                "activeByDefault": "true",
-                "partitions": [
-                    {
-                        "id": "P1",
-                        "provider": "mock",
-                        "property": [
-                            {
-                                "name": "region",
-                                "value": "RegionOne"
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    },
-    "childPolicies": [
-        {
-            "alias": "mytomcat2",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mytomcat1",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup6",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup8",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/mock/deploy.sh b/samples/applications/more-complex-app/iaases/mock/deploy.sh
deleted file mode 100755
index e576cf7..0000000
--- a/samples/applications/more-complex-app/iaases/mock/deploy.sh
+++ /dev/null
@@ -1,57 +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}
-echo "Adding autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-popd
-
-# Adding cartridges
-pushd ${cartridges_path}
-	# Adding tomcat cartridge
-echo "Adding tomcat cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding tomcat1 cartridge
-echo "Adding tomcat1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding tomcat2 cartridge
-echo "Adding tomcat2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat2.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-popd
-
-# Adding groups
-pushd ${cartridges_groups_path}
-	# Adding group6c3
-echo "Adding group6c3 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group6c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-
-	# Adding group8c3
-echo "Adding group8c3 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group8c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-popd
-
-sleep 5
-
-# Creating application
-pushd ${artifacts_path}
-echo "Creating application..."
-curl -X POST -H "Content-Type: application/json" -d @'application-definition.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/deployment-policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications/app_boo/deploy
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/mock/undeploy.sh b/samples/applications/more-complex-app/iaases/mock/undeploy.sh
deleted file mode 100644
index c582ac7..0000000
--- a/samples/applications/more-complex-app/iaases/mock/undeploy.sh
+++ /dev/null
@@ -1,30 +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/app_boo/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/app_boo
-
-# Removing groups
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group8
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group6
-
-# Removing cartridges
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat2
-
-# 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_1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/openstack/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/openstack/artifacts/deployment-policy.json b/samples/applications/more-complex-app/iaases/openstack/artifacts/deployment-policy.json
deleted file mode 100644
index d4d3936..0000000
--- a/samples/applications/more-complex-app/iaases/openstack/artifacts/deployment-policy.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
-    "applicationId": "app_boo",
-    "applicationPolicy": {
-        "applicationId": "app_boo_r4",
-        "networkPartition": [
-            {
-                "id": "openstack_R1",
-                "activeByDefault": "true",
-                "partitions": [
-                    {
-                        "id": "P1",
-                        "provider": "openstack",
-                        "property": [
-                            {
-                                "name": "region",
-                                "value": "RegionOne"
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    },
-    "childPolicies": [
-        {
-            "alias": "mytomcat2",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mytomcat1",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup6",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "alias": "mygroup8",
-            "networkPartition": [
-                {
-                    "id": "openstack_R1",
-                    "partitionAlgo": "one-after-another",
-                    "partitions": [
-                        {
-                            "id": "P1",
-                            "max": 5
-                        }
-                    ]
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/openstack/deploy.sh b/samples/applications/more-complex-app/iaases/openstack/deploy.sh
deleted file mode 100755
index c7dd566..0000000
--- a/samples/applications/more-complex-app/iaases/openstack/deploy.sh
+++ /dev/null
@@ -1,57 +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}
-echo "Adding autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d @'autoscale-policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/autoscalingPolicies
-popd
-
-# Adding cartridges
-pushd ${cartridges_path}
-	# Adding tomcat cartridge
-echo "Adding tomcat cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding tomcat1 cartridge
-echo "Adding tomcat1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat1.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-
-	# Adding tomcat2 cartridge
-echo "Adding tomcat2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d @'tomcat2.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridges
-popd
-
-# Adding groups
-pushd ${cartridges_groups_path}
-	# Adding group6c3
-echo "Adding group6c3 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group6c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-
-	# Adding group8c3
-echo "Adding group8c3 group..."
-curl -X POST -H "Content-Type: application/json" -d @'group8c3.json' -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups
-popd
-
-sleep 5
-
-# Creating application
-pushd ${artifacts_path}
-echo "Creating application..."
-curl -X POST -H "Content-Type: application/json" -d @'application-definition.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/deployment-policy.json' -k -v -u admin:admin https://${host_ip}:9443/api/applications/app_boo/deploy
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/iaases/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/iaases/openstack/undeploy.sh b/samples/applications/more-complex-app/iaases/openstack/undeploy.sh
deleted file mode 100644
index dcffc89..0000000
--- a/samples/applications/more-complex-app/iaases/openstack/undeploy.sh
+++ /dev/null
@@ -1,30 +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/app_boo/undeploy
-
-sleep 40
-
-# Deleting application
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/applications/app_boo
-
-# Removing groups
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group8
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridgeGroups/group6
-
-# Removing cartridges
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:9443/api/cartridges/tomcat2
-
-# 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_1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/scripts/common/deploy.sh b/samples/applications/more-complex-app/scripts/common/deploy.sh
new file mode 100755
index 0000000..8a3f7ea
--- /dev/null
+++ b/samples/applications/more-complex-app/scripts/common/deploy.sh
@@ -0,0 +1,47 @@
+#!/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 ${artifacts_path}/autoscale-policy.json
+echo "Adding autoscale policy..."
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/autoscaling-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+echo "Adding 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 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 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 group6c3 group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
+
+echo "Adding group8c3 group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group8c3.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/app_boo/deploy
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/scripts/common/undeploy.sh b/samples/applications/more-complex-app/scripts/common/undeploy.sh
new file mode 100644
index 0000000..95e856d
--- /dev/null
+++ b/samples/applications/more-complex-app/scripts/common/undeploy.sh
@@ -0,0 +1,27 @@
+#!/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/app_boo/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/app_boo
+
+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
+
+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..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscale-policy-1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/scripts/ec2/deploy.sh b/samples/applications/more-complex-app/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..62063a2
--- /dev/null
+++ b/samples/applications/more-complex-app/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/c43278ca/samples/applications/more-complex-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/scripts/ec2/undeploy.sh b/samples/applications/more-complex-app/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..b05cf9f
--- /dev/null
+++ b/samples/applications/more-complex-app/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/c43278ca/samples/applications/more-complex-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/scripts/kubernetes/deploy.sh b/samples/applications/more-complex-app/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..31909af
--- /dev/null
+++ b/samples/applications/more-complex-app/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/c43278ca/samples/applications/more-complex-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/scripts/kubernetes/undeploy.sh b/samples/applications/more-complex-app/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..3dc8e34
--- /dev/null
+++ b/samples/applications/more-complex-app/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/c43278ca/samples/applications/more-complex-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/scripts/mock/deploy.sh b/samples/applications/more-complex-app/scripts/mock/deploy.sh
new file mode 100755
index 0000000..a75033b
--- /dev/null
+++ b/samples/applications/more-complex-app/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
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c43278ca/samples/applications/more-complex-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/scripts/mock/undeploy.sh b/samples/applications/more-complex-app/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..b05cf9f
--- /dev/null
+++ b/samples/applications/more-complex-app/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/c43278ca/samples/applications/more-complex-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/scripts/openstack/deploy.sh b/samples/applications/more-complex-app/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..1588a45
--- /dev/null
+++ b/samples/applications/more-complex-app/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/c43278ca/samples/applications/more-complex-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/scripts/openstack/undeploy.sh b/samples/applications/more-complex-app/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..b05cf9f
--- /dev/null
+++ b/samples/applications/more-complex-app/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