From 91d04c64771832a0b8815ffbe1f0f9920320d94d Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 14 Feb 2017 19:41:00 -0500 Subject: Initial OpenECOMP policy/engine commit Change-Id: I7dbff37733b661643dd4d1caefa3d7dccc361b6e Signed-off-by: Pamela Dragosh --- packages/base/src/files/etc/cron.d/logrotate.cron | 1 + packages/base/src/files/etc/cron.d/monitor.cron | 1 + .../base/src/files/etc/logrotate.d/monitor.conf | 7 ++++++ packages/base/src/files/etc/monitor/monitor.cfg | 16 +++++++++++++ packages/base/src/files/etc/profile.d/env.sh | 27 ++++++++++++++++++++++ packages/base/src/files/etc/profile.d/su.cfg | 1 + 6 files changed, 53 insertions(+) create mode 100644 packages/base/src/files/etc/cron.d/logrotate.cron create mode 100644 packages/base/src/files/etc/cron.d/monitor.cron create mode 100644 packages/base/src/files/etc/logrotate.d/monitor.conf create mode 100644 packages/base/src/files/etc/monitor/monitor.cfg create mode 100644 packages/base/src/files/etc/profile.d/env.sh create mode 100644 packages/base/src/files/etc/profile.d/su.cfg (limited to 'packages/base/src/files/etc') diff --git a/packages/base/src/files/etc/cron.d/logrotate.cron b/packages/base/src/files/etc/cron.d/logrotate.cron new file mode 100644 index 000000000..aa78eed24 --- /dev/null +++ b/packages/base/src/files/etc/cron.d/logrotate.cron @@ -0,0 +1 @@ +5 1 * * * /usr/sbin/logrotate -s ${{POLICY_HOME}}/var/logrotate.status ${{POLICY_HOME}}/etc/logrotate.d/monitor.conf diff --git a/packages/base/src/files/etc/cron.d/monitor.cron b/packages/base/src/files/etc/cron.d/monitor.cron new file mode 100644 index 000000000..4272bf487 --- /dev/null +++ b/packages/base/src/files/etc/cron.d/monitor.cron @@ -0,0 +1 @@ +* * * * * . ${{POLICY_HOME}}/etc/profile.d/env.sh; monitor.sh /dev/null 2>&1 diff --git a/packages/base/src/files/etc/logrotate.d/monitor.conf b/packages/base/src/files/etc/logrotate.d/monitor.conf new file mode 100644 index 000000000..98971f753 --- /dev/null +++ b/packages/base/src/files/etc/logrotate.d/monitor.conf @@ -0,0 +1,7 @@ +${{POLICY_HOME}}/logs/monitor.log { + daily + rotate 10 + compress + missingok + copytruncate +} diff --git a/packages/base/src/files/etc/monitor/monitor.cfg b/packages/base/src/files/etc/monitor/monitor.cfg new file mode 100644 index 000000000..5314839e1 --- /dev/null +++ b/packages/base/src/files/etc/monitor/monitor.cfg @@ -0,0 +1,16 @@ +# Line Format: component=status where +# component=pap|pdp|pypdp|configs|console|paplp|pdplp and +# status=on|off|uninstalled where +# on: component is to be monitored and should started +# off: component is to be monitored and should stopped +# uninstalled: component is NOT to be monitored +# There should be no component duplicate lines + +pap=uninstalled +pdp=uninstalled +configs=uninstalled +pypdp=uninstalled +console=uninstalled +paplp=uninstalled +pdplp=uninstalled +brmsgw=uninstalled diff --git a/packages/base/src/files/etc/profile.d/env.sh b/packages/base/src/files/etc/profile.d/env.sh new file mode 100644 index 000000000..4d9fcf9a7 --- /dev/null +++ b/packages/base/src/files/etc/profile.d/env.sh @@ -0,0 +1,27 @@ +### +# ============LICENSE_START======================================================= +# ECOMP Policy Engine +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed 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. +# ============LICENSE_END========================================================= +### + +export POLICY_HOME=${{POLICY_HOME}} +export POLICY_USER=${{POLICY_USER}} +export POLICY_GROUP=${{POLICY_GROUP}} +export KEYSTORE_PASSWD=${{KEYSTORE_PASSWD}} + +export JAVA_HOME=${{JAVA_HOME}} +export PATH=${PATH}:${{POLICY_HOME}}/bin diff --git a/packages/base/src/files/etc/profile.d/su.cfg b/packages/base/src/files/etc/profile.d/su.cfg new file mode 100644 index 000000000..8ba4edd19 --- /dev/null +++ b/packages/base/src/files/etc/profile.d/su.cfg @@ -0,0 +1 @@ +#name=value pairs for su purposes -- cgit 1.2.3-korg