You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2015/04/30 08:28:28 UTC
[06/10] stratos git commit: refining the application samples hierarchy
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/n-level-nesting/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/artifacts/application.json b/samples/applications/n-level-nesting/artifacts/application.json
deleted file mode 100644
index 1fa30c0..0000000
--- a/samples/applications/n-level-nesting/artifacts/application.json
+++ /dev/null
@@ -1,184 +0,0 @@
-{
- "alias":"n-level-nesting-app",
- "applicationId":"n-level-nesting",
- "components":{
- "groups":[
- {
- "name":"n-level-nesting",
- "groupMinInstances":1,
- "groupMaxInstances":1,
- "alias":"n-level-nesting-group",
- "groups":[
- {
- "name":"level-one-group",
- "groupMinInstances":1,
- "groupMaxInstances":1,
- "alias":"level-one-group",
- "cartridges":[
- {
- "cartridgeMin":1,
- "cartridgeMax":10000000,
- "type":"esb",
- "subscribableInfo":{
- "alias":"level-one-group-esb",
- "deploymentPolicy":"deployment-policy-1",
- "autoscalingPolicy":"autoscaling-policy-1"
- }
- },
- {
- "cartridgeMin":1,
- "cartridgeMax":10000000,
- "type":"tomcat",
- "subscribableInfo":{
- "alias":"level-one-group-tomcat",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git"
- },
- "autoscalingPolicy":"autoscaling-policy-1"
- }
- }
- ],
- "groups":[
- {
- "name":"level-two-group",
- "groupMinInstances":1,
- "groupMaxInstances":1,
- "alias":"level-two-group",
- "cartridges":[
- {
- "cartridgeMin":1,
- "cartridgeMax":10000000,
- "type":"esb",
- "subscribableInfo":{
- "alias":"level-two-group-esb",
- "deploymentPolicy":"deployment-policy-1",
- "autoscalingPolicy":"autoscaling-policy-1"
- }
- },
- {
- "cartridgeMin":1,
- "cartridgeMax":10000000,
- "type":"tomcat",
- "subscribableInfo":{
- "alias":"level-two-group-tomcat",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git"
- },
- "autoscalingPolicy":"autoscaling-policy-1"
- }
- }
- ],
- "groups":[
- {
- "name":"level-three-group",
- "groupMinInstances":1,
- "groupMaxInstances":1,
- "alias":"level-three-group",
- "cartridges":[
- {
- "cartridgeMin":1,
- "cartridgeMax":10000000,
- "type":"esb",
- "subscribableInfo":{
- "alias":"level-three-group-esb",
- "deploymentPolicy":"deployment-policy-1",
- "autoscalingPolicy":"autoscaling-policy-1"
- }
- },
- {
- "cartridgeMin":1,
- "cartridgeMax":10000000,
- "type":"tomcat",
- "subscribableInfo":{
- "alias":"level-three-group-tomcat",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git"
- },
- "autoscalingPolicy":"autoscaling-policy-1"
- }
- }
- ],
- "groups":[
- {
- "name":"level-four-group",
- "groupMinInstances":1,
- "groupMaxInstances":1,
- "alias":"level-four-group",
- "cartridges":[
- {
- "cartridgeMin":1,
- "cartridgeMax":10000000,
- "type":"esb",
- "subscribableInfo":{
- "alias":"level-four-group-esb",
- "deploymentPolicy":"deployment-policy-1",
- "autoscalingPolicy":"autoscaling-policy-1"
- }
- },
- {
- "cartridgeMin":1,
- "cartridgeMax":10000000,
- "type":"tomcat",
- "subscribableInfo":{
- "alias":"level-four-group-tomcat",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git"
- },
- "autoscalingPolicy":"autoscaling-policy-1"
- }
- }
- ],
- "groups":[
- {
- "name":"level-five-group",
- "groupMinInstances":1,
- "groupMaxInstances":1,
- "alias":"level-five-group",
- "cartridges":[
- {
- "cartridgeMin":1,
- "cartridgeMax":10000000,
- "type":"esb",
- "subscribableInfo":{
- "alias":"level-five-group-esb",
- "deploymentPolicy":"deployment-policy-1",
- "autoscalingPolicy":"autoscaling-policy-1"
- }
- },
- {
- "cartridgeMin":1,
- "cartridgeMax":10000000,
- "type":"tomcat",
- "subscribableInfo":{
- "alias":"level-five-group-tomcat",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git"
- },
- "autoscalingPolicy":"autoscaling-policy-1"
- }
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/n-level-nesting/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/scripts/common/deploy.sh b/samples/applications/n-level-nesting/scripts/common/deploy.sh
deleted file mode 100755
index bc5b806..0000000
--- a/samples/applications/n-level-nesting/scripts/common/deploy.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-
-iaas=$1
-host_ip="localhost"
-host_port=9443
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-
-artifacts_path=`cd "${script_path}/../../artifacts"; pwd`
-iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd`
-cartridges_path=`cd "${script_path}/../../../../cartridges/${iaas}"; pwd`
-cartridges_groups_path=`cd "${script_path}/../../../../cartridges-groups"; pwd`
-autoscaling_policies_path=`cd "${script_path}/../../../../autoscaling-policies"; pwd`
-network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd`
-deployment_policies_path=`cd "${script_path}/../../../../deployment-policies"; pwd`
-application_policies_path=`cd "${script_path}/../../../../application-policies"; pwd`
-
-set -e
-
-if [[ -z "${iaas}" ]]; then
- echo "Usage: deploy.sh [iaas]"
- exit
-fi
-
-echo ${autoscaling_policies_path}/autoscaling-policy-1.json
-echo "Adding autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
-
-echo "Adding network partitions..."
-curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions
-curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions
-
-echo "Adding deployment policy..."
-curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
-
-echo "Adding mysql cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/mysql.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-echo "Adding php cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/php.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-echo "Adding esb cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/esb.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-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
-
-sleep 1
-
-echo "Adding application policy..."
-curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies
-
-sleep 1
-
-echo "n-level-nesting group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/n-level-nesting.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" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/n-level-nesting/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/n-level-nesting/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/scripts/common/undeploy.sh b/samples/applications/n-level-nesting/scripts/common/undeploy.sh
deleted file mode 100644
index 48d20f4..0000000
--- a/samples/applications/n-level-nesting/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/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/n-level-nesting/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/n-level-nesting
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/n-level-nesting
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/php
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/mysql
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/esb
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat
-
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
-
-echo "Removing deployment policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies/deployment-policy-1
-
-echo "Removing network partitions..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-2
-
-echo "Removing application policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/n-level-nesting/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/scripts/ec2/deploy.sh b/samples/applications/n-level-nesting/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/n-level-nesting/scripts/ec2/deploy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-iaas="ec2"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/n-level-nesting/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/scripts/ec2/undeploy.sh b/samples/applications/n-level-nesting/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/n-level-nesting/scripts/ec2/undeploy.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/n-level-nesting/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/scripts/kubernetes/deploy.sh b/samples/applications/n-level-nesting/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 0d614cc..0000000
--- a/samples/applications/n-level-nesting/scripts/kubernetes/deploy.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-host_ip="localhost"
-host_port=9443
-iaas="kubernetes"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd`
-kubernetes_clusters_path=`cd "${script_path}/../../../../kubernets-clusters"; pwd`
-
-echo "Adding kubernetes cluster..."
-curl -X POST -H "Content-Type: application/json" -d "@${kubernetes_clusters_path}/kubernetes-cluster-1.json" -k -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters
-
-bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/n-level-nesting/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/scripts/kubernetes/undeploy.sh b/samples/applications/n-level-nesting/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/n-level-nesting/scripts/kubernetes/undeploy.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-host_ip="localhost"
-host_port=9443
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
-
-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/aaa8a0f4/samples/applications/n-level-nesting/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/scripts/mock/deploy.sh b/samples/applications/n-level-nesting/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/n-level-nesting/scripts/mock/deploy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-iaas="mock"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/n-level-nesting/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/scripts/mock/undeploy.sh b/samples/applications/n-level-nesting/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/n-level-nesting/scripts/mock/undeploy.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/n-level-nesting/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/scripts/openstack/deploy.sh b/samples/applications/n-level-nesting/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/n-level-nesting/scripts/openstack/deploy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-iaas="openstack"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/n-level-nesting/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/n-level-nesting/scripts/openstack/undeploy.sh b/samples/applications/n-level-nesting/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/n-level-nesting/scripts/openstack/undeploy.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/README.md b/samples/applications/nested-group-v2/README.md
deleted file mode 100644
index 3bf8240..0000000
--- a/samples/applications/nested-group-v2/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-nested-group
-============
-
-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
-
-
-Description
-----------
-
-This sample is to test the nested grouping with more than one group in one level where each groups have their own cartridges. Eg:
-
- group6
- |
- -----------------
- | |
- group7 group-tom2
- | |
- -------- ---------
- | | | |
-tomcat tomcat1 tomcat2 tomcat3
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/artifacts/application.json b/samples/applications/nested-group-v2/artifacts/application.json
deleted file mode 100644
index bfa7732..0000000
--- a/samples/applications/nested-group-v2/artifacts/application.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "applicationId": "nested-group-app",
- "alias": "my-nested-group-app",
- "components": {
- "groups": [
- {
- "name": "group6",
- "alias": "my-group6",
- "groupMinInstances": 1,
- "groupMaxInstances": 1,
- "deploymentPolicy":"deployment-policy-2",
- "groups": [
- {
- "name": "group7",
- "alias": "my-group7",
- "groupMinInstances": 1,
- "groupMaxInstances": 1,
- "cartridges": [
- {
- "type": "tomcat",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat-group7",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- },
- {
- "type": "tomcat1",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat1-group7",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ],
- "groups": []
- },
- {
- "name": "group-tom2",
- "alias": "my-group-tmo2",
- "groupMinInstances": 1,
- "groupMaxInstances": 1,
- "cartridges": [
- {
- "type": "tomcat2",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat2-group",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- },
- {
- "type": "tomcat3",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat3-group",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ],
- "groups": []
- }
- ]
- }
- ]
-
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/images/nested-group-app.png
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/images/nested-group-app.png b/samples/applications/nested-group-v2/images/nested-group-app.png
deleted file mode 100644
index e6a0f37..0000000
Binary files a/samples/applications/nested-group-v2/images/nested-group-app.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/scripts/common/deploy.sh b/samples/applications/nested-group-v2/scripts/common/deploy.sh
deleted file mode 100755
index 7708346..0000000
--- a/samples/applications/nested-group-v2/scripts/common/deploy.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/bash
-
-iaas=$1
-host_ip="localhost"
-host_port=9443
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-
-artifacts_path=`cd "${script_path}/../../artifacts"; pwd`
-iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd`
-cartridges_path=`cd "${script_path}/../../../../cartridges/${iaas}"; pwd`
-cartridges_groups_path=`cd "${script_path}/../../../../cartridges-groups"; pwd`
-autoscaling_policies_path=`cd "${script_path}/../../../../autoscaling-policies"; pwd`
-network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd`
-deployment_policies_path=`cd "${script_path}/../../../../deployment-policies"; pwd`
-application_policies_path=`cd "${script_path}/../../../../application-policies"; pwd`
-
-set -e
-
-if [[ -z "${iaas}" ]]; then
- echo "Usage: deploy.sh [iaas]"
- exit
-fi
-
-echo ${autoscaling_policies_path}/autoscaling-policy-1.json
-echo "Adding autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
-
-echo "Adding network partitions..."
-curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions
-curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions
-
-echo "Adding deployment policies..."
-curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
-
-echo "Adding tomcat cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-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 tomcat2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-
-echo "Adding group6c group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c7.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
-
-sleep 1
-
-echo "Adding application policy..."
-curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy-5.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies
-
-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" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/nested-group-app/deploy/application-policy-5
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/scripts/common/undeploy.sh b/samples/applications/nested-group-v2/scripts/common/undeploy.sh
deleted file mode 100644
index 5b4aa59..0000000
--- a/samples/applications/nested-group-v2/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/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/nested-group-app/undeploy
-
-sleep 10
-
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/nested-group-app
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group6
-
-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/autoscaling-policy-5
-
-echo "Removing application policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies/application-policy-5
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/scripts/ec2/deploy.sh b/samples/applications/nested-group-v2/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/nested-group-v2/scripts/ec2/deploy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-iaas="ec2"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/scripts/ec2/undeploy.sh b/samples/applications/nested-group-v2/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/nested-group-v2/scripts/ec2/undeploy.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/scripts/kubernetes/deploy.sh b/samples/applications/nested-group-v2/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/nested-group-v2/scripts/kubernetes/deploy.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-host_ip="localhost"
-host_port=9443
-iaas="kubernetes"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd`
-
-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
-
-bash ${common_folder}/deploy.sh ${iaas}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/scripts/kubernetes/undeploy.sh b/samples/applications/nested-group-v2/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/nested-group-v2/scripts/kubernetes/undeploy.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-host_ip="localhost"
-host_port=9443
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
-
-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/aaa8a0f4/samples/applications/nested-group-v2/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/scripts/mock/deploy.sh b/samples/applications/nested-group-v2/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/nested-group-v2/scripts/mock/deploy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-iaas="mock"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/scripts/mock/undeploy.sh b/samples/applications/nested-group-v2/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/nested-group-v2/scripts/mock/undeploy.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/scripts/openstack/deploy.sh b/samples/applications/nested-group-v2/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/nested-group-v2/scripts/openstack/deploy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-iaas="openstack"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group-v2/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group-v2/scripts/openstack/undeploy.sh b/samples/applications/nested-group-v2/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/nested-group-v2/scripts/openstack/undeploy.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/README.md b/samples/applications/nested-group/README.md
deleted file mode 100644
index 1acc75d..0000000
--- a/samples/applications/nested-group/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-nested-group
-============
-
-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/aaa8a0f4/samples/applications/nested-group/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/artifacts/application.json b/samples/applications/nested-group/artifacts/application.json
deleted file mode 100644
index d7a6e04..0000000
--- a/samples/applications/nested-group/artifacts/application.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "applicationId": "nested-group-app",
- "alias": "my-nested-group-app",
- "components": {
- "groups": [
- {
- "name": "group6",
- "alias": "my-group6",
- "groupMinInstances": 1,
- "groupMaxInstances": 1,
- "deploymentPolicy":"deployment-policy-2",
- "groups": [
- {
- "name": "group7",
- "alias": "my-group7",
- "groupMinInstances": 1,
- "groupMaxInstances": 1,
- "cartridges": [
- {
- "type": "tomcat1",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat1-group7",
- "autoscalingPolicy": "autoscaling-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": "my-tomcat2-group6",
- "autoscalingPolicy": "autoscaling-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": "my-tomcat",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-2",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ],
- "dependencies": {
- "startupOrders": [
- "group.my-group6,cartridge.my-tomcat"
- ],
- "terminationBehaviour": "terminate-all"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/common/deploy.sh b/samples/applications/nested-group/scripts/common/deploy.sh
deleted file mode 100755
index 0d2611c..0000000
--- a/samples/applications/nested-group/scripts/common/deploy.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-
-iaas=$1
-host_ip="localhost"
-host_port=9443
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-
-artifacts_path=`cd "${script_path}/../../artifacts"; pwd`
-iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd`
-cartridges_path=`cd "${script_path}/../../../../cartridges/${iaas}"; pwd`
-cartridges_groups_path=`cd "${script_path}/../../../../cartridges-groups"; pwd`
-autoscaling_policies_path=`cd "${script_path}/../../../../autoscaling-policies"; pwd`
-network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd`
-deployment_policies_path=`cd "${script_path}/../../../../deployment-policies"; pwd`
-application_policies_path=`cd "${script_path}/../../../../application-policies"; pwd`
-
-set -e
-
-if [[ -z "${iaas}" ]]; then
- echo "Usage: deploy.sh [iaas]"
- exit
-fi
-
-echo ${autoscaling_policies_path}/autoscaling-policy-1.json
-echo "Adding autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
-
-echo "Adding network partitions..."
-curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions
-curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions
-
-echo "Adding deployment policies..."
-curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
-
-echo "Adding tomcat cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-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 group6c group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
-
-sleep 1
-
-echo "Adding application policy..."
-curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies
-
-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" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/nested-group-app/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/common/undeploy.sh b/samples/applications/nested-group/scripts/common/undeploy.sh
deleted file mode 100644
index 038933e..0000000
--- a/samples/applications/nested-group/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/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/nested-group-app/undeploy
-
-sleep 10
-
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/nested-group-app
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group6
-
-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/autoscaling-policy-1
-
-echo "Removing application policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies/application-policy-1
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/common/update-deployment-policy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/common/update-deployment-policy.sh b/samples/applications/nested-group/scripts/common/update-deployment-policy.sh
deleted file mode 100755
index 8b03c4c..0000000
--- a/samples/applications/nested-group/scripts/common/update-deployment-policy.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-iaas=$1
-host_ip="localhost"
-host_port=9443
-
-script_path=`cd "$prgdir"; pwd`
-
-deployment_policies_path=`cd "${script_path}/../../../../deployment-policies"; pwd`
-
-curl -X PUT -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/common/update-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/common/update-network-partition.sh b/samples/applications/nested-group/scripts/common/update-network-partition.sh
deleted file mode 100755
index 5af767c..0000000
--- a/samples/applications/nested-group/scripts/common/update-network-partition.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-iaas=$1
-host_ip="localhost"
-host_port=9443
-
-script_path=`cd "$prgdir"; pwd`
-
-network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd`
-
-curl -X PUT -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/ec2/deploy.sh b/samples/applications/nested-group/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/nested-group/scripts/ec2/deploy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-iaas="ec2"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/ec2/undeploy.sh b/samples/applications/nested-group/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/nested-group/scripts/ec2/undeploy.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/kubernetes/deploy.sh b/samples/applications/nested-group/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/nested-group/scripts/kubernetes/deploy.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-host_ip="localhost"
-host_port=9443
-iaas="kubernetes"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd`
-
-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
-
-bash ${common_folder}/deploy.sh ${iaas}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/kubernetes/undeploy.sh b/samples/applications/nested-group/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/nested-group/scripts/kubernetes/undeploy.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-host_ip="localhost"
-host_port=9443
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
-
-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/aaa8a0f4/samples/applications/nested-group/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/mock/deploy.sh b/samples/applications/nested-group/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/nested-group/scripts/mock/deploy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-iaas="mock"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/mock/undeploy.sh b/samples/applications/nested-group/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/nested-group/scripts/mock/undeploy.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/mock/update-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/mock/update-network-partition.sh b/samples/applications/nested-group/scripts/mock/update-network-partition.sh
deleted file mode 100755
index 329684b..0000000
--- a/samples/applications/nested-group/scripts/mock/update-network-partition.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-iaas="mock"
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/update-network-partition.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/openstack/deploy.sh b/samples/applications/nested-group/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/nested-group/scripts/openstack/deploy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-iaas="openstack"
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/openstack/undeploy.sh b/samples/applications/nested-group/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/nested-group/scripts/openstack/undeploy.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-prgdir=`dirname "$0"`
-script_path=`cd "$prgdir"; pwd`
-common_folder=`cd "${script_path}/../common"; pwd`
-
-bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested-group/scripts/openstack/update-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested-group/scripts/openstack/update-network-partition.sh b/samples/applications/nested-group/scripts/openstack/update-network-partition.sh
deleted file mode 100755
index 5af767c..0000000
--- a/samples/applications/nested-group/scripts/openstack/update-network-partition.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-iaas=$1
-host_ip="localhost"
-host_port=9443
-
-script_path=`cd "$prgdir"; pwd`
-
-network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd`
-
-curl -X PUT -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/complex-app-with-lb/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/README.md b/samples/applications/nested/complex-app-with-lb/README.md
new file mode 100644
index 0000000..daaacc1
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/README.md
@@ -0,0 +1,13 @@
+Complex App with a Load Balancer
+================================
+
+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/aaa8a0f4/samples/applications/nested/complex-app-with-lb/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/artifacts/application.json b/samples/applications/nested/complex-app-with-lb/artifacts/application.json
new file mode 100644
index 0000000..e3ba6af
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/artifacts/application.json
@@ -0,0 +1,141 @@
+{
+ "applicationId": "complex-app-with-lb",
+ "alias": "complex-app-with-lb-v1",
+ "components": {
+ "groups": [
+ {
+ "name": "group6",
+ "alias": "my-group6",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 1,
+ "deploymentPolicy":"deployment-policy-1",
+ "groups": [
+ {
+ "name": "group7",
+ "alias": "my-group7",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 1,
+ "cartridges": [
+ {
+ "type": "tomcat1",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-tomcat1-group7",
+ "autoscalingPolicy": "autoscaling-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": "my-tomcat2-group6",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ]
+ },
+ {
+ "name": "group8",
+ "alias": "my-group8",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 1,
+ "deploymentPolicy":"deployment-policy-1",
+ "groups": [
+ {
+ "name": "group9",
+ "alias": "my-group9",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 1,
+ "cartridges": [
+ {
+ "type": "tomcat1",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-tomcat1-group9",
+ "autoscalingPolicy": "autoscaling-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": "my-tomcat2-group8",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cartridges": [
+ {
+ "type": "stratos-lb",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-stratos-lb",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-1"
+ }
+ },
+ {
+ "type": "tomcat",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-tomcat",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ],
+ "dependencies": {
+ "startupOrders": [
+ "cartridge.my-tomcat,cartridge.my-stratos-lb,group.my-group6,group.my-group8"
+ ],
+ "terminationBehaviour": "terminate-all"
+ }
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/complex-app-with-lb/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/scripts/common/deploy.sh b/samples/applications/nested/complex-app-with-lb/scripts/common/deploy.sh
new file mode 100755
index 0000000..7d02464
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/scripts/common/deploy.sh
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+iaas=$1
+host_ip="localhost"
+host_port=9443
+
+prgdir=`dirname "$0"`
+script_path=`cd "$prgdir"; pwd`
+
+artifacts_path=`cd "${script_path}/../../artifacts"; pwd`
+iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd`
+cartridges_path=`cd "${script_path}/../../../../../cartridges/${iaas}"; pwd`
+cartridges_groups_path=`cd "${script_path}/../../../../../cartridges-groups"; pwd`
+autoscaling_policies_path=`cd "${script_path}/../../../../../autoscaling-policies"; pwd`
+network_partitions_path=`cd "${script_path}/../../../../../network-partitions/${iaas}"; pwd`
+deployment_policies_path=`cd "${script_path}/../../../../../deployment-policies"; pwd`
+application_policies_path=`cd "${script_path}/../../../../../application-policies"; pwd`
+
+set -e
+
+if [[ -z "${iaas}" ]]; then
+ echo "Usage: deploy.sh [iaas]"
+ exit
+fi
+
+echo ${autoscaling_policies_path}/autoscaling-policy-1.json
+echo "Adding autoscale policy..."
+curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+echo "Adding network partitions..."
+curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions
+
+echo "Adding deployment policies..."
+curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
+
+echo "Adding load balancer cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/stratos-lb.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+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 group6c 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 group8c group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group8c.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
+
+sleep 1
+
+echo "Adding application policy..."
+curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies
+
+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" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/complex-app-with-lb/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/complex-app-with-lb/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/scripts/common/undeploy.sh b/samples/applications/nested/complex-app-with-lb/scripts/common/undeploy.sh
new file mode 100644
index 0000000..618348d
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/scripts/common/undeploy.sh
@@ -0,0 +1,31 @@
+#!/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/complex-app-with-lb/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/complex-app-with-lb
+
+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
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/stratos-lb
+
+echo "Removing autoscale policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
+
+echo "Removing application policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies/application-policy-1
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/complex-app-with-lb/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/scripts/ec2/deploy.sh b/samples/applications/nested/complex-app-with-lb/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/scripts/ec2/deploy.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+iaas="ec2"
+
+prgdir=`dirname "$0"`
+script_path=`cd "$prgdir"; pwd`
+common_folder=`cd "${script_path}/../common"; pwd`
+
+bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/complex-app-with-lb/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/scripts/ec2/undeploy.sh b/samples/applications/nested/complex-app-with-lb/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/scripts/ec2/undeploy.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+prgdir=`dirname "$0"`
+script_path=`cd "$prgdir"; pwd`
+common_folder=`cd "${script_path}/../common"; pwd`
+
+bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/complex-app-with-lb/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/scripts/kubernetes/deploy.sh b/samples/applications/nested/complex-app-with-lb/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..32eff3c
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/scripts/kubernetes/deploy.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+host_ip="localhost"
+host_port=9443
+iaas="kubernetes"
+
+prgdir=`dirname "$0"`
+script_path=`cd "$prgdir"; pwd`
+common_folder=`cd "${script_path}/../common"; pwd`
+iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd`
+
+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
+
+bash ${common_folder}/deploy.sh ${iaas}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/complex-app-with-lb/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/scripts/kubernetes/undeploy.sh b/samples/applications/nested/complex-app-with-lb/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/scripts/kubernetes/undeploy.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+host_ip="localhost"
+host_port=9443
+
+prgdir=`dirname "$0"`
+script_path=`cd "$prgdir"; pwd`
+common_folder=`cd "${script_path}/../common"; pwd`
+
+bash ${common_folder}/undeploy.sh
+
+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/aaa8a0f4/samples/applications/nested/complex-app-with-lb/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/scripts/mock/deploy.sh b/samples/applications/nested/complex-app-with-lb/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/scripts/mock/deploy.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+iaas="mock"
+
+prgdir=`dirname "$0"`
+script_path=`cd "$prgdir"; pwd`
+common_folder=`cd "${script_path}/../common"; pwd`
+
+bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/complex-app-with-lb/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/scripts/mock/undeploy.sh b/samples/applications/nested/complex-app-with-lb/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/scripts/mock/undeploy.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+prgdir=`dirname "$0"`
+script_path=`cd "$prgdir"; pwd`
+common_folder=`cd "${script_path}/../common"; pwd`
+
+bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/complex-app-with-lb/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/scripts/openstack/deploy.sh b/samples/applications/nested/complex-app-with-lb/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/scripts/openstack/deploy.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+iaas="openstack"
+
+prgdir=`dirname "$0"`
+script_path=`cd "$prgdir"; pwd`
+common_folder=`cd "${script_path}/../common"; pwd`
+
+bash ${common_folder}/deploy.sh ${iaas}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/complex-app-with-lb/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/complex-app-with-lb/scripts/openstack/undeploy.sh b/samples/applications/nested/complex-app-with-lb/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/complex-app-with-lb/scripts/openstack/undeploy.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+prgdir=`dirname "$0"`
+script_path=`cd "$prgdir"; pwd`
+common_folder=`cd "${script_path}/../common"; pwd`
+
+bash ${common_folder}/undeploy.sh
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/README.md b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/README.md
new file mode 100644
index 0000000..af2349a
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/README.md
@@ -0,0 +1,23 @@
+Wordpress Extended V2 Application
+=================================
+Wordpress extended v2 application consists of a cartridge group which includes a MySQL cartridge and PHP cartridge and
+a Tomcat cartridge at the top level. The cartridge group defines a startup dependency to first start MySQL cluster and
+then the PHP cluster once the MySQL cluster is active. Group scaling has been enabled in MySQL, PHP group and the
+maximum number of group instances has been set to two. The application has defined a startup dependency to first start
+the MySQL, PHP group clusters and then the Tomcat cluster.
+
+
+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/aaa8a0f4/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/artifacts/application.json b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/artifacts/application.json
new file mode 100644
index 0000000..da8e512
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/artifacts/application.json
@@ -0,0 +1,141 @@
+{
+ "applicationId": "esb-php-nested-with-esb-php-nested-with-mysql-php-app",
+ "alias": "my-esb-php-nested-with-esb-php-nested-with-mysql-php-app",
+ "components": {
+ "groups": [
+ {
+ "name": "esb-php-nested-with-esb-php-nested-with-mysql-php",
+ "alias": "my-esb-php-nested-with-esb-php-nested-with-mysql-php",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 2,
+ "groups": [
+ {
+ "name": "esb-php-nested-with-mysql-php",
+ "alias": "my-esb-php-nested-with-mysql-php",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 2,
+ "groups": [
+ {
+ "name": "mysql-php",
+ "alias": "my-mysql-php",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 2,
+ "cartridges": [
+ {
+ "type": "mysql",
+ "cartridgeMin": 2,
+ "cartridgeMax": 5,
+ "subscribableInfo": {
+ "alias": "my-mysql-php-mysql",
+ "deploymentPolicy":"deployment-policy-1",
+ "autoscalingPolicy": "autoscaling-policy-1"
+ }
+ },
+ {
+ "type": "php",
+ "cartridgeMin": 2,
+ "cartridgeMax": 5,
+ "subscribableInfo": {
+ "alias": "my-mysql-php-php",
+ "deploymentPolicy":"deployment-policy-1",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cartridges": [
+ {
+ "type": "esb",
+ "cartridgeMin": 2,
+ "cartridgeMax": 5,
+ "subscribableInfo": {
+ "alias": "my-esb-php-nested-with-mysql-php-esb",
+ "deploymentPolicy":"deployment-policy-1",
+ "autoscalingPolicy": "autoscaling-policy-1"
+ }
+ },
+ {
+ "type": "php",
+ "cartridgeMin": 2,
+ "cartridgeMax": 5,
+ "subscribableInfo": {
+ "alias": "my-esb-php-nested-with-mysql-php-php",
+ "deploymentPolicy":"deployment-policy-1",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cartridges": [
+ {
+ "type": "esb",
+ "cartridgeMin": 2,
+ "cartridgeMax": 5,
+ "subscribableInfo": {
+ "alias": "my-esb-php-nested-with-esb-php-nested-with-mysql-php-esb",
+ "deploymentPolicy":"deployment-policy-1",
+ "autoscalingPolicy": "autoscaling-policy-1"
+ }
+ },
+ {
+ "type": "php",
+ "cartridgeMin": 2,
+ "cartridgeMax": 5,
+ "subscribableInfo": {
+ "alias": "my-esb-php-nested-with-esb-php-nested-with-mysql-php-php",
+ "deploymentPolicy":"deployment-policy-1",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cartridges" : [
+ {
+ "type": "esb",
+ "cartridgeMin": 2,
+ "cartridgeMax": 5,
+ "subscribableInfo": {
+ "alias": "my-esb",
+ "deploymentPolicy":"deployment-policy-1",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git"
+ }
+ }
+ }
+ ],
+ "cartridges" : [
+ {
+ "type": "php",
+ "cartridgeMin": 2,
+ "cartridgeMax": 5,
+ "subscribableInfo": {
+ "alias": "my-php",
+ "deploymentPolicy":"deployment-policy-1",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git"
+ }
+ }
+ }
+ ]
+ }
+}
+