Repository: incubator-stratos Updated Branches: refs/heads/master e20b3ea41 -> 81399c54a
changing puppet scripts of lb to take mb_type into consideration Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/75dbd674 Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/75dbd674 Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/75dbd674 Branch: refs/heads/master Commit: 75dbd674b1e76efddb57e1e248520c20dc8c19eb Parents: cbf7c38 Author: Nirmal Fernando <[email protected]> Authored: Thu Mar 27 11:51:30 2014 +0530 Committer: Nirmal Fernando <[email protected]> Committed: Thu Mar 27 11:51:30 2014 +0530 ---------------------------------------------------------------------- tools/puppet3/manifests/nodes.pp | 1 + tools/puppet3/modules/lb/manifests/init.pp | 1 + .../conf/templates/jndi.properties.template.erb | 33 ++++++++++++++++++++ 3 files changed, 35 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/75dbd674/tools/puppet3/manifests/nodes.pp ---------------------------------------------------------------------- diff --git a/tools/puppet3/manifests/nodes.pp b/tools/puppet3/manifests/nodes.pp index 64ed5f6..d07deef 100644 --- a/tools/puppet3/manifests/nodes.pp +++ b/tools/puppet3/manifests/nodes.pp @@ -5,6 +5,7 @@ node 'base' { $local_package_dir = '/mnt/packs' $mb_ip = '54.255.43.95' $mb_port = '5677' + $mb_type = 'activemq' #in wso2 mb case, value should be 'wso2mb' $cep_ip = '54.255.43.95' $cep_port = '7615' $truststore_password = 'wso2carbon' http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/75dbd674/tools/puppet3/modules/lb/manifests/init.pp ---------------------------------------------------------------------- diff --git a/tools/puppet3/modules/lb/manifests/init.pp b/tools/puppet3/modules/lb/manifests/init.pp index 5d52fc8..8b199bb 100755 --- a/tools/puppet3/modules/lb/manifests/init.pp +++ b/tools/puppet3/modules/lb/manifests/init.pp @@ -47,6 +47,7 @@ class lb ( $service_templates = [ 'conf/axis2/axis2.xml', 'conf/loadbalancer.conf', + 'conf/templates/jndi.properties.template', ] tag($service_code) http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/75dbd674/tools/puppet3/modules/lb/templates/conf/templates/jndi.properties.template.erb ---------------------------------------------------------------------- diff --git a/tools/puppet3/modules/lb/templates/conf/templates/jndi.properties.template.erb b/tools/puppet3/modules/lb/templates/conf/templates/jndi.properties.template.erb new file mode 100644 index 0000000..598c000 --- /dev/null +++ b/tools/puppet3/modules/lb/templates/conf/templates/jndi.properties.template.erb @@ -0,0 +1,33 @@ +# +# 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. +# +# This is a generated file and will be overwritten at the next load balancer startup. +# Please use loadbalancer.conf for updating mb-ip, mb-port and templates/jndi.properties.template +# file for updating other configurations. +# +<% if @mb_type == 'wso2mb' %> + connectionfactoryName=topicConnectionfactory + connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon/carbon?brokerlist='tcp://$mb_ip:$mb_port' + java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory +<% end %> +<% if @mb_type == 'activemq' %> + connectionfactoryName=TopicConnectionFactory + java.naming.provider.url=tcp://$mb_ip:$mb_port + java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory +<% end %> +
