diff options
Diffstat (limited to 'hot/software-config/elements/heat-config-apply-config')
4 files changed, 0 insertions, 81 deletions
diff --git a/hot/software-config/elements/heat-config-apply-config/README.rst b/hot/software-config/elements/heat-config-apply-config/README.rst deleted file mode 100644 index 444d36a..0000000 --- a/hot/software-config/elements/heat-config-apply-config/README.rst +++ /dev/null @@ -1,14 +0,0 @@ -A hook which invokes os-apply-config. - -The intent is for this element (hook script) to be used in place of the one in -tripleo-image-elements which relies on an external signal handling -shell script at the end of the os-refresh-config run (99-refresh-completed). -This version will run os-apply-config and return a signal immediately. Because -it uses the heat-hook mechanisms it also supports a broader set of signal -handling capabilities... which 99-refresh-completed doesn't fully support. - -It is worth noting that this hook runs os-apply-config against all the -accumulated metadata, not just data supplied to an individual hook. - -To use this hook set group: to 'apply-config' instead of 'os-apply-config' -in your Heat software configuration resources. diff --git a/hot/software-config/elements/heat-config-apply-config/element-deps b/hot/software-config/elements/heat-config-apply-config/element-deps deleted file mode 100644 index 31d7aa5..0000000 --- a/hot/software-config/elements/heat-config-apply-config/element-deps +++ /dev/null @@ -1 +0,0 @@ -heat-config diff --git a/hot/software-config/elements/heat-config-apply-config/install.d/50-heat-config-apply-config b/hot/software-config/elements/heat-config-apply-config/install.d/50-heat-config-apply-config deleted file mode 100755 index 53c3878..0000000 --- a/hot/software-config/elements/heat-config-apply-config/install.d/50-heat-config-apply-config +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -x - -SCRIPTDIR=$(dirname $0) - -install -D -g root -o root -m 0755 ${SCRIPTDIR}/hook-apply-config.py /var/lib/heat-config/hooks/apply-config diff --git a/hot/software-config/elements/heat-config-apply-config/install.d/hook-apply-config.py b/hot/software-config/elements/heat-config-apply-config/install.d/hook-apply-config.py deleted file mode 100755 index a48209d..0000000 --- a/hot/software-config/elements/heat-config-apply-config/install.d/hook-apply-config.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python -# -# 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. - -import json -import logging -import os -import subprocess -import sys -import warnings - -APPLY_CONFIG_CMD = os.environ.get('HEAT_APPLY_CONFIG_CMD', 'os-apply-config') - - -def main(argv=sys.argv): - warnings.warn('This hook is deprecated, please use hooks from heat-agents ' - 'repository instead.', DeprecationWarning) - log = logging.getLogger('heat-config') - handler = logging.StreamHandler(sys.stderr) - handler.setFormatter( - logging.Formatter( - '[%(asctime)s] (%(name)s) [%(levelname)s] %(message)s')) - log.addHandler(handler) - log.setLevel('DEBUG') - - env = os.environ.copy() - - log.debug('Running %s' % APPLY_CONFIG_CMD) - subproc = subprocess.Popen([APPLY_CONFIG_CMD], stdout=subprocess.PIPE, - stderr=subprocess.PIPE, env=env) - stdout, stderr = subproc.communicate() - - log.info(stdout) - log.debug(stderr) - - if subproc.returncode: - log.error("Error running apply-config: [%s]\n" % subproc.returncode) - else: - log.info('Completed apply-config.') - - response = { - 'deploy_stdout': stdout, - 'deploy_stderr': stderr, - 'deploy_status_code': subproc.returncode, - } - - json.dump(response, sys.stdout) - -if __name__ == '__main__': - sys.exit(main(sys.argv)) |