You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/06/04 08:32:53 UTC
[01/12] stratos git commit: fixing issues in GCEIaas class and gce
config.sh
Repository: stratos
Updated Branches:
refs/heads/master 653684ebf -> c14c6b16e
fixing issues in GCEIaas class and gce config.sh
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/9a262f2b
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/9a262f2b
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/9a262f2b
Branch: refs/heads/master
Commit: 9a262f2b03520a6857f21cb920817c55749f9b41
Parents: 2fe84b9
Author: asanka sanjaya <an...@gmail.com>
Authored: Wed Jun 3 10:01:21 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Wed Jun 3 10:01:21 2015 +0000
----------------------------------------------------------------------
.../org/apache/stratos/cloud/controller/iaases/gce/GCEIaas.java | 4 ++--
tools/config-scripts/gce/config.sh | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/9a262f2b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/gce/GCEIaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/gce/GCEIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/gce/GCEIaas.java
index d5ae1ec..975fe0c 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/gce/GCEIaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/gce/GCEIaas.java
@@ -181,9 +181,9 @@ public class GCEIaas extends JcloudsIaas {
// in vCloud case we need to run a script
IaasProvider iaasInfo = getIaasProvider();
- if (iaasInfo.getTemplate() == null || iaasInfo.getPayload() == null) {
+ if (iaasInfo.getTemplate() == null || payload == null) {
if (log.isDebugEnabled()) {
- log.debug("Payload for GCE not found");
+ log.debug("Template or payload for GCE not found");
}
return;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/9a262f2b/tools/config-scripts/gce/config.sh
----------------------------------------------------------------------
diff --git a/tools/config-scripts/gce/config.sh b/tools/config-scripts/gce/config.sh
index 0c1cbc7..140895f 100644
--- a/tools/config-scripts/gce/config.sh
+++ b/tools/config-scripts/gce/config.sh
@@ -90,7 +90,7 @@ if [[ $answer = y ]] ; then
ARGS=("-n${NODEID}" "-d${DOMAIN}" "-s${PUPPET_IP}")
${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}"
/root/bin/puppetinstall/puppetinstall "${ARGS[@]}"
- ${RM} /mnt/apache-stratos-cartridge-agent-4.0.0/wso2carbon.lck
+ ${RM} /mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/wso2carbon.lck
${GREP} -q '/root/bin/init.sh > /tmp/puppet_log' /etc/rc.local || ${SED} -i 's/exit 0$/\/root\/bin\/init.sh \> \/tmp\/puppet_log\nexit 0/' /etc/rc.local
${RM} -rf /tmp/*
${RM} -rf /var/lib/puppet/ssl/*
[08/12] stratos git commit: reformat the code in gce config.sh
Posted by ga...@apache.org.
reformat the code in gce config.sh
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/c72a31d5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/c72a31d5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/c72a31d5
Branch: refs/heads/master
Commit: c72a31d5ca633bb4749fe75a7f1e0f6d3e2260b8
Parents: 48b9b86
Author: asanka sanjaya <an...@gmail.com>
Authored: Thu Jun 4 05:52:28 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Thu Jun 4 05:52:28 2015 +0000
----------------------------------------------------------------------
tools/config-scripts/gce/config.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/c72a31d5/tools/config-scripts/gce/config.sh
----------------------------------------------------------------------
diff --git a/tools/config-scripts/gce/config.sh b/tools/config-scripts/gce/config.sh
index 40c9cdd..327a33f 100644
--- a/tools/config-scripts/gce/config.sh
+++ b/tools/config-scripts/gce/config.sh
@@ -91,7 +91,7 @@ if [[ $answer = y ]] ; then
ARGS=("-n${NODEID}" "-d${DOMAIN}" "-s${PUPPET_IP}")
${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}"
/root/bin/puppetinstall/puppetinstall "${ARGS[@]}"
- if [ -e ${LOCKFILE} ]; then
+ if [[ -e ${LOCKFILE} ]]; then
${RM} ${LOCKFILE}
fi
[04/12] stratos git commit: fixing a naming issue in gce config.sh
Posted by ga...@apache.org.
fixing a naming issue in gce config.sh
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/232557a6
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/232557a6
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/232557a6
Branch: refs/heads/master
Commit: 232557a672b487dfea0bb096286c138771b74db8
Parents: 9bc3f0c
Author: asanka sanjaya <an...@gmail.com>
Authored: Wed Jun 3 11:02:26 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Wed Jun 3 11:02:26 2015 +0000
----------------------------------------------------------------------
tools/config-scripts/gce/config.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/232557a6/tools/config-scripts/gce/config.sh
----------------------------------------------------------------------
diff --git a/tools/config-scripts/gce/config.sh b/tools/config-scripts/gce/config.sh
index 140895f..a2c61b8 100644
--- a/tools/config-scripts/gce/config.sh
+++ b/tools/config-scripts/gce/config.sh
@@ -90,7 +90,7 @@ if [[ $answer = y ]] ; then
ARGS=("-n${NODEID}" "-d${DOMAIN}" "-s${PUPPET_IP}")
${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}"
/root/bin/puppetinstall/puppetinstall "${ARGS[@]}"
- ${RM} /mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/wso2carbon.lck
+ ${RM} /mnt/apache-stratos-python-cartridge-agent-4.1.0/wso2carbon.lck
${GREP} -q '/root/bin/init.sh > /tmp/puppet_log' /etc/rc.local || ${SED} -i 's/exit 0$/\/root\/bin\/init.sh \> \/tmp\/puppet_log\nexit 0/' /etc/rc.local
${RM} -rf /tmp/*
${RM} -rf /var/lib/puppet/ssl/*
[12/12] stratos git commit: Merge branch 'master' of
https://github.com/asankasanjaya/stratos
Posted by ga...@apache.org.
Merge branch 'master' of https://github.com/asankasanjaya/stratos
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/c14c6b16
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/c14c6b16
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/c14c6b16
Branch: refs/heads/master
Commit: c14c6b16eb170d2553c636f89fa3f4e203325873
Parents: 653684e 4d4e849
Author: Gayan Gunarathne <ga...@wso2.com>
Authored: Thu Jun 4 11:42:42 2015 +0530
Committer: Gayan Gunarathne <ga...@wso2.com>
Committed: Thu Jun 4 11:42:42 2015 +0530
----------------------------------------------------------------------
.../apache/stratos/cloud/controller/iaases/gce/GCEIaas.java | 4 ++--
tools/config-scripts/ec2/config.sh | 2 +-
tools/config-scripts/gce/config.sh | 6 +++++-
3 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
[07/12] stratos git commit: fixing a naming issue in gce config.sh
Posted by ga...@apache.org.
fixing a naming issue in gce config.sh
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/48b9b860
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/48b9b860
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/48b9b860
Branch: refs/heads/master
Commit: 48b9b860aeb660411dbd29eec6b52a59ed1dc0eb
Parents: a6213ba
Author: asanka sanjaya <an...@gmail.com>
Authored: Wed Jun 3 11:24:35 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Wed Jun 3 11:24:35 2015 +0000
----------------------------------------------------------------------
tools/config-scripts/gce/config.sh | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/48b9b860/tools/config-scripts/gce/config.sh
----------------------------------------------------------------------
diff --git a/tools/config-scripts/gce/config.sh b/tools/config-scripts/gce/config.sh
index 71bdd27..40c9cdd 100644
--- a/tools/config-scripts/gce/config.sh
+++ b/tools/config-scripts/gce/config.sh
@@ -91,7 +91,6 @@ if [[ $answer = y ]] ; then
ARGS=("-n${NODEID}" "-d${DOMAIN}" "-s${PUPPET_IP}")
${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}"
/root/bin/puppetinstall/puppetinstall "${ARGS[@]}"
-
if [ -e ${LOCKFILE} ]; then
${RM} ${LOCKFILE}
fi
[02/12] stratos git commit: Adding initial files for gce load
balancer extension
Posted by ga...@apache.org.
Adding initial files for gce load balancer extension
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/dfe2e2c4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/dfe2e2c4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/dfe2e2c4
Branch: refs/heads/master
Commit: dfe2e2c4f56f3b4a297b107a6e60525d24c78459
Parents: 9a262f2
Author: asanka sanjaya <an...@gmail.com>
Authored: Wed Jun 3 10:07:29 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Wed Jun 3 10:07:29 2015 +0000
----------------------------------------------------------------------
.../load-balancer/gce-extension/README.md | 6 +
extensions/load-balancer/gce-extension/pom.xml | 109 +++++++++++++++++++
.../gce-extension/src/main/assembly/bin.xml | 69 ++++++++++++
.../gce-extension/src/main/bin/gce-extension.sh | 46 ++++++++
.../gce-extension/src/main/conf/jndi.properties | 22 ++++
.../src/main/conf/log4j.properties | 40 +++++++
.../src/main/conf/thrift-client-config.xml | 27 +++++
.../stratos/gce/extension/GCELoadBalancer.java | 48 ++++++++
.../stratos/gce/extension/GCEOperations.java | 24 ++++
.../gce/extension/GCEStatisticsReader.java | 37 +++++++
.../org/apache/stratos/gce/extension/Main.java | 88 +++++++++++++++
extensions/load-balancer/pom.xml | 1 +
12 files changed, 517 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/README.md
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/README.md b/extensions/load-balancer/gce-extension/README.md
new file mode 100644
index 0000000..9406ee6
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/README.md
@@ -0,0 +1,6 @@
+# Apache Stratos GCE Extension
+
+Apache Stratos GCE extension is a load balancer extension for Google Compute Engine Load Balancer. It is an executable program
+which can manage the life-cycle of a GCE load balancer instance according to the topology, composite application model,
+tenant application signups and domain mapping information received from Stratos via the message broker.
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/pom.xml b/extensions/load-balancer/gce-extension/pom.xml
new file mode 100644
index 0000000..0981d49
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/pom.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>stratos-load-balancer-extensions</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.apache.stratos.gce.extension</artifactId>
+ <name>Apache Stratos - GCE Extension</name>
+ <description>Apache Stratos GCE Extension for Load Balancing</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.7.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>org.apache.stratos.common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>org.apache.stratos.messaging</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>org.apache.stratos.load.balancer.extension.api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.wso2.andes.wso2</groupId>
+ <artifactId>andes-client</artifactId>
+ <version>0.13.wso2v8</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/bin.xml</descriptor>
+ </descriptors>
+ <archiverConfig>
+ <fileMode>420</fileMode>
+ <directoryMode>493</directoryMode>
+ <defaultDirectoryMode>493</defaultDirectoryMode>
+ </archiverConfig>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.apache.stratos.gce.extension.Main</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/assembly/bin.xml b/extensions/load-balancer/gce-extension/src/main/assembly/bin.xml
new file mode 100644
index 0000000..2cbc6d5
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/src/main/assembly/bin.xml
@@ -0,0 +1,69 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>bin</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}/src/main/bin</directory>
+ <outputDirectory>/bin</outputDirectory>
+ <fileMode>0755</fileMode>
+ <includes>
+ <include>gce-extension.sh</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/src/main/conf</directory>
+ <outputDirectory>/conf</outputDirectory>
+ <fileMode>0600</fileMode>
+ <includes>
+ <include>jndi.properties</include>
+ <include>log4j.properties</include>
+ <include>thrift-client-config.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/src/main/security</directory>
+ <outputDirectory>/security</outputDirectory>
+ <fileMode>0600</fileMode>
+ <includes>
+ <include>client-truststore.jks</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/lib</outputDirectory>
+ <excludes>
+ <exclude>*:icu4j*</exclude>
+ <exclude>*:jaxen*</exclude>
+ <exclude>*:jboss-transaction-api*</exclude>
+ <exclude>*:wrapper*</exclude>
+ <exclude>*:xom*</exclude>
+ </excludes>
+ <useProjectArtifact>true</useProjectArtifact>
+ <scope>runtime</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly>
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/src/main/bin/gce-extension.sh
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/bin/gce-extension.sh b/extensions/load-balancer/gce-extension/src/main/bin/gce-extension.sh
new file mode 100755
index 0000000..c67d831
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/src/main/bin/gce-extension.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+# --------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# --------------------------------------------------------------
+
+echo "Starting gce load balancer extension..."
+script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
+echo ${script_path}
+lib_path=${script_path}/../lib/
+class_path=`echo ${lib_path}/*.jar | tr ' ' ':'`
+
+
+
+properties="-Djndi.properties.dir=${script_path}/../conf
+ -Dstats.socket.file.path=/tmp/haproxy-stats.socket
+ -Dlog4j.properties.file.path=${script_path}/../conf/log4j.properties
+ -Djavax.net.ssl.trustStore=${script_path}/../security/client-truststore.jks
+ -Djavax.net.ssl.trustStorePassword=wso2carbon
+ -Dthrift.client.config.file.path=${script_path}/../conf/thrift-client-config.xml
+ -Dcep.stats.publisher.enabled=false
+ -Dthrift.receiver.ip=127.0.0.1
+ -Dthrift.receiver.port=7615
+ -Dnetwork.partition.id=network-partition-1"
+
+
+# Uncomment below line to enable remote debugging
+debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006"
+
+java -cp "${class_path}" ${properties} ${debug} org.apache.stratos.gce.extension.Main $*
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/src/main/conf/jndi.properties
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/conf/jndi.properties b/extensions/load-balancer/gce-extension/src/main/conf/jndi.properties
new file mode 100644
index 0000000..21d7420
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/src/main/conf/jndi.properties
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+connectionfactoryName=TopicConnectionFactory
+java.naming.provider.url=tcp://localhost:61616
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/src/main/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/conf/log4j.properties b/extensions/load-balancer/gce-extension/src/main/conf/log4j.properties
new file mode 100644
index 0000000..ec45878
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/src/main/conf/log4j.properties
@@ -0,0 +1,40 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Set root logger level and appenders
+log4j.rootLogger=INFO, CONSOLE_APPENDER, FILE_APPENDER
+
+# CONSOLE_APPENDER is set to be a ConsoleAppender.
+log4j.appender.CONSOLE_APPENDER=org.apache.log4j.ConsoleAppender
+
+# The standard error log where all the warnings, errors and fatal errors will be logged
+log4j.appender.FILE_APPENDER=org.apache.log4j.FileAppender
+log4j.appender.FILE_APPENDER.File=logs/haproxy-extension.log
+log4j.appender.FILE_APPENDER.layout=org.apache.log4j.PatternLayout
+log4j.appender.FILE_APPENDER.layout.ConversionPattern=%d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
+log4j.appender.FILE_APPENDER.threshold=DEBUG
+
+# CONSOLE_APPENDER uses PatternLayout.
+log4j.appender.CONSOLE_APPENDER.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE_APPENDER.layout.ConversionPattern=[%d{ISO8601}] %5p - [%c{1}] %m%n
+
+log4j.logger.org.apache.stratos.haproxy.extension=INFO
+log4j.logger.org.apache.stratos.load.balancer.extension.api=INFO
+log4j.logger.org.apache.stratos.messaging=INFO
+log4j.logger.org.wso2.andes.client=ERROR
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/src/main/conf/thrift-client-config.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/conf/thrift-client-config.xml b/extensions/load-balancer/gce-extension/src/main/conf/thrift-client-config.xml
new file mode 100644
index 0000000..5cacada
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/src/main/conf/thrift-client-config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP -->
+<thriftClientConfiguration>
+ <username>admin</username>
+ <password>admin</password>
+ <ip>localhost</ip>
+ <port>7611</port>
+</thriftClientConfiguration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCELoadBalancer.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCELoadBalancer.java b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCELoadBalancer.java
new file mode 100644
index 0000000..d1240f2
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCELoadBalancer.java
@@ -0,0 +1,48 @@
+package org.apache.stratos.gce.extension;
+
+import org.apache.stratos.load.balancer.common.domain.Topology;
+import org.apache.stratos.load.balancer.extension.api.LoadBalancer;
+import org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public class GCELoadBalancer implements LoadBalancer {
+
+
+ @Override
+ public void start() throws LoadBalancerExtensionException {
+
+ }
+
+ @Override
+ public void stop() throws LoadBalancerExtensionException {
+
+ }
+
+ @Override
+ public boolean configure(Topology topology) throws LoadBalancerExtensionException {
+ return false;
+ }
+
+ @Override
+ public void reload() throws LoadBalancerExtensionException {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEOperations.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEOperations.java b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEOperations.java
new file mode 100644
index 0000000..a380c82
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEOperations.java
@@ -0,0 +1,24 @@
+package org.apache.stratos.gce.extension;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+public class GCEOperations {
+
+
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEStatisticsReader.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEStatisticsReader.java b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEStatisticsReader.java
new file mode 100644
index 0000000..8333306
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEStatisticsReader.java
@@ -0,0 +1,37 @@
+package org.apache.stratos.gce.extension;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.stratos.load.balancer.common.statistics.LoadBalancerStatisticsReader;
+
+/**
+ * GCE extension statistics reader class.
+ */
+public class GCEStatisticsReader implements LoadBalancerStatisticsReader {
+ @Override
+ public String getClusterInstanceId() {
+ return null;
+ }
+
+ @Override
+ public int getInFlightRequestCount(String clusterId) {
+ return 0;
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/Main.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/Main.java b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/Main.java
new file mode 100644
index 0000000..6fb7a53
--- /dev/null
+++ b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/Main.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.gce.extension;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.log4j.PropertyConfigurator;
+import org.apache.stratos.common.threading.StratosThreadPool;
+import org.apache.stratos.load.balancer.common.topology.TopologyProvider;
+import org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension;
+
+import java.util.concurrent.ExecutorService;
+
+/**
+ * GCE extension main class.
+ */
+public class Main {
+ private static final Log log = LogFactory.getLog(Main.class);
+ private static ExecutorService executorService;
+
+ public static void main(String[] args) {
+
+ LoadBalancerExtension extension = null;
+ try {
+ // Configure log4j properties
+ PropertyConfigurator.configure(System.getProperty("log4j.properties.file.path"));
+
+ if (log.isInfoEnabled()) {
+ log.info("GCE extension started");
+ }
+
+ // Add shutdown hook
+ final Thread mainThread = Thread.currentThread();
+ final LoadBalancerExtension finalExtension = extension;
+ Runtime.getRuntime().addShutdownHook(new Thread() {
+ public void run() {
+ try {
+ if(finalExtension != null) {
+ log.info("GCE gce instance...");
+ finalExtension.stop();
+ }
+ mainThread.join();
+ } catch (Exception e) {
+ log.error(e);
+ }
+ }
+ });
+
+ executorService = StratosThreadPool.getExecutorService("gce.extension.thread.pool", 10);
+
+ // Validate runtime parameters
+
+ TopologyProvider topologyProvider = new TopologyProvider();
+ //ToDo: pass topology provider inside the statsReader. Look line 70 in HAProxy.java
+ GCEStatisticsReader statisticsReader = new GCEStatisticsReader();
+ extension = new LoadBalancerExtension(new GCELoadBalancer(), statisticsReader, topologyProvider);
+ extension.setExecutorService(executorService);
+ extension.execute();
+
+
+ } catch (Exception e) {
+ if (log.isErrorEnabled()) {
+ log.error(e);
+ }
+ if (extension != null) {
+ log.info("Shutting GCE instance...");
+ extension.stop();
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/dfe2e2c4/extensions/load-balancer/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/pom.xml b/extensions/load-balancer/pom.xml
index ff89360..5b27928 100644
--- a/extensions/load-balancer/pom.xml
+++ b/extensions/load-balancer/pom.xml
@@ -36,6 +36,7 @@
<modules>
<module>haproxy-extension</module>
<module>nginx-extension</module>
+ <module>gce-extension</module>
</modules>
</project>
[11/12] stratos git commit: reformat the code in gce config.sh
Posted by ga...@apache.org.
reformat the code in gce config.sh
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/4d4e8492
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/4d4e8492
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/4d4e8492
Branch: refs/heads/master
Commit: 4d4e8492a1d77a802b400451a1615a9473c8595d
Parents: 57e1dcb
Author: asanka sanjaya <an...@gmail.com>
Authored: Thu Jun 4 06:08:01 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Thu Jun 4 06:08:01 2015 +0000
----------------------------------------------------------------------
tools/config-scripts/gce/config.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/4d4e8492/tools/config-scripts/gce/config.sh
----------------------------------------------------------------------
diff --git a/tools/config-scripts/gce/config.sh b/tools/config-scripts/gce/config.sh
index 2fd7076..ab75b12 100644
--- a/tools/config-scripts/gce/config.sh
+++ b/tools/config-scripts/gce/config.sh
@@ -91,7 +91,7 @@ if [[ $answer = y ]] ; then
ARGS=("-n${NODEID}" "-d${DOMAIN}" "-s${PUPPET_IP}")
${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}"
/root/bin/puppetinstall/puppetinstall "${ARGS[@]}"
- if [[ -e ${LOCKFILE} ]]; then
+ if [ -e ${LOCKFILE} ]; then
${RM} ${LOCKFILE}
fi
[09/12] stratos git commit: reformat the code in gce config.sh
Posted by ga...@apache.org.
reformat the code in gce config.sh
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/bca441fe
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/bca441fe
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/bca441fe
Branch: refs/heads/master
Commit: bca441fec2f746db5d74eb1c578b847f50d9ad0a
Parents: c72a31d
Author: asanka sanjaya <an...@gmail.com>
Authored: Thu Jun 4 06:04:44 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Thu Jun 4 06:04:44 2015 +0000
----------------------------------------------------------------------
tools/config-scripts/gce/config.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/bca441fe/tools/config-scripts/gce/config.sh
----------------------------------------------------------------------
diff --git a/tools/config-scripts/gce/config.sh b/tools/config-scripts/gce/config.sh
index 327a33f..48947df 100644
--- a/tools/config-scripts/gce/config.sh
+++ b/tools/config-scripts/gce/config.sh
@@ -92,7 +92,7 @@ if [[ $answer = y ]] ; then
${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}"
/root/bin/puppetinstall/puppetinstall "${ARGS[@]}"
if [[ -e ${LOCKFILE} ]]; then
- ${RM} ${LOCKFILE}
+ ${RM} ${LOCKFILE}
fi
${GREP} -q '/root/bin/init.sh > /tmp/puppet_log' /etc/rc.local || ${SED} -i 's/exit 0$/\/root\/bin\/init.sh \> \/tmp\/puppet_log\nexit 0/' /etc/rc.local
[05/12] stratos git commit: fixing a naming issue in gce config.sh
Posted by ga...@apache.org.
fixing a naming issue in gce config.sh
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/4935d4c1
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/4935d4c1
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/4935d4c1
Branch: refs/heads/master
Commit: 4935d4c1a2cc38dae693145cb944303f8a1fa6ac
Parents: 232557a
Author: asanka sanjaya <an...@gmail.com>
Authored: Wed Jun 3 11:12:06 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Wed Jun 3 11:12:06 2015 +0000
----------------------------------------------------------------------
tools/config-scripts/ec2/config.sh | 2 +-
tools/config-scripts/gce/config.sh | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/4935d4c1/tools/config-scripts/ec2/config.sh
----------------------------------------------------------------------
diff --git a/tools/config-scripts/ec2/config.sh b/tools/config-scripts/ec2/config.sh
index 4ac4707..880a778 100755
--- a/tools/config-scripts/ec2/config.sh
+++ b/tools/config-scripts/ec2/config.sh
@@ -33,7 +33,7 @@ CP=`which cp`
MV=`which mv`
HOSTSFILE=/etc/hosts
-LOCKFILE=/mnt/apache-stratos-cartridge-agent-4.0.0/wso2carbon.lck
+LOCKFILE=/mnt/apache-stratos-cartridge-agent-4.1.0/wso2carbon.lck
DATE=`date +%d%m%y%S`
RANDOMNUMBER="`${TR} -c -d 0-9 < /dev/urandom | ${HEAD} -c 4`${DATE}"
http://git-wip-us.apache.org/repos/asf/stratos/blob/4935d4c1/tools/config-scripts/gce/config.sh
----------------------------------------------------------------------
diff --git a/tools/config-scripts/gce/config.sh b/tools/config-scripts/gce/config.sh
index a2c61b8..80e5739 100644
--- a/tools/config-scripts/gce/config.sh
+++ b/tools/config-scripts/gce/config.sh
@@ -36,6 +36,7 @@ CURL=`which curl`
HOSTSFILE=/etc/hosts
DATE=`date +%d%m%y%S`
RANDOMNUMBER="`${TR} -c -d 0-9 < /dev/urandom | ${HEAD} -c 4`${DATE}"
+LOCKFILE=/mnt/apache-stratos-cartridge-agent-4.1.0/wso2carbon.lck
function valid_ip()
{
@@ -90,7 +91,9 @@ if [[ $answer = y ]] ; then
ARGS=("-n${NODEID}" "-d${DOMAIN}" "-s${PUPPET_IP}")
${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}"
/root/bin/puppetinstall/puppetinstall "${ARGS[@]}"
- ${RM} /mnt/apache-stratos-python-cartridge-agent-4.1.0/wso2carbon.lck
+ if [ -e ${LOCKFILE} ]; then
+ ${RM} ${LOCKFILE}
+ fi
${GREP} -q '/root/bin/init.sh > /tmp/puppet_log' /etc/rc.local || ${SED} -i 's/exit 0$/\/root\/bin\/init.sh \> \/tmp\/puppet_log\nexit 0/' /etc/rc.local
${RM} -rf /tmp/*
${RM} -rf /var/lib/puppet/ssl/*
[10/12] stratos git commit: reformat the code in gce config.sh
Posted by ga...@apache.org.
reformat the code in gce config.sh
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/57e1dcb5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/57e1dcb5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/57e1dcb5
Branch: refs/heads/master
Commit: 57e1dcb5449992c42c5d337fc863c92f7f3c7edc
Parents: bca441f
Author: asanka sanjaya <an...@gmail.com>
Authored: Thu Jun 4 06:06:19 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Thu Jun 4 06:06:19 2015 +0000
----------------------------------------------------------------------
tools/config-scripts/gce/config.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/57e1dcb5/tools/config-scripts/gce/config.sh
----------------------------------------------------------------------
diff --git a/tools/config-scripts/gce/config.sh b/tools/config-scripts/gce/config.sh
index 48947df..2fd7076 100644
--- a/tools/config-scripts/gce/config.sh
+++ b/tools/config-scripts/gce/config.sh
@@ -92,7 +92,7 @@ if [[ $answer = y ]] ; then
${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}"
/root/bin/puppetinstall/puppetinstall "${ARGS[@]}"
if [[ -e ${LOCKFILE} ]]; then
- ${RM} ${LOCKFILE}
+ ${RM} ${LOCKFILE}
fi
${GREP} -q '/root/bin/init.sh > /tmp/puppet_log' /etc/rc.local || ${SED} -i 's/exit 0$/\/root\/bin\/init.sh \> \/tmp\/puppet_log\nexit 0/' /etc/rc.local
[06/12] stratos git commit: fixing a naming issue in gce config.sh
Posted by ga...@apache.org.
fixing a naming issue in gce config.sh
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a6213baf
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a6213baf
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a6213baf
Branch: refs/heads/master
Commit: a6213baf820e4fb95f9f46c90fcb5fab97f59fd3
Parents: 4935d4c
Author: asanka sanjaya <an...@gmail.com>
Authored: Wed Jun 3 11:18:37 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Wed Jun 3 11:18:37 2015 +0000
----------------------------------------------------------------------
tools/config-scripts/gce/config.sh | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/a6213baf/tools/config-scripts/gce/config.sh
----------------------------------------------------------------------
diff --git a/tools/config-scripts/gce/config.sh b/tools/config-scripts/gce/config.sh
index 80e5739..71bdd27 100644
--- a/tools/config-scripts/gce/config.sh
+++ b/tools/config-scripts/gce/config.sh
@@ -91,9 +91,11 @@ if [[ $answer = y ]] ; then
ARGS=("-n${NODEID}" "-d${DOMAIN}" "-s${PUPPET_IP}")
${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}"
/root/bin/puppetinstall/puppetinstall "${ARGS[@]}"
+
if [ -e ${LOCKFILE} ]; then
${RM} ${LOCKFILE}
fi
+
${GREP} -q '/root/bin/init.sh > /tmp/puppet_log' /etc/rc.local || ${SED} -i 's/exit 0$/\/root\/bin\/init.sh \> \/tmp\/puppet_log\nexit 0/' /etc/rc.local
${RM} -rf /tmp/*
${RM} -rf /var/lib/puppet/ssl/*
[03/12] stratos git commit: Adding initial files for gce load
balancer extension
Posted by ga...@apache.org.
Adding initial files for gce load balancer extension
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/9bc3f0c8
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/9bc3f0c8
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/9bc3f0c8
Branch: refs/heads/master
Commit: 9bc3f0c8e8924d3ab9741b301dae8266c6bab9be
Parents: dfe2e2c
Author: asanka sanjaya <an...@gmail.com>
Authored: Wed Jun 3 10:09:21 2015 +0000
Committer: asanka sanjaya <an...@gmail.com>
Committed: Wed Jun 3 10:09:21 2015 +0000
----------------------------------------------------------------------
.../load-balancer/gce-extension/README.md | 6 -
extensions/load-balancer/gce-extension/pom.xml | 109 -------------------
.../gce-extension/src/main/assembly/bin.xml | 69 ------------
.../gce-extension/src/main/bin/gce-extension.sh | 46 --------
.../gce-extension/src/main/conf/jndi.properties | 22 ----
.../src/main/conf/log4j.properties | 40 -------
.../src/main/conf/thrift-client-config.xml | 27 -----
.../stratos/gce/extension/GCELoadBalancer.java | 48 --------
.../stratos/gce/extension/GCEOperations.java | 24 ----
.../gce/extension/GCEStatisticsReader.java | 37 -------
.../org/apache/stratos/gce/extension/Main.java | 88 ---------------
extensions/load-balancer/pom.xml | 1 -
12 files changed, 517 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/README.md
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/README.md b/extensions/load-balancer/gce-extension/README.md
deleted file mode 100644
index 9406ee6..0000000
--- a/extensions/load-balancer/gce-extension/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# Apache Stratos GCE Extension
-
-Apache Stratos GCE extension is a load balancer extension for Google Compute Engine Load Balancer. It is an executable program
-which can manage the life-cycle of a GCE load balancer instance according to the topology, composite application model,
-tenant application signups and domain mapping information received from Stratos via the message broker.
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/pom.xml b/extensions/load-balancer/gce-extension/pom.xml
deleted file mode 100644
index 0981d49..0000000
--- a/extensions/load-balancer/gce-extension/pom.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.stratos</groupId>
- <artifactId>stratos-load-balancer-extensions</artifactId>
- <version>4.1.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.apache.stratos.gce.extension</artifactId>
- <name>Apache Stratos - GCE Extension</name>
- <description>Apache Stratos GCE Extension for Load Balancing</description>
-
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.7.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.stratos</groupId>
- <artifactId>org.apache.stratos.common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.stratos</groupId>
- <artifactId>org.apache.stratos.messaging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.stratos</groupId>
- <artifactId>org.apache.stratos.load.balancer.extension.api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>1.7</version>
- </dependency>
- <dependency>
- <groupId>org.wso2.andes.wso2</groupId>
- <artifactId>andes-client</artifactId>
- <version>0.13.wso2v8</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/bin.xml</descriptor>
- </descriptors>
- <archiverConfig>
- <fileMode>420</fileMode>
- <directoryMode>493</directoryMode>
- <defaultDirectoryMode>493</defaultDirectoryMode>
- </archiverConfig>
- <appendAssemblyId>false</appendAssemblyId>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <archive>
- <manifest>
- <mainClass>org.apache.stratos.gce.extension.Main</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/assembly/bin.xml b/extensions/load-balancer/gce-extension/src/main/assembly/bin.xml
deleted file mode 100644
index 2cbc6d5..0000000
--- a/extensions/load-balancer/gce-extension/src/main/assembly/bin.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>bin</id>
- <formats>
- <format>zip</format>
- </formats>
- <fileSets>
- <fileSet>
- <directory>${project.basedir}/src/main/bin</directory>
- <outputDirectory>/bin</outputDirectory>
- <fileMode>0755</fileMode>
- <includes>
- <include>gce-extension.sh</include>
- </includes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/src/main/conf</directory>
- <outputDirectory>/conf</outputDirectory>
- <fileMode>0600</fileMode>
- <includes>
- <include>jndi.properties</include>
- <include>log4j.properties</include>
- <include>thrift-client-config.xml</include>
- </includes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/src/main/security</directory>
- <outputDirectory>/security</outputDirectory>
- <fileMode>0600</fileMode>
- <includes>
- <include>client-truststore.jks</include>
- </includes>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <outputDirectory>/lib</outputDirectory>
- <excludes>
- <exclude>*:icu4j*</exclude>
- <exclude>*:jaxen*</exclude>
- <exclude>*:jboss-transaction-api*</exclude>
- <exclude>*:wrapper*</exclude>
- <exclude>*:xom*</exclude>
- </excludes>
- <useProjectArtifact>true</useProjectArtifact>
- <scope>runtime</scope>
- </dependencySet>
- </dependencySets>
-</assembly>
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/src/main/bin/gce-extension.sh
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/bin/gce-extension.sh b/extensions/load-balancer/gce-extension/src/main/bin/gce-extension.sh
deleted file mode 100755
index c67d831..0000000
--- a/extensions/load-balancer/gce-extension/src/main/bin/gce-extension.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# --------------------------------------------------------------
-
-echo "Starting gce load balancer extension..."
-script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-echo ${script_path}
-lib_path=${script_path}/../lib/
-class_path=`echo ${lib_path}/*.jar | tr ' ' ':'`
-
-
-
-properties="-Djndi.properties.dir=${script_path}/../conf
- -Dstats.socket.file.path=/tmp/haproxy-stats.socket
- -Dlog4j.properties.file.path=${script_path}/../conf/log4j.properties
- -Djavax.net.ssl.trustStore=${script_path}/../security/client-truststore.jks
- -Djavax.net.ssl.trustStorePassword=wso2carbon
- -Dthrift.client.config.file.path=${script_path}/../conf/thrift-client-config.xml
- -Dcep.stats.publisher.enabled=false
- -Dthrift.receiver.ip=127.0.0.1
- -Dthrift.receiver.port=7615
- -Dnetwork.partition.id=network-partition-1"
-
-
-# Uncomment below line to enable remote debugging
-debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006"
-
-java -cp "${class_path}" ${properties} ${debug} org.apache.stratos.gce.extension.Main $*
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/src/main/conf/jndi.properties
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/conf/jndi.properties b/extensions/load-balancer/gce-extension/src/main/conf/jndi.properties
deleted file mode 100644
index 21d7420..0000000
--- a/extensions/load-balancer/gce-extension/src/main/conf/jndi.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-connectionfactoryName=TopicConnectionFactory
-java.naming.provider.url=tcp://localhost:61616
-java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/src/main/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/conf/log4j.properties b/extensions/load-balancer/gce-extension/src/main/conf/log4j.properties
deleted file mode 100644
index ec45878..0000000
--- a/extensions/load-balancer/gce-extension/src/main/conf/log4j.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# Set root logger level and appenders
-log4j.rootLogger=INFO, CONSOLE_APPENDER, FILE_APPENDER
-
-# CONSOLE_APPENDER is set to be a ConsoleAppender.
-log4j.appender.CONSOLE_APPENDER=org.apache.log4j.ConsoleAppender
-
-# The standard error log where all the warnings, errors and fatal errors will be logged
-log4j.appender.FILE_APPENDER=org.apache.log4j.FileAppender
-log4j.appender.FILE_APPENDER.File=logs/haproxy-extension.log
-log4j.appender.FILE_APPENDER.layout=org.apache.log4j.PatternLayout
-log4j.appender.FILE_APPENDER.layout.ConversionPattern=%d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
-log4j.appender.FILE_APPENDER.threshold=DEBUG
-
-# CONSOLE_APPENDER uses PatternLayout.
-log4j.appender.CONSOLE_APPENDER.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE_APPENDER.layout.ConversionPattern=[%d{ISO8601}] %5p - [%c{1}] %m%n
-
-log4j.logger.org.apache.stratos.haproxy.extension=INFO
-log4j.logger.org.apache.stratos.load.balancer.extension.api=INFO
-log4j.logger.org.apache.stratos.messaging=INFO
-log4j.logger.org.wso2.andes.client=ERROR
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/src/main/conf/thrift-client-config.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/conf/thrift-client-config.xml b/extensions/load-balancer/gce-extension/src/main/conf/thrift-client-config.xml
deleted file mode 100644
index 5cacada..0000000
--- a/extensions/load-balancer/gce-extension/src/main/conf/thrift-client-config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP -->
-<thriftClientConfiguration>
- <username>admin</username>
- <password>admin</password>
- <ip>localhost</ip>
- <port>7611</port>
-</thriftClientConfiguration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCELoadBalancer.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCELoadBalancer.java b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCELoadBalancer.java
deleted file mode 100644
index d1240f2..0000000
--- a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCELoadBalancer.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.apache.stratos.gce.extension;
-
-import org.apache.stratos.load.balancer.common.domain.Topology;
-import org.apache.stratos.load.balancer.extension.api.LoadBalancer;
-import org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class GCELoadBalancer implements LoadBalancer {
-
-
- @Override
- public void start() throws LoadBalancerExtensionException {
-
- }
-
- @Override
- public void stop() throws LoadBalancerExtensionException {
-
- }
-
- @Override
- public boolean configure(Topology topology) throws LoadBalancerExtensionException {
- return false;
- }
-
- @Override
- public void reload() throws LoadBalancerExtensionException {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEOperations.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEOperations.java b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEOperations.java
deleted file mode 100644
index a380c82..0000000
--- a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEOperations.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.apache.stratos.gce.extension;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-public class GCEOperations {
-
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEStatisticsReader.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEStatisticsReader.java b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEStatisticsReader.java
deleted file mode 100644
index 8333306..0000000
--- a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/GCEStatisticsReader.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.apache.stratos.gce.extension;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.stratos.load.balancer.common.statistics.LoadBalancerStatisticsReader;
-
-/**
- * GCE extension statistics reader class.
- */
-public class GCEStatisticsReader implements LoadBalancerStatisticsReader {
- @Override
- public String getClusterInstanceId() {
- return null;
- }
-
- @Override
- public int getInFlightRequestCount(String clusterId) {
- return 0;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/Main.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/Main.java b/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/Main.java
deleted file mode 100644
index 6fb7a53..0000000
--- a/extensions/load-balancer/gce-extension/src/main/java/org/apache/stratos/gce/extension/Main.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.gce.extension;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.log4j.PropertyConfigurator;
-import org.apache.stratos.common.threading.StratosThreadPool;
-import org.apache.stratos.load.balancer.common.topology.TopologyProvider;
-import org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension;
-
-import java.util.concurrent.ExecutorService;
-
-/**
- * GCE extension main class.
- */
-public class Main {
- private static final Log log = LogFactory.getLog(Main.class);
- private static ExecutorService executorService;
-
- public static void main(String[] args) {
-
- LoadBalancerExtension extension = null;
- try {
- // Configure log4j properties
- PropertyConfigurator.configure(System.getProperty("log4j.properties.file.path"));
-
- if (log.isInfoEnabled()) {
- log.info("GCE extension started");
- }
-
- // Add shutdown hook
- final Thread mainThread = Thread.currentThread();
- final LoadBalancerExtension finalExtension = extension;
- Runtime.getRuntime().addShutdownHook(new Thread() {
- public void run() {
- try {
- if(finalExtension != null) {
- log.info("GCE gce instance...");
- finalExtension.stop();
- }
- mainThread.join();
- } catch (Exception e) {
- log.error(e);
- }
- }
- });
-
- executorService = StratosThreadPool.getExecutorService("gce.extension.thread.pool", 10);
-
- // Validate runtime parameters
-
- TopologyProvider topologyProvider = new TopologyProvider();
- //ToDo: pass topology provider inside the statsReader. Look line 70 in HAProxy.java
- GCEStatisticsReader statisticsReader = new GCEStatisticsReader();
- extension = new LoadBalancerExtension(new GCELoadBalancer(), statisticsReader, topologyProvider);
- extension.setExecutorService(executorService);
- extension.execute();
-
-
- } catch (Exception e) {
- if (log.isErrorEnabled()) {
- log.error(e);
- }
- if (extension != null) {
- log.info("Shutting GCE instance...");
- extension.stop();
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/9bc3f0c8/extensions/load-balancer/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/pom.xml b/extensions/load-balancer/pom.xml
index 5b27928..ff89360 100644
--- a/extensions/load-balancer/pom.xml
+++ b/extensions/load-balancer/pom.xml
@@ -36,7 +36,6 @@
<modules>
<module>haproxy-extension</module>
<module>nginx-extension</module>
- <module>gce-extension</module>
</modules>
</project>