You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2014/07/29 12:11:42 UTC
[4/5] git commit: Added artifacts updated extension for Jboss
Added artifacts updated extension for Jboss
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/877fa836
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/877fa836
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/877fa836
Branch: refs/heads/4.0.0
Commit: 877fa83661b48854ec6b4122240853d762343f4c
Parents: 6ccc74c
Author: Akila Perera <ra...@gmail.com>
Authored: Tue Jul 22 12:41:01 2014 +0530
Committer: Akila Perera <ra...@gmail.com>
Committed: Tue Jul 22 12:41:01 2014 +0530
----------------------------------------------------------------------
tools/puppet3/manifests/nodes.pp | 7 +++++--
.../templates/extensions/addons/_jboss-as.erb | 18 ++++++++++++++++++
.../templates/extensions/artifacts-updated.sh.erb | 9 +++++----
3 files changed, 28 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/877fa836/tools/puppet3/manifests/nodes.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/manifests/nodes.pp b/tools/puppet3/manifests/nodes.pp
index dae8aa1..0b4c9c4 100644
--- a/tools/puppet3/manifests/nodes.pp
+++ b/tools/puppet3/manifests/nodes.pp
@@ -28,6 +28,7 @@ node 'base' {
$truststore_password = 'wso2carbon'
$java_distribution = 'jdk-7u51-linux-x64.tar.gz'
$java_name = 'jdk1.7.0_51'
+ $java_home = '/opt/java'
$member_type_ip = 'private'
$lb_httpPort = '80'
$lb_httpsPort = '443'
@@ -69,10 +70,12 @@ node /jboss/ inherits base {
$product = 'jboss-as'
$version = '7.1.1.Final'
$docroot = "/mnt/${product}-${version}/standalone/deployments/"
+ $jboss_user = 'jbossas1'
+ $jboss_group = 'jboss'
require java
class {'jboss':
- user => 'jbossas1',
- group => 'jboss',
+ user => $jboss_user,
+ group => $jboss_group,
java_home => $java_home,
version => $version,
java_opts => "-Xms512m -Xmx3000m",
http://git-wip-us.apache.org/repos/asf/stratos/blob/877fa836/tools/puppet3/modules/agent/templates/extensions/addons/_jboss-as.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/agent/templates/extensions/addons/_jboss-as.erb b/tools/puppet3/modules/agent/templates/extensions/addons/_jboss-as.erb
new file mode 100755
index 0000000..b6e23be
--- /dev/null
+++ b/tools/puppet3/modules/agent/templates/extensions/addons/_jboss-as.erb
@@ -0,0 +1,18 @@
+# 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.
+
+chown -R <%= @jboss_user %>:<%= @jboss_group %> <%= @docroot %>
http://git-wip-us.apache.org/repos/asf/stratos/blob/877fa836/tools/puppet3/modules/agent/templates/extensions/artifacts-updated.sh.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/agent/templates/extensions/artifacts-updated.sh.erb b/tools/puppet3/modules/agent/templates/extensions/artifacts-updated.sh.erb
index 37b7791..1735603 100755
--- a/tools/puppet3/modules/agent/templates/extensions/artifacts-updated.sh.erb
+++ b/tools/puppet3/modules/agent/templates/extensions/artifacts-updated.sh.erb
@@ -27,7 +27,8 @@
log=/var/log/apache-stratos/cartridge-agent-extensions.log
echo `date`": Artifacts Updated Event" | tee -a $log
-
-<%- if @type == 'php' -%>
-<%= scope.function_template(['agent/extensions/addons/_php.erb']) -%>
-<%- end -%>
+<%- if @type == 'php' -%>
+<%= scope.function_template(['agent/extensions/addons/_php.erb']) -%>
+<%- elsif @type == 'jboss-as' -%>
+<%= scope.function_template(['agent/extensions/addons/_jboss-as.erb']) -%>
+<%- end -%>