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/22 05:13:00 UTC
[1/3] stratos git commit: Removing dot,
dash and underscore characters from service id,
pod id and replication controller id
Repository: stratos
Updated Branches:
refs/heads/master 2b8b7071d -> 51c569f6b
Removing dot, dash and underscore characters from service id, pod id and replication controller id
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/75ac8f27
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/75ac8f27
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/75ac8f27
Branch: refs/heads/master
Commit: 75ac8f27269175aa62ca6095cc8266894901cf5b
Parents: 2b8b707
Author: Imesh Gunaratne <im...@apache.org>
Authored: Sun Feb 22 09:39:43 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Sun Feb 22 09:39:43 2015 +0530
----------------------------------------------------------------------
.../controller/iaases/kubernetes/KubernetesIaas.java | 10 +++++-----
.../cloud/controller/util/CloudControllerUtil.java | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/75ac8f27/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
index bc483bd..fd2a50f 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
@@ -296,7 +296,7 @@ public class KubernetesIaas extends Iaas {
throws KubernetesClientException, InterruptedException {
Labels labels = new Labels();
- String podId = CloudControllerUtil.replaceDotsWithDash(memberContext.getMemberId());
+ String podId = CloudControllerUtil.removeSpecialCharacters(memberContext.getMemberId());
labels.setName(podId);
Pod pod;
@@ -333,7 +333,7 @@ public class KubernetesIaas extends Iaas {
Thread.sleep(5000);
}
- String replicationControllerId = CloudControllerUtil.replaceDotsWithDash(memberContext.getMemberId());
+ String replicationControllerId = CloudControllerUtil.removeSpecialCharacters(memberContext.getMemberId());
String message;
if (podCreated) {
// Pod created but status did not change to running
@@ -394,7 +394,7 @@ public class KubernetesIaas extends Iaas {
memberContext.setDynamicPayload(payload);
// Create replication controller
- String replicationControllerId = CloudControllerUtil.replaceDotsWithDash(memberContext.getMemberId());
+ String replicationControllerId = CloudControllerUtil.removeSpecialCharacters(memberContext.getMemberId());
String replicationControllerName = replicationControllerId;
String dockerImage = iaasProvider.getImage();
EnvironmentVariable[] environmentVariables = KubernetesIaasUtil.prepareEnvironmentVariables(
@@ -432,8 +432,8 @@ public class KubernetesIaas extends Iaas {
}
for (PortMapping portMapping : cartridge.getPortMappings()) {
- String serviceName = CloudControllerUtil.replaceDotsWithDash(clusterId);
- String serviceId = KubernetesIaasUtil.generateKubernetesServiceId(serviceName, portMapping);
+ String serviceName = CloudControllerUtil.removeSpecialCharacters(clusterId);
+ String serviceId = serviceName;
if (log.isInfoEnabled()) {
log.info(String.format("Creating kubernetes service: [cluster-id] %s [service-id] %s " +
http://git-wip-us.apache.org/repos/asf/stratos/blob/75ac8f27/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
index 4ba1123..71ce9cc 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
@@ -356,10 +356,10 @@ public class CloudControllerUtil {
return "[" +partitionStr+ "]";
}
- public static String replaceDotsWithDash(String id) {
- if (id.indexOf('.') != -1) {
- id = id.replace('.', '-');
- }
+ public static String removeSpecialCharacters(String id) {
+ id = id.replace(".", "");
+ id = id.replace("-", "");
+ id = id.replace("_", "");
return id;
}
[3/3] stratos git commit: Introducing tomcat sample application
Posted by im...@apache.org.
Introducing tomcat sample application
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/51c569f6
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/51c569f6
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/51c569f6
Branch: refs/heads/master
Commit: 51c569f6b3057fbaf5e106d91ec70ac5bda71cfa
Parents: bc75144
Author: Imesh Gunaratne <im...@apache.org>
Authored: Sun Feb 22 09:42:48 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Sun Feb 22 09:42:48 2015 +0530
----------------------------------------------------------------------
samples/applications/tomcat/README.md | 19 +++++++
.../tomcat/artifacts/application.json | 24 +++++++++
.../tomcat/artifacts/autoscaling-policy.json | 14 +++++
.../tomcat/artifacts/ec2/deployment-policy.json | 39 ++++++++++++++
.../artifacts/kubernetes/deployment-policy.json | 41 ++++++++++++++
.../kubernetes/kubernetes-cluster.json | 56 ++++++++++++++++++++
.../artifacts/mock/deployment-policy.json | 40 ++++++++++++++
.../artifacts/openstack/deployment-policy.json | 40 ++++++++++++++
.../tomcat/scripts/common/deploy.sh | 37 +++++++++++++
.../tomcat/scripts/common/undeploy.sh | 20 +++++++
.../applications/tomcat/scripts/ec2/deploy.sh | 9 ++++
.../applications/tomcat/scripts/ec2/undeploy.sh | 7 +++
.../tomcat/scripts/kubernetes/deploy.sh | 15 ++++++
.../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 +++
samples/cartridges/kubernetes/php.json | 4 --
samples/cartridges/kubernetes/tomcat.json | 14 ++---
20 files changed, 411 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/51c569f6/samples/applications/tomcat/README.md
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/README.md b/samples/applications/tomcat/README.md
new file mode 100644
index 0000000..5d5684b
--- /dev/null
+++ b/samples/applications/tomcat/README.md
@@ -0,0 +1,19 @@
+Tomcat Application
+==================
+Tomcat application provides an Apache Tomcat 7 cluster. It only contains the tomcat cartridge and 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/51c569f6/samples/applications/tomcat/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/artifacts/application.json b/samples/applications/tomcat/artifacts/application.json
new file mode 100644
index 0000000..8130f1c
--- /dev/null
+++ b/samples/applications/tomcat/artifacts/application.json
@@ -0,0 +1,24 @@
+{
+ "applicationId":"tomcat-single-sign-on",
+ "alias":"tomcat-single-sign-on",
+ "multiTenant":false,
+ "components":{
+ "cartridges":[
+ {
+ "type":"tomcat",
+ "cartridgeMin": 1,
+ "cartridgeMax": 5,
+ "subscribableInfo":{
+ "alias":"tomcat-1",
+ "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/51c569f6/samples/applications/tomcat/artifacts/autoscaling-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/artifacts/autoscaling-policy.json b/samples/applications/tomcat/artifacts/autoscaling-policy.json
new file mode 100644
index 0000000..9f6a370
--- /dev/null
+++ b/samples/applications/tomcat/artifacts/autoscaling-policy.json
@@ -0,0 +1,14 @@
+{
+ "id": "autoscaling-policy-1",
+ "loadThresholds": {
+ "requestsInFlight": {
+ "threshold": 50
+ },
+ "memoryConsumption": {
+ "threshold": 40
+ },
+ "loadAverage": {
+ "threshold": 40
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/51c569f6/samples/applications/tomcat/artifacts/ec2/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/artifacts/ec2/deployment-policy.json b/samples/applications/tomcat/artifacts/ec2/deployment-policy.json
new file mode 100644
index 0000000..e690bbf
--- /dev/null
+++ b/samples/applications/tomcat/artifacts/ec2/deployment-policy.json
@@ -0,0 +1,39 @@
+{
+ "applicationPolicy": {
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "activeByDefault": "true",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "provider": "ec2",
+ "property": [
+ {
+ "name": "region",
+ "value": "default"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "childPolicies": [
+ {
+ "alias": "php1",
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "partitionAlgo": "one-after-another",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "max": 5
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/51c569f6/samples/applications/tomcat/artifacts/kubernetes/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/artifacts/kubernetes/deployment-policy.json b/samples/applications/tomcat/artifacts/kubernetes/deployment-policy.json
new file mode 100644
index 0000000..52114de
--- /dev/null
+++ b/samples/applications/tomcat/artifacts/kubernetes/deployment-policy.json
@@ -0,0 +1,41 @@
+{
+ "applicationPolicy": {
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "activeByDefault": "true",
+ "kubernetesClusterId": "kubernetes-cluster-1",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "provider": "kubernetes",
+ "property": [
+ {
+ "name": "region",
+ "value": "default"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "childPolicies": [
+ {
+ "alias": "tomcat-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/51c569f6/samples/applications/tomcat/artifacts/kubernetes/kubernetes-cluster.json
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/artifacts/kubernetes/kubernetes-cluster.json b/samples/applications/tomcat/artifacts/kubernetes/kubernetes-cluster.json
new file mode 100644
index 0000000..2988ed1
--- /dev/null
+++ b/samples/applications/tomcat/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/51c569f6/samples/applications/tomcat/artifacts/mock/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/artifacts/mock/deployment-policy.json b/samples/applications/tomcat/artifacts/mock/deployment-policy.json
new file mode 100644
index 0000000..0444ea3
--- /dev/null
+++ b/samples/applications/tomcat/artifacts/mock/deployment-policy.json
@@ -0,0 +1,40 @@
+{
+ "applicationPolicy": {
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "activeByDefault": "true",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "provider": "mock",
+ "property": [
+ {
+ "name": "region",
+ "value": "default"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "childPolicies": [
+ {
+ "alias": "php1",
+ "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/51c569f6/samples/applications/tomcat/artifacts/openstack/deployment-policy.json
----------------------------------------------------------------------
diff --git a/samples/applications/tomcat/artifacts/openstack/deployment-policy.json b/samples/applications/tomcat/artifacts/openstack/deployment-policy.json
new file mode 100644
index 0000000..cf8d9f7
--- /dev/null
+++ b/samples/applications/tomcat/artifacts/openstack/deployment-policy.json
@@ -0,0 +1,40 @@
+{
+ "applicationPolicy": {
+ "networkPartition": [
+ {
+ "id": "network-partition-1",
+ "activeByDefault": "true",
+ "partitions": [
+ {
+ "id": "partition-1",
+ "provider": "openstack",
+ "property": [
+ {
+ "name": "region",
+ "value": "RegionOne"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "childPolicies": [
+ {
+ "alias": "php1",
+ "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/51c569f6/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
new file mode 100755
index 0000000..1099ac7
--- /dev/null
+++ b/samples/applications/tomcat/scripts/common/deploy.sh
@@ -0,0 +1,37 @@
+#!/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`
+
+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 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 "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/tomcat-single-sign-on/deploy
http://git-wip-us.apache.org/repos/asf/stratos/blob/51c569f6/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
new file mode 100644
index 0000000..11c3a49
--- /dev/null
+++ b/samples/applications/tomcat/scripts/common/undeploy.sh
@@ -0,0 +1,20 @@
+#!/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
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/51c569f6/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
new file mode 100755
index 0000000..1370667
--- /dev/null
+++ b/samples/applications/tomcat/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/51c569f6/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
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/tomcat/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/51c569f6/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
new file mode 100755
index 0000000..32eff3c
--- /dev/null
+++ b/samples/applications/tomcat/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/51c569f6/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
new file mode 100755
index 0000000..0054670
--- /dev/null
+++ b/samples/applications/tomcat/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/51c569f6/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
new file mode 100755
index 0000000..93f8517
--- /dev/null
+++ b/samples/applications/tomcat/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/51c569f6/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
new file mode 100755
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/tomcat/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/51c569f6/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
new file mode 100755
index 0000000..4c39959
--- /dev/null
+++ b/samples/applications/tomcat/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/51c569f6/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
new file mode 100644
index 0000000..17d8c71
--- /dev/null
+++ b/samples/applications/tomcat/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/51c569f6/samples/cartridges/kubernetes/php.json
----------------------------------------------------------------------
diff --git a/samples/cartridges/kubernetes/php.json b/samples/cartridges/kubernetes/php.json
index ff681f9..50c8497 100755
--- a/samples/cartridges/kubernetes/php.json
+++ b/samples/cartridges/kubernetes/php.json
@@ -22,10 +22,6 @@
"type":"kubernetes",
"imageId":"stratos/php:4.1.0-beta",
"networkInterfaces":[
- {
- "name":"network-non-routable",
- "networkUuid":""
- }
],
"property":[
]
http://git-wip-us.apache.org/repos/asf/stratos/blob/51c569f6/samples/cartridges/kubernetes/tomcat.json
----------------------------------------------------------------------
diff --git a/samples/cartridges/kubernetes/tomcat.json b/samples/cartridges/kubernetes/tomcat.json
index 9be38d2..fb06928 100755
--- a/samples/cartridges/kubernetes/tomcat.json
+++ b/samples/cartridges/kubernetes/tomcat.json
@@ -3,29 +3,25 @@
"provider": "apache",
"host": "tomcat.stratos.org",
"category": "data",
- "displayName": "tomcat",
- "description": "tomcat Cartridge",
+ "displayName": "Tomcat 7",
+ "description": "Tomcat 7 Cartridge",
"version": "7",
"multiTenant": "false",
"portMapping": [
{
"protocol": "http",
- "port": "22",
+ "port": "8080",
"proxyPort": "8280"
}
],
"deployment":{
- "baseDir":"/var/www"
+ "baseDir":"/opt/tomcat/webapps"
},
"iaasProvider":[
{
"type":"kubernetes",
- "imageId":"stratos/cartridge:4.1.0-alpha",
+ "imageId":"stratos/tomcat:4.1.0-beta",
"networkInterfaces":[
- {
- "name":"network-non-routable",
- "networkUuid":""
- }
],
"property":[
]
[2/3] stratos git commit: Updating activemq client version to 5.10.0
Posted by im...@apache.org.
Updating activemq client version to 5.10.0
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/bc751448
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/bc751448
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/bc751448
Branch: refs/heads/master
Commit: bc75144894aa8151148c842eff8f257e716ba8fe
Parents: 75ac8f2
Author: Imesh Gunaratne <im...@apache.org>
Authored: Sun Feb 22 09:41:55 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Sun Feb 22 09:41:55 2015 +0530
----------------------------------------------------------------------
products/load-balancer/modules/distribution/pom.xml | 2 +-
products/stratos/modules/distribution/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/bc751448/products/load-balancer/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/load-balancer/modules/distribution/pom.xml b/products/load-balancer/modules/distribution/pom.xml
index 9bd0469..42c901b 100755
--- a/products/load-balancer/modules/distribution/pom.xml
+++ b/products/load-balancer/modules/distribution/pom.xml
@@ -460,7 +460,7 @@
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
- <version>5.9.1</version>
+ <version>5.10.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.paho</groupId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/bc751448/products/stratos/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/pom.xml b/products/stratos/modules/distribution/pom.xml
index 048ccb3..6645f9a 100755
--- a/products/stratos/modules/distribution/pom.xml
+++ b/products/stratos/modules/distribution/pom.xml
@@ -479,7 +479,7 @@
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
- <version>5.9.1</version>
+ <version>5.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.stratos</groupId>