You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/02/19 10:43:10 UTC
stratos git commit: Introducing wordpress-extended sample application
Repository: stratos
Updated Branches:
refs/heads/master 085dbf8b4 -> 0181deffb
Introducing wordpress-extended sample application
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/0181deff
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/0181deff
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/0181deff
Branch: refs/heads/master
Commit: 0181deffb608aaa91c90e89cb8e380c9e33318b6
Parents: 085dbf8
Author: Imesh Gunaratne <im...@apache.org>
Authored: Thu Feb 19 15:12:50 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Thu Feb 19 15:13:08 2015 +0530
----------------------------------------------------------------------
.../applications/wordpress-extended/README.md | 20 +++++++
.../artifacts/application.json | 60 ++++++++++++++++++++
.../artifacts/autoscaling-policy.json | 14 +++++
.../artifacts/ec2/deployment-policy.json | 55 ++++++++++++++++++
.../artifacts/kubernetes/deployment-policy.json | 55 ++++++++++++++++++
.../kubernetes/kubernetes-cluster.json | 56 ++++++++++++++++++
.../artifacts/mock/deployment-policy.json | 55 ++++++++++++++++++
.../artifacts/openstack/deployment-policy.json | 55 ++++++++++++++++++
.../wordpress-extended/scripts/common/deploy.sh | 47 +++++++++++++++
.../scripts/common/undeploy.sh | 25 ++++++++
.../wordpress-extended/scripts/ec2/deploy.sh | 9 +++
.../wordpress-extended/scripts/ec2/undeploy.sh | 7 +++
.../scripts/kubernetes/deploy.sh | 15 +++++
.../scripts/kubernetes/undeploy.sh | 13 +++++
.../wordpress-extended/scripts/mock/deploy.sh | 9 +++
.../wordpress-extended/scripts/mock/undeploy.sh | 7 +++
.../scripts/openstack/deploy.sh | 9 +++
.../scripts/openstack/undeploy.sh | 7 +++
samples/applications/wordpress/README.md | 2 +
19 files changed, 520 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/0181deff/samples/applications/wordpress-extended/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/README.md b/samples/applications/wordpress-extended/README.md
new file mode 100644
index 0000000..004af34
--- /dev/null
+++ b/samples/applications/wordpress-extended/README.md
@@ -0,0 +1,20 @@
+Wordpress Extended Application
+=====================
+Wordpress extended application consists of a cartridge group which includes a MySQL cartridge, a PHP cartridge and
+an extra Tomcat cartridge on the top level.
+
+
+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/0181deff/samples/applications/wordpress-extended/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/artifacts/application.json b/samples/applications/wordpress-extended/artifacts/application.json
new file mode 100644
index 0000000..2ea517a
--- /dev/null
+++ b/samples/applications/wordpress-extended/artifacts/application.json
@@ -0,0 +1,60 @@
+{
+ "applicationId": "wordpress-extended",
+ "alias": "wordpress",
+ "components": {
+ "groups": [
+ {
+ "name": "mysql-php-group",
+ "alias": "mysql-php-group",
+ "groupMinInstances": 1,
+ "groupMaxInstances": 1,
+ "cartridges": [
+ {
+ "type": "mysql",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "mysql",
+ "autoscalingPolicy": "autoscaling-policy-1"
+ }
+ },
+ {
+ "type": "php",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "php",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-php-applications.git"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cartridges" : [
+ {
+ "type": "tomcat",
+ "cartridgeMin": 1,
+ "cartridgeMax": 2,
+ "subscribableInfo": {
+ "alias": "tomcat",
+ "autoscalingPolicy": "autoscaling-policy-1",
+ "artifactRepository":{
+ "privateRepo":false,
+ "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git"
+ }
+ }
+ }
+ ],
+ "dependencies": {
+ "startupOrders": [
+ "group.mysql-php-group,cartridge.tomcat"
+ ],
+ "terminationBehaviour": "terminate-none"
+ }
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/0181deff/samples/applications/wordpress-extended/artifacts/autoscaling-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/artifacts/autoscaling-policy.json b/samples/applications/wordpress-extended/artifacts/autoscaling-policy.json
new file mode 100755
index 0000000..b41726e
--- /dev/null
+++ b/samples/applications/wordpress-extended/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/0181deff/samples/applications/wordpress-extended/artifacts/ec2/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/artifacts/ec2/deployment-policy.json b/samples/applications/wordpress-extended/artifacts/ec2/deployment-policy.json
new file mode 100644
index 0000000..67f5a5f
--- /dev/null
+++ b/samples/applications/wordpress-extended/artifacts/ec2/deployment-policy.json
@@ -0,0 +1,55 @@
+{
+ "applicationPolicy": {
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "activeByDefault": "true",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "provider": "ec2",
+ "property": [
+ {
+ "name": "region",
+ "value": "default"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "childPolicies": [
+ {
+ "alias": "mysql",
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "partitionAlgo": "one-after-another",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "max": 5
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "alias": "php",
+ "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/0181deff/samples/applications/wordpress-extended/artifacts/kubernetes/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/artifacts/kubernetes/deployment-policy.json b/samples/applications/wordpress-extended/artifacts/kubernetes/deployment-policy.json
new file mode 100644
index 0000000..cb72ffd
--- /dev/null
+++ b/samples/applications/wordpress-extended/artifacts/kubernetes/deployment-policy.json
@@ -0,0 +1,55 @@
+{
+ "applicationPolicy": {
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "activeByDefault": "true",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "provider": "kubernetes",
+ "property": [
+ {
+ "name": "region",
+ "value": "default"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "childPolicies": [
+ {
+ "alias": "mysql",
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "partitionAlgo": "one-after-another",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "max": 5
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "alias": "php",
+ "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/0181deff/samples/applications/wordpress-extended/artifacts/kubernetes/kubernetes-cluster.json
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/artifacts/kubernetes/kubernetes-cluster.json b/samples/applications/wordpress-extended/artifacts/kubernetes/kubernetes-cluster.json
new file mode 100644
index 0000000..2988ed1
--- /dev/null
+++ b/samples/applications/wordpress-extended/artifacts/kubernetes/kubernetes-cluster.json
@@ -0,0 +1,56 @@
+{
+ "clusterId": "kubernetes-cluster-1",
+ "description": "Kubernetes CoreOS cluster",
+ "kubernetesMaster": {
+ "hostId": "KubHostMaster1",
+ "hostname": "master.dev.kubernetes.example.org",
+ "privateIPAddress": "172.17.8.100",
+ "publicIPAddress": "172.17.8.100",
+ "property": [
+ ]
+ },
+ "portRange": {
+ "upper": "5000",
+ "lower": "4500"
+ },
+ "kubernetesHosts": [
+ {
+ "hostId": "KubHostSlave1",
+ "hostname": "slave1.dev.kubernetes.example.org",
+ "privateIPAddress": "172.17.8.101",
+ "publicIPAddress": "172.17.8.101",
+ "property": [
+ ]
+ },
+ {
+ "hostId": "KubHostSlave2",
+ "hostname": "slave2.dev.kubernetes.example.org",
+ "privateIPAddress": "172.17.8.102",
+ "publicIPAddress": "172.17.8.102",
+ "property": [
+ ]
+ }
+ ],
+ "property": [
+ {
+ "name": "payload_parameter.MB_IP",
+ "value": "172.17.8.1"
+ },
+ {
+ "name": "payload_parameter.MB_PORT",
+ "value": "1883"
+ },
+ {
+ "name": "payload_parameter.CEP_IP",
+ "value": "172.17.8.1"
+ },
+ {
+ "name": "payload_parameter.CEP_PORT",
+ "value": "7711"
+ },
+ {
+ "name": "payload_parameter.LOG_LEVEL",
+ "value": "DEBUG"
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/0181deff/samples/applications/wordpress-extended/artifacts/mock/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/artifacts/mock/deployment-policy.json b/samples/applications/wordpress-extended/artifacts/mock/deployment-policy.json
new file mode 100644
index 0000000..ed89a69
--- /dev/null
+++ b/samples/applications/wordpress-extended/artifacts/mock/deployment-policy.json
@@ -0,0 +1,55 @@
+{
+ "applicationPolicy": {
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "activeByDefault": "true",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "provider": "mock",
+ "property": [
+ {
+ "name": "region",
+ "value": "default"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "childPolicies": [
+ {
+ "alias": "mysql-php-group",
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "partitionAlgo": "one-after-another",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "max": 5
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "alias": "tomcat",
+ "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/0181deff/samples/applications/wordpress-extended/artifacts/openstack/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/artifacts/openstack/deployment-policy.json b/samples/applications/wordpress-extended/artifacts/openstack/deployment-policy.json
new file mode 100644
index 0000000..a2d1e8c
--- /dev/null
+++ b/samples/applications/wordpress-extended/artifacts/openstack/deployment-policy.json
@@ -0,0 +1,55 @@
+{
+ "applicationPolicy": {
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "activeByDefault": "true",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "provider": "openstack",
+ "property": [
+ {
+ "name": "region",
+ "value": "default"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "childPolicies": [
+ {
+ "alias": "mysql",
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "partitionAlgo": "one-after-another",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "max": 5
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "alias": "php",
+ "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/0181deff/samples/applications/wordpress-extended/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/scripts/common/deploy.sh b/samples/applications/wordpress-extended/scripts/common/deploy.sh
new file mode 100755
index 0000000..1a736a6
--- /dev/null
+++ b/samples/applications/wordpress-extended/scripts/common/deploy.sh
@@ -0,0 +1,47 @@
+#!/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`
+
+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 "@${artifacts_path}/autoscaling-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies
+
+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 "Creating application..."
+curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/application.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications
+
+sleep 1
+
+echo "Deploying application..."
+curl -X POST -H "Content-Type: application/json" -d "@${iaas_artifacts_path}/deployment-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/wordpress-extended/deploy
http://git-wip-us.apache.org/repos/asf/stratos/blob/0181deff/samples/applications/wordpress-extended/scripts/common/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/scripts/common/undeploy.sh b/samples/applications/wordpress-extended/scripts/common/undeploy.sh
new file mode 100644
index 0000000..410c429
--- /dev/null
+++ b/samples/applications/wordpress-extended/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/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
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/0181deff/samples/applications/wordpress-extended/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/scripts/ec2/deploy.sh b/samples/applications/wordpress-extended/scripts/ec2/deploy.sh
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/wordpress-extended/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/0181deff/samples/applications/wordpress-extended/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/scripts/ec2/undeploy.sh b/samples/applications/wordpress-extended/scripts/ec2/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/wordpress-extended/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/0181deff/samples/applications/wordpress-extended/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/scripts/kubernetes/deploy.sh b/samples/applications/wordpress-extended/scripts/kubernetes/deploy.sh
new file mode 100755
index 0000000..32eff3c
--- /dev/null
+++ b/samples/applications/wordpress-extended/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/0181deff/samples/applications/wordpress-extended/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/scripts/kubernetes/undeploy.sh b/samples/applications/wordpress-extended/scripts/kubernetes/undeploy.sh
new file mode 100644
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/wordpress-extended/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/0181deff/samples/applications/wordpress-extended/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/scripts/mock/deploy.sh b/samples/applications/wordpress-extended/scripts/mock/deploy.sh
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/wordpress-extended/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/0181deff/samples/applications/wordpress-extended/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/scripts/mock/undeploy.sh b/samples/applications/wordpress-extended/scripts/mock/undeploy.sh
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/wordpress-extended/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/0181deff/samples/applications/wordpress-extended/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/scripts/openstack/deploy.sh b/samples/applications/wordpress-extended/scripts/openstack/deploy.sh
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/wordpress-extended/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/0181deff/samples/applications/wordpress-extended/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress-extended/scripts/openstack/undeploy.sh b/samples/applications/wordpress-extended/scripts/openstack/undeploy.sh
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/wordpress-extended/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/0181deff/samples/applications/wordpress/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/wordpress/README.md b/samples/applications/wordpress/README.md
index 48335bc..ffdfbdc 100644
--- a/samples/applications/wordpress/README.md
+++ b/samples/applications/wordpress/README.md
@@ -1,5 +1,7 @@
Wordpress Application
=====================
+Wordpress application consists of a cartridge group which includes a MySQL cartridge and PHP cartridge. It defines a
+startup dependency to start MySQL cluster first and PHP cluster second once the MySQL cluster is active.
Application folder structure
----------------------------