You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/01/21 11:27:07 UTC

[04/10] stratos git commit: Add APPLICATION_PATH to agent conf file and set it via the puppet module

Add APPLICATION_PATH to agent conf file and set it via the puppet module


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/08af4e20
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/08af4e20
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/08af4e20

Branch: refs/heads/master
Commit: 08af4e20ca78f3d730f2a245dca9f43791c56f80
Parents: 49a2802
Author: Chamila de Alwis <ch...@wso2.com>
Authored: Tue Jan 20 01:42:00 2015 +0530
Committer: Chamila de Alwis <ch...@wso2.com>
Committed: Wed Jan 21 07:42:37 2015 +0530

----------------------------------------------------------------------
 .../cartridgeagent/cartridgeagent/agent.conf    |  1 +
 .../modules/artifactmgt/git/agentgithandler.py  |  2 ++
 .../python_agent/templates/agent.conf.erb       | 21 +++++++++++++++++---
 3 files changed, 21 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/08af4e20/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.conf
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.conf b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.conf
index f611cca..1e1f764 100644
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.conf
+++ b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.conf
@@ -38,6 +38,7 @@ monitoring.server.secure.port         =MONITORING-SERVER-SECURE-PORT
 monitoring.server.admin.username      =MONITORING-SERVER-ADMIN-USERNAME
 monitoring.server.admin.password      =MONITORING-SERVER-ADMIN-PASSWORD
 log.file.paths                        =LOG_FILE_PATHS
+APPLICATION_PATH                      =APPLICATION_PATH
 super.tenant.repository.path          =/repository/deployment/server/
 tenant.repository.path                =/repository/tenants/
 extension.instance.started            =instance-started.sh

http://git-wip-us.apache.org/repos/asf/stratos/blob/08af4e20/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/modules/artifactmgt/git/agentgithandler.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/modules/artifactmgt/git/agentgithandler.py b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/modules/artifactmgt/git/agentgithandler.py
index a6b23dc..7602c02 100644
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/modules/artifactmgt/git/agentgithandler.py
+++ b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/modules/artifactmgt/git/agentgithandler.py
@@ -82,6 +82,7 @@ class AgentGitHandler:
                 else:
                     #not empty
                     if AgentGitHandler.sync_initial_local_artifacts(repo_context):
+                        AgentGitHandler.log.debug("Cloning in to a directory which is not empty.")
                         AgentGitHandler.log.debug("Executing git pull: [tenant-id] %s [repo-url] %s", repo_info.tenant_id, repo_info.repo_url)
                         AgentGitHandler.pull(repo_context)
                         AgentGitHandler.log.debug("Git pull executed: [tenant-id] %s [repo-url] %s", repo_info.tenant_id, repo_info.repo_url)
@@ -89,6 +90,7 @@ class AgentGitHandler:
                         repo_context = None
         else:
             #subscribing run.. need to clone
+            AgentGitHandler.log.debug("Cloning artifacts from %s for the first time", repo_info.repo_url)
             subscribe_run = True
             AgentGitHandler.log.debug("Executing git clone: [tenant-id] %s [repo-url] %s", repo_info.tenant_id, repo_info.repo_url)
             repo_context = AgentGitHandler.clone(repo_info)

http://git-wip-us.apache.org/repos/asf/stratos/blob/08af4e20/tools/puppet3/modules/python_agent/templates/agent.conf.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/python_agent/templates/agent.conf.erb b/tools/puppet3/modules/python_agent/templates/agent.conf.erb
index bd866a9..4696648 100644
--- a/tools/puppet3/modules/python_agent/templates/agent.conf.erb
+++ b/tools/puppet3/modules/python_agent/templates/agent.conf.erb
@@ -1,3 +1,20 @@
+# 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.
+
 [agent]
 mb.ip                                 =<%= @mb_ip %>
 mb.port                               =<%= @mb_port %>
@@ -6,8 +23,6 @@ thrift.receiver.ip                    =<%= @cep_ip %>
 thrift.receiver.port                  =<%= @cep_port %>
 thrift.server.admin.username          =<%= @cep_username %>
 thrift.server.admin.password          =<%= @cep_password %>
-param.file.path                       =<%= @agent_home %>/payload/launch-params
-extensions.dir                        =<%= @agent_home %>/extensions
 cep.stats.publisher.enabled           =true
 lb.private.ip                         =
 lb.public.ip                          =
@@ -23,7 +38,7 @@ monitoring.server.secure.port         =<%= @bam_secure_port %>
 monitoring.server.admin.username      =<%= @bam_username %>
 monitoring.server.admin.password      =<%= @bam_password %>
 log.file.paths                        =LOG_FILE_PATHS
-APP_PATH                              =<%= @docroot %>
+APPLICATION_PATH                      =<%= @docroot %>
 super.tenant.repository.path          =/repository/deployment/server/
 tenant.repository.path                =/repository/tenants/
 extension.instance.started            =instance-started.sh