You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by sa...@apache.org on 2014/01/08 22:20:13 UTC
[1/2] git commit: Added missing carbon kernel patches to LB. Update
cartridge-agent.sh script to match with stratos.sh script rename
Updated Branches:
refs/heads/master dac753c2f -> 7e2b9d94e
Added missing carbon kernel patches to LB. Update cartridge-agent.sh script to match with stratos.sh script rename
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/cdb5e556
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/cdb5e556
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/cdb5e556
Branch: refs/heads/master
Commit: cdb5e556ad4d49caa69830939a362dae371f231e
Parents: bd29249
Author: Sajith Kariyawasam <sa...@wso2.com>
Authored: Thu Jan 9 02:48:58 2014 +0530
Committer: Sajith Kariyawasam <sa...@wso2.com>
Committed: Thu Jan 9 02:48:58 2014 +0530
----------------------------------------------------------------------
.../conf/templates/jndi.properties.template | 3 -
.../modules/scripts/ec2/cartridge-agent.sh | 67 ++++++++------------
.../ec2/load-balancer/cartridge-agent.sh | 27 ++++----
.../distribution/src/main/assembly/bin.xml | 37 ++++++++++-
.../conf/templates/jndi.properties.template | 3 -
5 files changed, 76 insertions(+), 61 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cdb5e556/products/cartridge-agent/modules/distribution/src/main/conf/templates/jndi.properties.template
----------------------------------------------------------------------
diff --git a/products/cartridge-agent/modules/distribution/src/main/conf/templates/jndi.properties.template b/products/cartridge-agent/modules/distribution/src/main/conf/templates/jndi.properties.template
index 8ca6b34..c6b062a 100644
--- a/products/cartridge-agent/modules/distribution/src/main/conf/templates/jndi.properties.template
+++ b/products/cartridge-agent/modules/distribution/src/main/conf/templates/jndi.properties.template
@@ -23,6 +23,3 @@
connectionfactoryName=topicConnectionfactory
connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon/carbon?brokerlist='tcp://$mb_ip:$mb_port'
java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory
-java.naming.provider.url=conf/jndi.properties
-
-
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cdb5e556/products/cartridge-agent/modules/scripts/ec2/cartridge-agent.sh
----------------------------------------------------------------------
diff --git a/products/cartridge-agent/modules/scripts/ec2/cartridge-agent.sh b/products/cartridge-agent/modules/scripts/ec2/cartridge-agent.sh
index b16325f..8d7f3b9 100755
--- a/products/cartridge-agent/modules/scripts/ec2/cartridge-agent.sh
+++ b/products/cartridge-agent/modules/scripts/ec2/cartridge-agent.sh
@@ -24,24 +24,12 @@
# instance is spawned. It will initiate all the tasks that needs to
# be run to bring the cartridge instance to operational state.
-source /etc/environment
-
set -e # Terminate on any error
export LOG=/var/log/apache-stratos/cartridge-agent-sh.log
instance_path=/opt/apache-stratos-cartridge-agent # Cartridge agent home
ca_exec_path=${instance_path}/cartridge-agent # Cartridge agent executable home
-temp_payload_path=/tmp/payload/launch-params
-puppet_payload_path=/tmp/puppet-payload
-cartridge_agent_script=cartridge-agent.sh
-
-#---------------------------------------------
-# Unzip cartridge agent pack
-#---------------------------------------------
-pushd ${instance_path}
-unzip apache-stratos-cartridge-agent-4.0.0-SNAPSHOT-bin.zip
-mv apache-stratos-cartridge-agent-4.0.0-SNAPSHOT cartridge-agent
-popd
-
+cert_truststore=security/client-truststore.jks
+truststore_password=wso2carbon
# ---------------------------------------------
# Download payload
@@ -50,14 +38,8 @@ if [ ! -d ${instance_path}/payload ]; then
echo "creating payload directory... " | tee -a $LOG
mkdir ${instance_path}/payload
echo "payload directory created" | tee -a $LOG
- #wget http://169.254.169.254/latest/user-data -O ${instance_path}/payload/launch-params -- payload already downloaded
- #echo "payload copied" | tee -a $LOG
-
- # Concat puppet payload and instance payload into ${instance_path}/payload/launch-params
- #Read puppet configs
- puppet_config=`cat /tmp/puppet-payload`
- echo "puppet_config"
- sed "s|$|${puppet_config}|" ${temp_payload_path} > ${instance_path}/payload/launch-params
+ wget http://169.254.169.254/latest/user-data -O ${instance_path}/payload/payload.txt
+ echo "payload copied" | tee -a $LOG
for i in `/usr/bin/ruby ${instance_path}/get-launch-params.rb`
do
@@ -70,35 +52,36 @@ if [ ! -d ${instance_path}/payload ]; then
fi
echo "writing to launch.params ${value}" | tee -a $LOG
echo "export" ${value} >> ${instance_path}/launch.params
- done
-
+ done
fi
source ${instance_path}/launch.params
-pushd $ca_exec_path
-echo "Configuring cartridge agent executable..." | tee -a $LOG
-cp -f bin/$cartridge_agent_script bin/$cartridge_agent_script.tmp
-cat bin/$cartridge_agent_script.tmp | sed -e "s@MB-IP@$MB_IP@g" > bin/$cartridge_agent_script
-cp -f bin/$cartridge_agent_script bin/$cartridge_agent_script.tmp
-cat bin/$cartridge_agent_script.tmp | sed -e "s@MB-PORT@$MB_PORT@g" > bin/$cartridge_agent_script
-cp -f bin/$cartridge_agent_script bin/$cartridge_agent_script.tmp
-cat bin/$cartridge_agent_script.tmp | sed -e "s@CEP-IP@$CEP_IP@g" > bin/$cartridge_agent_script
-cp -f bin/$cartridge_agent_script bin/$cartridge_agent_script.tmp
-cat bin/$cartridge_agent_script.tmp | sed -e "s@CEP-PORT@$CEP_PORT@g" > bin/$cartridge_agent_script
-cp -f bin/$cartridge_agent_script bin/$cartridge_agent_script.tmp
-cat bin/$cartridge_agent_script.tmp | sed -e "s@CERT-TRUSTSTORE@$CERT_TRUSTSTORE@g" > bin/$cartridge_agent_script
-cp -f bin/$cartridge_agent_script bin/$cartridge_agent_script.tmp
-cat bin/$cartridge_agent_script.tmp | sed -e "s@\bTRUSTSTORE-PASSWORD\b@$TRUSTSTORE_PASSWORD@g" > bin/$cartridge_agent_script
-rm -f bin/$cartridge_agent_script.tmp
+#---------------------------
+# Starting load balancer
+#---------------------------
+pushd $instance_path/load-balancer/
+sh "start-load-balancer.sh" $MB_IP $MB_PORT $CEP_IP $CEP_PORT $CLUSTER_ID $NETWORK_PARTITION_ID &
popd
-
#------------------------------------
# Starting cartridge agent executable
#------------------------------------
pushd $ca_exec_path
+echo "Configuring cartridge agent executable..." | tee -a $LOG
+cp -f templates/stratos.sh.template bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@MB-IP@$MB_IP@g" > bin/stratos.sh
+cp -f bin/stratos.sh bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@MB-PORT@$MB_PORT@g" > bin/stratos.sh
+cp -f bin/stratos.sh bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@CEP-IP@$CEP_IP@g" > bin/stratos.sh
+cp -f bin/stratos.sh bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@CEP-PORT@$CEP_PORT@g" > bin/stratos.sh
+cp -f bin/stratos.sh bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@CERT-TRUSTSTORE@$cert_truststore@g" > bin/stratos.sh
+cp -f bin/stratos.sh bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@\bTRUSTSTORE-PASSWORD\b@$truststore_password@g" > bin/stratos.sh
+rm -f bin/stratos.sh.tmp
echo "Starting cartridge agent..." | tee -a $LOG
-sh bin/cartridge-agent.sh
+sh bin/stratos.sh &
popd
-
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cdb5e556/products/cartridge-agent/modules/scripts/ec2/load-balancer/cartridge-agent.sh
----------------------------------------------------------------------
diff --git a/products/cartridge-agent/modules/scripts/ec2/load-balancer/cartridge-agent.sh b/products/cartridge-agent/modules/scripts/ec2/load-balancer/cartridge-agent.sh
index b65888f..8d7f3b9 100644
--- a/products/cartridge-agent/modules/scripts/ec2/load-balancer/cartridge-agent.sh
+++ b/products/cartridge-agent/modules/scripts/ec2/load-balancer/cartridge-agent.sh
@@ -28,6 +28,8 @@ set -e # Terminate on any error
export LOG=/var/log/apache-stratos/cartridge-agent-sh.log
instance_path=/opt/apache-stratos-cartridge-agent # Cartridge agent home
ca_exec_path=${instance_path}/cartridge-agent # Cartridge agent executable home
+cert_truststore=security/client-truststore.jks
+truststore_password=wso2carbon
# ---------------------------------------------
# Download payload
@@ -67,16 +69,19 @@ popd
#------------------------------------
pushd $ca_exec_path
echo "Configuring cartridge agent executable..." | tee -a $LOG
-cp -f templates/cartridge-agent.sh.template bin/cartridge-agent.sh.tmp
-cat bin/cartridge-agent.sh.tmp | sed -e "s@MB-IP@$MB_IP@g" > bin/cartridge-agent.sh
-cp -f bin/cartridge-agent.sh bin/cartridge-agent.sh.tmp
-cat bin/cartridge-agent.sh.tmp | sed -e "s@MB-PORT@$MB_PORT@g" > bin/cartridge-agent.sh
-cp -f bin/cartridge-agent.sh bin/cartridge-agent.sh.tmp
-cat bin/cartridge-agent.sh.tmp | sed -e "s@CEP-IP@$CEP_IP@g" > bin/cartridge-agent.sh
-cp -f bin/cartridge-agent.sh bin/cartridge-agent.sh.tmp
-cat bin/cartridge-agent.sh.tmp | sed -e "s@CEP-PORT@$CEP_PORT@g" > bin/cartridge-agent.sh
-rm -f bin/cartridge-agent.sh.tmp
+cp -f templates/stratos.sh.template bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@MB-IP@$MB_IP@g" > bin/stratos.sh
+cp -f bin/stratos.sh bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@MB-PORT@$MB_PORT@g" > bin/stratos.sh
+cp -f bin/stratos.sh bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@CEP-IP@$CEP_IP@g" > bin/stratos.sh
+cp -f bin/stratos.sh bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@CEP-PORT@$CEP_PORT@g" > bin/stratos.sh
+cp -f bin/stratos.sh bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@CERT-TRUSTSTORE@$cert_truststore@g" > bin/stratos.sh
+cp -f bin/stratos.sh bin/stratos.sh.tmp
+cat bin/stratos.sh.tmp | sed -e "s@\bTRUSTSTORE-PASSWORD\b@$truststore_password@g" > bin/stratos.sh
+rm -f bin/stratos.sh.tmp
echo "Starting cartridge agent..." | tee -a $LOG
-sh bin/cartridge-agent.sh
+sh bin/stratos.sh &
popd
-
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cdb5e556/products/load-balancer/modules/distribution/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/products/load-balancer/modules/distribution/src/main/assembly/bin.xml b/products/load-balancer/modules/distribution/src/main/assembly/bin.xml
index 431a2bc..ffa2670 100755
--- a/products/load-balancer/modules/distribution/src/main/assembly/bin.xml
+++ b/products/load-balancer/modules/distribution/src/main/assembly/bin.xml
@@ -32,7 +32,6 @@
<exclude>**/conf/axis2/axis2.xml</exclude>
<exclude>**/conf/mgt-transports.xml</exclude>
<exclude>**/conf/synapse.xml</exclude>
- <exclude>**/conf/cipher-text.properties</exclude>
<exclude>**/log4j.properties</exclude>
<exclude>**/dbscripts/**</exclude>
<exclude>**/native/*</exclude>
@@ -52,7 +51,6 @@
<exclude>**/build.xml</exclude>
<exclude>**/chpasswd.*</exclude>
<exclude>**/carbondump.*</exclude>
- <exclude>**/ciphertool.*</exclude>
<exclude>**/jgroups-s3_ping-aws.xml</exclude>
<exclude>**/tomcat-users.xml</exclude>
<exclude>**/axis2/tenant-axis2.xml</exclude>
@@ -62,6 +60,8 @@
<exclude>**/*.aar</exclude>
<exclude>**/webapp-mode/**</exclude>
<exclude>**/repository/components/**</exclude>
+ <exclude>**/repository/conf/security/cipher-text.properties</exclude>
+ <exclude>**/repository/conf/security/cipher-tool.properties</exclude>
</excludes>
</fileSet>
<!-- Copying p2 profile and osgi bundles-->
@@ -105,6 +105,39 @@
<include>*.xsd</include>
</includes>
</fileSet>
+
+
+ <!-- Kernel Patches-->
+ <fileSet>
+ <directory>../p2-profile/target/WSO2-CARBON-PATCH-4.2.0-0001</directory>
+ <outputDirectory>apache-stratos-load-balancer-${pom.version}/repository/components/patches</outputDirectory>
+ <includes>
+ <include>**/patch0001/*.*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>../p2-profile/target/WSO2-CARBON-PATCH-4.2.0-0002</directory>
+ <outputDirectory>apache-stratos-load-balancer-${pom.version}/repository/components/patches</outputDirectory>
+ <includes>
+ <include>**/patch0002/*.*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>../p2-profile/target/WSO2-CARBON-PATCH-4.2.0-0003</directory>
+ <outputDirectory>apache-stratos-load-balancer-${pom.version}/repository/components/patches</outputDirectory>
+ <includes>
+ <include>**/patch0003/*.*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>../p2-profile/target/WSO2-CARBON-PATCH-4.2.0-0004</directory>
+ <outputDirectory>apache-stratos-load-balancer-${pom.version}/repository/components/patches</outputDirectory>
+ <includes>
+ <include>**/patch0004/*.*</include>
+ </includes>
+ </fileSet>
+
+
</fileSets>
<dependencySets>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cdb5e556/products/load-balancer/modules/distribution/src/main/conf/templates/jndi.properties.template
----------------------------------------------------------------------
diff --git a/products/load-balancer/modules/distribution/src/main/conf/templates/jndi.properties.template b/products/load-balancer/modules/distribution/src/main/conf/templates/jndi.properties.template
index 9ccf044..c6b062a 100644
--- a/products/load-balancer/modules/distribution/src/main/conf/templates/jndi.properties.template
+++ b/products/load-balancer/modules/distribution/src/main/conf/templates/jndi.properties.template
@@ -23,6 +23,3 @@
connectionfactoryName=topicConnectionfactory
connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon/carbon?brokerlist='tcp://$mb_ip:$mb_port'
java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory
-java.naming.provider.url=repository/conf/jndi.properties
-
-
[2/2] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by sa...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/7e2b9d94
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/7e2b9d94
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/7e2b9d94
Branch: refs/heads/master
Commit: 7e2b9d94ec3d1974d43a37967730bd10b4204521
Parents: cdb5e55 dac753c
Author: Sajith Kariyawasam <sa...@wso2.com>
Authored: Thu Jan 9 02:49:37 2014 +0530
Committer: Sajith Kariyawasam <sa...@wso2.com>
Committed: Thu Jan 9 02:49:37 2014 +0530
----------------------------------------------------------------------
.../apache/stratos/manager/lookup/ClusterIdToSubscription.java | 4 ++--
.../java/org/apache/stratos/manager/lookup/LookupDataHolder.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------