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:23 UTC
[01/10] stratos git commit: refining the application samples hierarchy
Repository: stratos
Updated Branches:
refs/heads/master 3ae231b66 -> 49cac9ba9
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/wordpress-extended-v1/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/artifacts/application.json b/samples/applications/wordpress-extended-v1/artifacts/application.json
deleted file mode 100644
index 9c9d937..0000000
--- a/samples/applications/wordpress-extended-v1/artifacts/application.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "applicationId": "wordpress-extended",
- "alias": "wordpress",
- "components": {
- "groups": [
- {
- "name": "mysql-php-group",
- "alias": "my-mysql-php-group",
- "groupMinInstances": 1,
- "groupMaxInstances": 1,
- "deploymentPolicy":"deployment-policy-1",
- "cartridges": [
- {
- "type": "mysql",
- "cartridgeMin": 2,
- "cartridgeMax": 5,
- "subscribableInfo": {
- "alias": "my-mysql",
- "autoscalingPolicy": "autoscaling-policy-1"
- }
- },
- {
- "type": "php",
- "cartridgeMin": 2,
- "cartridgeMax": 5,
- "subscribableInfo": {
- "alias": "my-php",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-php-applications.git"
- }
- }
- }
- ]
- }
- ],
- "cartridges" : [
- {
- "type": "tomcat",
- "cartridgeMin": 2,
- "cartridgeMax": 5,
- "subscribableInfo": {
- "alias": "my-tomcat",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git"
- }
- }
- }
- ],
- "dependencies": {
- "startupOrders": [
- "group.my-mysql-php-group,cartridge.my-tomcat"
- ],
- "terminationBehaviour": "terminate-none"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/wordpress-extended-v1/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/scripts/common/deploy.sh b/samples/applications/wordpress-extended-v1/scripts/common/deploy.sh
deleted file mode 100755
index 6e0822a..0000000
--- a/samples/applications/wordpress-extended-v1/scripts/common/deploy.sh
+++ /dev/null
@@ -1,63 +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 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 mysql-php-group group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/mysql-php-group.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/wordpress-extended/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/wordpress-extended-v1/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/scripts/common/undeploy.sh b/samples/applications/wordpress-extended-v1/scripts/common/undeploy.sh
deleted file mode 100644
index f2078ce..0000000
--- a/samples/applications/wordpress-extended-v1/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/wordpress-extended/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/wordpress-extended
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/mysql-php-group
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/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/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/wordpress-extended-v1/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/scripts/ec2/deploy.sh b/samples/applications/wordpress-extended-v1/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/wordpress-extended-v1/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/wordpress-extended-v1/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/scripts/ec2/undeploy.sh b/samples/applications/wordpress-extended-v1/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/wordpress-extended-v1/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/wordpress-extended-v1/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/scripts/kubernetes/deploy.sh b/samples/applications/wordpress-extended-v1/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 0d614cc..0000000
--- a/samples/applications/wordpress-extended-v1/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/wordpress-extended-v1/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/scripts/kubernetes/undeploy.sh b/samples/applications/wordpress-extended-v1/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/wordpress-extended-v1/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/wordpress-extended-v1/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/scripts/mock/deploy.sh b/samples/applications/wordpress-extended-v1/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/wordpress-extended-v1/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/wordpress-extended-v1/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/scripts/mock/undeploy.sh b/samples/applications/wordpress-extended-v1/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/wordpress-extended-v1/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/wordpress-extended-v1/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/scripts/openstack/deploy.sh b/samples/applications/wordpress-extended-v1/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/wordpress-extended-v1/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/wordpress-extended-v1/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/scripts/openstack/undeploy.sh b/samples/applications/wordpress-extended-v1/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/wordpress-extended-v1/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/wordpress-extended-v2/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/README.md b/samples/applications/wordpress-extended-v2/README.md
deleted file mode 100644
index af2349a..0000000
--- a/samples/applications/wordpress-extended-v2/README.md
+++ /dev/null
@@ -1,23 +0,0 @@
-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/wordpress-extended-v2/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/artifacts/application.json b/samples/applications/wordpress-extended-v2/artifacts/application.json
deleted file mode 100644
index e5b1ae7..0000000
--- a/samples/applications/wordpress-extended-v2/artifacts/application.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "applicationId": "wordpress-extended",
- "alias": "my-wordpress",
- "components": {
- "groups": [
- {
- "name": "mysql-php-group",
- "alias": "my-mysql-php-group",
- "groupMinInstances": 2,
- "groupMaxInstances": 2,
- "cartridges": [
- {
- "type": "mysql",
- "cartridgeMin": 2,
- "cartridgeMax": 5,
- "subscribableInfo": {
- "alias": "my-mysql",
- "deploymentPolicy":"deployment-policy-1",
- "autoscalingPolicy": "autoscaling-policy-1"
- }
- },
- {
- "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-php-applications.git"
- }
- }
- }
- ]
- }
- ],
- "cartridges" : [
- {
- "type": "tomcat",
- "cartridgeMin": 2,
- "cartridgeMax": 5,
- "subscribableInfo": {
- "alias": "my-tomcat",
- "deploymentPolicy":"deployment-policy-1",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git"
- }
- }
- }
- ],
- "dependencies": {
- "startupOrders": [
- "group.my-mysql-php-group,cartridge.my-tomcat"
- ],
- "terminationBehaviour": "terminate-none"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/wordpress-extended-v2/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/common/deploy.sh b/samples/applications/wordpress-extended-v2/scripts/common/deploy.sh
deleted file mode 100755
index 6e0822a..0000000
--- a/samples/applications/wordpress-extended-v2/scripts/common/deploy.sh
+++ /dev/null
@@ -1,63 +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 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 mysql-php-group group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/mysql-php-group.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/wordpress-extended/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/wordpress-extended-v2/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/common/undeploy.sh b/samples/applications/wordpress-extended-v2/scripts/common/undeploy.sh
deleted file mode 100644
index f2078ce..0000000
--- a/samples/applications/wordpress-extended-v2/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/wordpress-extended/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/wordpress-extended
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/mysql-php-group
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/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/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/wordpress-extended-v2/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/ec2/deploy.sh b/samples/applications/wordpress-extended-v2/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/wordpress-extended-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/wordpress-extended-v2/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/ec2/undeploy.sh b/samples/applications/wordpress-extended-v2/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/wordpress-extended-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/wordpress-extended-v2/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/kubernetes/deploy.sh b/samples/applications/wordpress-extended-v2/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 0d614cc..0000000
--- a/samples/applications/wordpress-extended-v2/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/wordpress-extended-v2/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/kubernetes/undeploy.sh b/samples/applications/wordpress-extended-v2/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/wordpress-extended-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/wordpress-extended-v2/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/mock/deploy.sh b/samples/applications/wordpress-extended-v2/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/wordpress-extended-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/wordpress-extended-v2/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/mock/undeploy.sh b/samples/applications/wordpress-extended-v2/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/wordpress-extended-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/wordpress-extended-v2/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/openstack/deploy.sh b/samples/applications/wordpress-extended-v2/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/wordpress-extended-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/wordpress-extended-v2/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v2/scripts/openstack/undeploy.sh b/samples/applications/wordpress-extended-v2/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/wordpress-extended-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/wordpress/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/README.md b/samples/applications/wordpress/README.md
deleted file mode 100644
index 9b61ca1..0000000
--- a/samples/applications/wordpress/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-Wordpress Application
-=====================
-Wordpress application consists of a cartridge group which includes a MySQL cartridge and PHP cartridge. The cartridge
-group defines a startup dependency to first start MySQL cluster and then the PHP cluster second once the MySQL cluster
-is active. Group scaling has been disabled in MySQL, PHP 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/wordpress/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/artifacts/application.json b/samples/applications/wordpress/artifacts/application.json
deleted file mode 100644
index 4220fe2..0000000
--- a/samples/applications/wordpress/artifacts/application.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "applicationId": "wordpress",
- "alias": "wordpress",
- "components": {
- "groups": [
- {
- "name": "mysql-php-group",
- "alias": "mysql-php-group",
- "groupMinInstances": 1,
- "groupMaxInstances": 1,
- "cartridges": [
- {
- "type": "mysql",
- "cartridgeMin": 2,
- "cartridgeMax": 5,
- "subscribableInfo": {
- "alias": "my-mysql",
- "deploymentPolicy":"deployment-policy-2",
- "autoscalingPolicy": "autoscaling-policy-1"
- }
- },
- {
- "type": "php",
- "cartridgeMin": 2,
- "cartridgeMax": 5,
- "subscribableInfo": {
- "alias": "my-php",
- "deploymentPolicy":"deployment-policy-2",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-php-applications.git"
- }
- }
- }
- ]
- }
- ]
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/wordpress/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/scripts/common/deploy.sh b/samples/applications/wordpress/scripts/common/deploy.sh
deleted file mode 100755
index 731273f..0000000
--- a/samples/applications/wordpress/scripts/common/deploy.sh
+++ /dev/null
@@ -1,60 +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-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
-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 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 mysql-php-group group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/mysql-php-group.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/wordpress/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/wordpress/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/scripts/common/undeploy.sh b/samples/applications/wordpress/scripts/common/undeploy.sh
deleted file mode 100644
index 7969cca..0000000
--- a/samples/applications/wordpress/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,35 +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/wordpress/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/wordpress
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/mysql-php-group
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/php
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/mysql
-
-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
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies/deployment-policy-2
-
-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/wordpress/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/scripts/ec2/deploy.sh b/samples/applications/wordpress/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/wordpress/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/wordpress/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/scripts/ec2/undeploy.sh b/samples/applications/wordpress/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/wordpress/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/wordpress/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/scripts/kubernetes/deploy.sh b/samples/applications/wordpress/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 0d614cc..0000000
--- a/samples/applications/wordpress/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/wordpress/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/scripts/kubernetes/undeploy.sh b/samples/applications/wordpress/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/wordpress/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/wordpress/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/scripts/mock/deploy.sh b/samples/applications/wordpress/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/wordpress/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/wordpress/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/scripts/mock/undeploy.sh b/samples/applications/wordpress/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/wordpress/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/wordpress/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/scripts/openstack/deploy.sh b/samples/applications/wordpress/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/wordpress/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/wordpress/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/scripts/openstack/undeploy.sh b/samples/applications/wordpress/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/wordpress/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
[03/10] stratos git commit: refining the application samples hierarchy
Posted by is...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/kubernetes/undeploy.sh b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/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/scaling/group-scaling/group-scaling-v1/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/mock/deploy.sh b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/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/scaling/group-scaling/group-scaling-v1/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/mock/undeploy.sh b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/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/scaling/group-scaling/group-scaling-v1/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/openstack/deploy.sh b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/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/scaling/group-scaling/group-scaling-v1/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/openstack/undeploy.sh b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/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/scaling/group-scaling/single-group-group-scaling/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/README.md b/samples/applications/scaling/group-scaling/single-group-group-scaling/README.md
new file mode 100644
index 0000000..7ba069c
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/README.md
@@ -0,0 +1,13 @@
+single-group-group-scaling
+==========================
+
+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/scaling/group-scaling/single-group-group-scaling/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/artifacts/application.json b/samples/applications/scaling/group-scaling/single-group-group-scaling/artifacts/application.json
new file mode 100644
index 0000000..08c7ede
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/artifacts/application.json
@@ -0,0 +1,33 @@
+{
+ "applicationId": "single-group-group-scaling",
+ "alias": "my-single-group-group-scaling",
+ "components": {
+ "groups": [
+ {
+ "name": "group6",
+ "alias": "my-group6",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 3,
+ "deploymentPolicy":"deployment-policy-1",
+ "cartridges": [
+ {
+ "type": "tomcat",
+ "cartridgeMin": 1,
+ "cartridgeMax": 4,
+ "subscribableInfo": {
+ "alias": "my-tomcat",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/common/deploy.sh b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/common/deploy.sh
new file mode 100755
index 0000000..b55e113
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/common/deploy.sh
@@ -0,0 +1,55 @@
+#!/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 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 group6c4 group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c4.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/single-group-group-scaling/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/common/undeploy.sh b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/common/undeploy.sh
new file mode 100644
index 0000000..7060ee1
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/common/undeploy.sh
@@ -0,0 +1,28 @@
+#!/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/single-group-group-scaling/undeploy
+
+sleep 10
+
+echo "Deleting application..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-group-scaling
+
+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
+
+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/scaling/group-scaling/single-group-group-scaling/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/ec2/deploy.sh b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/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/scaling/group-scaling/single-group-group-scaling/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/ec2/undeploy.sh b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/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/scaling/group-scaling/single-group-group-scaling/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/kubernetes/deploy.sh b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..32eff3c
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/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/scaling/group-scaling/single-group-group-scaling/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/kubernetes/undeploy.sh b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/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/scaling/group-scaling/single-group-group-scaling/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/mock/deploy.sh b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/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/scaling/group-scaling/single-group-group-scaling/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/mock/undeploy.sh b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/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/scaling/group-scaling/single-group-group-scaling/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/openstack/deploy.sh b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/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/scaling/group-scaling/single-group-group-scaling/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/openstack/undeploy.sh b/samples/applications/scaling/group-scaling/single-group-group-scaling/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/single-group-group-scaling/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/simple/single-cartridge-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/README.md b/samples/applications/simple/single-cartridge-app/README.md
new file mode 100644
index 0000000..4c13b2c
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/README.md
@@ -0,0 +1,8 @@
+single_cartridge
+================
+i) In this artifact sample you can find we have listed them as mock and openstack.
+
+ii) In this sample artifact, it deployes simple application with a php cartridge and start it.
+
+iii) You can choose the IaaS and navigate to it and simply run the single_cartridge.sh file. It'll deploy the relevant artifacts and start the application.
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/artifacts/application-signup.json
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/artifacts/application-signup.json b/samples/applications/simple/single-cartridge-app/artifacts/application-signup.json
new file mode 100644
index 0000000..138648e
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/artifacts/application-signup.json
@@ -0,0 +1,18 @@
+{
+ "artifactRepositories":[
+ {
+ "alias":"php",
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ },
+ {
+ "alias":"tomcat",
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/artifacts/application.json b/samples/applications/simple/single-cartridge-app/artifacts/application.json
new file mode 100644
index 0000000..6e66fe3
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/artifacts/application.json
@@ -0,0 +1,25 @@
+{
+ "applicationId": "single-cartridge-app",
+ "alias": "single-cartridge-app",
+ "multiTenant": false,
+ "components": {
+ "cartridges": [
+ {
+ "type": "php",
+ "cartridgeMin": 1,
+ "cartridgeMax": 10,
+ "subscribableInfo": {
+ "alias": "my-php",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy": "deployment-policy-1",
+ "artifactRepository": {
+ "privateRepo": false,
+ "repoUrl": "https://github.com/imesh/stratos-php-applications.git",
+ "repoUsername": "",
+ "repoPassword": ""
+ }
+ }
+ }
+ ]
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/artifacts/domain-mappings.json
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/artifacts/domain-mappings.json b/samples/applications/simple/single-cartridge-app/artifacts/domain-mappings.json
new file mode 100644
index 0000000..78e6008
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/artifacts/domain-mappings.json
@@ -0,0 +1,9 @@
+{
+ "domainMappings": [
+ {
+ "cartridgeAlias":"my-php",
+ "domainName":"abc.com",
+ "contextPath":"/abc/app"
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/scripts/common/add-domain-mappings.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/common/add-domain-mappings.sh b/samples/applications/simple/single-cartridge-app/scripts/common/add-domain-mappings.sh
new file mode 100755
index 0000000..74c6ed7
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/scripts/common/add-domain-mappings.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+export host_ip="localhost"
+export artifacts_path="../../artifacts"
+
+pushd ${artifacts_path}
+echo "Adding domain mappings..."
+curl -X POST -H "Content-Type: application/json" -d @'domain-mappings.json' -k -u admin:admin https://${host_ip}:9443/api/applications/single-cartridge-app/domainMappings
+popd
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/scripts/common/add-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/common/add-network-partition.sh b/samples/applications/simple/single-cartridge-app/scripts/common/add-network-partition.sh
new file mode 100644
index 0000000..56c7c6c
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/scripts/common/add-network-partition.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+export host_ip="localhost"
+export artifacts_path="../../artifacts"
+
+pushd ${artifacts_path}
+echo "Adding network partition..."
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/network-partition.json" -k -v -u admin:admin https://${host_ip}:9443/api/networkPartitions
+popd
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/common/deploy.sh b/samples/applications/simple/single-cartridge-app/scripts/common/deploy.sh
new file mode 100755
index 0000000..a94c525
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/scripts/common/deploy.sh
@@ -0,0 +1,49 @@
+#!/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_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 php cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${iaas_cartridges_path}/php.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 "Adding 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/single-cartridge-app/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/scripts/common/get-application-runtime.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/common/get-application-runtime.sh b/samples/applications/simple/single-cartridge-app/scripts/common/get-application-runtime.sh
new file mode 100755
index 0000000..ed80688
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/scripts/common/get-application-runtime.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+iaas=$1
+host_ip="localhost"
+host_port=9443
+
+set -e
+
+echo "Getting application runtime..."
+curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-cartridge-app/runtime
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/scripts/common/list-domain-mappings.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/common/list-domain-mappings.sh b/samples/applications/simple/single-cartridge-app/scripts/common/list-domain-mappings.sh
new file mode 100755
index 0000000..0b49f6f
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/scripts/common/list-domain-mappings.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+echo "Listing domain mappings..."
+curl -X GET -H "Content-Type: application/json" -k -u admin:admin https://localhost:9443/api/applications/single-cartridge-app/domainMappings
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/scripts/common/list-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/common/list-network-partition.sh b/samples/applications/simple/single-cartridge-app/scripts/common/list-network-partition.sh
new file mode 100755
index 0000000..6e3812d
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/scripts/common/list-network-partition.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+echo "Listing network partitions..."
+curl -X GET -H "Content-Type: application/json" -k -u admin:admin https://localhost:9443/api/networkPartitions
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/common/undeploy.sh b/samples/applications/simple/single-cartridge-app/scripts/common/undeploy.sh
new file mode 100644
index 0000000..b0174b8
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/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/single-cartridge-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/single-cartridge-app
+
+echo "Removing cartridges..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/php
+
+echo "Removing autoscale policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
+
+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/simple/single-cartridge-app/scripts/common/update-deployment-policy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/common/update-deployment-policy.sh b/samples/applications/simple/single-cartridge-app/scripts/common/update-deployment-policy.sh
new file mode 100755
index 0000000..d28fb40
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/scripts/common/update-deployment-policy.sh
@@ -0,0 +1,12 @@
+#!/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-1.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/simple/single-cartridge-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/ec2/deploy.sh b/samples/applications/simple/single-cartridge-app/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/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/simple/single-cartridge-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/ec2/undeploy.sh b/samples/applications/simple/single-cartridge-app/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/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/simple/single-cartridge-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/kubernetes/deploy.sh b/samples/applications/simple/single-cartridge-app/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..eab754c
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/scripts/kubernetes/deploy.sh
@@ -0,0 +1,16 @@
+#!/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`
+kubernetes_clusters_path=`cd "${script_path}/../../../../../kubernetes-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}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-cartridge-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/kubernetes/undeploy.sh b/samples/applications/simple/single-cartridge-app/scripts/kubernetes/undeploy.sh
new file mode 100755
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/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/simple/single-cartridge-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/mock/deploy.sh b/samples/applications/simple/single-cartridge-app/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/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/simple/single-cartridge-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/mock/undeploy.sh b/samples/applications/simple/single-cartridge-app/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/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/simple/single-cartridge-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/openstack/deploy.sh b/samples/applications/simple/single-cartridge-app/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/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/simple/single-cartridge-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/scripts/openstack/undeploy.sh b/samples/applications/simple/single-cartridge-app/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/simple/single-cartridge-app/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/simple/single-group-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/README.md b/samples/applications/simple/single-group-app/README.md
new file mode 100644
index 0000000..294a1a2
--- /dev/null
+++ b/samples/applications/simple/single-group-app/README.md
@@ -0,0 +1,15 @@
+single_group_v1
+==============
+
+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/simple/single-group-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/artifacts/application.json b/samples/applications/simple/single-group-app/artifacts/application.json
new file mode 100644
index 0000000..a66f8f0
--- /dev/null
+++ b/samples/applications/simple/single-group-app/artifacts/application.json
@@ -0,0 +1,72 @@
+
+{
+ "applicationId": "cartridge-group-app",
+ "alias": "my-cartridge-group-app",
+ "components": {
+ "groups": [
+ {
+ "name": "esb-php-group",
+ "alias": "my-esb-php-group",
+ "deploymentPolicy":"deployment-policy-1",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 2,
+ "cartridges": [
+ {
+ "type": "esb",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-esb",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-esb-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ },
+ {
+ "type": "php",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-php",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cartridges": [
+ {
+ "type": "tomcat",
+ "cartridgeMin": 2,
+ "cartridgeMax": 4,
+ "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": {
+ "terminationBehaviour": "terminate-none"
+ }
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-group-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/scripts/common/deploy.sh b/samples/applications/simple/single-group-app/scripts/common/deploy.sh
new file mode 100755
index 0000000..10bf6b3
--- /dev/null
+++ b/samples/applications/simple/single-group-app/scripts/common/deploy.sh
@@ -0,0 +1,62 @@
+#!/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 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 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 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-php-group group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/esb-php-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
+
+sleep 1
+
+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/cartridge-group-app/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/simple/single-group-app/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/scripts/common/undeploy.sh b/samples/applications/simple/single-group-app/scripts/common/undeploy.sh
new file mode 100644
index 0000000..b97b398
--- /dev/null
+++ b/samples/applications/simple/single-group-app/scripts/common/undeploy.sh
@@ -0,0 +1,37 @@
+#!/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/cartridge-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/cartridge-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/esb-php-group
+
+echo "Removing cartridges..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat
+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/php
+
+echo "Removing autoscale policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
+
+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/simple/single-group-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/scripts/ec2/deploy.sh b/samples/applications/simple/single-group-app/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/simple/single-group-app/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/simple/single-group-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/scripts/ec2/undeploy.sh b/samples/applications/simple/single-group-app/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/simple/single-group-app/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/simple/single-group-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/scripts/kubernetes/deploy.sh b/samples/applications/simple/single-group-app/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..c8f11f7
--- /dev/null
+++ b/samples/applications/simple/single-group-app/scripts/kubernetes/deploy.sh
@@ -0,0 +1,16 @@
+#!/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/simple/single-group-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/scripts/kubernetes/undeploy.sh b/samples/applications/simple/single-group-app/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/simple/single-group-app/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/simple/single-group-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/scripts/mock/deploy.sh b/samples/applications/simple/single-group-app/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/simple/single-group-app/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/simple/single-group-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/scripts/mock/undeploy.sh b/samples/applications/simple/single-group-app/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/simple/single-group-app/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/simple/single-group-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/scripts/openstack/deploy.sh b/samples/applications/simple/single-group-app/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/simple/single-group-app/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/simple/single-group-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-group-app/scripts/openstack/undeploy.sh b/samples/applications/simple/single-group-app/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/simple/single-group-app/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/single-cartridge/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/README.md b/samples/applications/single-cartridge/README.md
deleted file mode 100644
index 4c13b2c..0000000
--- a/samples/applications/single-cartridge/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-single_cartridge
-================
-i) In this artifact sample you can find we have listed them as mock and openstack.
-
-ii) In this sample artifact, it deployes simple application with a php cartridge and start it.
-
-iii) You can choose the IaaS and navigate to it and simply run the single_cartridge.sh file. It'll deploy the relevant artifacts and start the application.
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/artifacts/application-signup.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/artifacts/application-signup.json b/samples/applications/single-cartridge/artifacts/application-signup.json
deleted file mode 100644
index 138648e..0000000
--- a/samples/applications/single-cartridge/artifacts/application-signup.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "artifactRepositories":[
- {
- "alias":"php",
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
- "repoUsername":"",
- "repoPassword":""
- },
- {
- "alias":"tomcat",
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- ]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/artifacts/application.json b/samples/applications/single-cartridge/artifacts/application.json
deleted file mode 100644
index 6e66fe3..0000000
--- a/samples/applications/single-cartridge/artifacts/application.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "applicationId": "single-cartridge-app",
- "alias": "single-cartridge-app",
- "multiTenant": false,
- "components": {
- "cartridges": [
- {
- "type": "php",
- "cartridgeMin": 1,
- "cartridgeMax": 10,
- "subscribableInfo": {
- "alias": "my-php",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy": "deployment-policy-1",
- "artifactRepository": {
- "privateRepo": false,
- "repoUrl": "https://github.com/imesh/stratos-php-applications.git",
- "repoUsername": "",
- "repoPassword": ""
- }
- }
- }
- ]
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/artifacts/domain-mappings.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/artifacts/domain-mappings.json b/samples/applications/single-cartridge/artifacts/domain-mappings.json
deleted file mode 100644
index 78e6008..0000000
--- a/samples/applications/single-cartridge/artifacts/domain-mappings.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "domainMappings": [
- {
- "cartridgeAlias":"my-php",
- "domainName":"abc.com",
- "contextPath":"/abc/app"
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/scripts/common/add-domain-mappings.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/common/add-domain-mappings.sh b/samples/applications/single-cartridge/scripts/common/add-domain-mappings.sh
deleted file mode 100755
index 74c6ed7..0000000
--- a/samples/applications/single-cartridge/scripts/common/add-domain-mappings.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-export host_ip="localhost"
-export artifacts_path="../../artifacts"
-
-pushd ${artifacts_path}
-echo "Adding domain mappings..."
-curl -X POST -H "Content-Type: application/json" -d @'domain-mappings.json' -k -u admin:admin https://${host_ip}:9443/api/applications/single-cartridge-app/domainMappings
-popd
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/scripts/common/add-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/common/add-network-partition.sh b/samples/applications/single-cartridge/scripts/common/add-network-partition.sh
deleted file mode 100644
index 56c7c6c..0000000
--- a/samples/applications/single-cartridge/scripts/common/add-network-partition.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-export host_ip="localhost"
-export artifacts_path="../../artifacts"
-
-pushd ${artifacts_path}
-echo "Adding network partition..."
-curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/network-partition.json" -k -v -u admin:admin https://${host_ip}:9443/api/networkPartitions
-popd
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/common/deploy.sh b/samples/applications/single-cartridge/scripts/common/deploy.sh
deleted file mode 100755
index a32d462..0000000
--- a/samples/applications/single-cartridge/scripts/common/deploy.sh
+++ /dev/null
@@ -1,49 +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_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 php cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${iaas_cartridges_path}/php.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 "Adding 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/single-cartridge-app/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/scripts/common/get-application-runtime.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/common/get-application-runtime.sh b/samples/applications/single-cartridge/scripts/common/get-application-runtime.sh
deleted file mode 100755
index ed80688..0000000
--- a/samples/applications/single-cartridge/scripts/common/get-application-runtime.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-iaas=$1
-host_ip="localhost"
-host_port=9443
-
-set -e
-
-echo "Getting application runtime..."
-curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-cartridge-app/runtime
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/scripts/common/list-domain-mappings.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/common/list-domain-mappings.sh b/samples/applications/single-cartridge/scripts/common/list-domain-mappings.sh
deleted file mode 100755
index 0b49f6f..0000000
--- a/samples/applications/single-cartridge/scripts/common/list-domain-mappings.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-echo "Listing domain mappings..."
-curl -X GET -H "Content-Type: application/json" -k -u admin:admin https://localhost:9443/api/applications/single-cartridge-app/domainMappings
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/scripts/common/list-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/common/list-network-partition.sh b/samples/applications/single-cartridge/scripts/common/list-network-partition.sh
deleted file mode 100755
index 6e3812d..0000000
--- a/samples/applications/single-cartridge/scripts/common/list-network-partition.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-echo "Listing network partitions..."
-curl -X GET -H "Content-Type: application/json" -k -u admin:admin https://localhost:9443/api/networkPartitions
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/common/undeploy.sh b/samples/applications/single-cartridge/scripts/common/undeploy.sh
deleted file mode 100644
index b0174b8..0000000
--- a/samples/applications/single-cartridge/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,31 +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/single-cartridge-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/single-cartridge-app
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/php
-
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
-
-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/single-cartridge/scripts/common/update-deployment-policy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/common/update-deployment-policy.sh b/samples/applications/single-cartridge/scripts/common/update-deployment-policy.sh
deleted file mode 100755
index f0bd8fb..0000000
--- a/samples/applications/single-cartridge/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-1.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/single-cartridge/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/ec2/deploy.sh b/samples/applications/single-cartridge/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/single-cartridge/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/single-cartridge/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/ec2/undeploy.sh b/samples/applications/single-cartridge/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-cartridge/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/single-cartridge/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/kubernetes/deploy.sh b/samples/applications/single-cartridge/scripts/kubernetes/deploy.sh
deleted file mode 100755
index d6c47c1..0000000
--- a/samples/applications/single-cartridge/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`
-kubernetes_clusters_path=`cd "${script_path}/../../../../kubernetes-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}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-cartridge/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/kubernetes/undeploy.sh b/samples/applications/single-cartridge/scripts/kubernetes/undeploy.sh
deleted file mode 100755
index 0054670..0000000
--- a/samples/applications/single-cartridge/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/single-cartridge/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/mock/deploy.sh b/samples/applications/single-cartridge/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/single-cartridge/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/single-cartridge/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/mock/undeploy.sh b/samples/applications/single-cartridge/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/single-cartridge/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/single-cartridge/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/openstack/deploy.sh b/samples/applications/single-cartridge/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/single-cartridge/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/single-cartridge/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/openstack/undeploy.sh b/samples/applications/single-cartridge/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-cartridge/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/single-group-cartridge/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/README.md b/samples/applications/single-group-cartridge/README.md
deleted file mode 100644
index 294a1a2..0000000
--- a/samples/applications/single-group-cartridge/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-single_group_v1
-==============
-
-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/single-group-cartridge/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/artifacts/application.json b/samples/applications/single-group-cartridge/artifacts/application.json
deleted file mode 100644
index a66f8f0..0000000
--- a/samples/applications/single-group-cartridge/artifacts/application.json
+++ /dev/null
@@ -1,72 +0,0 @@
-
-{
- "applicationId": "cartridge-group-app",
- "alias": "my-cartridge-group-app",
- "components": {
- "groups": [
- {
- "name": "esb-php-group",
- "alias": "my-esb-php-group",
- "deploymentPolicy":"deployment-policy-1",
- "groupMinInstances": 1,
- "groupMaxInstances": 2,
- "cartridges": [
- {
- "type": "esb",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-esb",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-esb-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- },
- {
- "type": "php",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-php",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
- ],
- "cartridges": [
- {
- "type": "tomcat",
- "cartridgeMin": 2,
- "cartridgeMax": 4,
- "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": {
- "terminationBehaviour": "terminate-none"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-cartridge/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/common/deploy.sh b/samples/applications/single-group-cartridge/scripts/common/deploy.sh
deleted file mode 100755
index 9afe1db..0000000
--- a/samples/applications/single-group-cartridge/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 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 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 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 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-php-group group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/esb-php-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
-
-sleep 1
-
-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/cartridge-group-app/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-cartridge/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/common/undeploy.sh b/samples/applications/single-group-cartridge/scripts/common/undeploy.sh
deleted file mode 100644
index b97b398..0000000
--- a/samples/applications/single-group-cartridge/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,37 +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/cartridge-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/cartridge-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/esb-php-group
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat
-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/php
-
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
-
-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/single-group-cartridge/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/ec2/deploy.sh b/samples/applications/single-group-cartridge/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/single-group-cartridge/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/single-group-cartridge/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/ec2/undeploy.sh b/samples/applications/single-group-cartridge/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-group-cartridge/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/single-group-cartridge/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/kubernetes/deploy.sh b/samples/applications/single-group-cartridge/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 0d614cc..0000000
--- a/samples/applications/single-group-cartridge/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/single-group-cartridge/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/kubernetes/undeploy.sh b/samples/applications/single-group-cartridge/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/single-group-cartridge/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/single-group-cartridge/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/mock/deploy.sh b/samples/applications/single-group-cartridge/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/single-group-cartridge/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}
[07/10] stratos git commit: refining the application samples hierarchy
Posted by is...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh
deleted file mode 100755
index f6c2e14..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh
+++ /dev/null
@@ -1,64 +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
-
-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 "Adding esb-php-nested-with-esb-php-nested-with-mysql-php group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/esb-php-nested-with-esb-php-nested-with-mysql-php.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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh
deleted file mode 100644
index 2658130..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,35 +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/esb-php-nested-with-esb-php-nested-with-mysql-php-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/esb-php-nested-with-esb-php-nested-with-mysql-php-app
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/esb-php-nested-with-esb-php-nested-with-mysql-php
-
-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
-
-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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/deploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/undeploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 0d614cc..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/undeploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/deploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/undeploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/deploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/undeploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/group-cartridges/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/README.md b/samples/applications/group-cartridges/README.md
deleted file mode 100644
index 34cfb83..0000000
--- a/samples/applications/group-cartridges/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-single_group_v3
-===============
-
-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/group-cartridges/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/artifacts/application.json b/samples/applications/group-cartridges/artifacts/application.json
deleted file mode 100644
index 8a82371..0000000
--- a/samples/applications/group-cartridges/artifacts/application.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "applicationId": "group-cartridges",
- "alias": "my-group-cartridges",
- "components": {
- "cartridges":[
- {
- "type": "tomcat1",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat1",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-2",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- },
- {
- "type":"mysql",
- "cartridgeMin": 1,
- "cartridgeMax": 10,
- "subscribableInfo":{
- "alias":"my-mysql",
- "autoscalingPolicy":"autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-2",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"",
- "repoUsername":"",
- "repoPassword":""
- }
- }
-
- }
- ],
- "dependencies": {
- "startupOrders": [
- "cartridge.my-mysql,cartridge.my-tomcat1"
- ],
- "terminationBehaviour": "terminate-all"
- }
- }
-}
-
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/scripts/common/deploy.sh b/samples/applications/group-cartridges/scripts/common/deploy.sh
deleted file mode 100755
index 42a482c..0000000
--- a/samples/applications/group-cartridges/scripts/common/deploy.sh
+++ /dev/null
@@ -1,63 +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-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
-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}/mysql.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/group-cartridges/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/scripts/common/undeploy.sh b/samples/applications/group-cartridges/scripts/common/undeploy.sh
deleted file mode 100644
index 2bb13e6..0000000
--- a/samples/applications/group-cartridges/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,38 +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/group-cartridges/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/group-cartridges
-
-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/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
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies/deployment-policy-2
-
-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/group-cartridges/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/scripts/ec2/deploy.sh b/samples/applications/group-cartridges/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/group-cartridges/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/group-cartridges/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/scripts/ec2/undeploy.sh b/samples/applications/group-cartridges/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/group-cartridges/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/group-cartridges/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/scripts/kubernetes/deploy.sh b/samples/applications/group-cartridges/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/group-cartridges/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/group-cartridges/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/scripts/kubernetes/undeploy.sh b/samples/applications/group-cartridges/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/group-cartridges/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/group-cartridges/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/scripts/mock/deploy.sh b/samples/applications/group-cartridges/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/group-cartridges/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/group-cartridges/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/scripts/mock/undeploy.sh b/samples/applications/group-cartridges/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/group-cartridges/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/group-cartridges/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/scripts/openstack/deploy.sh b/samples/applications/group-cartridges/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/group-cartridges/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/group-cartridges/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-cartridges/scripts/openstack/undeploy.sh b/samples/applications/group-cartridges/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/group-cartridges/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/group-scaling-v1/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/README.md b/samples/applications/group-scaling-v1/README.md
deleted file mode 100644
index 7b09b98..0000000
--- a/samples/applications/group-scaling-v1/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-Group Scaling v1
-================
-
-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
-
-How to undeploy
----------------
-cd scripts/<iaas>/
-./undeploy.sh
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/artifacts/application.json b/samples/applications/group-scaling-v1/artifacts/application.json
deleted file mode 100644
index c486e93..0000000
--- a/samples/applications/group-scaling-v1/artifacts/application.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "applicationId": "group-scaling-v1",
- "alias": "my-group-scaling-v1",
- "components": {
- "groups": [
- {
- "name": "group2",
- "alias": "my-group2",
- "groupMinInstances": 1,
- "groupMaxInstances": 2,
- "deploymentPolicy":"deployment-policy-1",
- "cartridges": [
- {
- "type": "c2",
- "cartridgeMin": 2,
- "cartridgeMax": 4,
- "subscribableInfo": {
- "alias": "my-c2",
- "autoscalingPolicy": "autoscaling-policy-c2",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-c2-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- },
- {
- "type": "c3",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-c3",
- "autoscalingPolicy": "autoscaling-policy-c3",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-c3-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
- ]
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/scripts/common/deploy.sh b/samples/applications/group-scaling-v1/scripts/common/deploy.sh
deleted file mode 100644
index 27b732e..0000000
--- a/samples/applications/group-scaling-v1/scripts/common/deploy.sh
+++ /dev/null
@@ -1,58 +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 "Adding autoscaling policy c2..."
-curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
-
-echo "Adding autoscaling policy c3..."
-curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c3.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 c2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-echo "Adding c3 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-echo "Adding group1b group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group1b.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
-
-echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-scaling-v1/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/scripts/common/undeploy.sh b/samples/applications/group-scaling-v1/scripts/common/undeploy.sh
deleted file mode 100644
index cbca5a0..0000000
--- a/samples/applications/group-scaling-v1/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/group-scaling-v1/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/group-scaling-v1
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group2
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c3
-
-echo "Removing autoscaling policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c3
-
-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/group-scaling-v1/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/scripts/ec2/deploy.sh b/samples/applications/group-scaling-v1/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/group-scaling-v1/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/group-scaling-v1/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/scripts/ec2/undeploy.sh b/samples/applications/group-scaling-v1/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/group-scaling-v1/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/group-scaling-v1/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/scripts/kubernetes/deploy.sh b/samples/applications/group-scaling-v1/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/group-scaling-v1/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/group-scaling-v1/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/scripts/kubernetes/undeploy.sh b/samples/applications/group-scaling-v1/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/group-scaling-v1/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/group-scaling-v1/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/scripts/mock/deploy.sh b/samples/applications/group-scaling-v1/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/group-scaling-v1/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/group-scaling-v1/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/scripts/mock/undeploy.sh b/samples/applications/group-scaling-v1/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/group-scaling-v1/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/group-scaling-v1/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/scripts/openstack/deploy.sh b/samples/applications/group-scaling-v1/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/group-scaling-v1/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/group-scaling-v1/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling-v1/scripts/openstack/undeploy.sh b/samples/applications/group-scaling-v1/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/group-scaling-v1/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/group-scaling/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/README.md b/samples/applications/group-scaling/README.md
deleted file mode 100644
index 1443d02..0000000
--- a/samples/applications/group-scaling/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-Group Scaling
-===========
-
-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
-
-How to undeploy
----------------
-cd scripts/<iaas>/
-./undeploy.sh
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/artifacts/application.json b/samples/applications/group-scaling/artifacts/application.json
deleted file mode 100644
index c2b3f3c..0000000
--- a/samples/applications/group-scaling/artifacts/application.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "applicationId": "group-scaling",
- "alias": "my-group-scaling",
- "components": {
- "groups": [
- {
- "name": "group1",
- "alias": "my-group1",
- "groupMinInstances": 1,
- "groupMaxInstances": 1,
- "deploymentPolicy":"deployment-policy-1",
- "groups": [
- {
- "name": "group2",
- "alias": "my-group2",
- "groupMinInstances": 1,
- "groupMaxInstances": 2,
- "cartridges": [
- {
- "type": "c2",
- "cartridgeMin": 2,
- "cartridgeMax": 4,
- "subscribableInfo": {
- "alias": "my-c2-group2",
- "autoscalingPolicy": "autoscaling-policy-c2",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-c2-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- },
- {
- "type": "c3",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-c3-group2",
- "autoscalingPolicy": "autoscaling-policy-c3",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-c3-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
- ],
- "cartridges": [
- {
- "type": "c1",
- "cartridgeMin": 2,
- "cartridgeMax": 4,
- "subscribableInfo": {
- "alias": "my-c1-group1",
- "autoscalingPolicy": "autoscaling-policy-c1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-c1-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
- ],
- "cartridges": [
- {
- "type": "c4",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-c4",
- "autoscalingPolicy": "autoscaling-policy-c4",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-c4-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ],
- "dependencies": {
- "startupOrders": [
- "group.my-group1,cartridge.my-c4"
- ],
- "terminationBehaviour": "terminate-dependents"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/common/deploy.sh b/samples/applications/group-scaling/scripts/common/deploy.sh
deleted file mode 100644
index 992fbf0..0000000
--- a/samples/applications/group-scaling/scripts/common/deploy.sh
+++ /dev/null
@@ -1,72 +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 "Adding autoscaling policy c1..."
-curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
-
-echo "Adding autoscaling policy c2..."
-curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
-
-echo "Adding autoscaling policy c3..."
-curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
-
-echo "Adding autoscaling policy c4..."
-curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c4.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 c1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-echo "Adding c2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-echo "Adding c3 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-echo "Adding c4 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c4.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-echo "Adding group1 group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
-
-sleep 1
-
-echo "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/group-scaling/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/common/undeploy.sh b/samples/applications/group-scaling/scripts/common/undeploy.sh
deleted file mode 100644
index 599e6d7..0000000
--- a/samples/applications/group-scaling/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,33 +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/group-scaling/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/group-scaling
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group1
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c4
-
-echo "Removing autoscaling policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c1
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c2
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c4
-
-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/group-scaling/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/ec2/deploy.sh b/samples/applications/group-scaling/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/group-scaling/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/group-scaling/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/ec2/undeploy.sh b/samples/applications/group-scaling/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/group-scaling/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/group-scaling/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/kubernetes/deploy.sh b/samples/applications/group-scaling/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/group-scaling/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/group-scaling/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/kubernetes/undeploy.sh b/samples/applications/group-scaling/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/group-scaling/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/group-scaling/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/mock/deploy.sh b/samples/applications/group-scaling/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/group-scaling/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/group-scaling/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/mock/undeploy.sh b/samples/applications/group-scaling/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/group-scaling/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/group-scaling/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/openstack/deploy.sh b/samples/applications/group-scaling/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/group-scaling/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/group-scaling/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/group-scaling/scripts/openstack/undeploy.sh b/samples/applications/group-scaling/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/group-scaling/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/more-complex-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/more-complex-app/README.md b/samples/applications/more-complex-app/README.md
deleted file mode 100644
index 4e3bc4d..0000000
--- a/samples/applications/more-complex-app/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-more-complex-app
-================
-
-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/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
deleted file mode 100644
index 3112bb1..0000000
--- a/samples/applications/more-complex-app/artifacts/application.json
+++ /dev/null
@@ -1,202 +0,0 @@
-{
- "applicationId": "more-complex-app",
- "alias": "my-more-complex-app",
- "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":""
- }
- }
-
- },
- {
- "type": "tomcat2",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat2-group7",
- "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",
- "cartridges": [
- {
- "type": "tomcat1",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat1-group8",
- "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",
- "deploymentPolicy":"deployment-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": "tomcat1",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat1-group8",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- },
- {
- "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": "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":""
- }
- }
- },
- {
- "type": "tomcat1",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat1",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ],
- "dependencies": {
- "startupOrders": [
- "group.my-group6,cartridge.my-tomcat,cartridge.my-tomcat1,group.my-group8"
- ],
- "terminationBehaviour": "terminate-all"
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/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
deleted file mode 100755
index 2dc7958..0000000
--- a/samples/applications/more-complex-app/scripts/common/deploy.sh
+++ /dev/null
@@ -1,64 +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
-
-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 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 "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/more-complex-app/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/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
deleted file mode 100644
index 7c45c57..0000000
--- a/samples/applications/more-complex-app/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,31 +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/more-complex-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/more-complex-app
-
-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/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/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
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/more-complex-app/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/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
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/more-complex-app/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/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
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/more-complex-app/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/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
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/more-complex-app/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/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
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/more-complex-app/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/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
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/more-complex-app/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/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
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/more-complex-app/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/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
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/more-complex-app/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
[08/10] stratos git commit: refining the application samples hierarchy
Posted by is...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/artifacts/application.json b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/artifacts/application.json
new file mode 100644
index 0000000..10f8c83
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/artifacts/application.json
@@ -0,0 +1,121 @@
+{
+ "alias": "mycompositeapp",
+ "applicationId": "my-compositeapp",
+ "components": {
+ "groups": [
+ {
+ "name": "app-group",
+ "alias": "my-appgroup",
+ "cartridges": [
+ {
+ "type": "tomcat",
+ "cartridgeMax": 2,
+ "cartridgeMin": 1,
+ "subscribableInfo": {
+ "alias": "my-tomcat",
+ "artifactRepository": {
+ "alias": "my-tomcat",
+ "privateRepo": true,
+ "repoPassword": "password",
+ "repoUrl": "http://xxx:10080/git/default.git",
+ "repoUsername": "user"
+ },
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy": "deployment-policy-2"
+ }
+ },
+ {
+ "type": "php",
+ "cartridgeMax": 2,
+ "cartridgeMin": 1,
+ "subscribableInfo": {
+ "alias": "my-php",
+ "artifactRepository": {
+
+ "privateRepo": true,
+ "repoPassword": "password",
+ "repoUrl": "http://xxx:10080/git/default.git",
+ "repoUsername": "user"
+ },
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy": "deployment-policy-2"
+ }
+ }
+ ],
+ "groupMaxInstances": 2,
+ "groupMinInstances": 1,
+ "groupScalingEnabled": true
+ },
+ {
+ "name": "db-group",
+ "alias": "my-dbgroup",
+ "cartridges": [
+ {
+ "type": "postgres",
+ "cartridgeMax": 2,
+ "cartridgeMin": 1,
+ "subscribableInfo": {
+ "alias": "my-postgres",
+ "artifactRepository": {
+ "alias": "my-postgres",
+ "privateRepo": false,
+ "repoPassword": "password",
+ "repoUrl": "http://xxx:10080/git/default.git",
+ "repoUsername": "user"
+ },
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy": "deployment-policy-2"
+ }
+ },
+ {
+ "type": "mysql",
+ "cartridgeMax": 2,
+ "cartridgeMin": 1,
+ "subscribableInfo": {
+ "alias": "my-mysql",
+ "artifactRepository": {
+ "alias": "my-mysql",
+ "privateRepo": true,
+ "repoPassword": "password",
+ "repoUrl": "http://xxx:10080/git/default.git",
+ "repoUsername": "user"
+ },
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy": "deployment-policy-2"
+ }
+ }
+ ],
+ "groupMaxInstances": 2,
+ "groupMinInstances": 1,
+ "groupScalingEnabled": true
+ }
+ ],
+ "cartridges": [
+ {
+ "type": "esb",
+ "cartridgeMax": 2,
+ "cartridgeMin": 1,
+ "subscribableInfo": {
+ "alias": "my-esb",
+ "artifactRepository": {
+ "privateRepo": true,
+ "repoPassword": "password",
+ "repoUrl": "http://xxx:10080/git/default.git",
+ "repoUsername": "user"
+ },
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy": "deployment-policy-2"
+ }
+ }
+ ],
+ "dependencies": {
+ "scalingDependants": {
+ "@xsi.nil": "true"
+ },
+ "startupOrders": [
+ "group.my-dbgroup,group.my-appgroup","group.my-dbgroup,cartridge.my-esb"
+ ],
+ "terminationBehaviour": "terminate-none"
+ }
+ }
+ }
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-domain-mappings.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-domain-mappings.sh b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-domain-mappings.sh
new file mode 100755
index 0000000..74c6ed7
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-domain-mappings.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+export host_ip="localhost"
+export artifacts_path="../../artifacts"
+
+pushd ${artifacts_path}
+echo "Adding domain mappings..."
+curl -X POST -H "Content-Type: application/json" -d @'domain-mappings.json' -k -u admin:admin https://${host_ip}:9443/api/applications/single-cartridge-app/domainMappings
+popd
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-network-partition.sh b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-network-partition.sh
new file mode 100644
index 0000000..56c7c6c
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-network-partition.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+export host_ip="localhost"
+export artifacts_path="../../artifacts"
+
+pushd ${artifacts_path}
+echo "Adding network partition..."
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/network-partition.json" -k -v -u admin:admin https://${host_ip}:9443/api/networkPartitions
+popd
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/deploy.sh b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/deploy.sh
new file mode 100755
index 0000000..3023afc
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/deploy.sh
@@ -0,0 +1,65 @@
+#!/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-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
+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 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
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/postgres.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+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
+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 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 mysql-php-group group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/app-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/db-group.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/my-compositeapp/deploy/application-policy-1
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/get-application-runtime.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/get-application-runtime.sh b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/get-application-runtime.sh
new file mode 100755
index 0000000..ed80688
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/get-application-runtime.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+iaas=$1
+host_ip="localhost"
+host_port=9443
+
+set -e
+
+echo "Getting application runtime..."
+curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-cartridge-app/runtime
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-domain-mappings.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-domain-mappings.sh b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-domain-mappings.sh
new file mode 100755
index 0000000..0b49f6f
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-domain-mappings.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+echo "Listing domain mappings..."
+curl -X GET -H "Content-Type: application/json" -k -u admin:admin https://localhost:9443/api/applications/single-cartridge-app/domainMappings
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-network-partition.sh b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-network-partition.sh
new file mode 100755
index 0000000..6e3812d
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-network-partition.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+echo "Listing network partitions..."
+curl -X GET -H "Content-Type: application/json" -k -u admin:admin https://localhost:9443/api/networkPartitions
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/undeploy.sh b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/undeploy.sh
new file mode 100644
index 0000000..54613ed
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/undeploy.sh
@@ -0,0 +1,37 @@
+#!/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/my-compositeapp/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/my-compositeapp
+
+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/postgres
+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/tomcat
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/esb
+
+
+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
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies/deployment-policy-2
+
+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/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/update-deployment-policy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/update-deployment-policy.sh b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/update-deployment-policy.sh
new file mode 100755
index 0000000..d28fb40
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/common/update-deployment-policy.sh
@@ -0,0 +1,12 @@
+#!/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-1.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/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/deploy.sh b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/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/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/undeploy.sh b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/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/complex/tomcat-single-signon/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/README.md b/samples/applications/complex/tomcat-single-signon/README.md
new file mode 100644
index 0000000..5247a3f
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/README.md
@@ -0,0 +1,30 @@
+#Tomcat Single Sign On Sample Application
+
+This sample application demonstrate how Single Sign On (SAML2) configuration can be automated with Composite
+Application Model using Tomcat and WSO2 Identity Server. It includes a cartridge for Tomcat 7 and WSO2 Identity
+Server 5.0.0 and a set of cartridge agent plugins for handling the SSO configuration.
+
+###Tomcat Dockerfile
+https://github.com/apache/stratos/tree/master/tools/docker-images/cartridge-docker-images/service-images/tomcat-saml-sso/Dockerfile
+
+###Tomcat Cartridge Agent Plugins
+https://github.com/apache/stratos/tree/master/tools/docker-images/cartridge-docker-images/service-images/tomcat-saml-sso/packs/plugins
+
+###WSO2 Identity Server Dockerfile:
+https://github.com/apache/stratos/tree/master/tools/docker-images/cartridge-docker-images/service-images/wso2is-saml-sso/Dockerfile
+
+###WSO2 Identity Server Cartridge Agent Plugins
+https://github.com/apache/stratos/tree/master/tools/docker-images/cartridge-docker-images/service-images/wso2is-saml-sso/packs/plugins
+
+###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
+```
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/tomcat-single-signon/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/artifacts/application.json b/samples/applications/complex/tomcat-single-signon/artifacts/application.json
new file mode 100644
index 0000000..2f237c1
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/artifacts/application.json
@@ -0,0 +1,38 @@
+{
+ "applicationId": "tomcat-single-signon",
+ "alias": "tomcat-single-signon",
+ "components": {
+
+ "cartridges": [
+ {
+ "type": "tomcat3",
+ "cartridgeMin": 1,
+ "cartridgeMax": 1,
+ "subscribableInfo": {
+ "alias": "mytomcat3",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy": "deployment-policy-3",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/chamilad/travelocity-sample",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ },
+ {
+ "type": "wso2is",
+ "cartridgeMin": 1,
+ "cartridgeMax": 1,
+ "subscribableInfo": {
+ "alias": "mywso2is",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy": "deployment-policy-3"
+ }
+ }
+ ],
+ "dependencies": {
+ "terminationBehaviour": "terminate-none"
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/tomcat-single-signon/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/scripts/common/deploy.sh b/samples/applications/complex/tomcat-single-signon/scripts/common/deploy.sh
new file mode 100755
index 0000000..5507206
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/scripts/common/deploy.sh
@@ -0,0 +1,54 @@
+#!/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_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 ${artifacts_path}/autoscaling-policy.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-3.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-3.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 "@${iaas_cartridges_path}/tomcat3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding wso2-is cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${iaas_cartridges_path}/wso2-is.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-2.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/tomcat-single-signon/deploy/application-policy-2
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/tomcat-single-signon/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/scripts/common/undeploy.sh b/samples/applications/complex/tomcat-single-signon/scripts/common/undeploy.sh
new file mode 100644
index 0000000..9e50142
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/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/tomcat-single-signon/undeploy
+
+sleep 10
+
+echo "Deleting application..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-cartridge-app
+
+echo "Removing cartridges..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat3
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/wso2-is
+
+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-2
+
+
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/tomcat-single-signon/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/scripts/ec2/deploy.sh b/samples/applications/complex/tomcat-single-signon/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/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/complex/tomcat-single-signon/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/scripts/ec2/undeploy.sh b/samples/applications/complex/tomcat-single-signon/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/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/complex/tomcat-single-signon/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/scripts/kubernetes/deploy.sh b/samples/applications/complex/tomcat-single-signon/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..eab754c
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/scripts/kubernetes/deploy.sh
@@ -0,0 +1,16 @@
+#!/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`
+kubernetes_clusters_path=`cd "${script_path}/../../../../../kubernetes-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}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/tomcat-single-signon/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/scripts/kubernetes/undeploy.sh b/samples/applications/complex/tomcat-single-signon/scripts/kubernetes/undeploy.sh
new file mode 100755
index 0000000..c450ea0
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/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-ec2
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/tomcat-single-signon/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/scripts/mock/deploy.sh b/samples/applications/complex/tomcat-single-signon/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/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/complex/tomcat-single-signon/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/scripts/mock/undeploy.sh b/samples/applications/complex/tomcat-single-signon/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/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/complex/tomcat-single-signon/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/scripts/openstack/deploy.sh b/samples/applications/complex/tomcat-single-signon/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/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/complex/tomcat-single-signon/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/tomcat-single-signon/scripts/openstack/undeploy.sh b/samples/applications/complex/tomcat-single-signon/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/complex/tomcat-single-signon/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/complex/wordpress-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/README.md b/samples/applications/complex/wordpress-app/README.md
new file mode 100644
index 0000000..9b61ca1
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/README.md
@@ -0,0 +1,20 @@
+Wordpress Application
+=====================
+Wordpress application consists of a cartridge group which includes a MySQL cartridge and PHP cartridge. The cartridge
+group defines a startup dependency to first start MySQL cluster and then the PHP cluster second once the MySQL cluster
+is active. Group scaling has been disabled in MySQL, PHP 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/complex/wordpress-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/artifacts/application.json b/samples/applications/complex/wordpress-app/artifacts/application.json
new file mode 100644
index 0000000..4220fe2
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/artifacts/application.json
@@ -0,0 +1,41 @@
+{
+ "applicationId": "wordpress",
+ "alias": "wordpress",
+ "components": {
+ "groups": [
+ {
+ "name": "mysql-php-group",
+ "alias": "mysql-php-group",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 1,
+ "cartridges": [
+ {
+ "type": "mysql",
+ "cartridgeMin": 2,
+ "cartridgeMax": 5,
+ "subscribableInfo": {
+ "alias": "my-mysql",
+ "deploymentPolicy":"deployment-policy-2",
+ "autoscalingPolicy": "autoscaling-policy-1"
+ }
+ },
+ {
+ "type": "php",
+ "cartridgeMin": 2,
+ "cartridgeMax": 5,
+ "subscribableInfo": {
+ "alias": "my-php",
+ "deploymentPolicy":"deployment-policy-2",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/wordpress-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/scripts/common/deploy.sh b/samples/applications/complex/wordpress-app/scripts/common/deploy.sh
new file mode 100755
index 0000000..d76e621
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/scripts/common/deploy.sh
@@ -0,0 +1,60 @@
+#!/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-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
+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 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 mysql-php-group group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/mysql-php-group.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/wordpress/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex/wordpress-app/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/scripts/common/undeploy.sh b/samples/applications/complex/wordpress-app/scripts/common/undeploy.sh
new file mode 100644
index 0000000..7969cca
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/scripts/common/undeploy.sh
@@ -0,0 +1,35 @@
+#!/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/wordpress/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/wordpress
+
+echo "Removing groups..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/mysql-php-group
+
+echo "Removing cartridges..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/php
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/mysql
+
+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
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies/deployment-policy-2
+
+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/complex/wordpress-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/scripts/ec2/deploy.sh b/samples/applications/complex/wordpress-app/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/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/complex/wordpress-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/scripts/ec2/undeploy.sh b/samples/applications/complex/wordpress-app/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/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/complex/wordpress-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/scripts/kubernetes/deploy.sh b/samples/applications/complex/wordpress-app/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..c8f11f7
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/scripts/kubernetes/deploy.sh
@@ -0,0 +1,16 @@
+#!/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/complex/wordpress-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/scripts/kubernetes/undeploy.sh b/samples/applications/complex/wordpress-app/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/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/complex/wordpress-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/scripts/mock/deploy.sh b/samples/applications/complex/wordpress-app/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/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/complex/wordpress-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/scripts/mock/undeploy.sh b/samples/applications/complex/wordpress-app/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/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/complex/wordpress-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/scripts/openstack/deploy.sh b/samples/applications/complex/wordpress-app/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/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/complex/wordpress-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex/wordpress-app/scripts/openstack/undeploy.sh b/samples/applications/complex/wordpress-app/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/complex/wordpress-app/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/dependent-scaling/sample-cartridges/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/README.md b/samples/applications/dependent-scaling/sample-cartridges/README.md
deleted file mode 100644
index 34feba2..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-sample-cartridges
-=================
-
-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/dependent-scaling/sample-cartridges/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/artifacts/application.json b/samples/applications/dependent-scaling/sample-cartridges/artifacts/application.json
deleted file mode 100644
index 03fe033..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/artifacts/application.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "applicationId": "dependency-scaling-cartridges-app",
- "alias": "my-dependency-scaling-cartridges-app",
- "components": {
- "cartridges": [
- {
- "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":""
- }
- }
- },
- {
- "type": "php",
- "cartridgeMin": 2,
- "cartridgeMax": 4,
- "subscribableInfo": {
- "alias": "my-php",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ],
- "dependencies": {
- "scalingDependants": [
- "cartridge.my-tomcat, cartridge.my-php"
- ],
- "terminationBehaviour": "terminate-none"
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/dependent-scaling/sample-cartridges/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/common/deploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/common/deploy.sh
deleted file mode 100755
index b55c736..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/scripts/common/deploy.sh
+++ /dev/null
@@ -1,53 +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`
-cartridges_path=`cd "${script_path}/../../../../../cartridges/${iaas}"; 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 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 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
-
-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
-
-
-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/dependency-scaling-cartridges-app/deploy/application-policy-1
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/dependent-scaling/sample-cartridges/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/common/undeploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/common/undeploy.sh
deleted file mode 100644
index 79ce013..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,21 +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/sample-cartridges-app/undeploy
-
-sleep 10
-
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/sample-cartridges-app
-
-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/php
-
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/dependent-scaling/sample-cartridges/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/ec2/deploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/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/dependent-scaling/sample-cartridges/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/ec2/undeploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/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/dependent-scaling/sample-cartridges/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/kubernetes/deploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/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/dependent-scaling/sample-cartridges/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/kubernetes/undeploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/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/dependent-scaling/sample-cartridges/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/mock/deploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/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/dependent-scaling/sample-cartridges/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/mock/undeploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/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/dependent-scaling/sample-cartridges/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/openstack/deploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/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/dependent-scaling/sample-cartridges/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/openstack/undeploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/dependent-scaling/sample-cartridges/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/dependent-scaling/sample-groups/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/README.md b/samples/applications/dependent-scaling/sample-groups/README.md
deleted file mode 100644
index d1adf79..0000000
--- a/samples/applications/dependent-scaling/sample-groups/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-sample-groups
-=============
-
-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/dependent-scaling/sample-groups/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/artifacts/application.json b/samples/applications/dependent-scaling/sample-groups/artifacts/application.json
deleted file mode 100644
index f261596..0000000
--- a/samples/applications/dependent-scaling/sample-groups/artifacts/application.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "applicationId": "dependency-scaling-groups-app",
- "alias": "my-dependency-scaling-groups-app",
- "components": {
- "groups": [
- {
- "name": "esb-php-group",
- "alias": "my-esb-php-group",
- "groupMinInstances": 1,
- "groupMaxInstances": 2,
- "deploymentPolicy": "deployment-policy-1",
- "cartridges": [
- {
- "type": "esb",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-esb",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-esb-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- },
- {
- "type": "php",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-php",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
- ],
- "cartridges": [
- {
- "type": "tomcat",
- "cartridgeMin": 2,
- "cartridgeMax": 4,
- "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": {
- "scalingDependants": [
- "group.my-esb-php-group, cartridge.my-tomcat"
- ],
- "terminationBehaviour": "terminate-none"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh
deleted file mode 100755
index 884b33c..0000000
--- a/samples/applications/dependent-scaling/sample-groups/scripts/common/deploy.sh
+++ /dev/null
@@ -1,58 +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`
-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}:9443/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 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 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 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-php-group group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/esb-php-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
-
-sleep 1
-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 "Adding 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/dependency-scaling-groups-app/deploy/application-policy-1
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/dependent-scaling/sample-groups/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/common/undeploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/common/undeploy.sh
deleted file mode 100644
index a69d60d..0000000
--- a/samples/applications/dependent-scaling/sample-groups/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,25 +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/dependency-scaling-groups-app/undeploy
-
-sleep 10
-
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/dependency-scaling-groups-app
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/esb-php-group
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat
-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/php
-
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/dependent-scaling/sample-groups/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/ec2/deploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/dependent-scaling/sample-groups/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/dependent-scaling/sample-groups/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/ec2/undeploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/dependent-scaling/sample-groups/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/dependent-scaling/sample-groups/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/kubernetes/deploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/dependent-scaling/sample-groups/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/dependent-scaling/sample-groups/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/kubernetes/undeploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/dependent-scaling/sample-groups/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/dependent-scaling/sample-groups/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/mock/deploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/dependent-scaling/sample-groups/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/dependent-scaling/sample-groups/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/mock/undeploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/dependent-scaling/sample-groups/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/dependent-scaling/sample-groups/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/openstack/deploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/dependent-scaling/sample-groups/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/dependent-scaling/sample-groups/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-groups/scripts/openstack/undeploy.sh b/samples/applications/dependent-scaling/sample-groups/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/dependent-scaling/sample-groups/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/README.md b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/README.md
deleted file mode 100644
index af2349a..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/README.md
+++ /dev/null
@@ -1,23 +0,0 @@
-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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/artifacts/application.json b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/artifacts/application.json
deleted file mode 100644
index da8e512..0000000
--- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/artifacts/application.json
+++ /dev/null
@@ -1,141 +0,0 @@
-{
- "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"
- }
- }
- }
- ]
- }
-}
-
[09/10] stratos git commit: refining the application samples hierarchy
Posted by is...@apache.org.
refining the application samples hierarchy
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/aaa8a0f4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/aaa8a0f4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/aaa8a0f4
Branch: refs/heads/master
Commit: aaa8a0f48c63d28c86d66da9b21ae689e48ad1ce
Parents: e97d336
Author: Isuru Haththotuwa <is...@apache.org>
Authored: Thu Apr 30 11:54:44 2015 +0530
Committer: Isuru Haththotuwa <is...@apache.org>
Committed: Thu Apr 30 11:54:44 2015 +0530
----------------------------------------------------------------------
.../tests/SampleApplicationsTest.java | 2 +-
.../applications/app-bursting-pattern/README.md | 8 -
.../artifacts/application-signup.json | 18 --
.../artifacts/application.json | 25 ---
.../artifacts/domain-mappings.json | 9 -
.../scripts/common/deploy.sh | 51 -----
.../scripts/common/undeploy.sh | 33 ---
.../app-bursting-pattern/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../app-bursting-pattern/scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../applications/complex-app-with-lb/README.md | 13 --
.../artifacts/application.json | 141 -------------
.../scripts/common/deploy.sh | 67 ------
.../scripts/common/undeploy.sh | 31 ---
.../complex-app-with-lb/scripts/ec2/deploy.sh | 9 -
.../complex-app-with-lb/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../complex-app-with-lb/scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/complex-app/README.md | 13 --
.../complex-app/artifacts/application.json | 131 ------------
.../artifacts/autoscaling-policy.json | 14 --
.../artifacts/deployment-policy.json | 15 --
.../complex-app/scripts/common/deploy.sh | 64 ------
.../complex-app/scripts/common/undeploy.sh | 36 ----
.../complex-app/scripts/ec2/deploy.sh | 9 -
.../complex-app/scripts/ec2/undeploy.sh | 7 -
.../complex-app/scripts/kubernetes/deploy.sh | 15 --
.../complex-app/scripts/kubernetes/undeploy.sh | 13 --
.../complex-app/scripts/mock/deploy.sh | 9 -
.../complex-app/scripts/mock/undeploy.sh | 7 -
.../complex-app/scripts/openstack/deploy.sh | 9 -
.../complex-app/scripts/openstack/undeploy.sh | 7 -
.../README.md | 10 +
.../artifacts/application.json | 121 +++++++++++
.../scripts/common/add-domain-mappings.sh | 9 +
.../scripts/common/add-network-partition.sh | 9 +
.../scripts/common/deploy.sh | 65 ++++++
.../scripts/common/get-application-runtime.sh | 10 +
.../scripts/common/list-domain-mappings.sh | 4 +
.../scripts/common/list-network-partition.sh | 4 +
.../scripts/common/undeploy.sh | 37 ++++
.../scripts/common/update-deployment-policy.sh | 12 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../complex/tomcat-single-signon/README.md | 30 +++
.../artifacts/application.json | 38 ++++
.../scripts/common/deploy.sh | 54 +++++
.../scripts/common/undeploy.sh | 27 +++
.../tomcat-single-signon/scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../tomcat-single-signon/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../complex/wordpress-app/README.md | 20 ++
.../wordpress-app/artifacts/application.json | 41 ++++
.../wordpress-app/scripts/common/deploy.sh | 60 ++++++
.../wordpress-app/scripts/common/undeploy.sh | 35 ++++
.../complex/wordpress-app/scripts/ec2/deploy.sh | 9 +
.../wordpress-app/scripts/ec2/undeploy.sh | 7 +
.../wordpress-app/scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../wordpress-app/scripts/mock/deploy.sh | 9 +
.../wordpress-app/scripts/mock/undeploy.sh | 7 +
.../wordpress-app/scripts/openstack/deploy.sh | 9 +
.../wordpress-app/scripts/openstack/undeploy.sh | 7 +
.../sample-cartridges/README.md | 13 --
.../artifacts/application.json | 46 -----
.../sample-cartridges/scripts/common/deploy.sh | 53 -----
.../scripts/common/undeploy.sh | 21 --
.../sample-cartridges/scripts/ec2/deploy.sh | 9 -
.../sample-cartridges/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../sample-cartridges/scripts/mock/deploy.sh | 9 -
.../sample-cartridges/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../dependent-scaling/sample-groups/README.md | 13 --
.../sample-groups/artifacts/application.json | 74 -------
.../sample-groups/scripts/common/deploy.sh | 58 ------
.../sample-groups/scripts/common/undeploy.sh | 25 ---
.../sample-groups/scripts/ec2/deploy.sh | 9 -
.../sample-groups/scripts/ec2/undeploy.sh | 7 -
.../sample-groups/scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../sample-groups/scripts/mock/deploy.sh | 9 -
.../sample-groups/scripts/mock/undeploy.sh | 7 -
.../sample-groups/scripts/openstack/deploy.sh | 9 -
.../sample-groups/scripts/openstack/undeploy.sh | 7 -
.../README.md | 23 ---
.../artifacts/application.json | 141 -------------
.../scripts/common/deploy.sh | 64 ------
.../scripts/common/undeploy.sh | 35 ----
.../scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/group-cartridges/README.md | 14 --
.../group-cartridges/artifacts/application.json | 49 -----
.../group-cartridges/scripts/common/deploy.sh | 63 ------
.../group-cartridges/scripts/common/undeploy.sh | 38 ----
.../group-cartridges/scripts/ec2/deploy.sh | 9 -
.../group-cartridges/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../group-cartridges/scripts/mock/deploy.sh | 9 -
.../group-cartridges/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/group-scaling-v1/README.md | 18 --
.../group-scaling-v1/artifacts/application.json | 48 -----
.../group-scaling-v1/scripts/common/deploy.sh | 58 ------
.../group-scaling-v1/scripts/common/undeploy.sh | 29 ---
.../group-scaling-v1/scripts/ec2/deploy.sh | 9 -
.../group-scaling-v1/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../group-scaling-v1/scripts/mock/deploy.sh | 9 -
.../group-scaling-v1/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/group-scaling/README.md | 18 --
.../group-scaling/artifacts/application.json | 97 ---------
.../group-scaling/scripts/common/deploy.sh | 72 -------
.../group-scaling/scripts/common/undeploy.sh | 33 ---
.../group-scaling/scripts/ec2/deploy.sh | 9 -
.../group-scaling/scripts/ec2/undeploy.sh | 7 -
.../group-scaling/scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../group-scaling/scripts/mock/deploy.sh | 9 -
.../group-scaling/scripts/mock/undeploy.sh | 7 -
.../group-scaling/scripts/openstack/deploy.sh | 9 -
.../group-scaling/scripts/openstack/undeploy.sh | 7 -
samples/applications/more-complex-app/README.md | 14 --
.../more-complex-app/artifacts/application.json | 202 -------------------
.../more-complex-app/scripts/common/deploy.sh | 64 ------
.../more-complex-app/scripts/common/undeploy.sh | 31 ---
.../more-complex-app/scripts/ec2/deploy.sh | 9 -
.../more-complex-app/scripts/ec2/undeploy.sh | 7 -
.../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 | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../n-level-nesting/artifacts/application.json | 184 -----------------
.../n-level-nesting/scripts/common/deploy.sh | 67 ------
.../n-level-nesting/scripts/common/undeploy.sh | 36 ----
.../n-level-nesting/scripts/ec2/deploy.sh | 9 -
.../n-level-nesting/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../n-level-nesting/scripts/mock/deploy.sh | 9 -
.../n-level-nesting/scripts/mock/undeploy.sh | 7 -
.../n-level-nesting/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/nested-group-v2/README.md | 30 ---
.../nested-group-v2/artifacts/application.json | 97 ---------
.../nested-group-v2/images/nested-group-app.png | Bin 22765 -> 0 bytes
.../nested-group-v2/scripts/common/deploy.sh | 66 ------
.../nested-group-v2/scripts/common/undeploy.sh | 29 ---
.../nested-group-v2/scripts/ec2/deploy.sh | 9 -
.../nested-group-v2/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../nested-group-v2/scripts/mock/deploy.sh | 9 -
.../nested-group-v2/scripts/mock/undeploy.sh | 7 -
.../nested-group-v2/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/nested-group/README.md | 14 --
.../nested-group/artifacts/application.json | 82 --------
.../nested-group/scripts/common/deploy.sh | 62 ------
.../nested-group/scripts/common/undeploy.sh | 29 ---
.../scripts/common/update-deployment-policy.sh | 12 --
.../scripts/common/update-network-partition.sh | 11 -
.../nested-group/scripts/ec2/deploy.sh | 9 -
.../nested-group/scripts/ec2/undeploy.sh | 7 -
.../nested-group/scripts/kubernetes/deploy.sh | 15 --
.../nested-group/scripts/kubernetes/undeploy.sh | 13 --
.../nested-group/scripts/mock/deploy.sh | 9 -
.../nested-group/scripts/mock/undeploy.sh | 7 -
.../scripts/mock/update-network-partition.sh | 6 -
.../nested-group/scripts/openstack/deploy.sh | 9 -
.../nested-group/scripts/openstack/undeploy.sh | 7 -
.../openstack/update-network-partition.sh | 11 -
.../nested/complex-app-with-lb/README.md | 13 ++
.../artifacts/application.json | 141 +++++++++++++
.../scripts/common/deploy.sh | 67 ++++++
.../scripts/common/undeploy.sh | 31 +++
.../complex-app-with-lb/scripts/ec2/deploy.sh | 9 +
.../complex-app-with-lb/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../complex-app-with-lb/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../README.md | 23 +++
.../artifacts/application.json | 141 +++++++++++++
.../scripts/common/deploy.sh | 64 ++++++
.../scripts/common/undeploy.sh | 35 ++++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../artifacts/application.json | 184 +++++++++++++++++
.../scripts/common/deploy.sh | 67 ++++++
.../scripts/common/undeploy.sh | 36 ++++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../single-level-nested-group-app/README.md | 14 ++
.../artifacts/application.json | 82 ++++++++
.../scripts/common/deploy.sh | 62 ++++++
.../scripts/common/undeploy.sh | 29 +++
.../scripts/common/update-deployment-policy.sh | 12 ++
.../scripts/common/update-network-partition.sh | 11 +
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/mock/update-network-partition.sh | 6 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../openstack/update-network-partition.sh | 11 +
.../single-level-nested-groups-app/README.md | 13 ++
.../artifacts/application.json | 131 ++++++++++++
.../artifacts/autoscaling-policy.json | 14 ++
.../artifacts/deployment-policy.json | 15 ++
.../scripts/common/deploy.sh | 64 ++++++
.../scripts/common/undeploy.sh | 36 ++++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../README.md | 10 -
.../artifacts/application.json | 121 -----------
.../scripts/common/add-domain-mappings.sh | 9 -
.../scripts/common/add-network-partition.sh | 9 -
.../scripts/common/deploy.sh | 65 ------
.../scripts/common/get-application-runtime.sh | 10 -
.../scripts/common/list-domain-mappings.sh | 4 -
.../scripts/common/list-network-partition.sh | 4 -
.../scripts/common/undeploy.sh | 37 ----
.../scripts/common/update-deployment-policy.sh | 12 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scaling/app-bursting-pattern/README.md | 8 +
.../artifacts/application-signup.json | 18 ++
.../artifacts/application.json | 25 +++
.../artifacts/domain-mappings.json | 9 +
.../scripts/common/deploy.sh | 51 +++++
.../scripts/common/undeploy.sh | 33 +++
.../app-bursting-pattern/scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../app-bursting-pattern/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../sample-cartridges/README.md | 13 ++
.../artifacts/application.json | 46 +++++
.../sample-cartridges/scripts/common/deploy.sh | 53 +++++
.../scripts/common/undeploy.sh | 21 ++
.../sample-cartridges/scripts/ec2/deploy.sh | 9 +
.../sample-cartridges/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../sample-cartridges/scripts/mock/deploy.sh | 9 +
.../sample-cartridges/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../dependent-scaling/sample-groups/README.md | 13 ++
.../sample-groups/artifacts/application.json | 74 +++++++
.../sample-groups/scripts/common/deploy.sh | 58 ++++++
.../sample-groups/scripts/common/undeploy.sh | 25 +++
.../sample-groups/scripts/ec2/deploy.sh | 9 +
.../sample-groups/scripts/ec2/undeploy.sh | 7 +
.../sample-groups/scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../sample-groups/scripts/mock/deploy.sh | 9 +
.../sample-groups/scripts/mock/undeploy.sh | 7 +
.../sample-groups/scripts/openstack/deploy.sh | 9 +
.../sample-groups/scripts/openstack/undeploy.sh | 7 +
.../group-scaling/group-scaling-app/README.md | 18 ++
.../artifacts/application.json | 97 +++++++++
.../group-scaling-app/scripts/common/deploy.sh | 72 +++++++
.../scripts/common/undeploy.sh | 33 +++
.../group-scaling-app/scripts/ec2/deploy.sh | 9 +
.../group-scaling-app/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../group-scaling-app/scripts/mock/deploy.sh | 9 +
.../group-scaling-app/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../group-scaling/group-scaling-v1/README.md | 18 ++
.../group-scaling-v1/artifacts/application.json | 48 +++++
.../group-scaling-v1/scripts/common/deploy.sh | 58 ++++++
.../group-scaling-v1/scripts/common/undeploy.sh | 29 +++
.../group-scaling-v1/scripts/ec2/deploy.sh | 9 +
.../group-scaling-v1/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../group-scaling-v1/scripts/mock/deploy.sh | 9 +
.../group-scaling-v1/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../single-group-group-scaling/README.md | 13 ++
.../artifacts/application.json | 33 +++
.../scripts/common/deploy.sh | 55 +++++
.../scripts/common/undeploy.sh | 28 +++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../simple/single-cartridge-app/README.md | 8 +
.../artifacts/application-signup.json | 18 ++
.../artifacts/application.json | 25 +++
.../artifacts/domain-mappings.json | 9 +
.../scripts/common/add-domain-mappings.sh | 9 +
.../scripts/common/add-network-partition.sh | 9 +
.../scripts/common/deploy.sh | 49 +++++
.../scripts/common/get-application-runtime.sh | 10 +
.../scripts/common/list-domain-mappings.sh | 4 +
.../scripts/common/list-network-partition.sh | 4 +
.../scripts/common/undeploy.sh | 31 +++
.../scripts/common/update-deployment-policy.sh | 12 ++
.../single-cartridge-app/scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../single-cartridge-app/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../simple/single-group-app/README.md | 15 ++
.../single-group-app/artifacts/application.json | 72 +++++++
.../single-group-app/scripts/common/deploy.sh | 62 ++++++
.../single-group-app/scripts/common/undeploy.sh | 37 ++++
.../single-group-app/scripts/ec2/deploy.sh | 9 +
.../single-group-app/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../single-group-app/scripts/mock/deploy.sh | 9 +
.../single-group-app/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
samples/applications/single-cartridge/README.md | 8 -
.../artifacts/application-signup.json | 18 --
.../single-cartridge/artifacts/application.json | 25 ---
.../artifacts/domain-mappings.json | 9 -
.../scripts/common/add-domain-mappings.sh | 9 -
.../scripts/common/add-network-partition.sh | 9 -
.../single-cartridge/scripts/common/deploy.sh | 49 -----
.../scripts/common/get-application-runtime.sh | 10 -
.../scripts/common/list-domain-mappings.sh | 4 -
.../scripts/common/list-network-partition.sh | 4 -
.../single-cartridge/scripts/common/undeploy.sh | 31 ---
.../scripts/common/update-deployment-policy.sh | 12 --
.../single-cartridge/scripts/ec2/deploy.sh | 9 -
.../single-cartridge/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../single-cartridge/scripts/mock/deploy.sh | 9 -
.../single-cartridge/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../single-group-cartridge/README.md | 15 --
.../artifacts/application.json | 72 -------
.../scripts/common/deploy.sh | 62 ------
.../scripts/common/undeploy.sh | 37 ----
.../scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../single-group-group-scaling/README.md | 13 --
.../artifacts/application.json | 33 ---
.../scripts/common/deploy.sh | 55 -----
.../scripts/common/undeploy.sh | 28 ---
.../scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/single-group-v1/README.md | 15 --
.../artifacts/application-up.json | 38 ----
.../single-group-v1/artifacts/application.json | 57 ------
.../single-group-v1/scripts/common/deploy.sh | 57 ------
.../single-group-v1/scripts/common/undeploy.sh | 35 ----
.../single-group-v1/scripts/ec2/deploy.sh | 9 -
.../single-group-v1/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../single-group-v1/scripts/mock/deploy.sh | 9 -
.../single-group-v1/scripts/mock/undeploy.sh | 7 -
.../single-group-v1/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/single-group-v2/README.md | 14 --
.../single-group-v2/artifacts/application.json | 72 -------
.../single-group-v2/scripts/common/deploy.sh | 59 ------
.../single-group-v2/scripts/common/undeploy.sh | 31 ---
.../single-group-v2/scripts/ec2/deploy.sh | 9 -
.../single-group-v2/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../single-group-v2/scripts/mock/deploy.sh | 9 -
.../single-group-v2/scripts/mock/undeploy.sh | 7 -
.../single-group-v2/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/single-group-v3/README.md | 14 --
.../single-group-v3/artifacts/application.json | 34 ----
.../single-group-v3/scripts/common/deploy.sh | 53 -----
.../single-group-v3/scripts/common/undeploy.sh | 28 ---
.../single-group-v3/scripts/ec2/deploy.sh | 9 -
.../single-group-v3/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../single-group-v3/scripts/mock/deploy.sh | 9 -
.../single-group-v3/scripts/mock/undeploy.sh | 7 -
.../single-group-v3/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../applications/tomcat-single-signon/README.md | 30 ---
.../artifacts/application.json | 38 ----
.../scripts/common/deploy.sh | 54 -----
.../scripts/common/undeploy.sh | 27 ---
.../tomcat-single-signon/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../tomcat-single-signon/scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/tomcat/README.md | 18 --
.../tomcat/artifacts/application.json | 25 ---
.../tomcat/scripts/common/deploy.sh | 53 -----
.../tomcat/scripts/common/undeploy.sh | 25 ---
.../applications/tomcat/scripts/ec2/deploy.sh | 9 -
.../applications/tomcat/scripts/ec2/undeploy.sh | 7 -
.../tomcat/scripts/kubernetes/deploy.sh | 16 --
.../tomcat/scripts/kubernetes/undeploy.sh | 13 --
.../applications/tomcat/scripts/mock/deploy.sh | 9 -
.../tomcat/scripts/mock/undeploy.sh | 7 -
.../tomcat/scripts/openstack/deploy.sh | 9 -
.../tomcat/scripts/openstack/undeploy.sh | 7 -
.../wordpress-extended-v1/README.md | 22 --
.../artifacts/application.json | 62 ------
.../scripts/common/deploy.sh | 63 ------
.../scripts/common/undeploy.sh | 36 ----
.../wordpress-extended-v1/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../wordpress-extended-v2/README.md | 23 ---
.../artifacts/application.json | 63 ------
.../scripts/common/deploy.sh | 63 ------
.../scripts/common/undeploy.sh | 36 ----
.../wordpress-extended-v2/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/wordpress/README.md | 20 --
.../wordpress/artifacts/application.json | 41 ----
.../wordpress/scripts/common/deploy.sh | 60 ------
.../wordpress/scripts/common/undeploy.sh | 35 ----
.../wordpress/scripts/ec2/deploy.sh | 9 -
.../wordpress/scripts/ec2/undeploy.sh | 7 -
.../wordpress/scripts/kubernetes/deploy.sh | 16 --
.../wordpress/scripts/kubernetes/undeploy.sh | 13 --
.../wordpress/scripts/mock/deploy.sh | 9 -
.../wordpress/scripts/mock/undeploy.sh | 7 -
.../wordpress/scripts/openstack/deploy.sh | 9 -
.../wordpress/scripts/openstack/undeploy.sh | 7 -
525 files changed, 4375 insertions(+), 6755 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationsTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationsTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationsTest.java
index 08f6b91..47384eb 100644
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationsTest.java
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationsTest.java
@@ -59,7 +59,7 @@ public class SampleApplicationsTest extends StratosTestServerManager {
public void testSingleCartridgeApplication() {
try {
initializeApplicationEventReceiver();
- runApplicationTest("single-cartridge", "single-cartridge-app");
+ runApplicationTest("simple/single-cartridge-app", "single-cartridge-app");
} catch (Exception e) {
log.error(e);
assertTrue("An error occurred", false);
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/app-bursting-pattern/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/README.md b/samples/applications/app-bursting-pattern/README.md
deleted file mode 100644
index 8e18c5c..0000000
--- a/samples/applications/app-bursting-pattern/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-app-bursting-pattern
-================
-i) In this artifact sample you can find we have listed them as mock and openstack.
-
-ii) In this sample artifact, it deployed simple tomcat cartridge and start it.
-
-iii) You can choose the IaaS and navigate to it and simply run the single_cartridge.sh file. It'll deploy the relevant artifacts and start the application.
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/app-bursting-pattern/artifacts/application-signup.json
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/artifacts/application-signup.json b/samples/applications/app-bursting-pattern/artifacts/application-signup.json
deleted file mode 100644
index 138648e..0000000
--- a/samples/applications/app-bursting-pattern/artifacts/application-signup.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "artifactRepositories":[
- {
- "alias":"php",
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
- "repoUsername":"",
- "repoPassword":""
- },
- {
- "alias":"tomcat",
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- ]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/app-bursting-pattern/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/artifacts/application.json b/samples/applications/app-bursting-pattern/artifacts/application.json
deleted file mode 100644
index 1cb3e57..0000000
--- a/samples/applications/app-bursting-pattern/artifacts/application.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "applicationId":"app-bursting-pattern-app",
- "alias":"app-bursting-pattern-app",
- "multiTenant":false,
- "components":{
- "cartridges":[
- {
- "type":"php",
- "cartridgeMin": 1,
- "cartridgeMax": 10,
- "subscribableInfo":{
- "alias":"my-php",
- "autoscalingPolicy":"autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-4",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/app-bursting-pattern/artifacts/domain-mappings.json
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/artifacts/domain-mappings.json b/samples/applications/app-bursting-pattern/artifacts/domain-mappings.json
deleted file mode 100644
index 17ee4f6..0000000
--- a/samples/applications/app-bursting-pattern/artifacts/domain-mappings.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "domainMappings": [
- {
- "cartridgeAlias":"php1",
- "domainName":"abc.com",
- "contextPath":"/abc/app"
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/app-bursting-pattern/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/scripts/common/deploy.sh b/samples/applications/app-bursting-pattern/scripts/common/deploy.sh
deleted file mode 100755
index df13856..0000000
--- a/samples/applications/app-bursting-pattern/scripts/common/deploy.sh
+++ /dev/null
@@ -1,51 +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_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
-curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-3.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-4.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-4.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
-
-echo "Adding php cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${iaas_cartridges_path}/php.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-4.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies
-
-echo "Adding 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/app-bursting-pattern-app/deploy/application-policy-4
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/app-bursting-pattern/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/scripts/common/undeploy.sh b/samples/applications/app-bursting-pattern/scripts/common/undeploy.sh
deleted file mode 100644
index 2a05ba5..0000000
--- a/samples/applications/app-bursting-pattern/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,33 +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/app-bursting-pattern-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/app-bursting-pattern-app
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/php
-
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
-
-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-4
-
-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
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-4
-
-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-4
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/app-bursting-pattern/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/scripts/ec2/deploy.sh b/samples/applications/app-bursting-pattern/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/app-bursting-pattern/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/app-bursting-pattern/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/scripts/ec2/undeploy.sh b/samples/applications/app-bursting-pattern/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/app-bursting-pattern/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/app-bursting-pattern/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/scripts/kubernetes/deploy.sh b/samples/applications/app-bursting-pattern/scripts/kubernetes/deploy.sh
deleted file mode 100755
index d6c47c1..0000000
--- a/samples/applications/app-bursting-pattern/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`
-kubernetes_clusters_path=`cd "${script_path}/../../../../kubernetes-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}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/app-bursting-pattern/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/scripts/kubernetes/undeploy.sh b/samples/applications/app-bursting-pattern/scripts/kubernetes/undeploy.sh
deleted file mode 100755
index 0054670..0000000
--- a/samples/applications/app-bursting-pattern/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/app-bursting-pattern/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/scripts/mock/deploy.sh b/samples/applications/app-bursting-pattern/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/app-bursting-pattern/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/app-bursting-pattern/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/scripts/mock/undeploy.sh b/samples/applications/app-bursting-pattern/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/app-bursting-pattern/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/app-bursting-pattern/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/scripts/openstack/deploy.sh b/samples/applications/app-bursting-pattern/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/app-bursting-pattern/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/app-bursting-pattern/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/app-bursting-pattern/scripts/openstack/undeploy.sh b/samples/applications/app-bursting-pattern/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/app-bursting-pattern/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/complex-app-with-lb/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/README.md b/samples/applications/complex-app-with-lb/README.md
deleted file mode 100644
index daaacc1..0000000
--- a/samples/applications/complex-app-with-lb/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-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/complex-app-with-lb/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/artifacts/application.json b/samples/applications/complex-app-with-lb/artifacts/application.json
deleted file mode 100644
index e3ba6af..0000000
--- a/samples/applications/complex-app-with-lb/artifacts/application.json
+++ /dev/null
@@ -1,141 +0,0 @@
-{
- "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/complex-app-with-lb/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/common/deploy.sh b/samples/applications/complex-app-with-lb/scripts/common/deploy.sh
deleted file mode 100755
index a1359bd..0000000
--- a/samples/applications/complex-app-with-lb/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
-
-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/complex-app-with-lb/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/common/undeploy.sh b/samples/applications/complex-app-with-lb/scripts/common/undeploy.sh
deleted file mode 100644
index 618348d..0000000
--- a/samples/applications/complex-app-with-lb/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,31 +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/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/complex-app-with-lb/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/ec2/deploy.sh b/samples/applications/complex-app-with-lb/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/complex-app-with-lb/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/complex-app-with-lb/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/ec2/undeploy.sh b/samples/applications/complex-app-with-lb/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/complex-app-with-lb/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/complex-app-with-lb/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/kubernetes/deploy.sh b/samples/applications/complex-app-with-lb/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/complex-app-with-lb/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/complex-app-with-lb/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/kubernetes/undeploy.sh b/samples/applications/complex-app-with-lb/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/complex-app-with-lb/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/complex-app-with-lb/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/mock/deploy.sh b/samples/applications/complex-app-with-lb/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/complex-app-with-lb/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/complex-app-with-lb/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/mock/undeploy.sh b/samples/applications/complex-app-with-lb/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/complex-app-with-lb/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/complex-app-with-lb/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/openstack/deploy.sh b/samples/applications/complex-app-with-lb/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/complex-app-with-lb/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/complex-app-with-lb/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/openstack/undeploy.sh b/samples/applications/complex-app-with-lb/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/complex-app-with-lb/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/complex-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/README.md b/samples/applications/complex-app/README.md
deleted file mode 100644
index 47015bf..0000000
--- a/samples/applications/complex-app/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Complex App
-===========
-
-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/complex-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/artifacts/application.json b/samples/applications/complex-app/artifacts/application.json
deleted file mode 100644
index 7b85f93..0000000
--- a/samples/applications/complex-app/artifacts/application.json
+++ /dev/null
@@ -1,131 +0,0 @@
-{
- "applicationId": "complex-app",
- "alias": "my-complex-app",
- "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": "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": [
- "group.my-group8,cartridge.my-tomcat,group.my-group6"
- ],
- "terminationBehaviour": "terminate-all"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex-app/artifacts/autoscaling-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/artifacts/autoscaling-policy.json b/samples/applications/complex-app/artifacts/autoscaling-policy.json
deleted file mode 100755
index b41726e..0000000
--- a/samples/applications/complex-app/artifacts/autoscaling-policy.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "id": "autoscaling-policy-1",
- "loadThresholds": {
- "requestsInFlight": {
- "threshold": 80
- },
- "memoryConsumption": {
- "threshold": 90
- },
- "loadAverage": {
- "threshold": 50
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex-app/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/artifacts/deployment-policy.json b/samples/applications/complex-app/artifacts/deployment-policy.json
deleted file mode 100644
index 666c299..0000000
--- a/samples/applications/complex-app/artifacts/deployment-policy.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "id": "deployment-policy-1",
- "networkPartition": [
- {
- "id": "network-partition-1",
- "partitionAlgo": "one-after-another",
- "partitions": [
- {
- "id": "partition-1",
- "max": 5
- }
- ]
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/common/deploy.sh b/samples/applications/complex-app/scripts/common/deploy.sh
deleted file mode 100755
index 99f97f0..0000000
--- a/samples/applications/complex-app/scripts/common/deploy.sh
+++ /dev/null
@@ -1,64 +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
-
-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 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/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/complex-app/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/common/undeploy.sh b/samples/applications/complex-app/scripts/common/undeploy.sh
deleted file mode 100644
index 455174f..0000000
--- a/samples/applications/complex-app/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/complex-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/complex-app
-
-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/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
-
-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/complex-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/ec2/deploy.sh b/samples/applications/complex-app/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/complex-app/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/complex-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/ec2/undeploy.sh b/samples/applications/complex-app/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/complex-app/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/complex-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/kubernetes/deploy.sh b/samples/applications/complex-app/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/complex-app/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/complex-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/kubernetes/undeploy.sh b/samples/applications/complex-app/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/complex-app/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/complex-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/mock/deploy.sh b/samples/applications/complex-app/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/complex-app/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/complex-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/mock/undeploy.sh b/samples/applications/complex-app/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/complex-app/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/complex-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/openstack/deploy.sh b/samples/applications/complex-app/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/complex-app/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/complex-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/openstack/undeploy.sh b/samples/applications/complex-app/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/complex-app/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/complex/php-tomcat-group-postgres-mysql-group-esb/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/README.md b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/README.md
new file mode 100644
index 0000000..6cb7cdc
--- /dev/null
+++ b/samples/applications/complex/php-tomcat-group-postgres-mysql-group-esb/README.md
@@ -0,0 +1,10 @@
+single_cartridge
+================
+i) In this artifact sample you can find we have listed them as mock and openstack.
+
+ii) In this sample artifact, it deployes simple application with a php cartridge and start it.
+
+iii) You can choose the IaaS and navigate to it and simply run the single_cartridge.sh file. It'll deploy the relevant artifacts and start the application.
+
+
+This sample can be used to test the startup order pattern. As defined, the application is using dbgroup(mysql, postgres), app-group(tomcat, php) and esb. In this case, appgroup and esb are depending on dbgroup. So, dbgroup should start first. Other two can come up in parallel after dbgroup started. When starting of appgroup, tomcat depends on php. In that case, tomcat will have to come up first and then php. By running this sample, this particular scenario can be simulated.
[06/10] stratos git commit: refining the application samples hierarchy
Posted by is...@apache.org.
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"
+ }
+ }
+ }
+ ]
+ }
+}
+
[10/10] stratos git commit: Merge branch 'samples' with 'master'
Posted by is...@apache.org.
Merge branch 'samples' with 'master'
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/49cac9ba
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/49cac9ba
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/49cac9ba
Branch: refs/heads/master
Commit: 49cac9ba90a58fbfb892592d2544a3b3447bcc3d
Parents: 3ae231b aaa8a0f
Author: Isuru Haththotuwa <is...@apache.org>
Authored: Thu Apr 30 11:55:48 2015 +0530
Committer: Isuru Haththotuwa <is...@apache.org>
Committed: Thu Apr 30 11:55:48 2015 +0530
----------------------------------------------------------------------
.../tests/SampleApplicationsTest.java | 2 +-
.../applications/app-bursting-pattern/README.md | 8 -
.../artifacts/application-signup.json | 18 --
.../artifacts/application.json | 25 ---
.../artifacts/domain-mappings.json | 9 -
.../scripts/common/deploy.sh | 51 -----
.../scripts/common/undeploy.sh | 33 ---
.../app-bursting-pattern/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../app-bursting-pattern/scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../applications/complex-app-with-lb/README.md | 13 --
.../artifacts/application.json | 141 -------------
.../scripts/common/deploy.sh | 67 ------
.../scripts/common/undeploy.sh | 31 ---
.../complex-app-with-lb/scripts/ec2/deploy.sh | 9 -
.../complex-app-with-lb/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../complex-app-with-lb/scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/complex-app/README.md | 13 --
.../complex-app/artifacts/application.json | 131 ------------
.../artifacts/autoscaling-policy.json | 14 --
.../artifacts/deployment-policy.json | 15 --
.../complex-app/scripts/common/deploy.sh | 64 ------
.../complex-app/scripts/common/undeploy.sh | 36 ----
.../complex-app/scripts/ec2/deploy.sh | 9 -
.../complex-app/scripts/ec2/undeploy.sh | 7 -
.../complex-app/scripts/kubernetes/deploy.sh | 15 --
.../complex-app/scripts/kubernetes/undeploy.sh | 13 --
.../complex-app/scripts/mock/deploy.sh | 9 -
.../complex-app/scripts/mock/undeploy.sh | 7 -
.../complex-app/scripts/openstack/deploy.sh | 9 -
.../complex-app/scripts/openstack/undeploy.sh | 7 -
.../README.md | 10 +
.../artifacts/application.json | 121 +++++++++++
.../scripts/common/add-domain-mappings.sh | 9 +
.../scripts/common/add-network-partition.sh | 9 +
.../scripts/common/deploy.sh | 65 ++++++
.../scripts/common/get-application-runtime.sh | 10 +
.../scripts/common/list-domain-mappings.sh | 4 +
.../scripts/common/list-network-partition.sh | 4 +
.../scripts/common/undeploy.sh | 37 ++++
.../scripts/common/update-deployment-policy.sh | 12 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../complex/tomcat-single-signon/README.md | 30 +++
.../artifacts/application.json | 38 ++++
.../scripts/common/deploy.sh | 54 +++++
.../scripts/common/undeploy.sh | 27 +++
.../tomcat-single-signon/scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../tomcat-single-signon/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../complex/wordpress-app/README.md | 20 ++
.../wordpress-app/artifacts/application.json | 41 ++++
.../wordpress-app/scripts/common/deploy.sh | 60 ++++++
.../wordpress-app/scripts/common/undeploy.sh | 35 ++++
.../complex/wordpress-app/scripts/ec2/deploy.sh | 9 +
.../wordpress-app/scripts/ec2/undeploy.sh | 7 +
.../wordpress-app/scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../wordpress-app/scripts/mock/deploy.sh | 9 +
.../wordpress-app/scripts/mock/undeploy.sh | 7 +
.../wordpress-app/scripts/openstack/deploy.sh | 9 +
.../wordpress-app/scripts/openstack/undeploy.sh | 7 +
.../sample-cartridges/README.md | 13 --
.../artifacts/application.json | 46 -----
.../sample-cartridges/scripts/common/deploy.sh | 53 -----
.../scripts/common/undeploy.sh | 21 --
.../sample-cartridges/scripts/ec2/deploy.sh | 9 -
.../sample-cartridges/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../sample-cartridges/scripts/mock/deploy.sh | 9 -
.../sample-cartridges/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../dependent-scaling/sample-groups/README.md | 13 --
.../sample-groups/artifacts/application.json | 74 -------
.../sample-groups/scripts/common/deploy.sh | 58 ------
.../sample-groups/scripts/common/undeploy.sh | 25 ---
.../sample-groups/scripts/ec2/deploy.sh | 9 -
.../sample-groups/scripts/ec2/undeploy.sh | 7 -
.../sample-groups/scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../sample-groups/scripts/mock/deploy.sh | 9 -
.../sample-groups/scripts/mock/undeploy.sh | 7 -
.../sample-groups/scripts/openstack/deploy.sh | 9 -
.../sample-groups/scripts/openstack/undeploy.sh | 7 -
.../README.md | 23 ---
.../artifacts/application.json | 141 -------------
.../scripts/common/deploy.sh | 64 ------
.../scripts/common/undeploy.sh | 35 ----
.../scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/group-cartridges/README.md | 14 --
.../group-cartridges/artifacts/application.json | 49 -----
.../group-cartridges/scripts/common/deploy.sh | 63 ------
.../group-cartridges/scripts/common/undeploy.sh | 38 ----
.../group-cartridges/scripts/ec2/deploy.sh | 9 -
.../group-cartridges/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../group-cartridges/scripts/mock/deploy.sh | 9 -
.../group-cartridges/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/group-scaling-v1/README.md | 18 --
.../group-scaling-v1/artifacts/application.json | 48 -----
.../group-scaling-v1/scripts/common/deploy.sh | 58 ------
.../group-scaling-v1/scripts/common/undeploy.sh | 29 ---
.../group-scaling-v1/scripts/ec2/deploy.sh | 9 -
.../group-scaling-v1/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../group-scaling-v1/scripts/mock/deploy.sh | 9 -
.../group-scaling-v1/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/group-scaling/README.md | 18 --
.../group-scaling/artifacts/application.json | 97 ---------
.../group-scaling/scripts/common/deploy.sh | 72 -------
.../group-scaling/scripts/common/undeploy.sh | 33 ---
.../group-scaling/scripts/ec2/deploy.sh | 9 -
.../group-scaling/scripts/ec2/undeploy.sh | 7 -
.../group-scaling/scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../group-scaling/scripts/mock/deploy.sh | 9 -
.../group-scaling/scripts/mock/undeploy.sh | 7 -
.../group-scaling/scripts/openstack/deploy.sh | 9 -
.../group-scaling/scripts/openstack/undeploy.sh | 7 -
samples/applications/more-complex-app/README.md | 14 --
.../more-complex-app/artifacts/application.json | 202 -------------------
.../more-complex-app/scripts/common/deploy.sh | 64 ------
.../more-complex-app/scripts/common/undeploy.sh | 31 ---
.../more-complex-app/scripts/ec2/deploy.sh | 9 -
.../more-complex-app/scripts/ec2/undeploy.sh | 7 -
.../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 | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../n-level-nesting/artifacts/application.json | 184 -----------------
.../n-level-nesting/scripts/common/deploy.sh | 67 ------
.../n-level-nesting/scripts/common/undeploy.sh | 36 ----
.../n-level-nesting/scripts/ec2/deploy.sh | 9 -
.../n-level-nesting/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../n-level-nesting/scripts/mock/deploy.sh | 9 -
.../n-level-nesting/scripts/mock/undeploy.sh | 7 -
.../n-level-nesting/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/nested-group-v2/README.md | 30 ---
.../nested-group-v2/artifacts/application.json | 97 ---------
.../nested-group-v2/images/nested-group-app.png | Bin 22765 -> 0 bytes
.../nested-group-v2/scripts/common/deploy.sh | 66 ------
.../nested-group-v2/scripts/common/undeploy.sh | 29 ---
.../nested-group-v2/scripts/ec2/deploy.sh | 9 -
.../nested-group-v2/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../nested-group-v2/scripts/mock/deploy.sh | 9 -
.../nested-group-v2/scripts/mock/undeploy.sh | 7 -
.../nested-group-v2/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/nested-group/README.md | 14 --
.../nested-group/artifacts/application.json | 82 --------
.../nested-group/scripts/common/deploy.sh | 62 ------
.../nested-group/scripts/common/undeploy.sh | 29 ---
.../scripts/common/update-deployment-policy.sh | 12 --
.../scripts/common/update-network-partition.sh | 11 -
.../nested-group/scripts/ec2/deploy.sh | 9 -
.../nested-group/scripts/ec2/undeploy.sh | 7 -
.../nested-group/scripts/kubernetes/deploy.sh | 15 --
.../nested-group/scripts/kubernetes/undeploy.sh | 13 --
.../nested-group/scripts/mock/deploy.sh | 9 -
.../nested-group/scripts/mock/undeploy.sh | 7 -
.../scripts/mock/update-network-partition.sh | 6 -
.../nested-group/scripts/openstack/deploy.sh | 9 -
.../nested-group/scripts/openstack/undeploy.sh | 7 -
.../openstack/update-network-partition.sh | 11 -
.../nested/complex-app-with-lb/README.md | 13 ++
.../artifacts/application.json | 141 +++++++++++++
.../scripts/common/deploy.sh | 67 ++++++
.../scripts/common/undeploy.sh | 31 +++
.../complex-app-with-lb/scripts/ec2/deploy.sh | 9 +
.../complex-app-with-lb/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../complex-app-with-lb/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../README.md | 23 +++
.../artifacts/application.json | 141 +++++++++++++
.../scripts/common/deploy.sh | 64 ++++++
.../scripts/common/undeploy.sh | 35 ++++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../artifacts/application.json | 184 +++++++++++++++++
.../scripts/common/deploy.sh | 67 ++++++
.../scripts/common/undeploy.sh | 36 ++++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../single-level-nested-group-app/README.md | 14 ++
.../artifacts/application.json | 82 ++++++++
.../scripts/common/deploy.sh | 62 ++++++
.../scripts/common/undeploy.sh | 29 +++
.../scripts/common/update-deployment-policy.sh | 12 ++
.../scripts/common/update-network-partition.sh | 11 +
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/mock/update-network-partition.sh | 6 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../openstack/update-network-partition.sh | 11 +
.../single-level-nested-groups-app/README.md | 13 ++
.../artifacts/application.json | 131 ++++++++++++
.../artifacts/autoscaling-policy.json | 14 ++
.../artifacts/deployment-policy.json | 15 ++
.../scripts/common/deploy.sh | 64 ++++++
.../scripts/common/undeploy.sh | 36 ++++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../README.md | 10 -
.../artifacts/application.json | 121 -----------
.../scripts/common/add-domain-mappings.sh | 9 -
.../scripts/common/add-network-partition.sh | 9 -
.../scripts/common/deploy.sh | 65 ------
.../scripts/common/get-application-runtime.sh | 10 -
.../scripts/common/list-domain-mappings.sh | 4 -
.../scripts/common/list-network-partition.sh | 4 -
.../scripts/common/undeploy.sh | 37 ----
.../scripts/common/update-deployment-policy.sh | 12 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scaling/app-bursting-pattern/README.md | 8 +
.../artifacts/application-signup.json | 18 ++
.../artifacts/application.json | 25 +++
.../artifacts/domain-mappings.json | 9 +
.../scripts/common/deploy.sh | 51 +++++
.../scripts/common/undeploy.sh | 33 +++
.../app-bursting-pattern/scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../app-bursting-pattern/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../sample-cartridges/README.md | 13 ++
.../artifacts/application.json | 46 +++++
.../sample-cartridges/scripts/common/deploy.sh | 53 +++++
.../scripts/common/undeploy.sh | 21 ++
.../sample-cartridges/scripts/ec2/deploy.sh | 9 +
.../sample-cartridges/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../sample-cartridges/scripts/mock/deploy.sh | 9 +
.../sample-cartridges/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../dependent-scaling/sample-groups/README.md | 13 ++
.../sample-groups/artifacts/application.json | 74 +++++++
.../sample-groups/scripts/common/deploy.sh | 58 ++++++
.../sample-groups/scripts/common/undeploy.sh | 25 +++
.../sample-groups/scripts/ec2/deploy.sh | 9 +
.../sample-groups/scripts/ec2/undeploy.sh | 7 +
.../sample-groups/scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../sample-groups/scripts/mock/deploy.sh | 9 +
.../sample-groups/scripts/mock/undeploy.sh | 7 +
.../sample-groups/scripts/openstack/deploy.sh | 9 +
.../sample-groups/scripts/openstack/undeploy.sh | 7 +
.../group-scaling/group-scaling-app/README.md | 18 ++
.../artifacts/application.json | 97 +++++++++
.../group-scaling-app/scripts/common/deploy.sh | 72 +++++++
.../scripts/common/undeploy.sh | 33 +++
.../group-scaling-app/scripts/ec2/deploy.sh | 9 +
.../group-scaling-app/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../group-scaling-app/scripts/mock/deploy.sh | 9 +
.../group-scaling-app/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../group-scaling/group-scaling-v1/README.md | 18 ++
.../group-scaling-v1/artifacts/application.json | 48 +++++
.../group-scaling-v1/scripts/common/deploy.sh | 58 ++++++
.../group-scaling-v1/scripts/common/undeploy.sh | 29 +++
.../group-scaling-v1/scripts/ec2/deploy.sh | 9 +
.../group-scaling-v1/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../group-scaling-v1/scripts/mock/deploy.sh | 9 +
.../group-scaling-v1/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../single-group-group-scaling/README.md | 13 ++
.../artifacts/application.json | 33 +++
.../scripts/common/deploy.sh | 55 +++++
.../scripts/common/undeploy.sh | 28 +++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../simple/single-cartridge-app/README.md | 8 +
.../artifacts/application-signup.json | 18 ++
.../artifacts/application.json | 25 +++
.../artifacts/domain-mappings.json | 9 +
.../scripts/common/add-domain-mappings.sh | 9 +
.../scripts/common/add-network-partition.sh | 9 +
.../scripts/common/deploy.sh | 49 +++++
.../scripts/common/get-application-runtime.sh | 10 +
.../scripts/common/list-domain-mappings.sh | 4 +
.../scripts/common/list-network-partition.sh | 4 +
.../scripts/common/undeploy.sh | 31 +++
.../scripts/common/update-deployment-policy.sh | 12 ++
.../single-cartridge-app/scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../single-cartridge-app/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../simple/single-group-app/README.md | 15 ++
.../single-group-app/artifacts/application.json | 72 +++++++
.../single-group-app/scripts/common/deploy.sh | 62 ++++++
.../single-group-app/scripts/common/undeploy.sh | 37 ++++
.../single-group-app/scripts/ec2/deploy.sh | 9 +
.../single-group-app/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 ++
.../scripts/kubernetes/undeploy.sh | 13 ++
.../single-group-app/scripts/mock/deploy.sh | 9 +
.../single-group-app/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
samples/applications/single-cartridge/README.md | 8 -
.../artifacts/application-signup.json | 18 --
.../single-cartridge/artifacts/application.json | 25 ---
.../artifacts/domain-mappings.json | 9 -
.../scripts/common/add-domain-mappings.sh | 9 -
.../scripts/common/add-network-partition.sh | 9 -
.../single-cartridge/scripts/common/deploy.sh | 49 -----
.../scripts/common/get-application-runtime.sh | 10 -
.../scripts/common/list-domain-mappings.sh | 4 -
.../scripts/common/list-network-partition.sh | 4 -
.../single-cartridge/scripts/common/undeploy.sh | 31 ---
.../scripts/common/update-deployment-policy.sh | 12 --
.../single-cartridge/scripts/ec2/deploy.sh | 9 -
.../single-cartridge/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../single-cartridge/scripts/mock/deploy.sh | 9 -
.../single-cartridge/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../single-group-cartridge/README.md | 15 --
.../artifacts/application.json | 72 -------
.../scripts/common/deploy.sh | 62 ------
.../scripts/common/undeploy.sh | 37 ----
.../scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../single-group-group-scaling/README.md | 13 --
.../artifacts/application.json | 33 ---
.../scripts/common/deploy.sh | 55 -----
.../scripts/common/undeploy.sh | 28 ---
.../scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/single-group-v1/README.md | 15 --
.../artifacts/application-up.json | 38 ----
.../single-group-v1/artifacts/application.json | 57 ------
.../single-group-v1/scripts/common/deploy.sh | 57 ------
.../single-group-v1/scripts/common/undeploy.sh | 35 ----
.../single-group-v1/scripts/ec2/deploy.sh | 9 -
.../single-group-v1/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../single-group-v1/scripts/mock/deploy.sh | 9 -
.../single-group-v1/scripts/mock/undeploy.sh | 7 -
.../single-group-v1/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/single-group-v2/README.md | 14 --
.../single-group-v2/artifacts/application.json | 72 -------
.../single-group-v2/scripts/common/deploy.sh | 59 ------
.../single-group-v2/scripts/common/undeploy.sh | 31 ---
.../single-group-v2/scripts/ec2/deploy.sh | 9 -
.../single-group-v2/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../single-group-v2/scripts/mock/deploy.sh | 9 -
.../single-group-v2/scripts/mock/undeploy.sh | 7 -
.../single-group-v2/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/single-group-v3/README.md | 14 --
.../single-group-v3/artifacts/application.json | 34 ----
.../single-group-v3/scripts/common/deploy.sh | 53 -----
.../single-group-v3/scripts/common/undeploy.sh | 28 ---
.../single-group-v3/scripts/ec2/deploy.sh | 9 -
.../single-group-v3/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../single-group-v3/scripts/mock/deploy.sh | 9 -
.../single-group-v3/scripts/mock/undeploy.sh | 7 -
.../single-group-v3/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../applications/tomcat-single-signon/README.md | 30 ---
.../artifacts/application.json | 38 ----
.../scripts/common/deploy.sh | 54 -----
.../scripts/common/undeploy.sh | 27 ---
.../tomcat-single-signon/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../tomcat-single-signon/scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/tomcat/README.md | 18 --
.../tomcat/artifacts/application.json | 25 ---
.../tomcat/scripts/common/deploy.sh | 53 -----
.../tomcat/scripts/common/undeploy.sh | 25 ---
.../applications/tomcat/scripts/ec2/deploy.sh | 9 -
.../applications/tomcat/scripts/ec2/undeploy.sh | 7 -
.../tomcat/scripts/kubernetes/deploy.sh | 16 --
.../tomcat/scripts/kubernetes/undeploy.sh | 13 --
.../applications/tomcat/scripts/mock/deploy.sh | 9 -
.../tomcat/scripts/mock/undeploy.sh | 7 -
.../tomcat/scripts/openstack/deploy.sh | 9 -
.../tomcat/scripts/openstack/undeploy.sh | 7 -
.../wordpress-extended-v1/README.md | 22 --
.../artifacts/application.json | 62 ------
.../scripts/common/deploy.sh | 63 ------
.../scripts/common/undeploy.sh | 36 ----
.../wordpress-extended-v1/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../wordpress-extended-v2/README.md | 23 ---
.../artifacts/application.json | 63 ------
.../scripts/common/deploy.sh | 63 ------
.../scripts/common/undeploy.sh | 36 ----
.../wordpress-extended-v2/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 --
.../scripts/kubernetes/undeploy.sh | 13 --
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/wordpress/README.md | 20 --
.../wordpress/artifacts/application.json | 41 ----
.../wordpress/scripts/common/deploy.sh | 60 ------
.../wordpress/scripts/common/undeploy.sh | 35 ----
.../wordpress/scripts/ec2/deploy.sh | 9 -
.../wordpress/scripts/ec2/undeploy.sh | 7 -
.../wordpress/scripts/kubernetes/deploy.sh | 16 --
.../wordpress/scripts/kubernetes/undeploy.sh | 13 --
.../wordpress/scripts/mock/deploy.sh | 9 -
.../wordpress/scripts/mock/undeploy.sh | 7 -
.../wordpress/scripts/openstack/deploy.sh | 9 -
.../wordpress/scripts/openstack/undeploy.sh | 7 -
525 files changed, 4375 insertions(+), 6755 deletions(-)
----------------------------------------------------------------------
[04/10] stratos git commit: refining the application samples hierarchy
Posted by is...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/deploy.sh b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/deploy.sh
deleted file mode 100755
index 07d84e8..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/deploy.sh
+++ /dev/null
@@ -1,65 +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-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
-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 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
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/postgres.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-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
-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 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 mysql-php-group group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/app-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/db-group.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/my-compositeapp/deploy/application-policy-1
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/get-application-runtime.sh
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/get-application-runtime.sh b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/get-application-runtime.sh
deleted file mode 100755
index ed80688..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/get-application-runtime.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-iaas=$1
-host_ip="localhost"
-host_port=9443
-
-set -e
-
-echo "Getting application runtime..."
-curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-cartridge-app/runtime
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-domain-mappings.sh
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-domain-mappings.sh b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-domain-mappings.sh
deleted file mode 100755
index 0b49f6f..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-domain-mappings.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-echo "Listing domain mappings..."
-curl -X GET -H "Content-Type: application/json" -k -u admin:admin https://localhost:9443/api/applications/single-cartridge-app/domainMappings
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-network-partition.sh b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-network-partition.sh
deleted file mode 100755
index 6e3812d..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/list-network-partition.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-echo "Listing network partitions..."
-curl -X GET -H "Content-Type: application/json" -k -u admin:admin https://localhost:9443/api/networkPartitions
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/undeploy.sh b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/undeploy.sh
deleted file mode 100644
index 54613ed..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,37 +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/my-compositeapp/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/my-compositeapp
-
-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/postgres
-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/tomcat
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/esb
-
-
-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
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies/deployment-policy-2
-
-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/php-tomcat-group-postgres-mysql-group-esb/scripts/common/update-deployment-policy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/update-deployment-policy.sh b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/update-deployment-policy.sh
deleted file mode 100755
index f0bd8fb..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/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-1.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/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/deploy.sh b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/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/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/undeploy.sh b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/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/scaling/app-bursting-pattern/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/README.md b/samples/applications/scaling/app-bursting-pattern/README.md
new file mode 100644
index 0000000..8e18c5c
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/README.md
@@ -0,0 +1,8 @@
+app-bursting-pattern
+================
+i) In this artifact sample you can find we have listed them as mock and openstack.
+
+ii) In this sample artifact, it deployed simple tomcat cartridge and start it.
+
+iii) You can choose the IaaS and navigate to it and simply run the single_cartridge.sh file. It'll deploy the relevant artifacts and start the application.
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/app-bursting-pattern/artifacts/application-signup.json
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/artifacts/application-signup.json b/samples/applications/scaling/app-bursting-pattern/artifacts/application-signup.json
new file mode 100644
index 0000000..138648e
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/artifacts/application-signup.json
@@ -0,0 +1,18 @@
+{
+ "artifactRepositories":[
+ {
+ "alias":"php",
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ },
+ {
+ "alias":"tomcat",
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/app-bursting-pattern/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/artifacts/application.json b/samples/applications/scaling/app-bursting-pattern/artifacts/application.json
new file mode 100644
index 0000000..1cb3e57
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/artifacts/application.json
@@ -0,0 +1,25 @@
+{
+ "applicationId":"app-bursting-pattern-app",
+ "alias":"app-bursting-pattern-app",
+ "multiTenant":false,
+ "components":{
+ "cartridges":[
+ {
+ "type":"php",
+ "cartridgeMin": 1,
+ "cartridgeMax": 10,
+ "subscribableInfo":{
+ "alias":"my-php",
+ "autoscalingPolicy":"autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-4",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ]
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/app-bursting-pattern/artifacts/domain-mappings.json
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/artifacts/domain-mappings.json b/samples/applications/scaling/app-bursting-pattern/artifacts/domain-mappings.json
new file mode 100644
index 0000000..17ee4f6
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/artifacts/domain-mappings.json
@@ -0,0 +1,9 @@
+{
+ "domainMappings": [
+ {
+ "cartridgeAlias":"php1",
+ "domainName":"abc.com",
+ "contextPath":"/abc/app"
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/app-bursting-pattern/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/scripts/common/deploy.sh b/samples/applications/scaling/app-bursting-pattern/scripts/common/deploy.sh
new file mode 100755
index 0000000..41d4d3e
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/scripts/common/deploy.sh
@@ -0,0 +1,51 @@
+#!/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_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
+curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-3.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-4.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-4.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
+
+echo "Adding php cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${iaas_cartridges_path}/php.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-4.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies
+
+echo "Adding 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/app-bursting-pattern-app/deploy/application-policy-4
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/app-bursting-pattern/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/scripts/common/undeploy.sh b/samples/applications/scaling/app-bursting-pattern/scripts/common/undeploy.sh
new file mode 100644
index 0000000..2a05ba5
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/scripts/common/undeploy.sh
@@ -0,0 +1,33 @@
+#!/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-bursting-pattern-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/app-bursting-pattern-app
+
+echo "Removing cartridges..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/php
+
+echo "Removing autoscale policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
+
+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-4
+
+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
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-3
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-4
+
+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-4
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/app-bursting-pattern/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/scripts/ec2/deploy.sh b/samples/applications/scaling/app-bursting-pattern/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/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/scaling/app-bursting-pattern/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/scripts/ec2/undeploy.sh b/samples/applications/scaling/app-bursting-pattern/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/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/scaling/app-bursting-pattern/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/scripts/kubernetes/deploy.sh b/samples/applications/scaling/app-bursting-pattern/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..eab754c
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/scripts/kubernetes/deploy.sh
@@ -0,0 +1,16 @@
+#!/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`
+kubernetes_clusters_path=`cd "${script_path}/../../../../../kubernetes-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}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/app-bursting-pattern/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/scripts/kubernetes/undeploy.sh b/samples/applications/scaling/app-bursting-pattern/scripts/kubernetes/undeploy.sh
new file mode 100755
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/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/scaling/app-bursting-pattern/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/scripts/mock/deploy.sh b/samples/applications/scaling/app-bursting-pattern/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/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/scaling/app-bursting-pattern/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/scripts/mock/undeploy.sh b/samples/applications/scaling/app-bursting-pattern/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/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/scaling/app-bursting-pattern/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/scripts/openstack/deploy.sh b/samples/applications/scaling/app-bursting-pattern/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/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/scaling/app-bursting-pattern/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/app-bursting-pattern/scripts/openstack/undeploy.sh b/samples/applications/scaling/app-bursting-pattern/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/app-bursting-pattern/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/scaling/dependent-scaling/sample-cartridges/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/README.md b/samples/applications/scaling/dependent-scaling/sample-cartridges/README.md
new file mode 100644
index 0000000..34feba2
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/README.md
@@ -0,0 +1,13 @@
+sample-cartridges
+=================
+
+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/scaling/dependent-scaling/sample-cartridges/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/artifacts/application.json b/samples/applications/scaling/dependent-scaling/sample-cartridges/artifacts/application.json
new file mode 100644
index 0000000..03fe033
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/artifacts/application.json
@@ -0,0 +1,46 @@
+{
+ "applicationId": "dependency-scaling-cartridges-app",
+ "alias": "my-dependency-scaling-cartridges-app",
+ "components": {
+ "cartridges": [
+ {
+ "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":""
+ }
+ }
+ },
+ {
+ "type": "php",
+ "cartridgeMin": 2,
+ "cartridgeMax": 4,
+ "subscribableInfo": {
+ "alias": "my-php",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ],
+ "dependencies": {
+ "scalingDependants": [
+ "cartridge.my-tomcat, cartridge.my-php"
+ ],
+ "terminationBehaviour": "terminate-none"
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/common/deploy.sh b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/common/deploy.sh
new file mode 100755
index 0000000..d0c5dbb
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/common/deploy.sh
@@ -0,0 +1,53 @@
+#!/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`
+cartridges_path=`cd "${script_path}/../../../../../../cartridges/${iaas}"; 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 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 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
+
+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
+
+
+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/dependency-scaling-cartridges-app/deploy/application-policy-1
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/common/undeploy.sh b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/common/undeploy.sh
new file mode 100644
index 0000000..79ce013
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/common/undeploy.sh
@@ -0,0 +1,21 @@
+#!/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/sample-cartridges-app/undeploy
+
+sleep 10
+
+echo "Deleting application..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/sample-cartridges-app
+
+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/php
+
+echo "Removing autoscale policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/ec2/deploy.sh b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/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/scaling/dependent-scaling/sample-cartridges/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/ec2/undeploy.sh b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/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/scaling/dependent-scaling/sample-cartridges/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/kubernetes/deploy.sh b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..32eff3c
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/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/scaling/dependent-scaling/sample-cartridges/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/kubernetes/undeploy.sh b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/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/scaling/dependent-scaling/sample-cartridges/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/mock/deploy.sh b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/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/scaling/dependent-scaling/sample-cartridges/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/mock/undeploy.sh b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/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/scaling/dependent-scaling/sample-cartridges/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/openstack/deploy.sh b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/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/scaling/dependent-scaling/sample-cartridges/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/openstack/undeploy.sh b/samples/applications/scaling/dependent-scaling/sample-cartridges/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-cartridges/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/scaling/dependent-scaling/sample-groups/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/README.md b/samples/applications/scaling/dependent-scaling/sample-groups/README.md
new file mode 100644
index 0000000..d1adf79
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/README.md
@@ -0,0 +1,13 @@
+sample-groups
+=============
+
+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/scaling/dependent-scaling/sample-groups/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/artifacts/application.json b/samples/applications/scaling/dependent-scaling/sample-groups/artifacts/application.json
new file mode 100644
index 0000000..f261596
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/artifacts/application.json
@@ -0,0 +1,74 @@
+{
+ "applicationId": "dependency-scaling-groups-app",
+ "alias": "my-dependency-scaling-groups-app",
+ "components": {
+ "groups": [
+ {
+ "name": "esb-php-group",
+ "alias": "my-esb-php-group",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 2,
+ "deploymentPolicy": "deployment-policy-1",
+ "cartridges": [
+ {
+ "type": "esb",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-esb",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-esb-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ },
+ {
+ "type": "php",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-php",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "deploymentPolicy":"deployment-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cartridges": [
+ {
+ "type": "tomcat",
+ "cartridgeMin": 2,
+ "cartridgeMax": 4,
+ "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": {
+ "scalingDependants": [
+ "group.my-esb-php-group, cartridge.my-tomcat"
+ ],
+ "terminationBehaviour": "terminate-none"
+ }
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/dependent-scaling/sample-groups/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/scripts/common/deploy.sh b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/common/deploy.sh
new file mode 100755
index 0000000..7f093d0
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/common/deploy.sh
@@ -0,0 +1,58 @@
+#!/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`
+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}:9443/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 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 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 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-php-group group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/esb-php-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
+
+sleep 1
+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 "Adding 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/dependency-scaling-groups-app/deploy/application-policy-1
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/dependent-scaling/sample-groups/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/scripts/common/undeploy.sh b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/common/undeploy.sh
new file mode 100644
index 0000000..a69d60d
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/common/undeploy.sh
@@ -0,0 +1,25 @@
+#!/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/dependency-scaling-groups-app/undeploy
+
+sleep 10
+
+echo "Deleting application..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/dependency-scaling-groups-app
+
+echo "Removing groups..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/esb-php-group
+
+echo "Removing cartridges..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat
+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/php
+
+echo "Removing autoscale policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/dependent-scaling/sample-groups/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/scripts/ec2/deploy.sh b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/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/scaling/dependent-scaling/sample-groups/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/scripts/ec2/undeploy.sh b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/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/scaling/dependent-scaling/sample-groups/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/scripts/kubernetes/deploy.sh b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..32eff3c
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/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/scaling/dependent-scaling/sample-groups/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/scripts/kubernetes/undeploy.sh b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/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/scaling/dependent-scaling/sample-groups/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/scripts/mock/deploy.sh b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/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/scaling/dependent-scaling/sample-groups/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/scripts/mock/undeploy.sh b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/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/scaling/dependent-scaling/sample-groups/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/scripts/openstack/deploy.sh b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/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/scaling/dependent-scaling/sample-groups/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/dependent-scaling/sample-groups/scripts/openstack/undeploy.sh b/samples/applications/scaling/dependent-scaling/sample-groups/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/dependent-scaling/sample-groups/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/scaling/group-scaling/group-scaling-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/README.md b/samples/applications/scaling/group-scaling/group-scaling-app/README.md
new file mode 100644
index 0000000..1443d02
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/README.md
@@ -0,0 +1,18 @@
+Group Scaling
+===========
+
+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
+
+How to undeploy
+---------------
+cd scripts/<iaas>/
+./undeploy.sh
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/group-scaling/group-scaling-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/artifacts/application.json b/samples/applications/scaling/group-scaling/group-scaling-app/artifacts/application.json
new file mode 100644
index 0000000..c2b3f3c
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/artifacts/application.json
@@ -0,0 +1,97 @@
+{
+ "applicationId": "group-scaling",
+ "alias": "my-group-scaling",
+ "components": {
+ "groups": [
+ {
+ "name": "group1",
+ "alias": "my-group1",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 1,
+ "deploymentPolicy":"deployment-policy-1",
+ "groups": [
+ {
+ "name": "group2",
+ "alias": "my-group2",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 2,
+ "cartridges": [
+ {
+ "type": "c2",
+ "cartridgeMin": 2,
+ "cartridgeMax": 4,
+ "subscribableInfo": {
+ "alias": "my-c2-group2",
+ "autoscalingPolicy": "autoscaling-policy-c2",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-c2-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ },
+ {
+ "type": "c3",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-c3-group2",
+ "autoscalingPolicy": "autoscaling-policy-c3",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-c3-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cartridges": [
+ {
+ "type": "c1",
+ "cartridgeMin": 2,
+ "cartridgeMax": 4,
+ "subscribableInfo": {
+ "alias": "my-c1-group1",
+ "autoscalingPolicy": "autoscaling-policy-c1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-c1-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cartridges": [
+ {
+ "type": "c4",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-c4",
+ "autoscalingPolicy": "autoscaling-policy-c4",
+ "deploymentPolicy":"deployment-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-c4-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ],
+ "dependencies": {
+ "startupOrders": [
+ "group.my-group1,cartridge.my-c4"
+ ],
+ "terminationBehaviour": "terminate-dependents"
+ }
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/group-scaling/group-scaling-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/scripts/common/deploy.sh b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/common/deploy.sh
new file mode 100644
index 0000000..9a10248
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/common/deploy.sh
@@ -0,0 +1,72 @@
+#!/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 "Adding autoscaling policy c1..."
+curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+echo "Adding autoscaling policy c2..."
+curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+echo "Adding autoscaling policy c3..."
+curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+echo "Adding autoscaling policy c4..."
+curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c4.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 c1 cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding c2 cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding c3 cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding c4 cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c4.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding group1 group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
+
+sleep 1
+
+echo "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/group-scaling/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/group-scaling/group-scaling-app/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/scripts/common/undeploy.sh b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/common/undeploy.sh
new file mode 100644
index 0000000..599e6d7
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/common/undeploy.sh
@@ -0,0 +1,33 @@
+#!/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/group-scaling/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/group-scaling
+
+echo "Removing groups..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group1
+
+echo "Removing cartridges..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c1
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c2
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c3
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c4
+
+echo "Removing autoscaling policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c1
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c2
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c3
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c4
+
+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/scaling/group-scaling/group-scaling-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/scripts/ec2/deploy.sh b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/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/scaling/group-scaling/group-scaling-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/scripts/ec2/undeploy.sh b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/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/scaling/group-scaling/group-scaling-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/scripts/kubernetes/deploy.sh b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..32eff3c
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/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/scaling/group-scaling/group-scaling-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/scripts/kubernetes/undeploy.sh b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/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/scaling/group-scaling/group-scaling-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/scripts/mock/deploy.sh b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/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/scaling/group-scaling/group-scaling-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/scripts/mock/undeploy.sh b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/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/scaling/group-scaling/group-scaling-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/scripts/openstack/deploy.sh b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/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/scaling/group-scaling/group-scaling-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-app/scripts/openstack/undeploy.sh b/samples/applications/scaling/group-scaling/group-scaling-app/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-app/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/scaling/group-scaling/group-scaling-v1/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/README.md b/samples/applications/scaling/group-scaling/group-scaling-v1/README.md
new file mode 100644
index 0000000..7b09b98
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/README.md
@@ -0,0 +1,18 @@
+Group Scaling v1
+================
+
+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
+
+How to undeploy
+---------------
+cd scripts/<iaas>/
+./undeploy.sh
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/group-scaling/group-scaling-v1/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/artifacts/application.json b/samples/applications/scaling/group-scaling/group-scaling-v1/artifacts/application.json
new file mode 100644
index 0000000..c486e93
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/artifacts/application.json
@@ -0,0 +1,48 @@
+{
+ "applicationId": "group-scaling-v1",
+ "alias": "my-group-scaling-v1",
+ "components": {
+ "groups": [
+ {
+ "name": "group2",
+ "alias": "my-group2",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 2,
+ "deploymentPolicy":"deployment-policy-1",
+ "cartridges": [
+ {
+ "type": "c2",
+ "cartridgeMin": 2,
+ "cartridgeMax": 4,
+ "subscribableInfo": {
+ "alias": "my-c2",
+ "autoscalingPolicy": "autoscaling-policy-c2",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-c2-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ },
+ {
+ "type": "c3",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "my-c3",
+ "autoscalingPolicy": "autoscaling-policy-c3",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-c3-applications.git",
+ "repoUsername":"",
+ "repoPassword":""
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/common/deploy.sh b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/common/deploy.sh
new file mode 100644
index 0000000..f6424b5
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/common/deploy.sh
@@ -0,0 +1,58 @@
+#!/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 "Adding autoscaling policy c2..."
+curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+echo "Adding autoscaling policy c3..."
+curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c3.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 c2 cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding c3 cartridge..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
+
+echo "Adding group1b group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group1b.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
+
+echo "Deploying application..."
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-scaling-v1/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/common/undeploy.sh b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/common/undeploy.sh
new file mode 100644
index 0000000..cbca5a0
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/common/undeploy.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+host_ip="localhost"
+host_port=9443
+
+set -e
+
+echo "Undeploying application..."
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-scaling-v1/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/group-scaling-v1
+
+echo "Removing groups..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group2
+
+echo "Removing cartridges..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c2
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c3
+
+echo "Removing autoscaling policies..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c2
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c3
+
+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/scaling/group-scaling/group-scaling-v1/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/ec2/deploy.sh b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/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/scaling/group-scaling/group-scaling-v1/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/ec2/undeploy.sh b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/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/scaling/group-scaling/group-scaling-v1/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/kubernetes/deploy.sh b/samples/applications/scaling/group-scaling/group-scaling-v1/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..32eff3c
--- /dev/null
+++ b/samples/applications/scaling/group-scaling/group-scaling-v1/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
[02/10] stratos git commit: refining the application samples hierarchy
Posted by is...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-cartridge/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/mock/undeploy.sh b/samples/applications/single-group-cartridge/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/single-group-cartridge/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/single-group-cartridge/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/openstack/deploy.sh b/samples/applications/single-group-cartridge/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/single-group-cartridge/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/single-group-cartridge/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-cartridge/scripts/openstack/undeploy.sh b/samples/applications/single-group-cartridge/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-group-cartridge/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/single-group-group-scaling/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/README.md b/samples/applications/single-group-group-scaling/README.md
deleted file mode 100644
index 7ba069c..0000000
--- a/samples/applications/single-group-group-scaling/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-single-group-group-scaling
-==========================
-
-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/single-group-group-scaling/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/artifacts/application.json b/samples/applications/single-group-group-scaling/artifacts/application.json
deleted file mode 100644
index 08c7ede..0000000
--- a/samples/applications/single-group-group-scaling/artifacts/application.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "applicationId": "single-group-group-scaling",
- "alias": "my-single-group-group-scaling",
- "components": {
- "groups": [
- {
- "name": "group6",
- "alias": "my-group6",
- "groupMinInstances": 1,
- "groupMaxInstances": 3,
- "deploymentPolicy":"deployment-policy-1",
- "cartridges": [
- {
- "type": "tomcat",
- "cartridgeMin": 1,
- "cartridgeMax": 4,
- "subscribableInfo": {
- "alias": "my-tomcat",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
- ]
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-group-scaling/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/common/deploy.sh b/samples/applications/single-group-group-scaling/scripts/common/deploy.sh
deleted file mode 100755
index f4dbcb0..0000000
--- a/samples/applications/single-group-group-scaling/scripts/common/deploy.sh
+++ /dev/null
@@ -1,55 +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
-
-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 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 group6c4 group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c4.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/single-group-group-scaling/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-group-scaling/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/common/undeploy.sh b/samples/applications/single-group-group-scaling/scripts/common/undeploy.sh
deleted file mode 100644
index 7060ee1..0000000
--- a/samples/applications/single-group-group-scaling/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,28 +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/single-group-group-scaling/undeploy
-
-sleep 10
-
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-group-scaling
-
-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
-
-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/single-group-group-scaling/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/ec2/deploy.sh b/samples/applications/single-group-group-scaling/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/single-group-group-scaling/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/single-group-group-scaling/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/ec2/undeploy.sh b/samples/applications/single-group-group-scaling/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-group-group-scaling/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/single-group-group-scaling/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/kubernetes/deploy.sh b/samples/applications/single-group-group-scaling/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/single-group-group-scaling/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/single-group-group-scaling/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/kubernetes/undeploy.sh b/samples/applications/single-group-group-scaling/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/single-group-group-scaling/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/single-group-group-scaling/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/mock/deploy.sh b/samples/applications/single-group-group-scaling/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/single-group-group-scaling/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/single-group-group-scaling/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/mock/undeploy.sh b/samples/applications/single-group-group-scaling/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/single-group-group-scaling/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/single-group-group-scaling/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/openstack/deploy.sh b/samples/applications/single-group-group-scaling/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/single-group-group-scaling/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/single-group-group-scaling/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-group-scaling/scripts/openstack/undeploy.sh b/samples/applications/single-group-group-scaling/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-group-group-scaling/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/single-group-v1/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/README.md b/samples/applications/single-group-v1/README.md
deleted file mode 100644
index 294a1a2..0000000
--- a/samples/applications/single-group-v1/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-single_group_v1
-==============
-
-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/single-group-v1/artifacts/application-up.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/artifacts/application-up.json b/samples/applications/single-group-v1/artifacts/application-up.json
deleted file mode 100644
index d4a4a54..0000000
--- a/samples/applications/single-group-v1/artifacts/application-up.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "applicationId": "single-group-v1",
- "alias": "my-single-group-v1",
- "components": {
- "groups": [
- {
- "name": "group6",
- "alias": "my-group6",
- "groupMinInstances": 1,
- "groupMaxInstances": 6,
- "deploymentPolicy":"deployment-policy-1",
- "cartridges": [
- {
- "type": "tomcat1",
- "cartridgeMin": 2,
- "cartridgeMax": 10,
- "subscribableInfo": {
- "alias": "my-tomcat1",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
- ],
- "cartridges": [
- ],
- "dependencies": {
- "terminationBehaviour": "terminate-none"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-v1/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/artifacts/application.json b/samples/applications/single-group-v1/artifacts/application.json
deleted file mode 100644
index 25b4aad..0000000
--- a/samples/applications/single-group-v1/artifacts/application.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "applicationId": "single-group-v1",
- "alias": "my-single-group-v1",
- "components": {
- "groups": [
- {
- "name": "group6",
- "alias": "my-group6",
- "groupMinInstances": 2,
- "groupMaxInstances": 3,
- "deploymentPolicy":"deployment-policy-3",
- "cartridges": [
- {
- "type": "tomcat1",
- "cartridgeMin": 1,
- "cartridgeMax": 1,
- "subscribableInfo": {
- "alias": "my-tomcat1",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
- ],
- "cartridges": [
- {
- "type": "tomcat",
- "cartridgeMin": 1,
- "cartridgeMax": 1,
- "subscribableInfo": {
- "alias": "my-tomcat",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-3",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ],
- "dependencies": {
- "startupOrders": [
- "group.my-group6,cartridge.my-tomcat"
- ],
- "terminationBehaviour": "terminate-none"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-v1/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/common/deploy.sh b/samples/applications/single-group-v1/scripts/common/deploy.sh
deleted file mode 100755
index bc62050..0000000
--- a/samples/applications/single-group-v1/scripts/common/deploy.sh
+++ /dev/null
@@ -1,57 +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-3.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-3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
-
-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 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 group6 group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c5.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
-
-echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-v1/deploy/application-policy-1
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-v1/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/common/undeploy.sh b/samples/applications/single-group-v1/scripts/common/undeploy.sh
deleted file mode 100644
index a6a09b9..0000000
--- a/samples/applications/single-group-v1/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,35 +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/single-group-v1/undeploy
-
-sleep 10
-
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-v1
-
-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/tomcat1
-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-3
-
-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-3
-
-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/single-group-v1/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/ec2/deploy.sh b/samples/applications/single-group-v1/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/single-group-v1/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/single-group-v1/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/ec2/undeploy.sh b/samples/applications/single-group-v1/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-group-v1/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/single-group-v1/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/kubernetes/deploy.sh b/samples/applications/single-group-v1/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/single-group-v1/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/single-group-v1/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/kubernetes/undeploy.sh b/samples/applications/single-group-v1/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/single-group-v1/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/single-group-v1/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/mock/deploy.sh b/samples/applications/single-group-v1/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/single-group-v1/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/single-group-v1/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/mock/undeploy.sh b/samples/applications/single-group-v1/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/single-group-v1/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/single-group-v1/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/openstack/deploy.sh b/samples/applications/single-group-v1/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/single-group-v1/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/single-group-v1/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v1/scripts/openstack/undeploy.sh b/samples/applications/single-group-v1/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-group-v1/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/single-group-v2/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/README.md b/samples/applications/single-group-v2/README.md
deleted file mode 100644
index 8b52d4b..0000000
--- a/samples/applications/single-group-v2/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-single_group_v2
-===============
-
-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/single-group-v2/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/artifacts/application.json b/samples/applications/single-group-v2/artifacts/application.json
deleted file mode 100644
index df537bb..0000000
--- a/samples/applications/single-group-v2/artifacts/application.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "applicationId": "single_group_v2",
- "alias": "my-single_group_v2",
- "components": {
- "groups": [
- {
- "name": "tomcat-group",
- "alias": "my-tomcat-group",
- "groupMinInstances": 1,
- "groupMaxInstances": 1,
- "deploymentPolicy":"deployment-policy-3",
- "cartridges": [
- {
- "type": "tomcat2",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat2",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- },
- {
- "type": "tomcat1",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat1",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
- ],
- "cartridges": [
- {
- "type": "tomcat",
- "cartridgeMin": 1,
- "cartridgeMax": 2,
- "subscribableInfo": {
- "alias": "my-tomcat",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy":"deployment-policy-3",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ],
- "dependencies": {
- "startupOrders": [
- "group.my-tomcat-group,cartridge.my-tomcat"
- ],
- "terminationBehaviour": "terminate-none"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-v2/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/common/deploy.sh b/samples/applications/single-group-v2/scripts/common/deploy.sh
deleted file mode 100755
index c665ddf..0000000
--- a/samples/applications/single-group-v2/scripts/common/deploy.sh
+++ /dev/null
@@ -1,59 +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-3.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-3.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 tomcat-group group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/tomcat-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
-
-sleep 1
-
-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
-
-echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single_group_v2/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-v2/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/common/undeploy.sh b/samples/applications/single-group-v2/scripts/common/undeploy.sh
deleted file mode 100644
index b47ac59..0000000
--- a/samples/applications/single-group-v2/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,31 +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/single_group_v2/undeploy
-
-sleep 10
-
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single_group_v2
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/tomcat-group
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat
-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/single-group-v2/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/ec2/deploy.sh b/samples/applications/single-group-v2/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/single-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/single-group-v2/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/ec2/undeploy.sh b/samples/applications/single-group-v2/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-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/single-group-v2/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/kubernetes/deploy.sh b/samples/applications/single-group-v2/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/single-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/single-group-v2/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/kubernetes/undeploy.sh b/samples/applications/single-group-v2/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/single-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/single-group-v2/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/mock/deploy.sh b/samples/applications/single-group-v2/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/single-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/single-group-v2/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/mock/undeploy.sh b/samples/applications/single-group-v2/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/single-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/single-group-v2/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/openstack/deploy.sh b/samples/applications/single-group-v2/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/single-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/single-group-v2/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v2/scripts/openstack/undeploy.sh b/samples/applications/single-group-v2/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-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/single-group-v3/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/README.md b/samples/applications/single-group-v3/README.md
deleted file mode 100644
index 34cfb83..0000000
--- a/samples/applications/single-group-v3/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-single_group_v3
-===============
-
-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/single-group-v3/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/artifacts/application.json b/samples/applications/single-group-v3/artifacts/application.json
deleted file mode 100644
index 42f5382..0000000
--- a/samples/applications/single-group-v3/artifacts/application.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "applicationId": "single-group-v3",
- "alias": "my-single-group-v3",
- "components": {
- "groups": [
- {
- "name": "tomcat2-group",
- "alias": "my-tomcat2-group",
- "groupMinInstances": 3,
- "groupMaxInstances": 4,
- "deploymentPolicy":"deployment-policy-1",
- "cartridges": [
- {
- "type": "tomcat2",
- "cartridgeMin": 1,
- "cartridgeMax": 1,
- "subscribableInfo": {
- "alias": "my-tomcat2",
- "autoscalingPolicy": "autoscaling-policy-1",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- }
- ]
- }
- ]
- }
-}
-
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-v3/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/common/deploy.sh b/samples/applications/single-group-v3/scripts/common/deploy.sh
deleted file mode 100755
index ec0fb4e..0000000
--- a/samples/applications/single-group-v3/scripts/common/deploy.sh
+++ /dev/null
@@ -1,53 +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
-
-echo "Adding deployment policies..."
-curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies
-
-echo "Adding tomcat2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-echo "Adding tomcat2-group group..."
-curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/tomcat2-group.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups
-
-sleep 1
-
-echo "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
-
-echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-v3/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/single-group-v3/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/common/undeploy.sh b/samples/applications/single-group-v3/scripts/common/undeploy.sh
deleted file mode 100644
index c70d646..0000000
--- a/samples/applications/single-group-v3/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,28 +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/single-group-v3/undeploy
-
-sleep 10
-
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-group-v3
-
-echo "Removing groups..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/tomcat2-group
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/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/single-group-v3/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/ec2/deploy.sh b/samples/applications/single-group-v3/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/single-group-v3/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/single-group-v3/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/ec2/undeploy.sh b/samples/applications/single-group-v3/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-group-v3/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/single-group-v3/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/kubernetes/deploy.sh b/samples/applications/single-group-v3/scripts/kubernetes/deploy.sh
deleted file mode 100755
index 32eff3c..0000000
--- a/samples/applications/single-group-v3/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/single-group-v3/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/kubernetes/undeploy.sh b/samples/applications/single-group-v3/scripts/kubernetes/undeploy.sh
deleted file mode 100644
index 0054670..0000000
--- a/samples/applications/single-group-v3/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/single-group-v3/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/mock/deploy.sh b/samples/applications/single-group-v3/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/single-group-v3/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/single-group-v3/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/mock/undeploy.sh b/samples/applications/single-group-v3/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/single-group-v3/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/single-group-v3/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/openstack/deploy.sh b/samples/applications/single-group-v3/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/single-group-v3/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/single-group-v3/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-group-v3/scripts/openstack/undeploy.sh b/samples/applications/single-group-v3/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/single-group-v3/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/tomcat-single-signon/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/README.md b/samples/applications/tomcat-single-signon/README.md
deleted file mode 100644
index 5247a3f..0000000
--- a/samples/applications/tomcat-single-signon/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-#Tomcat Single Sign On Sample Application
-
-This sample application demonstrate how Single Sign On (SAML2) configuration can be automated with Composite
-Application Model using Tomcat and WSO2 Identity Server. It includes a cartridge for Tomcat 7 and WSO2 Identity
-Server 5.0.0 and a set of cartridge agent plugins for handling the SSO configuration.
-
-###Tomcat Dockerfile
-https://github.com/apache/stratos/tree/master/tools/docker-images/cartridge-docker-images/service-images/tomcat-saml-sso/Dockerfile
-
-###Tomcat Cartridge Agent Plugins
-https://github.com/apache/stratos/tree/master/tools/docker-images/cartridge-docker-images/service-images/tomcat-saml-sso/packs/plugins
-
-###WSO2 Identity Server Dockerfile:
-https://github.com/apache/stratos/tree/master/tools/docker-images/cartridge-docker-images/service-images/wso2is-saml-sso/Dockerfile
-
-###WSO2 Identity Server Cartridge Agent Plugins
-https://github.com/apache/stratos/tree/master/tools/docker-images/cartridge-docker-images/service-images/wso2is-saml-sso/packs/plugins
-
-###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
-```
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/tomcat-single-signon/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/artifacts/application.json b/samples/applications/tomcat-single-signon/artifacts/application.json
deleted file mode 100644
index 2f237c1..0000000
--- a/samples/applications/tomcat-single-signon/artifacts/application.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "applicationId": "tomcat-single-signon",
- "alias": "tomcat-single-signon",
- "components": {
-
- "cartridges": [
- {
- "type": "tomcat3",
- "cartridgeMin": 1,
- "cartridgeMax": 1,
- "subscribableInfo": {
- "alias": "mytomcat3",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy": "deployment-policy-3",
- "artifactRepository":{
- "privateRepo":false,
- "repoUrl":"https://github.com/chamilad/travelocity-sample",
- "repoUsername":"",
- "repoPassword":""
- }
- }
- },
- {
- "type": "wso2is",
- "cartridgeMin": 1,
- "cartridgeMax": 1,
- "subscribableInfo": {
- "alias": "mywso2is",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy": "deployment-policy-3"
- }
- }
- ],
- "dependencies": {
- "terminationBehaviour": "terminate-none"
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/tomcat-single-signon/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/common/deploy.sh b/samples/applications/tomcat-single-signon/scripts/common/deploy.sh
deleted file mode 100755
index bb4e07c..0000000
--- a/samples/applications/tomcat-single-signon/scripts/common/deploy.sh
+++ /dev/null
@@ -1,54 +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_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 ${artifacts_path}/autoscaling-policy.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-3.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-3.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 "@${iaas_cartridges_path}/tomcat3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges
-
-echo "Adding wso2-is cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${iaas_cartridges_path}/wso2-is.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-2.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/tomcat-single-signon/deploy/application-policy-2
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/tomcat-single-signon/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/common/undeploy.sh b/samples/applications/tomcat-single-signon/scripts/common/undeploy.sh
deleted file mode 100644
index 9e50142..0000000
--- a/samples/applications/tomcat-single-signon/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,27 +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/tomcat-single-signon/undeploy
-
-sleep 10
-
-echo "Deleting application..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/single-cartridge-app
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat3
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/wso2-is
-
-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-2
-
-
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/tomcat-single-signon/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/ec2/deploy.sh b/samples/applications/tomcat-single-signon/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/tomcat-single-signon/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/tomcat-single-signon/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/ec2/undeploy.sh b/samples/applications/tomcat-single-signon/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/tomcat-single-signon/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/tomcat-single-signon/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/kubernetes/deploy.sh b/samples/applications/tomcat-single-signon/scripts/kubernetes/deploy.sh
deleted file mode 100755
index d6c47c1..0000000
--- a/samples/applications/tomcat-single-signon/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`
-kubernetes_clusters_path=`cd "${script_path}/../../../../kubernetes-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}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/tomcat-single-signon/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/kubernetes/undeploy.sh b/samples/applications/tomcat-single-signon/scripts/kubernetes/undeploy.sh
deleted file mode 100755
index c450ea0..0000000
--- a/samples/applications/tomcat-single-signon/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-ec2
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/tomcat-single-signon/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/mock/deploy.sh b/samples/applications/tomcat-single-signon/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/tomcat-single-signon/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/tomcat-single-signon/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/mock/undeploy.sh b/samples/applications/tomcat-single-signon/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/tomcat-single-signon/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/tomcat-single-signon/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/openstack/deploy.sh b/samples/applications/tomcat-single-signon/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/tomcat-single-signon/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/tomcat-single-signon/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat-single-signon/scripts/openstack/undeploy.sh b/samples/applications/tomcat-single-signon/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/tomcat-single-signon/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/tomcat/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/README.md b/samples/applications/tomcat/README.md
deleted file mode 100644
index 2faa840..0000000
--- a/samples/applications/tomcat/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-Tomcat Application
-==================
-Tomcat application provides an Apache Tomcat 7 cluster. It has no cartridge groups or any dependencies.
-
-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
-```
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/tomcat/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/artifacts/application.json b/samples/applications/tomcat/artifacts/application.json
deleted file mode 100644
index 91db4ea..0000000
--- a/samples/applications/tomcat/artifacts/application.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "applicationId": "tomcat",
- "alias": "tomcat",
- "multiTenant": false,
- "components": {
- "cartridges": [
- {
- "type": "tomcat",
- "cartridgeMin": 1,
- "cartridgeMax": 5,
- "subscribableInfo": {
- "alias": "tomcat-1",
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy": "deployment-policy-1",
- "artifactRepository": {
- "privateRepo": false,
- "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
- "repoUsername": "",
- "repoPassword": ""
- }
- }
- }
- ]
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/tomcat/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/scripts/common/deploy.sh b/samples/applications/tomcat/scripts/common/deploy.sh
deleted file mode 100755
index 507d9e7..0000000
--- a/samples/applications/tomcat/scripts/common/deploy.sh
+++ /dev/null
@@ -1,53 +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`
-iaas_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 ${artifacts_path}/autoscaling-policy.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 tomcat cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@${iaas_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 "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/tomcat/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/tomcat/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/scripts/common/undeploy.sh b/samples/applications/tomcat/scripts/common/undeploy.sh
deleted file mode 100644
index ebbfabb..0000000
--- a/samples/applications/tomcat/scripts/common/undeploy.sh
+++ /dev/null
@@ -1,25 +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/tomcat/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/tomcat
-
-echo "Removing cartridges..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/php
-
-echo "Removing autoscale policies..."
-curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1
-
-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/tomcat/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/scripts/ec2/deploy.sh b/samples/applications/tomcat/scripts/ec2/deploy.sh
deleted file mode 100755
index 1370667..0000000
--- a/samples/applications/tomcat/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/tomcat/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/scripts/ec2/undeploy.sh b/samples/applications/tomcat/scripts/ec2/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/tomcat/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/tomcat/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/scripts/kubernetes/deploy.sh b/samples/applications/tomcat/scripts/kubernetes/deploy.sh
deleted file mode 100755
index d6c47c1..0000000
--- a/samples/applications/tomcat/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`
-kubernetes_clusters_path=`cd "${script_path}/../../../../kubernetes-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}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/tomcat/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/scripts/kubernetes/undeploy.sh b/samples/applications/tomcat/scripts/kubernetes/undeploy.sh
deleted file mode 100755
index 0054670..0000000
--- a/samples/applications/tomcat/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/tomcat/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/scripts/mock/deploy.sh b/samples/applications/tomcat/scripts/mock/deploy.sh
deleted file mode 100755
index 93f8517..0000000
--- a/samples/applications/tomcat/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/tomcat/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/scripts/mock/undeploy.sh b/samples/applications/tomcat/scripts/mock/undeploy.sh
deleted file mode 100755
index 17d8c71..0000000
--- a/samples/applications/tomcat/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/tomcat/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/scripts/openstack/deploy.sh b/samples/applications/tomcat/scripts/openstack/deploy.sh
deleted file mode 100755
index 4c39959..0000000
--- a/samples/applications/tomcat/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/tomcat/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/scripts/openstack/undeploy.sh b/samples/applications/tomcat/scripts/openstack/undeploy.sh
deleted file mode 100644
index 17d8c71..0000000
--- a/samples/applications/tomcat/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/wordpress-extended-v1/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended-v1/README.md b/samples/applications/wordpress-extended-v1/README.md
deleted file mode 100644
index 14249a1..0000000
--- a/samples/applications/wordpress-extended-v1/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-Wordpress Extended V1 Application
-=================================
-Wordpress extended v1 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 disabled in MySQL, PHP group. 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
-```
[05/10] stratos git commit: refining the application samples hierarchy
Posted by is...@apache.org.
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/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh
new file mode 100755
index 0000000..dc0446c
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh
@@ -0,0 +1,64 @@
+#!/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
+
+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 "Adding esb-php-nested-with-esb-php-nested-with-mysql-php group..."
+curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/esb-php-nested-with-esb-php-nested-with-mysql-php.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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/deploy/application-policy-1
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/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh
new file mode 100644
index 0000000..2658130
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh
@@ -0,0 +1,35 @@
+#!/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/esb-php-nested-with-esb-php-nested-with-mysql-php-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/esb-php-nested-with-esb-php-nested-with-mysql-php-app
+
+echo "Removing groups..."
+curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/esb-php-nested-with-esb-php-nested-with-mysql-php
+
+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
+
+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/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/deploy.sh b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/undeploy.sh b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..c8f11f7
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh
@@ -0,0 +1,16 @@
+#!/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/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/undeploy.sh b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/deploy.sh b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/undeploy.sh b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/deploy.sh b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/undeploy.sh b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/esb-php-nested-with-esb-php-nested-with-mysql-php-app/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/five-levels-nested-groups-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/artifacts/application.json b/samples/applications/nested/five-levels-nested-groups-app/artifacts/application.json
new file mode 100644
index 0000000..1fa30c0
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/artifacts/application.json
@@ -0,0 +1,184 @@
+{
+ "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/nested/five-levels-nested-groups-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/scripts/common/deploy.sh b/samples/applications/nested/five-levels-nested-groups-app/scripts/common/deploy.sh
new file mode 100755
index 0000000..3333dee
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/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
+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/nested/five-levels-nested-groups-app/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/scripts/common/undeploy.sh b/samples/applications/nested/five-levels-nested-groups-app/scripts/common/undeploy.sh
new file mode 100644
index 0000000..48d20f4
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/scripts/common/undeploy.sh
@@ -0,0 +1,36 @@
+#!/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/nested/five-levels-nested-groups-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/scripts/ec2/deploy.sh b/samples/applications/nested/five-levels-nested-groups-app/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/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/five-levels-nested-groups-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/scripts/ec2/undeploy.sh b/samples/applications/nested/five-levels-nested-groups-app/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/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/five-levels-nested-groups-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/scripts/kubernetes/deploy.sh b/samples/applications/nested/five-levels-nested-groups-app/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..c8f11f7
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/scripts/kubernetes/deploy.sh
@@ -0,0 +1,16 @@
+#!/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/nested/five-levels-nested-groups-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/scripts/kubernetes/undeploy.sh b/samples/applications/nested/five-levels-nested-groups-app/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/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/five-levels-nested-groups-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/scripts/mock/deploy.sh b/samples/applications/nested/five-levels-nested-groups-app/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/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/five-levels-nested-groups-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/scripts/mock/undeploy.sh b/samples/applications/nested/five-levels-nested-groups-app/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/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/five-levels-nested-groups-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/scripts/openstack/deploy.sh b/samples/applications/nested/five-levels-nested-groups-app/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/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/five-levels-nested-groups-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/five-levels-nested-groups-app/scripts/openstack/undeploy.sh b/samples/applications/nested/five-levels-nested-groups-app/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/five-levels-nested-groups-app/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/single-level-nested-group-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/README.md b/samples/applications/nested/single-level-nested-group-app/README.md
new file mode 100644
index 0000000..1acc75d
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/README.md
@@ -0,0 +1,14 @@
+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/single-level-nested-group-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/artifacts/application.json b/samples/applications/nested/single-level-nested-group-app/artifacts/application.json
new file mode 100644
index 0000000..d7a6e04
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/artifacts/application.json
@@ -0,0 +1,82 @@
+{
+ "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/single-level-nested-group-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/common/deploy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/common/deploy.sh
new file mode 100755
index 0000000..4a0e0ed
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/scripts/common/deploy.sh
@@ -0,0 +1,62 @@
+#!/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/single-level-nested-group-app/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/common/undeploy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/common/undeploy.sh
new file mode 100644
index 0000000..038933e
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/scripts/common/undeploy.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+host_ip="localhost"
+host_port=9443
+
+set -e
+
+echo "Undeploying application..."
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/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/single-level-nested-group-app/scripts/common/update-deployment-policy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/common/update-deployment-policy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/common/update-deployment-policy.sh
new file mode 100755
index 0000000..c52e117
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/scripts/common/update-deployment-policy.sh
@@ -0,0 +1,12 @@
+#!/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/single-level-nested-group-app/scripts/common/update-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/common/update-network-partition.sh b/samples/applications/nested/single-level-nested-group-app/scripts/common/update-network-partition.sh
new file mode 100755
index 0000000..4b2b275
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/scripts/common/update-network-partition.sh
@@ -0,0 +1,11 @@
+#!/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/single-level-nested-group-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/ec2/deploy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/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/single-level-nested-group-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/ec2/undeploy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/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/single-level-nested-group-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/kubernetes/deploy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..32eff3c
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/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/single-level-nested-group-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/kubernetes/undeploy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/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/single-level-nested-group-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/mock/deploy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/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/single-level-nested-group-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/mock/undeploy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/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/single-level-nested-group-app/scripts/mock/update-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/mock/update-network-partition.sh b/samples/applications/nested/single-level-nested-group-app/scripts/mock/update-network-partition.sh
new file mode 100755
index 0000000..329684b
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/scripts/mock/update-network-partition.sh
@@ -0,0 +1,6 @@
+#!/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/single-level-nested-group-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/openstack/deploy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/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/single-level-nested-group-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/openstack/undeploy.sh b/samples/applications/nested/single-level-nested-group-app/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/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/single-level-nested-group-app/scripts/openstack/update-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-group-app/scripts/openstack/update-network-partition.sh b/samples/applications/nested/single-level-nested-group-app/scripts/openstack/update-network-partition.sh
new file mode 100755
index 0000000..4b2b275
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-group-app/scripts/openstack/update-network-partition.sh
@@ -0,0 +1,11 @@
+#!/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/single-level-nested-groups-app/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/README.md b/samples/applications/nested/single-level-nested-groups-app/README.md
new file mode 100644
index 0000000..47015bf
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/README.md
@@ -0,0 +1,13 @@
+Complex App
+===========
+
+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/single-level-nested-groups-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/artifacts/application.json b/samples/applications/nested/single-level-nested-groups-app/artifacts/application.json
new file mode 100644
index 0000000..7b85f93
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/artifacts/application.json
@@ -0,0 +1,131 @@
+{
+ "applicationId": "complex-app",
+ "alias": "my-complex-app",
+ "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": "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": [
+ "group.my-group8,cartridge.my-tomcat,group.my-group6"
+ ],
+ "terminationBehaviour": "terminate-all"
+ }
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/single-level-nested-groups-app/artifacts/autoscaling-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/artifacts/autoscaling-policy.json b/samples/applications/nested/single-level-nested-groups-app/artifacts/autoscaling-policy.json
new file mode 100755
index 0000000..b41726e
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/artifacts/autoscaling-policy.json
@@ -0,0 +1,14 @@
+{
+ "id": "autoscaling-policy-1",
+ "loadThresholds": {
+ "requestsInFlight": {
+ "threshold": 80
+ },
+ "memoryConsumption": {
+ "threshold": 90
+ },
+ "loadAverage": {
+ "threshold": 50
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/single-level-nested-groups-app/artifacts/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/artifacts/deployment-policy.json b/samples/applications/nested/single-level-nested-groups-app/artifacts/deployment-policy.json
new file mode 100644
index 0000000..666c299
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/artifacts/deployment-policy.json
@@ -0,0 +1,15 @@
+{
+ "id": "deployment-policy-1",
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "partitionAlgo": "one-after-another",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "max": 5
+ }
+ ]
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/single-level-nested-groups-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/scripts/common/deploy.sh b/samples/applications/nested/single-level-nested-groups-app/scripts/common/deploy.sh
new file mode 100755
index 0000000..6adbef5
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/scripts/common/deploy.sh
@@ -0,0 +1,64 @@
+#!/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 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/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/nested/single-level-nested-groups-app/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/scripts/common/undeploy.sh b/samples/applications/nested/single-level-nested-groups-app/scripts/common/undeploy.sh
new file mode 100644
index 0000000..455174f
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/scripts/common/undeploy.sh
@@ -0,0 +1,36 @@
+#!/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/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
+
+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/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
+
+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/single-level-nested-groups-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/scripts/ec2/deploy.sh b/samples/applications/nested/single-level-nested-groups-app/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/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/single-level-nested-groups-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/scripts/ec2/undeploy.sh b/samples/applications/nested/single-level-nested-groups-app/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/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/single-level-nested-groups-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/scripts/kubernetes/deploy.sh b/samples/applications/nested/single-level-nested-groups-app/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..32eff3c
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/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/single-level-nested-groups-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/scripts/kubernetes/undeploy.sh b/samples/applications/nested/single-level-nested-groups-app/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/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/single-level-nested-groups-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/scripts/mock/deploy.sh b/samples/applications/nested/single-level-nested-groups-app/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/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/single-level-nested-groups-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/scripts/mock/undeploy.sh b/samples/applications/nested/single-level-nested-groups-app/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/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/single-level-nested-groups-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/scripts/openstack/deploy.sh b/samples/applications/nested/single-level-nested-groups-app/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/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/single-level-nested-groups-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/nested/single-level-nested-groups-app/scripts/openstack/undeploy.sh b/samples/applications/nested/single-level-nested-groups-app/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/nested/single-level-nested-groups-app/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/php-tomcat-group-postgres-mysql-group-esb/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/README.md b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/README.md
deleted file mode 100644
index 6cb7cdc..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-single_cartridge
-================
-i) In this artifact sample you can find we have listed them as mock and openstack.
-
-ii) In this sample artifact, it deployes simple application with a php cartridge and start it.
-
-iii) You can choose the IaaS and navigate to it and simply run the single_cartridge.sh file. It'll deploy the relevant artifacts and start the application.
-
-
-This sample can be used to test the startup order pattern. As defined, the application is using dbgroup(mysql, postgres), app-group(tomcat, php) and esb. In this case, appgroup and esb are depending on dbgroup. So, dbgroup should start first. Other two can come up in parallel after dbgroup started. When starting of appgroup, tomcat depends on php. In that case, tomcat will have to come up first and then php. By running this sample, this particular scenario can be simulated.
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/php-tomcat-group-postgres-mysql-group-esb/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/artifacts/application.json b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/artifacts/application.json
deleted file mode 100644
index 10f8c83..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/artifacts/application.json
+++ /dev/null
@@ -1,121 +0,0 @@
-{
- "alias": "mycompositeapp",
- "applicationId": "my-compositeapp",
- "components": {
- "groups": [
- {
- "name": "app-group",
- "alias": "my-appgroup",
- "cartridges": [
- {
- "type": "tomcat",
- "cartridgeMax": 2,
- "cartridgeMin": 1,
- "subscribableInfo": {
- "alias": "my-tomcat",
- "artifactRepository": {
- "alias": "my-tomcat",
- "privateRepo": true,
- "repoPassword": "password",
- "repoUrl": "http://xxx:10080/git/default.git",
- "repoUsername": "user"
- },
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy": "deployment-policy-2"
- }
- },
- {
- "type": "php",
- "cartridgeMax": 2,
- "cartridgeMin": 1,
- "subscribableInfo": {
- "alias": "my-php",
- "artifactRepository": {
-
- "privateRepo": true,
- "repoPassword": "password",
- "repoUrl": "http://xxx:10080/git/default.git",
- "repoUsername": "user"
- },
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy": "deployment-policy-2"
- }
- }
- ],
- "groupMaxInstances": 2,
- "groupMinInstances": 1,
- "groupScalingEnabled": true
- },
- {
- "name": "db-group",
- "alias": "my-dbgroup",
- "cartridges": [
- {
- "type": "postgres",
- "cartridgeMax": 2,
- "cartridgeMin": 1,
- "subscribableInfo": {
- "alias": "my-postgres",
- "artifactRepository": {
- "alias": "my-postgres",
- "privateRepo": false,
- "repoPassword": "password",
- "repoUrl": "http://xxx:10080/git/default.git",
- "repoUsername": "user"
- },
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy": "deployment-policy-2"
- }
- },
- {
- "type": "mysql",
- "cartridgeMax": 2,
- "cartridgeMin": 1,
- "subscribableInfo": {
- "alias": "my-mysql",
- "artifactRepository": {
- "alias": "my-mysql",
- "privateRepo": true,
- "repoPassword": "password",
- "repoUrl": "http://xxx:10080/git/default.git",
- "repoUsername": "user"
- },
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy": "deployment-policy-2"
- }
- }
- ],
- "groupMaxInstances": 2,
- "groupMinInstances": 1,
- "groupScalingEnabled": true
- }
- ],
- "cartridges": [
- {
- "type": "esb",
- "cartridgeMax": 2,
- "cartridgeMin": 1,
- "subscribableInfo": {
- "alias": "my-esb",
- "artifactRepository": {
- "privateRepo": true,
- "repoPassword": "password",
- "repoUrl": "http://xxx:10080/git/default.git",
- "repoUsername": "user"
- },
- "autoscalingPolicy": "autoscaling-policy-1",
- "deploymentPolicy": "deployment-policy-2"
- }
- }
- ],
- "dependencies": {
- "scalingDependants": {
- "@xsi.nil": "true"
- },
- "startupOrders": [
- "group.my-dbgroup,group.my-appgroup","group.my-dbgroup,cartridge.my-esb"
- ],
- "terminationBehaviour": "terminate-none"
- }
- }
- }
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-domain-mappings.sh
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-domain-mappings.sh b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-domain-mappings.sh
deleted file mode 100755
index 74c6ed7..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-domain-mappings.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-export host_ip="localhost"
-export artifacts_path="../../artifacts"
-
-pushd ${artifacts_path}
-echo "Adding domain mappings..."
-curl -X POST -H "Content-Type: application/json" -d @'domain-mappings.json' -k -u admin:admin https://${host_ip}:9443/api/applications/single-cartridge-app/domainMappings
-popd
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-network-partition.sh
----------------------------------------------------------------------
diff --git a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-network-partition.sh b/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-network-partition.sh
deleted file mode 100644
index 56c7c6c..0000000
--- a/samples/applications/php-tomcat-group-postgres-mysql-group-esb/scripts/common/add-network-partition.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-export host_ip="localhost"
-export artifacts_path="../../artifacts"
-
-pushd ${artifacts_path}
-echo "Adding network partition..."
-curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/network-partition.json" -k -v -u admin:admin https://${host_ip}:9443/api/networkPartitions
-popd