From 2e9cd0c8035e967e93ebc0b4cac72354656c1479 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 17 Feb 2022 12:42:35 -0800 Subject: [PATCH] Retire this repo The opendev project has been moving away from puppet and this is one of the puppet modules that is no longer used. To simplify things for us we are taking the extra step of retiring this repo. Change-Id: I83b9374c66f13d672800e76e8c10903f82479471 --- .gitignore | 2 - Gemfile | 15 - LICENSE | 202 --------- README.md | 31 +- Rakefile | 8 - bindep.txt | 11 - files/nodepool-builder.init | 170 -------- files/nodepool-deleter.init | 162 ------- files/nodepool-launcher.init | 162 ------- files/nodepool-launcherv3.init | 162 ------- files/nodepool-sudo.sudo | 1 - files/nodepool.init | 162 ------- files/ssh.config | 3 - manifests/builder.pp | 200 --------- manifests/init.pp | 410 ------------------ manifests/launcher.pp | 115 ----- manifests/mysql.pp | 59 --- metadata.json | 15 - spec/acceptance/nodesets/default.yml | 11 - spec/acceptance/nodesets/nodepool-centos7.yml | 10 - spec/acceptance/nodesets/nodepool-trusty.yml | 10 - spec/acceptance/nodesets/nodepool-xenial.yml | 10 - templates/nodepool-builder.default.erb | 16 - templates/nodepool-builder.logging.conf.erb | 55 --- templates/nodepool-builder.ssl.vhost.erb | 62 --- templates/nodepool-builder.vhost.erb | 38 -- templates/nodepool-deleter.default.erb | 8 - templates/nodepool-deleter.logging.conf.erb | 54 --- templates/nodepool-launcher.default.erb | 8 - templates/nodepool-launcher.logging.conf.erb | 54 --- templates/nodepool-launcher.vhost.erb | 19 - templates/nodepool-launcherv3.default.erb | 9 - templates/nodepool.default.erb | 12 - templates/nodepool.logging.conf.erb | 44 -- templates/secure.conf.erb | 12 - 35 files changed, 7 insertions(+), 2315 deletions(-) delete mode 100644 .gitignore delete mode 100644 Gemfile delete mode 100644 LICENSE delete mode 100644 Rakefile delete mode 100644 bindep.txt delete mode 100755 files/nodepool-builder.init delete mode 100755 files/nodepool-deleter.init delete mode 100755 files/nodepool-launcher.init delete mode 100755 files/nodepool-launcherv3.init delete mode 100644 files/nodepool-sudo.sudo delete mode 100755 files/nodepool.init delete mode 100644 files/ssh.config delete mode 100644 manifests/builder.pp delete mode 100644 manifests/init.pp delete mode 100644 manifests/launcher.pp delete mode 100644 manifests/mysql.pp delete mode 100644 metadata.json delete mode 100644 spec/acceptance/nodesets/default.yml delete mode 100644 spec/acceptance/nodesets/nodepool-centos7.yml delete mode 100644 spec/acceptance/nodesets/nodepool-trusty.yml delete mode 100644 spec/acceptance/nodesets/nodepool-xenial.yml delete mode 100644 templates/nodepool-builder.default.erb delete mode 100644 templates/nodepool-builder.logging.conf.erb delete mode 100644 templates/nodepool-builder.ssl.vhost.erb delete mode 100644 templates/nodepool-builder.vhost.erb delete mode 100644 templates/nodepool-deleter.default.erb delete mode 100644 templates/nodepool-deleter.logging.conf.erb delete mode 100644 templates/nodepool-launcher.default.erb delete mode 100644 templates/nodepool-launcher.logging.conf.erb delete mode 100644 templates/nodepool-launcher.vhost.erb delete mode 100644 templates/nodepool-launcherv3.default.erb delete mode 100644 templates/nodepool.default.erb delete mode 100644 templates/nodepool.logging.conf.erb delete mode 100644 templates/secure.conf.erb diff --git a/.gitignore b/.gitignore deleted file mode 100644 index dade81e..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Gemfile.lock -.bundled_gems/ diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 019213a..0000000 --- a/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source 'https://rubygems.org' - -if File.exists?('/home/zuul/src/git.openstack.org/openstack-infra/puppet-openstack_infra_spec_helper') - gem_checkout_method = {:path => '/home/zuul/src/git.openstack.org/openstack-infra/puppet-openstack_infra_spec_helper'} -else - gem_checkout_method = {:git => 'https://git.openstack.org/openstack-infra/puppet-openstack_infra_spec_helper'} -end -gem_checkout_method[:require] = false - -group :development, :test, :system_tests do - gem 'puppet-openstack_infra_spec_helper', - gem_checkout_method -end - -# vim:ft=ruby diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d645695..0000000 --- a/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/README.md b/README.md index a678c91..ec889a9 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,9 @@ -# OpenStack Nodepool Module +This project is no longer maintained. -## Overview +The contents of this repository are still available in the Git +source code management system. To see the contents of this +repository before it reached its end of life, please check out the +previous commit with "git checkout HEAD^1". -Configures Nodepool node. - -```puppet -class { '::nodepool': - mysql_root_password => 'xxx', - mysql_password => 'xxx', - nodepool_ssh_private_key => 'optional_key_content', - environment => { - optional_setting_1 => 'optional_value_1', - optional_setting_2 => 'optional_value_2', - }, - jenkins_masters => [ - { - name => 'jenkins_name' - user => 'jenkins_user', - apikey => 'jenkins_pass', - credentials => 'jenkins_credentials_id', - url => 'jenkins_url', - } - ] -} -``` +For any further questions, please email +service-discuss@lists.opendev.org or join #opendev on OFTC. diff --git a/Rakefile b/Rakefile deleted file mode 100644 index ff1f0d7..0000000 --- a/Rakefile +++ /dev/null @@ -1,8 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -PuppetLint.configuration.fail_on_warnings = true -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.send('disable_autoloader_layout') -PuppetLint.configuration.send('disable_class_inherits_from_params_class') -PuppetLint.configuration.send('disable_class_parameter_defaults') diff --git a/bindep.txt b/bindep.txt deleted file mode 100644 index 7cdd58e..0000000 --- a/bindep.txt +++ /dev/null @@ -1,11 +0,0 @@ -# This is a cross-platform list tracking distribution packages needed by tests; -# see http://docs.openstack.org/infra/bindep/ for additional information. - -libxml2-devel [test platform:rpm] -libxml2-dev [test platform:dpkg] -libxslt-devel [test platform:rpm] -libxslt1-dev [test platform:dpkg] -ruby-devel [test platform:rpm] -ruby-dev [test platform:dpkg] -zlib1g-dev [test platform:dpkg] -zlib-devel [test platform:rpm] diff --git a/files/nodepool-builder.init b/files/nodepool-builder.init deleted file mode 100755 index 4d4048e..0000000 --- a/files/nodepool-builder.init +++ /dev/null @@ -1,170 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: nodepool-builder -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Nodepool-builder -# Description: Trunk gating system -### END INIT INFO - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin -DESC="Nodepool Builder Worker" -NAME=nodepool-builder -DAEMON=/usr/local/bin/nodepool-builder -PIDFILE=/var/run/$NAME/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME -USER=nodepool - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -PIDFILE_DIR=$(dirname $PIDFILE) - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - - if [ ! -d "$PIDFILE_DIR" ] ; then - mkdir -p $PIDFILE_DIR - chown $USER $PIDFILE_DIR - fi - ulimit -n 8192 - start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON -- \ - $DAEMON_ARGS \ - || return 2 - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --signal 9 --pidfile $PIDFILE - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - if [ -f "$PIDFILE" ] ; then - rm -f $PIDFILE - fi - return "$RETVAL" -} - -# -# Function that stops the daemon/service -# -do_graceful_stop() -{ - PID=`cat $PIDFILE` - kill -INT $PID - # Old nodepoold used USR1 - # New nodepoold ignores it while INT is being handled - kill -USR1 $PID - - # wait until really stopped - if [ -n "${PID:-}" ]; then - i=0 - while kill -0 "${PID:-}" 2> /dev/null; do - if [ $i -eq '0' ]; then - echo -n " ... waiting " - else - echo -n "." - fi - i=$(($i+1)) - sleep 1 - done - fi - - if [ -f "$PIDFILE" ] ; then - rm -f $PIDFILE - fi -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - log_daemon_msg "Reloading $DESC" "$NAME" - do_reload - log_end_msg $? - ;; - restart) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_graceful_stop - do_start - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/files/nodepool-deleter.init b/files/nodepool-deleter.init deleted file mode 100755 index 1f9c5e5..0000000 --- a/files/nodepool-deleter.init +++ /dev/null @@ -1,162 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: nodepool-deleter -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Nodepool Deleter -# Description: Trunk gating system -### END INIT INFO - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin -DESC="Nodepool Deleter" -NAME=nodepool-deleter -DAEMON=/usr/local/bin/nodepoold -PIDFILE=/var/run/$NAME/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME -USER=nodepool - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - - mkdir -p /var/run/$NAME - chown $USER /var/run/$NAME - ulimit -n 8192 - start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON -- \ - $DAEMON_ARGS -p $PIDFILE \ - || return 2 - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --signal 9 --pidfile $PIDFILE - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - rm -f /var/run/$NAME/* - return "$RETVAL" -} - -# -# Function that stops the daemon/service -# -do_graceful_stop() -{ - PID=`cat $PIDFILE` - kill -INT $PID - # Old nodepoold used USR1 - # New nodepoold ignores it while INT is being handled - kill -USR1 $PID - - # wait until really stopped - if [ -n "${PID:-}" ]; then - i=0 - while kill -0 "${PID:-}" 2> /dev/null; do - if [ $i -eq '0' ]; then - echo -n " ... waiting " - else - echo -n "." - fi - i=$(($i+1)) - sleep 1 - done - fi - - rm -f /var/run/$NAME/* -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - log_daemon_msg "Reloading $DESC" "$NAME" - do_reload - log_end_msg $? - ;; - restart) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_graceful_stop - do_start - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/files/nodepool-launcher.init b/files/nodepool-launcher.init deleted file mode 100755 index 77ac4bf..0000000 --- a/files/nodepool-launcher.init +++ /dev/null @@ -1,162 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: nodepool-launcher -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Nodepool Launcher -# Description: Trunk gating system -### END INIT INFO - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin -DESC="Nodepool Launcher" -NAME=nodepool-launcher -DAEMON=/usr/local/bin/nodepoold -PIDFILE=/var/run/$NAME/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME -USER=nodepool - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - - mkdir -p /var/run/$NAME - chown $USER /var/run/$NAME - ulimit -n 8192 - start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON -- \ - $DAEMON_ARGS -p $PIDFILE \ - || return 2 - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --signal 9 --pidfile $PIDFILE - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - rm -f /var/run/$NAME/* - return "$RETVAL" -} - -# -# Function that stops the daemon/service -# -do_graceful_stop() -{ - PID=`cat $PIDFILE` - kill -INT $PID - # Old nodepoold used USR1 - # New nodepoold ignores it while INT is being handled - kill -USR1 $PID - - # wait until really stopped - if [ -n "${PID:-}" ]; then - i=0 - while kill -0 "${PID:-}" 2> /dev/null; do - if [ $i -eq '0' ]; then - echo -n " ... waiting " - else - echo -n "." - fi - i=$(($i+1)) - sleep 1 - done - fi - - rm -f /var/run/$NAME/* -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - log_daemon_msg "Reloading $DESC" "$NAME" - do_reload - log_end_msg $? - ;; - restart) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_graceful_stop - do_start - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/files/nodepool-launcherv3.init b/files/nodepool-launcherv3.init deleted file mode 100755 index b4aec04..0000000 --- a/files/nodepool-launcherv3.init +++ /dev/null @@ -1,162 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: nodepool-launcher -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Nodepool Launcher -# Description: Trunk gating system -### END INIT INFO - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin -DESC="Nodepool Launcher" -NAME=nodepool-launcher -DAEMON=/usr/local/bin/nodepool-launcher -PIDFILE=/var/run/$NAME/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME -USER=nodepool - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - - mkdir -p /var/run/$NAME - chown $USER /var/run/$NAME - ulimit -n 8192 - start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON -- \ - $DAEMON_ARGS -p $PIDFILE \ - || return 2 - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --signal 9 --pidfile $PIDFILE - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - rm -f /var/run/$NAME/* - return "$RETVAL" -} - -# -# Function that stops the daemon/service -# -do_graceful_stop() -{ - PID=`cat $PIDFILE` - kill -INT $PID - # Old nodepoold used USR1 - # New nodepoold ignores it while INT is being handled - kill -USR1 $PID - - # wait until really stopped - if [ -n "${PID:-}" ]; then - i=0 - while kill -0 "${PID:-}" 2> /dev/null; do - if [ $i -eq '0' ]; then - echo -n " ... waiting " - else - echo -n "." - fi - i=$(($i+1)) - sleep 1 - done - fi - - rm -f /var/run/$NAME/* -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - log_daemon_msg "Reloading $DESC" "$NAME" - do_reload - log_end_msg $? - ;; - restart) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_graceful_stop - do_start - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/files/nodepool-sudo.sudo b/files/nodepool-sudo.sudo deleted file mode 100644 index 5651f1b..0000000 --- a/files/nodepool-sudo.sudo +++ /dev/null @@ -1 +0,0 @@ -nodepool ALL=(ALL) NOPASSWD:ALL diff --git a/files/nodepool.init b/files/nodepool.init deleted file mode 100755 index 22e1668..0000000 --- a/files/nodepool.init +++ /dev/null @@ -1,162 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: nodepool -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Nodepool -# Description: Trunk gating system -### END INIT INFO - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin -DESC="Nodepool" -NAME=nodepool -DAEMON=/usr/local/bin/nodepoold -PIDFILE=/var/run/$NAME/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME -USER=nodepool - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - - mkdir -p /var/run/$NAME - chown $USER /var/run/$NAME - ulimit -n 8192 - start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER --exec $DAEMON -- \ - $DAEMON_ARGS -p $PIDFILE \ - || return 2 - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --signal 9 --pidfile $PIDFILE - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - rm -f /var/run/$NAME/* - return "$RETVAL" -} - -# -# Function that stops the daemon/service -# -do_graceful_stop() -{ - PID=`cat $PIDFILE` - kill -INT $PID - # Old nodepoold used USR1 - # New nodepoold ignores it while INT is being handled - kill -USR1 $PID - - # wait until really stopped - if [ -n "${PID:-}" ]; then - i=0 - while kill -0 "${PID:-}" 2> /dev/null; do - if [ $i -eq '0' ]; then - echo -n " ... waiting " - else - echo -n "." - fi - i=$(($i+1)) - sleep 1 - done - fi - - rm -f /var/run/$NAME/* -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - log_daemon_msg "Reloading $DESC" "$NAME" - do_reload - log_end_msg $? - ;; - restart) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_graceful_stop - do_start - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/files/ssh.config b/files/ssh.config deleted file mode 100644 index bccc9c9..0000000 --- a/files/ssh.config +++ /dev/null @@ -1,3 +0,0 @@ -UserKnownHostsFile=/dev/null -StrictHostKeyChecking=no -LogLevel=ERROR diff --git a/manifests/builder.pp b/manifests/builder.pp deleted file mode 100644 index 3e0d14b..0000000 --- a/manifests/builder.pp +++ /dev/null @@ -1,200 +0,0 @@ -# Copyright 2015 2015 IBM -# -# 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. - -# == Class: nodepool::builder -# -class nodepool::builder( - $statsd_host = undef, - $nodepool_ssh_public_key = undef, - # If true, export build logs from $build_log_document_root via apache - $enable_build_log_via_http = false, - $build_log_document_root = '/var/log/nodepool/builds', - $vhost_name = $::fqdn, - $builder_logging_conf_template = 'nodepool/nodepool-builder.logging.conf.erb', - $environment = {}, - $build_workers = '1', - $upload_workers = '4', - $zuulv3 = false, - $ssl_cert_file = '', - $ssl_cert_file_contents = '', - $ssl_chain_file = '', - $ssl_chain_file_contents = '', - $ssl_key_file = '', - $ssl_key_file_contents = '', -) { - - # This requires custom packages which aren't build for arm64; if we - # ever have a need we can re-evaluate this. - if ($::architecture == 'aarch64') { - $aarch64 = true - $support_vhd = false - } else { - $aarch64 = false - $support_vhd = true - } - - class { '::diskimage_builder': - support_vhd => $support_vhd, - } - - if ! defined(File['/home/nodepool/.ssh']) { - file { '/home/nodepool/.ssh': - ensure => directory, - mode => '0500', - owner => 'nodepool', - group => 'nodepool', - require => User['nodepool'], - } - } - - if ($nodepool_ssh_public_key != undef) { - file { '/home/nodepool/.ssh/id_rsa.pub': - ensure => present, - content => $nodepool_ssh_public_key, - mode => '0644', - owner => 'nodepool', - group => 'nodepool', - require => File['/home/nodepool/.ssh'], - } - } - - file { '/etc/init.d/nodepool-builder': - ensure => present, - mode => '0555', - owner => 'root', - group => 'root', - source => 'puppet:///modules/nodepool/nodepool-builder.init', - } - - file { '/etc/default/nodepool-builder': - ensure => present, - content => template('nodepool/nodepool-builder.default.erb'), - mode => '0444', - owner => 'root', - group => 'root', - } - - file { '/etc/nodepool/builder-logging.conf': - ensure => present, - mode => '0444', - owner => 'root', - group => 'root', - content => template($builder_logging_conf_template), - } - - if ($::operatingsystem == 'Ubuntu') and ($::operatingsystemrelease >= '16.04') { - # This is a hack to make sure that systemd is aware of the new service - # before we attempt to start it. - exec { 'nodepool-builder-systemd-daemon-reload': - command => '/bin/systemctl daemon-reload', - before => Service['nodepool-builder'], - subscribe => File['/etc/init.d/nodepool-builder'], - refreshonly => true, - } - } - - service { 'nodepool-builder': - name => 'nodepool-builder', - enable => true, - hasrestart => true, - require => [ - File['/etc/init.d/nodepool-builder'], - File['/etc/default/nodepool-builder'], - File['/etc/nodepool/builder-logging.conf'], - ], - } - - if $enable_build_log_via_http == true { - include ::httpd - - if $ssl_cert_file != '' { - $http_template = 'nodepool/nodepool-builder.ssl.vhost.erb' - } else { - $http_template = 'nodepool/nodepool-builder.vhost.erb' - } - - ::httpd::vhost { $vhost_name: - port => 80, - priority => '50', - docroot => 'MEANINGLESS_ARGUMENT', - template => $http_template, - } - if ! defined(Httpd::Mod['rewrite']) { - httpd::mod { 'rewrite': ensure => present } - } - if ! defined(Httpd::Mod['proxy']) { - httpd::mod { 'proxy': ensure => present } - } - if ! defined(Httpd::Mod['proxy_http']) { - httpd::mod { 'proxy_http': ensure => present } - } - - file { '/etc/ssl/certs': - ensure => directory, - owner => 'root', - mode => '0755', - } - - file { '/etc/ssl/private': - ensure => directory, - owner => 'root', - mode => '0700', - } - - if $ssl_cert_file_contents != '' { - file { $ssl_cert_file: - owner => 'root', - group => 'root', - mode => '0640', - content => $ssl_cert_file_contents, - before => Httpd::Vhost[$vhost_name], - } - } - - if $ssl_key_file_contents != '' { - file { $ssl_key_file: - owner => 'root', - group => 'ssl-cert', - mode => '0640', - content => $ssl_key_file_contents, - require => Package['ssl-cert'], - before => Httpd::Vhost[$vhost_name], - } - } - - if $ssl_chain_file_contents != '' { - file { $ssl_chain_file: - owner => 'root', - group => 'root', - mode => '0640', - content => $ssl_chain_file_contents, - before => Httpd::Vhost[$vhost_name], - } - } - } - - file { $build_log_document_root: - ensure => directory, - mode => '0755', - owner => 'nodepool', - group => 'nodepool', - require => [ - User['nodepool'], - File['/var/log/nodepool'], - ], - } - - - -} diff --git a/manifests/init.pp b/manifests/init.pp deleted file mode 100644 index eb52807..0000000 --- a/manifests/init.pp +++ /dev/null @@ -1,410 +0,0 @@ -# Copyright 2012-2013 Hewlett-Packard Development Company, L.P. -# Copyright 2012 Antoine "hashar" Musso -# Copyright 2012 Wikimedia Foundation Inc. -# Copyright 2013 OpenStack Foundation -# -# 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. - -# == Class: nodepool -# -class nodepool ( - $mysql_root_password, - $mysql_password, - $nodepool_ssh_private_key, - $nodepool_ssh_public_key = undef, - $git_source_repo = 'https://git.openstack.org/openstack-infra/nodepool', - $revision = 'master', - $statsd_host = undef, - # The following have all been deprecated and are left only for - # argument compatability - # - To export the image logs on builders use - # builder::enable_build_log_via_http - # - To enable the webapp on launchers use launcher::enable_webapp - # - Upload logs were never really useful, use the webapp endpoint - # to see status - # - TODO: common apache layout with config merging so launcher - # and builder on same host works - $enable_image_log_via_http = undef, - $image_log_document_root = undef, - $vhost_name = $::fqdn, - $image_log_periodic_cleanup = undef, - $upload_log_document_root = undef, - $upload_log_periodic_cleanup = undef, - $enable_upload_log_via_http = undef, - # /end - $environment = {}, - # enable sudo for nodepool user. Useful for using dib with nodepool - $sudo = true, - $scripts_dir = undef, - $elements_dir = undef, - $logging_conf_template = 'nodepool/nodepool.logging.conf.erb', - $launcher_logging_conf_template = 'nodepool/nodepool-launcher.logging.conf.erb', - $deleter_logging_conf_template = 'nodepool/nodepool-deleter.logging.conf.erb', - $builder_logging_conf_template = 'nodepool/nodepool-builder.logging.conf.erb', - $jenkins_masters = [], - $build_workers = '1', - $upload_workers = '4', - $install_mysql = true, - $mysql_db_name = 'nodepool', - $mysql_host = 'localhost', - $mysql_user_name = 'nodepool', - $split_daemon = false, - $install_nodepool_builder = true, - $python_version = 2, -) { - - if($install_mysql) { - class { '::nodepool::mysql' : - mysql_db_name => $mysql_db_name, - mysql_root_password => $mysql_root_password, - mysql_user_host => $mysql_host, - mysql_user_name => $mysql_user_name, - mysql_password => $mysql_password, - } - } - - $packages = [ - 'libffi-dev', - 'libssl-dev', - 'libgmp-dev', # transitive dep of paramiko - # xml2 and xslt are needed to build python lxml. - 'libxml2-dev', - 'libxslt1-dev', - ] - - ensure_packages($packages, {'ensure' => 'present'}) - - $absent_packages = [ - 'python-openssl', - ] - - ensure_packages($absent_packages, {'ensure' => 'absent'}) - - if ! defined(Package['build-essential']) { - package { 'build-essential': - ensure => present, - } - } - - # Alternative malloc implementation with better packing performance - if ! defined(Package['libjemalloc1']) { - package { 'libjemalloc1': - ensure => present, - } - } - - user { 'nodepool': - ensure => present, - home => '/home/nodepool', - shell => '/bin/bash', - gid => 'nodepool', - managehome => true, - require => Group['nodepool'], - } - - group { 'nodepool': - ensure => present, - } - - vcsrepo { '/opt/nodepool': - ensure => latest, - provider => git, - revision => $revision, - source => $git_source_repo, - } - - include ::pip - - if ($python_version == 3) { - include ::pip::python3 - $pip_provider = pip3 - $pip_command = 'pip3' - } else { - $pip_provider = openstack_pip - $pip_command = 'pip' - } - - if ! defined(Package['yappi']) { - package { 'yappi': - ensure => present, - provider => $pip_provider, - require => Class['pip'], - } - } - - if ! defined(Package['objgraph']) { - package { 'objgraph': - ensure => present, - provider => $pip_provider, - require => Class['pip'], - } - } - - exec { 'install_nodepool' : - command => "${pip_command} install -U /opt/nodepool", - path => '/usr/local/bin:/usr/bin:/bin/', - refreshonly => true, - subscribe => Vcsrepo['/opt/nodepool'], - require => [ - Class['pip'], - Package['build-essential'], - Package['libffi-dev'], - Package['libssl-dev'], - Package['libxml2-dev'], - Package['libxslt1-dev'], - Package['libgmp-dev'], - Package['objgraph'], - Package['yappi'], - ], - timeout => 1000, - } - - file { '/etc/nodepool': - ensure => directory, - } - - if ($scripts_dir != undef) { - file { '/etc/nodepool/scripts': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - recurse => true, - purge => true, - force => true, - require => File['/etc/nodepool'], - source => $scripts_dir, - } - } - - if ($elements_dir != undef) { - file { '/etc/nodepool/elements': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - recurse => true, - purge => true, - force => true, - require => File['/etc/nodepool'], - source => $elements_dir - } - } - - file { '/etc/default/nodepool': - ensure => present, - content => template('nodepool/nodepool.default.erb'), - mode => '0444', - owner => 'root', - group => 'root', - } - - # used for storage of d-i-b images in non-ephemeral partition - file { '/opt/nodepool_dib': - ensure => directory, - mode => '0755', - owner => 'nodepool', - group => 'nodepool', - require => User['nodepool'], - } - - # used for storage of d-i-b cached data - file { '/opt/dib_cache': - ensure => directory, - mode => '0755', - owner => 'nodepool', - group => 'nodepool', - require => User['nodepool'], - } - - # used as TMPDIR during d-i-b image builds - file { '/opt/dib_tmp': - ensure => directory, - mode => '0755', - owner => 'nodepool', - group => 'nodepool', - require => User['nodepool'], - } - - file { '/var/log/nodepool': - ensure => directory, - mode => '0755', - owner => 'nodepool', - group => 'nodepool', - require => User['nodepool'], - } - - file { '/var/run/nodepool': - ensure => directory, - mode => '0755', - owner => 'nodepool', - group => 'nodepool', - require => User['nodepool'], - } - - file { '/home/nodepool/.ssh/id_rsa': - ensure => present, - content => $nodepool_ssh_private_key, - mode => '0400', - owner => 'nodepool', - group => 'nodepool', - require => File['/home/nodepool/.ssh'], - } - - file { '/home/nodepool/.ssh/config': - ensure => present, - source => 'puppet:///modules/nodepool/ssh.config', - mode => '0440', - owner => 'nodepool', - group => 'nodepool', - require => File['/home/nodepool/.ssh'], - } - - file { '/etc/nodepool/logging.conf': - ensure => present, - mode => '0444', - owner => 'root', - group => 'root', - content => template($logging_conf_template), - } - - if ($split_daemon) { - file { '/etc/default/nodepool-launcher': - ensure => present, - content => template('nodepool/nodepool-launcher.default.erb'), - mode => '0444', - owner => 'root', - group => 'root', - } - - file { '/etc/default/nodepool-deleter': - ensure => present, - content => template('nodepool/nodepool-deleter.default.erb'), - mode => '0444', - owner => 'root', - group => 'root', - } - - file { '/etc/nodepool/launcher-logging.conf': - ensure => present, - mode => '0444', - owner => 'root', - group => 'root', - content => template($launcher_logging_conf_template), - } - - file { '/etc/nodepool/deleter-logging.conf': - ensure => present, - mode => '0444', - owner => 'root', - group => 'root', - content => template($deleter_logging_conf_template), - } - - file { '/etc/init.d/nodepool-launcher': - ensure => present, - mode => '0555', - owner => 'root', - group => 'root', - source => 'puppet:///modules/nodepool/nodepool-launcher.init', - } - - service { 'nodepool-launcher': - name => 'nodepool-launcher', - enable => true, - hasrestart => true, - require => File['/etc/init.d/nodepool-launcher'], - } - - file { '/etc/init.d/nodepool-deleter': - ensure => present, - mode => '0555', - owner => 'root', - group => 'root', - source => 'puppet:///modules/nodepool/nodepool-deleter.init', - } - - service { 'nodepool-deleter': - name => 'nodepool-deleter', - enable => true, - hasrestart => true, - require => File['/etc/init.d/nodepool-deleter'], - } - } - - validate_array($jenkins_masters) - file { '/etc/nodepool/secure.conf': - ensure => present, - owner => 'nodepool', - group => 'root', - mode => '0400', - content => template('nodepool/secure.conf.erb'), - require => [ - File['/etc/nodepool'], - User['nodepool'], - ], - } - - file { '/etc/init.d/nodepool': - ensure => present, - mode => '0555', - owner => 'root', - group => 'root', - source => 'puppet:///modules/nodepool/nodepool.init', - } - - service { 'nodepool': - name => 'nodepool', - enable => true, - hasrestart => true, - require => File['/etc/init.d/nodepool'], - } - - if $sudo == true { - $sudo_file_ensure = present - } - else { - $sudo_file_ensure = absent - } - file { '/etc/sudoers.d/nodepool-sudo': - ensure => $sudo_file_ensure, - source => 'puppet:///modules/nodepool/nodepool-sudo.sudo', - owner => 'root', - group => 'root', - mode => '0440', - } - - if ($install_nodepool_builder) { - class { '::nodepool::builder': - nodepool_ssh_public_key => $nodepool_ssh_public_key, - statsd_host => $statsd_host, - environment => $environment, - builder_logging_conf_template => $builder_logging_conf_template, - build_workers => $build_workers, - upload_workers => $upload_workers, - } - } else { - # For now, conditionally include this, since this code also lives in - # nodepool-builder. One things have settled down with zuulv3 effort, we - # should refactor this into a common.pp file. - if ! defined(File['/home/nodepool/.ssh']) { - file { '/home/nodepool/.ssh': - ensure => directory, - mode => '0500', - owner => 'nodepool', - group => 'nodepool', - require => User['nodepool'], - } - } - } -} diff --git a/manifests/launcher.pp b/manifests/launcher.pp deleted file mode 100644 index a35b0b9..0000000 --- a/manifests/launcher.pp +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2015 2015 IBM -# -# 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. - -# == Class: nodepool::launcher -# -class nodepool::launcher( - $statsd_host = undef, - $statsd_prefix = undef, - $nodepool_ssh_public_key = undef, - $launcher_logging_conf_template = 'nodepool/nodepool-launcher.logging.conf.erb', - # If true, an apache will be setup to redirect webapp end-points to - # the local webapp instance (on port 8005) - $enable_webapp = false, - $vhost_name = $::fqdn, -) { - - if ! defined(File['/home/nodepool/.ssh']) { - file { '/home/nodepool/.ssh': - ensure => directory, - mode => '0500', - owner => 'nodepool', - group => 'nodepool', - require => User['nodepool'], - } - } - - if ($nodepool_ssh_public_key != undef) { - file { '/home/nodepool/.ssh/id_rsa.pub': - ensure => present, - content => $nodepool_ssh_public_key, - mode => '0644', - owner => 'nodepool', - group => 'nodepool', - require => File['/home/nodepool/.ssh'], - } - } - - file { '/etc/init.d/nodepool-launcher': - ensure => present, - mode => '0555', - owner => 'root', - group => 'root', - source => 'puppet:///modules/nodepool/nodepool-launcherv3.init', - } - - file { '/etc/default/nodepool-launcher': - ensure => present, - content => template('nodepool/nodepool-launcherv3.default.erb'), - mode => '0444', - owner => 'root', - group => 'root', - } - - file { '/etc/nodepool/launcher-logging.conf': - ensure => present, - mode => '0444', - owner => 'root', - group => 'root', - content => template($launcher_logging_conf_template), - } - - if ($::operatingsystem == 'Ubuntu') and ($::operatingsystemrelease >= '16.04') { - # This is a hack to make sure that systemd is aware of the new service - # before we attempt to start it. - exec { 'nodepool-launcher-systemd-daemon-reload': - command => '/bin/systemctl daemon-reload', - before => Service['nodepool-launcher'], - subscribe => File['/etc/init.d/nodepool-launcher'], - refreshonly => true, - } - } - - service { 'nodepool-launcher': - name => 'nodepool-launcher', - enable => true, - hasrestart => true, - require => [ - File['/etc/init.d/nodepool-launcher'], - File['/etc/default/nodepool-launcher'], - File['/etc/nodepool/launcher-logging.conf'], - ], - } - - if $enable_webapp == true { - include ::httpd - - ::httpd::vhost { $vhost_name: - port => 80, - priority => '50', - docroot => 'MEANINGLESS_ARGUMENT', - template => 'nodepool/nodepool-launcher.vhost.erb', - } - if ! defined(Httpd::Mod['rewrite']) { - httpd::mod { 'rewrite': ensure => present } - } - if ! defined(Httpd::Mod['proxy']) { - httpd::mod { 'proxy': ensure => present } - } - if ! defined(Httpd::Mod['proxy_http']) { - httpd::mod { 'proxy_http': ensure => present } - } - } - -} diff --git a/manifests/mysql.pp b/manifests/mysql.pp deleted file mode 100644 index bf26d4c..0000000 --- a/manifests/mysql.pp +++ /dev/null @@ -1,59 +0,0 @@ -# == Class: nodepool::mysql -# -class nodepool::mysql ( - $mysql_password, - $mysql_root_password, - $mysql_bind_address = '127.0.0.1', - $mysql_default_engine = 'InnoDB', - $mysql_db_name = 'nodepool', - $mysql_max_connections = 8192, - $mysql_user_host = 'localhost', - $mysql_user_name = 'nodepool', -) { - - $mysql_data = load_module_metadata('mysql', true) - if ($mysql_data == {}) { - class { '::mysql::server' : - config_hash => { - 'bind_address' => $mysql_bind_address, - 'default_engine' => $mysql_default_engine, - 'max_connections' => $mysql_max_connections, - 'root_password' => $mysql_root_password, - } - } - } else { # If it has metadata.json, assume it's new enough to use this interface - class { '::mysql::server' : - override_options => { - 'mysqld' => { - 'default-storage-engine' => $mysql_default_engine, - 'max_connections' => $mysql_max_connections, - } - }, - root_password => $mysql_root_password, - } - } - - include ::mysql::server::account_security - - mysql::db { $mysql_db_name : - user => $mysql_user_name, - password => $mysql_password, - host => $mysql_user_host, - grant => ['all'], - charset => 'utf8', - require => [ - Class['mysql::server'], - Class['mysql::server::account_security'], - ], - } - - file { '/etc/mysql/conf.d/max_connections.cnf': - ensure => present, - content => "[server]\nmax_connections = 8192\n", - mode => '0444', - owner => 'root', - group => 'root', - require => Class['mysql::server'], - } - -} diff --git a/metadata.json b/metadata.json deleted file mode 100644 index ee208f8..0000000 --- a/metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "openstackinfra-nodepool", - "version": "0.0.1", - "author": "Openstack CI", - "summary": "Puppet module for Nodepool", - "license": "Apache 2.0", - "source": "https://git.openstack.org/openstack-infra/puppet-nodepool.git", - "project_page": "http://docs.openstack.org/infra/system-config/", - "issues_url": "https://storyboard.openstack.org/#!/project/765", - "dependencies": [ - {"name":"puppetlabs/apt", "version_requirement": "<2.0.0"}, - {"name":"openstackinfra/vcsrepo","version_requirement":">= 0.0.8"}, - {"name":"openstackinfra/diskimage_builder"} - ] -} diff --git a/spec/acceptance/nodesets/default.yml b/spec/acceptance/nodesets/default.yml deleted file mode 100644 index 3bb3e62..0000000 --- a/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-1404-x64: - roles: - - master - platform: ubuntu-14.04-amd64 - box: puppetlabs/ubuntu-14.04-64-nocm - box_url: https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm - hypervisor: vagrant -CONFIG: - log_level: debug - type: git diff --git a/spec/acceptance/nodesets/nodepool-centos7.yml b/spec/acceptance/nodesets/nodepool-centos7.yml deleted file mode 100644 index c552874..0000000 --- a/spec/acceptance/nodesets/nodepool-centos7.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-70-x64: - roles: - - master - platform: el-7-x86_64 - hypervisor: none - ip: 127.0.0.1 -CONFIG: - type: foss - set_env: false diff --git a/spec/acceptance/nodesets/nodepool-trusty.yml b/spec/acceptance/nodesets/nodepool-trusty.yml deleted file mode 100644 index 9fc624e..0000000 --- a/spec/acceptance/nodesets/nodepool-trusty.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-14.04-amd64: - roles: - - master - platform: ubuntu-14.04-amd64 - hypervisor: none - ip: 127.0.0.1 -CONFIG: - type: foss - set_env: false diff --git a/spec/acceptance/nodesets/nodepool-xenial.yml b/spec/acceptance/nodesets/nodepool-xenial.yml deleted file mode 100644 index 99dd318..0000000 --- a/spec/acceptance/nodesets/nodepool-xenial.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-16.04-amd64: - roles: - - master - platform: ubuntu-16.04-amd64 - hypervisor: none - ip: 127.0.0.1 -CONFIG: - type: foss - set_env: false diff --git a/templates/nodepool-builder.default.erb b/templates/nodepool-builder.default.erb deleted file mode 100644 index 2ea0e13..0000000 --- a/templates/nodepool-builder.default.erb +++ /dev/null @@ -1,16 +0,0 @@ -<% if @statsd_host != nil && @statsd_host != "" -%> -export STATSD_HOST=<%= @statsd_host %> -export STATSD_PORT=8125 -<% end -%> -<% @environment.keys.sort.each do |key| -%> -export <%= key %>='<%= @environment[key] %>' -<% end -%> -<% if @zuulv3 -%> -PIDFILE=/var/run/nodepool/nodepool-builder.pid -<% end -%> -DAEMON_ARGS="-c /etc/nodepool/nodepool.yaml -l /etc/nodepool/builder-logging.conf --build-workers <%= @build_workers %> --upload-workers <%= @upload_workers %>" -<% if @aarch64 -%> -export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.1 -<% else %> -export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 -<% end -%> diff --git a/templates/nodepool-builder.logging.conf.erb b/templates/nodepool-builder.logging.conf.erb deleted file mode 100644 index 9de3dd7..0000000 --- a/templates/nodepool-builder.logging.conf.erb +++ /dev/null @@ -1,55 +0,0 @@ -[loggers] -keys=root,nodepool,requests,openstack,kazoo - -[handlers] -keys=console,debug,normal - -[formatters] -keys=simple - -[logger_root] -level=WARNING -handlers=console - -[logger_requests] -level=WARNING -handlers=debug,normal -qualname=requests - -[logger_openstack] -level=WARNING -handlers=debug,normal -qualname=openstack - -[logger_nodepool] -level=DEBUG -handlers=debug,normal -qualname=nodepool - -[logger_kazoo] -level=INFO -handlers=debug,normal -qualname=kazoo -propagate=0 - -[handler_console] -level=WARNING -class=StreamHandler -formatter=simple -args=(sys.stdout,) - -[handler_debug] -level=DEBUG -class=logging.handlers.TimedRotatingFileHandler -formatter=simple -args=('/var/log/nodepool/builder-debug.log', 'H', 8, 30,) - -[handler_normal] -level=INFO -class=logging.handlers.TimedRotatingFileHandler -formatter=simple -args=('/var/log/nodepool/nodepool-builder.log', 'H', 8, 30,) - -[formatter_simple] -format=%(asctime)s %(levelname)s %(name)s: %(message)s -datefmt= diff --git a/templates/nodepool-builder.ssl.vhost.erb b/templates/nodepool-builder.ssl.vhost.erb deleted file mode 100644 index fe91ff8..0000000 --- a/templates/nodepool-builder.ssl.vhost.erb +++ /dev/null @@ -1,62 +0,0 @@ - - ServerName <%= scope.lookupvar("nodepool::builder::vhost_name") %> - - ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/nodepool_error.log - LogLevel warn - CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/nodepool_access.log combined - ServerSignature Off - - Redirect / https://<%= scope.lookupvar("nodepool::builder::vhost_name") %>/ - - - - - - ServerName <%= scope.lookupvar("nodepool::builder::vhost_name") %> - - SSLEngine on - - SSLCertificateFile <%= scope.lookupvar("nodepool::builder::ssl_cert_file") %> - SSLCertificateKeyFile <%= scope.lookupvar("nodepool::builder::ssl_key_file") %> - <%# The original default was '' -%> - <%# scope.lookupvar returns nil for an undefined variable in puppet 4 -%> - <%# scope.lookupvar returns :undef for an undefined variable in puppet 3 -%> - <% unless ['', nil, :undef].include? scope.lookupvar("nodepool::builder::ssl_chain_file") %> - SSLCertificateChainFile <%= scope.lookupvar("nodepool::builder::ssl_chain_file") %> - <% end %> - - DocumentRoot <%= scope.lookupvar("nodepool::builder::build_log_document_root") %> - > - Options <%= scope.lookupvar("httpd::params::options") %> - AllowOverride None - Require all granted - - - # Allow access to image files - Alias /images /opt/nodepool_dib - - Options <%= scope.lookupvar("httpd::params::options") %> - AllowOverride None - Require all granted - # Only allow access to the qcow2 files as they are smallest - - Require all denied - - - # Exclude the dib build dir as well. - - Require all denied - - - ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/nodepool_error.log - LogLevel warn - CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/nodepool_access.log combined - ServerSignature Off - - AddType text/plain .log - - - SetOutputFilter DEFLATE - - - diff --git a/templates/nodepool-builder.vhost.erb b/templates/nodepool-builder.vhost.erb deleted file mode 100644 index 9115c4f..0000000 --- a/templates/nodepool-builder.vhost.erb +++ /dev/null @@ -1,38 +0,0 @@ - - ServerName <%= scope.lookupvar("nodepool::builder::vhost_name") %> - - DocumentRoot <%= scope.lookupvar("nodepool::builder::build_log_document_root") %> - > - Options <%= scope.lookupvar("httpd::params::options") %> - AllowOverride None - Require all granted - - - # Allow access to image files - Alias /images /opt/nodepool_dib - - Options <%= scope.lookupvar("httpd::params::options") %> - AllowOverride None - Require all granted - # Only allow access to the qcow2 files as they are smallest - - Require all denied - - - # Exclude the dib build dir as well. - - Require all denied - - - ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/nodepool_error.log - LogLevel warn - CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/nodepool_access.log combined - ServerSignature Off - - AddType text/plain .log - - - SetOutputFilter DEFLATE - - - diff --git a/templates/nodepool-deleter.default.erb b/templates/nodepool-deleter.default.erb deleted file mode 100644 index 74cb5ba..0000000 --- a/templates/nodepool-deleter.default.erb +++ /dev/null @@ -1,8 +0,0 @@ -<% if @statsd_host != nil && @statsd_host != "" -%> -export STATSD_HOST=<%= @statsd_host %> -export STATSD_PORT=8125 -<% end -%> -<% @environment.keys.sort.each do |key| -%> -export <%= key %>='<%= @environment[key] %>' -<% end -%> -DAEMON_ARGS="--no-builder -c /etc/nodepool/nodepool.yaml -l /etc/nodepool/deleter-logging.conf --no-launches --no-webapp" diff --git a/templates/nodepool-deleter.logging.conf.erb b/templates/nodepool-deleter.logging.conf.erb deleted file mode 100644 index 75c73a4..0000000 --- a/templates/nodepool-deleter.logging.conf.erb +++ /dev/null @@ -1,54 +0,0 @@ -[loggers] -keys=root,nodepool,requests,shade - -[handlers] -keys=console,debug,normal - -[formatters] -keys=simple - -[logger_root] -level=WARNING -handlers=console - -[logger_requests] -level=WARNING -handlers=debug,normal -qualname=requests - -[logger_shade] -level=WARNING -handlers=debug,normal -qualname=shade - -[logger_gear] -level=DEBUG -handlers=debug,normal -qualname=gear - -[logger_nodepool] -level=DEBUG -handlers=debug,normal -qualname=nodepool - -[handler_console] -level=WARNING -class=StreamHandler -formatter=simple -args=(sys.stdout,) - -[handler_debug] -level=DEBUG -class=logging.handlers.TimedRotatingFileHandler -formatter=simple -args=('/var/log/nodepool/deleter-debug.log', 'H', 8, 30,) - -[handler_normal] -level=INFO -class=logging.handlers.TimedRotatingFileHandler -formatter=simple -args=('/var/log/nodepool/nodepool-deleter.log', 'H', 8, 30,) - -[formatter_simple] -format=%(asctime)s %(levelname)s %(name)s: %(message)s -datefmt= diff --git a/templates/nodepool-launcher.default.erb b/templates/nodepool-launcher.default.erb deleted file mode 100644 index b2528cb..0000000 --- a/templates/nodepool-launcher.default.erb +++ /dev/null @@ -1,8 +0,0 @@ -<% if @statsd_host != nil && @statsd_host != "" -%> -export STATSD_HOST=<%= @statsd_host %> -export STATSD_PORT=8125 -<% end -%> -<% @environment.keys.sort.each do |key| -%> -export <%= key %>='<%= @environment[key] %>' -<% end -%> -DAEMON_ARGS="--no-builder -c /etc/nodepool/nodepool.yaml -l /etc/nodepool/launcher-logging.conf --no-deletes --no-webapp" diff --git a/templates/nodepool-launcher.logging.conf.erb b/templates/nodepool-launcher.logging.conf.erb deleted file mode 100644 index 9ba2de4..0000000 --- a/templates/nodepool-launcher.logging.conf.erb +++ /dev/null @@ -1,54 +0,0 @@ -[loggers] -keys=root,nodepool,requests,openstack,kazoo - -[handlers] -keys=console,debug,normal - -[formatters] -keys=simple - -[logger_root] -level=WARNING -handlers=console - -[logger_requests] -level=WARNING -handlers=debug,normal -qualname=requests - -[logger_openstack] -level=WARNING -handlers=debug,normal -qualname=openstack - -[logger_kazoo] -level=INFO -handlers=debug,normal -qualname=kazoo - -[logger_nodepool] -level=DEBUG -handlers=debug,normal -qualname=nodepool - -[handler_console] -level=WARNING -class=StreamHandler -formatter=simple -args=(sys.stdout,) - -[handler_debug] -level=DEBUG -class=logging.handlers.TimedRotatingFileHandler -formatter=simple -args=('/var/log/nodepool/launcher-debug.log', 'H', 8, 30,) - -[handler_normal] -level=INFO -class=logging.handlers.TimedRotatingFileHandler -formatter=simple -args=('/var/log/nodepool/nodepool-launcher.log', 'H', 8, 30,) - -[formatter_simple] -format=%(asctime)s %(levelname)s %(name)s: %(message)s -datefmt= diff --git a/templates/nodepool-launcher.vhost.erb b/templates/nodepool-launcher.vhost.erb deleted file mode 100644 index 3af503a..0000000 --- a/templates/nodepool-launcher.vhost.erb +++ /dev/null @@ -1,19 +0,0 @@ - - ServerName <%= scope.lookupvar("nodepool::launcher::vhost_name") %> - - ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/nodepool_error.log - LogLevel warn - CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/nodepool_access.log combined - ServerSignature Off - - - SetOutputFilter DEFLATE - - - RewriteEngine on - RewriteRule ^/image-list$ http://127.0.0.1:8005/image-list [P] - RewriteRule ^/dib-image-list$ http://127.0.0.1:8005/dib-image-list [P] - RewriteRule ^/image-list.json$ http://127.0.0.1:8005/image-list.json [P] - RewriteRule ^/dib-image-list.json$ http://127.0.0.1:8005/dib-image-list.json [P] - - diff --git a/templates/nodepool-launcherv3.default.erb b/templates/nodepool-launcherv3.default.erb deleted file mode 100644 index 8d98589..0000000 --- a/templates/nodepool-launcherv3.default.erb +++ /dev/null @@ -1,9 +0,0 @@ -<% if @statsd_host != nil && @statsd_host != "" -%> -export STATSD_HOST=<%= @statsd_host %> -export STATSD_PORT=8125 -<% end -%> -<% if @statsd_prefix != nil && @statsd_prefix != "" -%> -export STATSD_PREFIX=<%= @statsd_prefix %> -<% end -%> -DAEMON_ARGS="-c /etc/nodepool/nodepool.yaml -l /etc/nodepool/launcher-logging.conf" -export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 diff --git a/templates/nodepool.default.erb b/templates/nodepool.default.erb deleted file mode 100644 index 3cc5a75..0000000 --- a/templates/nodepool.default.erb +++ /dev/null @@ -1,12 +0,0 @@ -<% if @statsd_host != nil && @statsd_host != "" -%> -export STATSD_HOST=<%= @statsd_host %> -export STATSD_PORT=8125 -<% end -%> -<% @environment.keys.sort.each do |key| -%> -export <%= key %>='<%= @environment[key] %>' -<% end -%> -<% if @split_daemon -%> -DAEMON_ARGS="--no-builder -c /etc/nodepool/nodepool.yaml -l /etc/nodepool/logging.conf --no-launches --no-deletes" -<% else -%> -DAEMON_ARGS="--no-builder -c /etc/nodepool/nodepool.yaml -l /etc/nodepool/logging.conf" -<% end -%> diff --git a/templates/nodepool.logging.conf.erb b/templates/nodepool.logging.conf.erb deleted file mode 100644 index 1aebe0c..0000000 --- a/templates/nodepool.logging.conf.erb +++ /dev/null @@ -1,44 +0,0 @@ -[loggers] -keys=root,nodepool,requests - -[handlers] -keys=console,debug,normal - -[formatters] -keys=simple - -[logger_root] -level=WARNING -handlers=console - -[logger_requests] -level=WARNING -handlers=debug,normal -qualname=requests - -[logger_nodepool] -level=DEBUG -handlers=debug,normal -qualname=nodepool - -[handler_console] -level=WARNING -class=StreamHandler -formatter=simple -args=(sys.stdout,) - -[handler_debug] -level=DEBUG -class=logging.handlers.TimedRotatingFileHandler -formatter=simple -args=('/var/log/nodepool/debug.log', 'H', 8, 30,) - -[handler_normal] -level=INFO -class=logging.handlers.TimedRotatingFileHandler -formatter=simple -args=('/var/log/nodepool/nodepool.log', 'H', 8, 30,) - -[formatter_simple] -format=%(asctime)s %(levelname)s %(name)s: %(message)s -datefmt= diff --git a/templates/secure.conf.erb b/templates/secure.conf.erb deleted file mode 100644 index 5f78ac3..0000000 --- a/templates/secure.conf.erb +++ /dev/null @@ -1,12 +0,0 @@ -[database] -dburi=mysql+pymysql://<%= @mysql_user_name %>:<%= @mysql_password %>@<%= @mysql_host %>/<%= @mysql_db_name %> - -<% @jenkins_masters.each do |master| -%> -[jenkins "<%= master['name'] -%>"] -user=<%= master['user'] %> -apikey=<%= master['apikey'] %> -<% if master.has_key?('credentials') -%> -credentials=<%= master['credentials'] %> -<% end -%> -url=<%= master['url'] %> -<% end %>