From 062f4a9c8dcfee66bc75c0ac8480589333f3114b Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 4 Mar 2019 15:31:19 -0500 Subject: [PATCH] Initial commit Change-Id: Id843f60e643f481fffdbd44ca9862b7fb4d0cf90 Signed-off-by: Paul Belanger --- .gitignore | 3 + .yamllint | 13 ++ .zuul.d/projects.yaml | 11 ++ README.rst | 3 + ansible/ansible.cfg | 13 ++ ansible/group_vars/all.yaml | 20 +++ ansible/group_vars/bastion.yaml | 20 +++ ansible/group_vars/gear.yaml | 108 ++++++++++++++ ansible/group_vars/nodepool-builder.yaml | 52 +++++++ ansible/group_vars/nodepool-launcher.yaml | 35 +++++ ansible/group_vars/nodepool.yaml | 48 ++++++ ansible/group_vars/statsd.yaml | 27 ++++ ansible/group_vars/zookeeper.yaml | 14 ++ ansible/group_vars/zuul-connections.yaml | 76 ++++++++++ ansible/group_vars/zuul-executor.yaml | 96 ++++++++++++ ansible/group_vars/zuul-fingergw.yaml | 34 +++++ ansible/group_vars/zuul-merger.yaml | 35 +++++ ansible/group_vars/zuul-scheduler.yaml | 37 +++++ ansible/group_vars/zuul-web.yaml | 35 +++++ ansible/group_vars/zuul.yaml | 141 ++++++++++++++++++ ansible/hosts | 50 +++++++ bindep.txt | 14 ++ nodepool/clouds.yaml.j2 | 20 +++ nodepool/elements/README.rst | 4 + nodepool/elements/zuul-worker/README.rst | 17 +++ .../zuul-worker/extra-data.d/60-zuul-user | 16 ++ .../zuul-worker/install.d/10-pip-packages | 26 ++++ .../zuul-worker/install.d/60-zuul-worker | 33 ++++ nodepool/nodepool.yaml.j2 | 48 ++++++ requirements.txt | 0 test-requirements.txt | 1 + tox.ini | 31 ++++ zuul/main.yaml | 6 + zuul/zuul.conf.j2 | 55 +++++++ 34 files changed, 1142 insertions(+) create mode 100644 .gitignore create mode 100644 .yamllint create mode 100644 .zuul.d/projects.yaml create mode 100644 README.rst create mode 100644 ansible/ansible.cfg create mode 100644 ansible/group_vars/all.yaml create mode 100644 ansible/group_vars/bastion.yaml create mode 100644 ansible/group_vars/gear.yaml create mode 100644 ansible/group_vars/nodepool-builder.yaml create mode 100644 ansible/group_vars/nodepool-launcher.yaml create mode 100644 ansible/group_vars/nodepool.yaml create mode 100644 ansible/group_vars/statsd.yaml create mode 100644 ansible/group_vars/zookeeper.yaml create mode 100644 ansible/group_vars/zuul-connections.yaml create mode 100644 ansible/group_vars/zuul-executor.yaml create mode 100644 ansible/group_vars/zuul-fingergw.yaml create mode 100644 ansible/group_vars/zuul-merger.yaml create mode 100644 ansible/group_vars/zuul-scheduler.yaml create mode 100644 ansible/group_vars/zuul-web.yaml create mode 100644 ansible/group_vars/zuul.yaml create mode 100644 ansible/hosts create mode 100644 bindep.txt create mode 100644 nodepool/clouds.yaml.j2 create mode 100644 nodepool/elements/README.rst create mode 100644 nodepool/elements/zuul-worker/README.rst create mode 100755 nodepool/elements/zuul-worker/extra-data.d/60-zuul-user create mode 100755 nodepool/elements/zuul-worker/install.d/10-pip-packages create mode 100755 nodepool/elements/zuul-worker/install.d/60-zuul-worker create mode 100644 nodepool/nodepool.yaml.j2 create mode 100644 requirements.txt create mode 100644 test-requirements.txt create mode 100644 tox.ini create mode 100644 zuul/main.yaml create mode 100644 zuul/zuul.conf.j2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4607f47 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.pyc +.tox +playbooks/roles diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..2ceb272 --- /dev/null +++ b/.yamllint @@ -0,0 +1,13 @@ +extends: default + +ignore: | + .tox + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable diff --git a/.zuul.d/projects.yaml b/.zuul.d/projects.yaml new file mode 100644 index 0000000..98da394 --- /dev/null +++ b/.zuul.d/projects.yaml @@ -0,0 +1,11 @@ +--- +- project: + templates: + - windmill-jobs-fedora-latest + - windmill-jobs-bionic + check: + jobs: + - openstack-tox-linters + gate: + jobs: + - openstack-tox-linters diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..6257d50 --- /dev/null +++ b/README.rst @@ -0,0 +1,3 @@ +=============== +windmill-config +=============== diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg new file mode 100644 index 0000000..a42fe20 --- /dev/null +++ b/ansible/ansible.cfg @@ -0,0 +1,13 @@ +# This file is generated by Ansible +# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN +# +[defaults] +callback_whitelist = profile_tasks, timer +fact_caching_connection = ~/.cache/ansible/facts +fact_caching = jsonfile +inventory = ~/.config/windmill/ansible/hosts +retry_files_enabled = false + +[ssh_connection] +pipelining = true +retries = 3 diff --git a/ansible/group_vars/all.yaml b/ansible/group_vars/all.yaml new file mode 100644 index 0000000..0b67f08 --- /dev/null +++ b/ansible/group_vars/all.yaml @@ -0,0 +1,20 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.virtualenv +virtualenv_install_method: package + +# windmill-config +# TODO(pabelanger): Create windmill-config project on git.o.o. +windmill_config_git_dest: ~/.config/windmill diff --git a/ansible/group_vars/bastion.yaml b/ansible/group_vars/bastion.yaml new file mode 100644 index 0000000..4640457 --- /dev/null +++ b/ansible/group_vars/bastion.yaml @@ -0,0 +1,20 @@ +# Copyright 2019 Red Hat, Inc. +# +# 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. +--- +ansible_pip_name: + - ansible + - ara + - netaddr +ansible_pip_virtualenv_python: python3 +ansible_pip_virtualenv: /opt/venv/ansible diff --git a/ansible/group_vars/gear.yaml b/ansible/group_vars/gear.yaml new file mode 100644 index 0000000..80cd937 --- /dev/null +++ b/ansible/group_vars/gear.yaml @@ -0,0 +1,108 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# openstack.gearman +gear_file_gear_service_config_src: gear/etc/systemd/system/gear.service.d/override.conf.j2 + +# TODO(pabelanger): Remove once https://review.openstack.org/558938 is merged +gear_pip_extra_args: statsd +gear_pip_virtualenv_python: python3 +gear_pip_virtualenv: /opt/venv/gear + +gear_file_ssl_ca_content: | + -----BEGIN CERTIFICATE----- + MIIDmjCCAoKgAwIBAgIJAN8sAUG3GR9wMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNV + BAYTAlVTMQ4wDAYDVQQIDAVUZXhhczEPMA0GA1UEBwwGQXVzdGluMR0wGwYDVQQK + DBRPcGVuU3RhY2sgRm91bmRhdGlvbjETMBEGA1UEAwwKZ2Vhcm1hbi1jYTAeFw0x + ODAzMjgwMjMzMTZaFw0yODAzMjUwMjMzMTZaMGIxCzAJBgNVBAYTAlVTMQ4wDAYD + VQQIDAVUZXhhczEPMA0GA1UEBwwGQXVzdGluMR0wGwYDVQQKDBRPcGVuU3RhY2sg + Rm91bmRhdGlvbjETMBEGA1UEAwwKZ2Vhcm1hbi1jYTCCASIwDQYJKoZIhvcNAQEB + BQADggEPADCCAQoCggEBAMLqIrwY9mDh9kKc/mXDvEUifXgdHtz4GwP3hoYz6N82 + 8Zl7NzUqvYFSj9tlpdJxFHWFBjB9TiGv+2UPjDfGLk7xTKPkErnEcmH6zf4F+0YH + hEI00c7DN5sSPq0qcMk1pVCzZ96Fhdi+fIQkVq3Ovx0GGmknHy0K2If2vX9FgZNZ + 323BZw7vZUSYRIvN8ClAXg+ONvHvodVGBWts2SO5CYvnsA+kQRa6RJswoe9CkTxb + qF8yq5CPLEdQeoTiF4RiLIsfB50ZFTcOrARw93blcMkSw4kh3EJhrRMezoJZZKPE + JfOOaMmHiKbrF5TWjREJODgdHIz87nePDuZAWrvlyDECAwEAAaNTMFEwHQYDVR0O + BBYEFEqtl/rooCIF+gMIfS2IKzYJC4LRMB8GA1UdIwQYMBaAFEqtl/rooCIF+gMI + fS2IKzYJC4LRMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAEck + 6wCHSOwtzWBBwM18uVlHAUywe95SNvgPJ6tt3jaM9Th6aGEaeF7Eh1wPBoQBUBUC + YsXhXenROoEf6r0CHaJkamaJSZqEIJ5/2sdZ8RgHXG8Savp5y1r9Rw1duNREuqaD + QsHNZ/hM1VEr9PhyVQ3HWe18EWRY8vMc22MlBAMt9QT+Okj3Ao679uPGnZD3HQ8p + ZiJRxV6UJoFlWdmEXyljUKUryotX7bN1bfSvBaiV/RncUARMfxulIbDxHgp6/D8G + dcdLTVD6WkbRS77Nt4rB1Gu+b/qME8zxwhjvM3J7r2p+EjVqwW7dgQQRP1I0jyGU + 9rZdDhon2y067Zr8Kuc= + -----END CERTIFICATE----- + +gear_file_ssl_cert_content: | + -----BEGIN CERTIFICATE----- + MIIDQTCCAikCCQDWIKrPJpjpMTANBgkqhkiG9w0BAQsFADBiMQswCQYDVQQGEwJV + UzEOMAwGA1UECAwFVGV4YXMxDzANBgNVBAcMBkF1c3RpbjEdMBsGA1UECgwUT3Bl + blN0YWNrIEZvdW5kYXRpb24xEzARBgNVBAMMCmdlYXJtYW4tY2EwHhcNMTgwMzI4 + MDIzMzQ5WhcNMjgwMzI1MDIzMzQ5WjBjMQswCQYDVQQGEwJVUzEOMAwGA1UECAwF + VGV4YXMxDzANBgNVBAcMBkF1c3RpbjEdMBsGA1UECgwUT3BlblN0YWNrIEZvdW5k + YXRpb24xFDASBgNVBAMMC2dlYXItc2VydmVyMIIBIjANBgkqhkiG9w0BAQEFAAOC + AQ8AMIIBCgKCAQEA5CTko8DQeIxRCUizbSY4JgJfYAz7HBkZK6VIPCVmJGmuFyDS + I3YlzhKIQdLA9SEDNpP9F9T5EJKDGcJEptvtqViQXWFv/gBth4agA89CPZu0kBz7 + X1OVxxr0LQociwbXWHpj4vDZJ0XRM0xgleZMeUFIT2A6wGDlg7eH7v4XASr/wwA0 + 4XCx042UDI79SPkxvR9hkexWbKZG3OEcv5jKEbb3mvpGqND8YTHvwOc/VlCO/mOw + /LEep2xlFO9T5WQZ1/qPLHAizOAYIqBMIUm8TP7beEVaAmZVy3Zm9V5lOw9KFE3R + c79CMYgTssWI32MzQJ81MRJEofMVAP50bFblhQIDAQABMA0GCSqGSIb3DQEBCwUA + A4IBAQDBhaVBFtU3ZKrJ7vMObLGcr+lUyYDi05/ccsHe3bXCdnCwdefULSgqJ4AX + kdJ5KFsUrsA+lxLVDbc1HLrRPy8lCjRiZFZHORTGBgReB2GfeQVLWeT0VyOTl1/t + 7JKPEGhJJhEOhn9EzcMxTUdNMTTg9DrzV8yVooWgKiZCMvDlMBZNnxStEphBP6GH + hE5mT6CITkCsDzzNDLYLCfEV4hCmzOBIt/KNp/1TQM1H5JK6R+VjGXMkRLtFqx29 + UDBz7a0g9iLvnpFq0jb7TpNgzzl256N3nIOaOPGT5OB7yYeIOEaLdBxTIIrmhuRd + HIedlOp7IZPO/bMz334m0eL0odIl + -----END CERTIFICATE----- + +gear_file_ssl_key_content: | + -----BEGIN PRIVATE KEY----- + MIIEvQIBADANBgkqhkiG9w0BAQEFAASC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Xf6M8 + 5zKkW46PfQKBgCBzden7ospMngrWWXASqvQneDCl7h81Mj1/MamCWglWznO6ec4n + ue5clVW/JdJlATqPUZg3iwlKYDQP68BTi0BGofQtNXB3YLIjhXQ6X9Ct77crqolH + DI6F3aTFvgaW4XUc//uDrPO6gjpD2ubzSEi9hm22qjyr7LlENZwMVDVRAoGARDR0 + xtiFS9jiUpQssq2yxoUEkfy5RA8PgirqG9RvXwIMyBasVVxfQht2BTZBrXgWqfAN + 8sGAPYlCibROdyiL/OOFpOyjptgFpSoJtvJE0Mx7kSzB7B+borMEPe5m9Wh/npLH + CLJc1SmVGsgdvyTcD8Az4RVu2wBio/yQphO4OAUCgYEAv4SPmu6xQAbwHMyUf8lv + 32b23e18jfh906cCcD3EH+lS8Ddbhl3LD2n3qJi55B5ibzTBcrrVpbPhePxtoGZr + 7NSS/HJJGlt/SqWSbASpt9gfw1k6a0wffIq6h0+I6bNeajfwMz8bGAMIdHqGRhze + TPw69kX4BM39nK3lP2/aiTQ= + -----END PRIVATE KEY----- + +# openstack.logrotate +logrotate_configs: + - name: gear + log: /var/log/gear/debug.log /var/log/gear/gear.log + options: + - compress + - missingok + - rotate 7 + - daily + - notifempty diff --git a/ansible/group_vars/nodepool-builder.yaml b/ansible/group_vars/nodepool-builder.yaml new file mode 100644 index 0000000..df4381c --- /dev/null +++ b/ansible/group_vars/nodepool-builder.yaml @@ -0,0 +1,52 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.diskimage-builder +diskimage_builder_pip_virtualenv_python: python3 +diskimage_builder_pip_virtualenv: /opt/venv/nodepool + +# windmill.nodepool +nodepool_file_builder_logging_conf_manage: true + +nodepool_file_nodepool_builder_service_config_manage: true +nodepool_file_nodepool_builder_service_config_src: nodepool-builder/etc/systemd/system/nodepool-builder.service.d/override.conf.j2 +nodepool_file_nodepool_builder_service_manage: true + +nodepool_service_nodepool_builder_enabled: true +nodepool_service_nodepool_builder_manage: true +nodepool_service_nodepool_builder_state: started + +# openstack.logrotate +logrotate_configs: + - name: nodepool-builder + log: /var/log/nodepool/builder-debug.log /var/log/nodepool/nodepool-builder.log + options: + - compress + - missingok + - rotate 7 + - daily + - notifempty + +# openstack.sudoers +sudoers_task_manager: + - config +sudoers_file_includes_dest: /etc/sudoers.d/nodepool +sudoers_file_includes_src: nodepool-builder/etc/sudoers.d/nodepool.j2 + +# windmill.ssh +ssh_user_name: "{{ nodepool_user_name|default('nodepool') }}" +ssh_user_home: "{{ nodepool_user_home|default('/var/lib/nodepool') }}" + +ssh_key_public_content: | + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDPFYsTS2aTFpgJHACEZjtkr4kt7rf9fHjavl5OhCq7rwAzfiQfq25YSaCZRRPywjUg6stm5JmBCLvQAa1LuhpsrUTE61TvGBIxeRwE6B0OecPW8SoXNbhgvfdrgVb4OIvH51tndPmXYPMpVN03iWyoSfN58YE77Z0VipDuG++dAjSJg+bmBlmmVE3L1419E2Jm56OnRDADWEDlvYciEIXaFWN9pIYXTL+Q1QdYKkWGPfuvMu6k5xSgQtNeXO4IWLSKyqkqj/PRQeY7XVBNstRhGzy+10fV0J4LrYcTAs/80rI2qgvrRoiDuXuhPMXyyD0OxoVrlIO4/f7BD2xk1lbq6JrUQthsNeLn9O5KVX9H7zhnFM1EUSRZz+knasDRfv8jrfrhUtM1QpF/3LITKftrjbr9whpOrxGSKSRRtnYlS5OrY1o9qqEfYPbelQdnz4oa+aTl0R7ApLfRpg64tbF1uNyVXwJvm7EYY2Ju1t0dY6vxFWlC8lLujE4Zq/VWajf5FhzsIh6SD0NVdz8UK1W/sZYKczejo0UHgQujfuJeJ3wRWAB/idzP2B69/uFJn7gp6199637j3v/3l38xRPi/kbh8zK0LjwvR8PKOlTx8pMJzNFaLzRqOTVJzhl4YmlYXtiNpxf/7/dPRUu8kJlb+yvVPo811v537EnmtsXin9w== zuul@example.org diff --git a/ansible/group_vars/nodepool-launcher.yaml b/ansible/group_vars/nodepool-launcher.yaml new file mode 100644 index 0000000..1c60de1 --- /dev/null +++ b/ansible/group_vars/nodepool-launcher.yaml @@ -0,0 +1,35 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.nodepool +nodepool_file_launcher_logging_conf_manage: true + +nodepool_file_nodepool_launcher_service_config_manage: true +nodepool_file_nodepool_launcher_service_config_src: nodepool-launcher/etc/systemd/system/nodepool-launcher.service.d/override.conf.j2 +nodepool_file_nodepool_launcher_service_manage: true + +nodepool_service_nodepool_launcher_enabled: true +nodepool_service_nodepool_launcher_manage: true +nodepool_service_nodepool_launcher_state: started + +# openstack.logrotate +logrotate_configs: + - name: nodepool-launcher + log: /var/log/nodepool/launcher-debug.log /var/log/nodepool/nodepool-launcher.log + options: + - compress + - missingok + - rotate 7 + - daily + - notifempty diff --git a/ansible/group_vars/nodepool.yaml b/ansible/group_vars/nodepool.yaml new file mode 100644 index 0000000..128e743 --- /dev/null +++ b/ansible/group_vars/nodepool.yaml @@ -0,0 +1,48 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.nodepool +nodepool_user_shell: /bin/bash + +nodepool_file_nodepool_yaml_src: "{{ windmill_config_git_dest }}/nodepool/nodepool.yaml.j2" + +nodepool_file_builder_logging_conf_manage: false +nodepool_file_launcher_logging_conf_manage: false + +nodepool_file_nodepool_builder_service_config_manage: false +nodepool_file_nodepool_builder_service_manage: false + +nodepool_file_nodepool_launcher_service_config_manage: false +nodepool_file_nodepool_launcher_service_manage: false + +nodepool_pip_virtualenv_python: python3 +nodepool_pip_virtualenv: /opt/venv/nodepool + +nodepool_service_nodepool_builder_enabled: false +nodepool_service_nodepool_builder_manage: false +nodepool_service_nodepool_builder_state: stopped + +nodepool_service_nodepool_launcher_enabled: false +nodepool_service_nodepool_launcher_manage: false +nodepool_service_nodepool_launcher_state: stopped + +# windmill.openstacksdk +openstacksdk_user_name: nodepool +openstacksdk_user_group: nodepool +openstacksdk_user_home: /var/lib/nodepool + +openstacksdk_pip_virtualenv_python: python3 +openstacksdk_pip_virtualenv: /opt/venv/nodepool + +openstacksdk_file_clouds_yaml_src: "{{ windmill_config_git_dest }}/nodepool/clouds.yaml.j2" diff --git a/ansible/group_vars/statsd.yaml b/ansible/group_vars/statsd.yaml new file mode 100644 index 0000000..773b021 --- /dev/null +++ b/ansible/group_vars/statsd.yaml @@ -0,0 +1,27 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.statsd +statsd_file_config_js_src: statsd/etc/statsd/config.js.j2 + +# openstack.logrotate +logrotate_configs: + - name: statsd + log: /var/log/statsd/statsd.log + options: + - compress + - missingok + - rotate 7 + - daily + - notifempty diff --git a/ansible/group_vars/zookeeper.yaml b/ansible/group_vars/zookeeper.yaml new file mode 100644 index 0000000..a4b6202 --- /dev/null +++ b/ansible/group_vars/zookeeper.yaml @@ -0,0 +1,14 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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/ansible/group_vars/zuul-connections.yaml b/ansible/group_vars/zuul-connections.yaml new file mode 100644 index 0000000..e4e6388 --- /dev/null +++ b/ansible/group_vars/zuul-connections.yaml @@ -0,0 +1,76 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.ssh +zuul_connections_ssh: + - ssh_key_private_content: | + -----BEGIN RSA PRIVATE KEY----- + MIIJKAIBAAKCAgEA4sxcS8zPIPc3Hviv6cGVmUmvsMqMRX8lU3EBM22+yDNKfL/8 + uAj0B8y9QzWKeFPncmwvtxI3Z0igFyD+5C0coQSg7SMgSoWdFPdlkctPQAZ5jafp + FmhAMp6UpYqSAD9IlaYIzbEaR7yx+WH5vhBLCyKmQSyhC97oewfhZMg1qDoeKQZn + HcskUsIS4Bq8KMRGsAtEjiNWzR2EPNhJWsx74H+0t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UgjXKwBGH2gkoPb5UFEvho+2w/rKqP + wv2g0W8/NlvMdL2fCMvPPBB+1xQEpDQ3z0Yxr9GeWnNBpzjvvMkOUY2qdCceRinC + nRZjAoIBAQDiiYg6ogq7n3y9qBYR+peIt55LFRmqMByBRO9oiMn7fteXTt1gVRQ0 + z4Hg2NhhDmDJADNc3ndlvSmJa/+DzQpM0653mN1X+4ykqr7lE9kfJpjKMJxiYCp3 + MAPAKGiToffa6Rhweziw9xJ6YEEFgixTS25fsJFvB7PBHeTvDuRd4i5cYvTJJenm + X+gzP7o+RS+b4Dzm5+R7l81+kktZW8ZRjecyDTUpm7GvyC58/6LNU7ZRrgFgf9BS + AyZc0TFVKVFkQbffzrrcGFHZX6uFmF33lUGIxODh1jeMFj+QJ+7fiLmJYLHcavtc + wfXhoSwhKg/Q72zp6G35chcntxo27bLVAoIBAEZlZfr/ifq9gmgTxjHQ//GJ80SV + 7y0K75e0bt/BkMU8EiqqsX5CywxSTH54tACzDIduMq0EFp+sK3bEzD7vPQ1QqJ3N + L2XkOO05o506RC4DbuwmQtYOCok+4IPuCF6FduCa0cYo/S8+UBxbjusauZET46J9 + r7KG1PGaIGfwQCcf4mzlAutR977M/FyN967J/gtP5QTBof1HEqPsTvaxe595KeUe + csgN17HFJXSaBudMf84xmCOc7rULAItXqmLIeNHTztjbjB4IAwpDon0qe+EfVt7z + eqZTcm7faWJiFVZNdnGD4uc0P+syWLmp1uX2hJfV/0WI+yPeDoRk6q+97W4= + -----END RSA PRIVATE KEY----- + + ssh_key_private_dest: /var/lib/zuul/.ssh/gerrit_id_rsa + ssh_key_public_content: | + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDizFxLzM8g9zce+K/pwZWZSa+wyoxFfyVTcQEzbb7IM0p8v/y4CPQHzL1DNYp4U+dybC+3EjdnSKAXIP7kLRyhBKDtIyBKhZ0U92WRy09ABnmNp+kWaEAynpSlipIAP0iVpgjNsRpHvLH5Yfm+EEsLIqZBLKEL3uh7B+FkyDWoOh4pBmcdyyRSwhLgGrwoxEawC0SOI1bNHYQ82ElazHvgf7S37RAMtb+RuL0+FeJsRPDlryvQbsmbRkRfBpK7ziULrYB+PgRiYNthdfyqhHT4J0Tt7mNemfwehn7ljaWod/PgcdZHAFDwX1rpVEOLvKkf2oUw2D+yll6fAzSkzGGveXRu63LQwyEaiFNteANcSrImbTncBKMINgdbDxdUA2/41y0sOwaCn7Q+BVlUmQa7zZVTctKlRG0OtLKZ7Ahi3z0Qu9fygfVmCRVFPl/v4VEadPRNXi55JZfemcj1HJEni0m0M8Ke50kQpPCDe3Zwzzz25thxCtvBAx3MY11EF7B1FYYDZjTyHt4E6XLYvQKyflm8R0la6dphlY4quq9fTS2MoteIUX9gD0hzIrX5CIOabncFYGFNSpIwMwbAy03IeXcr2nRW/ZsowDtts5YtMCKHHRcgt7x4XHZeYJ6/pEucSQ7HzflO5gGFiaUYps4K/LX0D9IaCIFUg2BctqhBjw== gerrit@example.org + + ssh_key_public_dest: /var/lib/zuul/.ssh/gerrit_id_rsa.pub + ssh_user_home: /var/lib/zuul + ssh_user_name: zuul diff --git a/ansible/group_vars/zuul-executor.yaml b/ansible/group_vars/zuul-executor.yaml new file mode 100644 index 0000000..737e7af --- /dev/null +++ b/ansible/group_vars/zuul-executor.yaml @@ -0,0 +1,96 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.zuul +zuul_file_executor_logging_conf_manage: true + +zuul_file_zuul_executor_service_config_manage: true +zuul_file_zuul_executor_service_config_src: zuul/etc/systemd/system/zuul-executor.service.d/override.conf.j2 +zuul_file_zuul_executor_service_manage: true + +zuul_pip_name: zuul[zuul_executor] + +zuul_service_zuul_executor_enabled: true +zuul_service_zuul_executor_manage: true +zuul_service_zuul_executor_state: started + +# openstack.logrotate +logrotate_configs: + - name: zuul-executor + log: /var/log/zuul/executor-debug.log /var/log/zuul/executor.log + options: + - compress + - missingok + - rotate 7 + - daily + - notifempty + +# windmill.ssh +ssh_user_name: zuul +ssh_user_home: /var/lib/zuul + +ssh_key_private_content: | + -----BEGIN RSA PRIVATE KEY----- + MIIJKgIBAAKCAgEAzxWLE0tmkxaYCRwAhGY7ZK+JLe63/Xx42r5eToQqu68AM34k + H6tuWEmgmUUT8sI1IOrLZuSZgQi70AGtS7oabK1ExOtU7xgSMXkcBOgdDnnD1vEq + FzW4YL33a4FW+DiLx+dbZ3T5l2DzKVTdN4lsqEnzefGBO+2dFYqQ7hvvnQI0iYPm + 5gZZplRNy9eNfRNiZuejp0QwA1hA5b2HIhCF2hVjfaSGF0y/kNUHWCpFhj37rzLu + pOcUoELTXlzuCFi0isqpKo/z0UHmO11QTbLUYRs8vtdH1dCeC62HEwLP/NKyNqoL + 60aIg7l7oTzF8sg9DsaFa5SDuP3+wQ9sZNZW6uia1ELYbDXi5/TuSlV/R+84ZxTN + RFEkWc/pJ2rA0X7/I6364VLTNUKRf9yyEyn7a426/cIaTq8RkikkUbZ2JUuTq2Na + PaqhH2D23pUHZ8+KGvmk5dEewKS30aYOuLWxdbjclV8Cb5uxGGNibtbdHWOr8RVp + QvJS7oxOGav1Vmo3+RYc7CIekg9DVXc/FCtVv7GWCnM3o6NFB4ELo37iXid8EVgA + f4ncz9gevf7hSZ+4Ketffet+497/95d/MUT4v5G4fMytC48L0fDyjpU8fKTCczRW + i80ajk1Sc4ZeGJpWF7YjacX/+/3T0VLvJCZW/sr1T6PNdb+d+xJ5rbF4p/cCAwEA + AQKCAgBLeAJzSatcN4O47ieSGN/UVdSclL8g9lflADPGUYxxUdm06men0wYnzs1k + jjQy6GwMTwVJvk3jJJetuq65Rl2S9aJ2UX1m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W+MwEVtA3tMEsFnTXirWrAV25dZ/nrKMDsT7VuoKP + hIZhDP6ArEjB4OFwKPNeoKA81R82Ubg58jFP7QRFUZHmfP7UGkaztRd7cLLcAah7 + xD/bPqLKBBxJiFV7AjLXVkyNhFvtjB1fdqfAmlyBGFwrOGufKuBjS710ocS6bi9m + kqNxJjwpr7RIhj0f/zerJ4VS3ZeT2XeXBOTJ8jx4IkKWywgVa4nPVrSS8A706g== + -----END RSA PRIVATE KEY----- + +ssh_key_private_dest: "{{ ssh_user_home }}/.ssh/nodepool_id_rsa" diff --git a/ansible/group_vars/zuul-fingergw.yaml b/ansible/group_vars/zuul-fingergw.yaml new file mode 100644 index 0000000..ba723c0 --- /dev/null +++ b/ansible/group_vars/zuul-fingergw.yaml @@ -0,0 +1,34 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.zuul +zuul_file_fingergw_logging_conf_manage: true + +zuul_file_zuul_fingergw_service_config_manage: true +zuul_file_zuul_fingergw_service_manage: true + +zuul_service_zuul_fingergw_enabled: true +zuul_service_zuul_fingergw_manage: true +zuul_service_zuul_fingergw_state: started + +# openstack.logrotate +logrotate_configs: + - name: zuul-fingergw + log: /var/log/zuul/fingergw-debug.log /var/log/zuul/fingergw.log + options: + - compress + - missingok + - rotate 7 + - daily + - notifempty diff --git a/ansible/group_vars/zuul-merger.yaml b/ansible/group_vars/zuul-merger.yaml new file mode 100644 index 0000000..566f93e --- /dev/null +++ b/ansible/group_vars/zuul-merger.yaml @@ -0,0 +1,35 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.zuul +zuul_file_merger_logging_conf_manage: true + +zuul_file_zuul_merger_service_config_manage: true +zuul_file_zuul_merger_service_config_src: zuul/etc/systemd/system/zuul-merger.service.d/override.conf.j2 +zuul_file_zuul_merger_service_manage: true + +zuul_service_zuul_merger_enabled: true +zuul_service_zuul_merger_manage: true +zuul_service_zuul_merger_state: started + +# openstack.logrotate +logrotate_configs: + - name: zuul-merger + log: /var/log/zuul/merger-debug.log /var/log/zuul/merger.log + options: + - compress + - missingok + - rotate 7 + - daily + - notifempty diff --git a/ansible/group_vars/zuul-scheduler.yaml b/ansible/group_vars/zuul-scheduler.yaml new file mode 100644 index 0000000..66cb4d7 --- /dev/null +++ b/ansible/group_vars/zuul-scheduler.yaml @@ -0,0 +1,37 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.zuul +zuul_file_main_yaml_manage: true + +zuul_file_scheduler_logging_conf_manage: true + +zuul_file_zuul_scheduler_service_config_manage: true +zuul_file_zuul_scheduler_service_config_src: zuul/etc/systemd/system/zuul-scheduler.service.d/override.conf.j2 +zuul_file_zuul_scheduler_service_manage: true + +zuul_service_zuul_scheduler_enabled: true +zuul_service_zuul_scheduler_manage: true +zuul_service_zuul_scheduler_state: started + +# openstack.logrotate +logrotate_configs: + - name: zuul-scheduler + log: /var/log/zuul/scheduler-debug.log /var/log/zuul/scheduler.log + options: + - compress + - missingok + - rotate 7 + - daily + - notifempty diff --git a/ansible/group_vars/zuul-web.yaml b/ansible/group_vars/zuul-web.yaml new file mode 100644 index 0000000..4125d69 --- /dev/null +++ b/ansible/group_vars/zuul-web.yaml @@ -0,0 +1,35 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.zuul +zuul_file_web_logging_conf_manage: true + +zuul_file_zuul_web_service_config_manage: true +zuul_file_zuul_web_service_config_src: zuul/etc/systemd/system/zuul-web.service.d/override.conf.j2 +zuul_file_zuul_web_service_manage: true + +zuul_service_zuul_web_enabled: true +zuul_service_zuul_web_manage: true +zuul_service_zuul_web_state: started + +# openstack.logrotate +logrotate_configs: + - name: zuul-web + log: /var/log/zuul/web-debug.log /var/log/zuul/web.log + options: + - compress + - missingok + - rotate 7 + - daily + - notifempty diff --git a/ansible/group_vars/zuul.yaml b/ansible/group_vars/zuul.yaml new file mode 100644 index 0000000..e04e5e3 --- /dev/null +++ b/ansible/group_vars/zuul.yaml @@ -0,0 +1,141 @@ +# Copyright 2016 Red Hat, Inc. +# +# 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. +--- +# windmill.zuul +zuul_user_shell: /bin/bash + +zuul_file_main_yaml_src: "{{ windmill_config_git_dest }}/zuul/main.yaml" +zuul_file_zuul_conf_src: "{{ windmill_config_git_dest }}/zuul/zuul.conf.j2" + +zuul_pip_virtualenv_python: python3 +zuul_pip_virtualenv: /opt/venv/zuul + +zuul_file_executor_logging_conf_manage: false +zuul_file_fingergw_logging_conf_manage: false +zuul_file_gearman_logging_conf_manage: false +zuul_file_main_yaml_manage: false +zuul_file_merger_logging_conf_manage: false +zuul_file_scheduler_logging_conf_manage: false +zuul_file_web_logging_conf_manage: false + +zuul_file_zuul_executor_service_config_manage: false +zuul_file_zuul_executor_service_manage: false + +zuul_file_zuul_fingergw_service_config_manage: false +zuul_file_zuul_fingergw_service_manage: false + +zuul_file_zuul_merger_service_config_manage: false +zuul_file_zuul_merger_service_manage: false + +zuul_file_zuul_scheduler_service_config_manage: false +zuul_file_zuul_scheduler_service_manage: false + +zuul_file_zuul_web_service_config_manage: false +zuul_file_zuul_web_service_manage: false + +zuul_service_zuul_executor_enabled: false +zuul_service_zuul_executor_manage: false +zuul_service_zuul_executor_state: stopped + +zuul_service_zuul_fingergw_enabled: false +zuul_service_zuul_fingergw_manage: false +zuul_service_zuul_fingergw_state: stopped + +zuul_service_zuul_merger_enabled: false +zuul_service_zuul_merger_manage: false +zuul_service_zuul_merger_state: stopped + +zuul_service_zuul_scheduler_enabled: false +zuul_service_zuul_scheduler_manage: false +zuul_service_zuul_scheduler_state: stopped + +zuul_service_zuul_web_enabled: false +zuul_service_zuul_web_manage: false +zuul_service_zuul_web_state: stopped + +zuul_file_gearman_ssl_ca_content: | + -----BEGIN CERTIFICATE----- + MIIDmjCCAoKgAwIBAgIJAN8sAUG3GR9wMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNV + BAYTAlVTMQ4wDAYDVQQIDAVUZXhhczEPMA0GA1UEBwwGQXVzdGluMR0wGwYDVQQK + DBRPcGVuU3RhY2sgRm91bmRhdGlvbjETMBEGA1UEAwwKZ2Vhcm1hbi1jYTAeFw0x + ODAzMjgwM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TIFICATE----- + +zuul_file_gearman_ssl_cert_content: | + -----BEGIN CERTIFICATE----- + MIIDQTCCAikCCQDWIKrPJpjpMjANBgkqhkiG9w0BAQsFADBiMQswCQYDVQQGEwJV + UzEOMAwGA1UECAwFVGV4YXMxDzANBgNVBAcMBkF1c3RpbjEdMBsGA1UECgwUT3Bl + blN0YWNrIEZvdW5kYXRpb24xEzARBgNVBAMMCmdlYXJtYW4tY2EwHhcNMTgwMzI4 + MDIzNTAzWhcNMjgwMzI1MDIzNTAzWjBjMQswCQYDVQQGEwJVUzEOMAwGA1UECAwF + VGV4YXMxDzANBgNVBAcMBkF1c3RpbjEdMBsGA1UECgwUT3BlblN0YWNrIEZvdW5k + YXRpb24xFDASBgNVBAMMC3p1dWwtY2xpZW50MIIBIjANBgkqhkiG9w0BAQEFAAOC + AQ8AMIIBCgKCAQEA0lHkUiVv+xKNgpXeWh/mEjxVBLvY9X0Jv+cIRnT2jgTIXzDT + An6g0pgfVOtXJ+Zg4wpcQgreJXI1dqHzYfGp5SfOCJz8UAzarp8ISR0Dmv5iD9yo + 0++XJcfYSMI8if95jORCg07VrwcaA3G+EqVCrEV43rzbt+lwNuqaXUsAZsawV1GX + pNKBGUkMGaKbgOn+tBMTsplsYEgZDL9CjdWyZrmjdXe+/G86KbmBvxTVHOpsjVLZ + v6JHuPd8i21d4cBdpvZq1OjHMP+wyVOCited0U0ACq2tDy/JG7IZxTe93nIXnzbB + bTQ8bJmDt5xS9wR4sobih+HFuSwL05rfrRVNQwIDAQABMA0GCSqGSIb3DQEBCwUA + A4IBAQBfB1Cf1rbeym5VGubIlYr3u+mrn1stHDhBANxzazNkmmHXER4z4fJPgkq0 + 8Nkq0YUptfQeJ1yoEpVHqLOGCyvgff8MWxuBEQXJXahvlbS2fV73gqWXFq/RFGoc + PDSH2WLPqcYHDx7+083q6YrjuJTGNNcJYCYf3R3+V90JGrfoKhi3OL31gkGzuZUl + QPkgA7AlYi8tLPThCPF/0RFTlp+6mRCeT30GkrjZ9521tV3H0vfFIhKO0vGuNhLh + zLSZhFOb11cvw3HHpeWuSiqbNjLHbNXi3vqQIuOb+eYncapTkFQafaBj3Ho4dhxP + EcoJZhxBAsiPa3u08rhLyXnCNKrf + -----END CERTIFICATE----- + +zuul_file_gearman_ssl_key_content: | + -----BEGIN PRIVATE KEY----- + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDSUeRSJW/7Eo2C + ld5aH+YSPFUEu9j1fQm/5whGdPaOBMhfMNMCfqDSmB9U61cn5mDjClxCCt4lcjV2 + ofNh8anlJ84InPxQDNqunwhJHQOa/mIP3KjT75clx9hIwjyJ/3mM5EKDTtWvBxoD + cb4SpUKsRXjevNu36XA26ppdSwBmxrBXUZek0oEZSQwZopuA6f60ExOymWxgSBkM + v0KN1bJmuaN1d778bzopuYG/FNUc6myNUtm/oke493yLbV3hwF2m9mrU6Mcw/7DJ + U4KK153RTQAKra0PL8kbshnFN73echefNsFtNDxsmYO3nFL3BHiyhuKH4cW5LAvT + mt+tFU1DAgMBAAECggEAJ+24JQhKfCYHi5UcQ4vux+OAWIe5JtH4OeCIp6eo70ll + KP1B8iVMLu8Gc77CKycHmdLrtPYPOpi2IbGZXSzeDk1CRkxXcnMeSSyUDB1gA9rr + jwtbWfEQhvGr1BRcHe7Mir0DC5653qLAg4rihPOu9rmxusesBvxge2yKpc+JYfla + Kue6tii1D9w8QVG69pBltVd5QmY+r8rTl3CxaagIkzi5OX8KfTb6X1ALfs/XWsTx + v2OypDJpK5oliCszLpQd437wXIQ9JDWRlglBOK0PXdYQ8SRj00veZYgoQBUlmmeX + HxE4voAl34oq5AUhJQxaUFmQb+OFPAvVbz2vDIJdYQKBgQD9X/YRfOdCRVI9ro6O + Qs+fsISJqO4nDK2IHKUAfIc/HIQ6cqxquUf53vLm/+N5rPy03E3lvNzvNJH82VPX + nNZZNKPLPcA+irMP1WfmvQLSFLAuRDL8iXsiSYp5WZwji5wahGjy49Etw+K+Swdp + +VmSvu4P71ynaxYV0P09vw13uwKBgQDUf7vdxMHSjFWysRONVuOX+N/XUmSXoLCD + JZfKw4rldTnN3gp/A0xLpM4zZjJsdg3N/QlbDhDUYZjKa1ifSyRxLOJTTs15SoSj + rUm8cCp4onPGo8L4yi/nr+fjaL1aYl3L6nHMEsWGFeL1XHM5hQX6eK5+NNpxO6tZ + fbdjFp4UGQKBgBTlfijREU2Q5Ah8RfuLnQ4Bg9zKluGXlRQ9sIoKuyjEVE9xt7CR + mVMNRSEyB3O4hZrw9Ge3HM2Jm2SsE9Mbdz4iLkQL0rgVvlDW+9u2yO3EkQcvzriv + Kf2Y7Re3AT6ZPAWf1/v4N/87QY8KJxFhZDbLEl00E4MnPMoN02TtRdITAoGAaJxF + WQSOwl8RpTllPbRjsKH1WCQYn0ic/MMZ+djP3Owbu8wucJ6oBakpVcZe1mQ7oYeK + /odrI5K0TBoSc8DjPM/yzz5BCw/zQjyBy0GQtviKdGSUDDRE5xMC3kHmzcMVF9jf + kq4/DSZjJ5UOqGdjLQ4SINFWJF5SmWi5Sg+NXKkCgYEAzD22Q8ttCKORyg7/Zi+9 + 84bn2tirCKSWPYkx2Zs/XB8qgZCZJcA0XxvnHUepP0F7T9nrvgRLe2wjOKDi0OJh + QqE7FEp7UZbDEVLb1xBaijmjkuq300f4olW+UNKzC23kSiX/VL3ngpxt0saNTWN+ + GGE1XO4oxVDrkeDSIUmxN60= + -----END PRIVATE KEY----- diff --git a/ansible/hosts b/ansible/hosts new file mode 100644 index 0000000..29a3dd2 --- /dev/null +++ b/ansible/hosts @@ -0,0 +1,50 @@ +[disabled] + +[bastion] +bastion01 ansible_connection=local + +[gear] +gear01 ansible_host=127.0.2.1 + +[nodepool-builder] +nb01 ansible_host=127.0.1.1 + +[nodepool-launcher] +nl01 ansible_host=127.0.7.1 + +[nodepool:children] +nodepool-builder +nodepool-launcher + +[statsd] +statsd01 ansible_host=127.0.9.1 + +[zookeeper] +zk01 ansible_host=127.0.6.1 + +[zuul-executor] +ze01 ansible_host=127.0.3.1 + +[zuul-fingergw] +zf01 ansible_host=127.0.8.1 + +[zuul-merger] +zm01 ansible_host=127.0.4.1 + +[zuul-scheduler] +zs01 ansible_host=127.0.5.1 + +[zuul-web] +zw01 ansible_host=127.0.9.1 + +[zuul:children] +zuul-executor +zuul-fingergw +zuul-merger +zuul-scheduler +zuul-web + +[zuul-connections:children] +zuul-executor +zuul-merger +zuul-scheduler diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000..084f943 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,14 @@ +# This is a cross-platform list tracking distribution packages needed by tests; +# see http://docs.openstack.org/infra/bindep/ for additional information. + +dbus +libffi-devel [platform:rpm] +libffi-dev [platform:dpkg] +libselinux-python [platform:rpm] +libssl-dev [platform:dpkg] +openssl-devel [platform:rpm] +python2-dnf [platform:fedora] +python3-devel [platform:rpm] +python3-dev [platform:dpkg] +python-devel [platform:rpm] +python-dev [platform:dpkg] diff --git a/nodepool/clouds.yaml.j2 b/nodepool/clouds.yaml.j2 new file mode 100644 index 0000000..aa551fb --- /dev/null +++ b/nodepool/clouds.yaml.j2 @@ -0,0 +1,20 @@ +# This file is generated by Ansible +# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN +# +cache: + expiration: + server: 5 + port: 5 + +clouds: + openstackzuul: + auth: + auth_url: http://127.0.0.1/identity_admin + password: secretadmin + project_domain_id: default + project_name: demo + user_domain_id: default + username: demo + identity_api_version: '3' + region_name: RegionOne + volume_api_version: '2' diff --git a/nodepool/elements/README.rst b/nodepool/elements/README.rst new file mode 100644 index 0000000..4a2400c --- /dev/null +++ b/nodepool/elements/README.rst @@ -0,0 +1,4 @@ +DIB Elements +============ + +Elements used by diskimage-builder for building images with nodepool-builder. diff --git a/nodepool/elements/zuul-worker/README.rst b/nodepool/elements/zuul-worker/README.rst new file mode 100644 index 0000000..86a174f --- /dev/null +++ b/nodepool/elements/zuul-worker/README.rst @@ -0,0 +1,17 @@ +zuul-worker +=========== + +Setup a node to be a zuul worker + +User Creation +============= + +This element bakes in a ``zuul`` user on the host for the zuul-worker +process to log in with. + +By default login permissions (``authorized_keys``) will be populated +for the ``zuul`` user from ``~/.ssh/id_rsa.pub`` -- i.e. the public +key of the currently building user. Specify an alternative filename +in ``ZUUL_USER_SSH_PUBLIC_KEY`` to override this. + +The ``zuul`` user is provided with passwordless ``sudo`` access. diff --git a/nodepool/elements/zuul-worker/extra-data.d/60-zuul-user b/nodepool/elements/zuul-worker/extra-data.d/60-zuul-user new file mode 100755 index 0000000..1795ed8 --- /dev/null +++ b/nodepool/elements/zuul-worker/extra-data.d/60-zuul-user @@ -0,0 +1,16 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +ZUUL_USER_SSH_PUBLIC_KEY=${ZUUL_USER_SSH_PUBLIC_KEY:-$HOME/.ssh/id_rsa.pub} + +if [ ! -f $ZUUL_USER_SSH_PUBLIC_KEY ]; then + die "Can not find public key for zuul user!" +fi + +# save the public key inside the chroot +cat $ZUUL_USER_SSH_PUBLIC_KEY >> $TMP_HOOKS_PATH/zuul-user-ssh-public-key diff --git a/nodepool/elements/zuul-worker/install.d/10-pip-packages b/nodepool/elements/zuul-worker/install.d/10-pip-packages new file mode 100755 index 0000000..a8a0192 --- /dev/null +++ b/nodepool/elements/zuul-worker/install.d/10-pip-packages @@ -0,0 +1,26 @@ +#!/bin/bash +# +# 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. + +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -e + +# NOTE(pabelanger): This is to work around a bug in the zuul-jobs tox role, this +# is because ensure-tox installs into ~/.local/bin however ansible doesn't +# incude that within PATH by default. +pip install tox diff --git a/nodepool/elements/zuul-worker/install.d/60-zuul-worker b/nodepool/elements/zuul-worker/install.d/60-zuul-worker new file mode 100755 index 0000000..1904e80 --- /dev/null +++ b/nodepool/elements/zuul-worker/install.d/60-zuul-worker @@ -0,0 +1,33 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +# Add zuul user and group. Note we don't want to rely on +# "useradd"'s group adding behaviour, because it might differ across +# distros. +groupadd zuul +useradd -m zuul -g zuul -s /bin/bash + +cat > /etc/sudoers.d/zuul << EOF +zuul ALL=(ALL) NOPASSWD:ALL +EOF +chmod 0440 /etc/sudoers.d/zuul + +visudo -c || die "Error setting zuul sudo!" + +# this was copied from outside the chroot by extras.d +_pub_key=/tmp/in_target.d/zuul-user-ssh-public-key +if [ ! -f $_pub_key ]; then + die "Can not find Zuul public key!" +fi + +mkdir -p /home/zuul/.ssh +chmod 700 /home/zuul/.ssh +cp $_pub_key /home/zuul/.ssh/authorized_keys + +# cleanup everything to the right owner +chown -R zuul:zuul /home/zuul diff --git a/nodepool/nodepool.yaml.j2 b/nodepool/nodepool.yaml.j2 new file mode 100644 index 0000000..2d39407 --- /dev/null +++ b/nodepool/nodepool.yaml.j2 @@ -0,0 +1,48 @@ +# This file is generated by Ansible +# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN +# +elements-dir: /etc/nodepool/elements +images-dir: /opt/nodepool/images + +zookeeper-servers: +{% if 'zookeeper' in groups %} +{% for host in groups['zookeeper'] %} + - host: '{{ hostvars[host].ansible_host | ipwrap }}' + port: 2181 +{% endfor %} +{% endif %} + +labels: + - name: ubuntu-bionic + min-ready: 1 + +providers: + - name: openstackzuul + cloud: openstackzuul + diskimages: + - name: ubuntu-bionic + config-drive: true + pools: + - name: main + max-servers: 10 + labels: + - name: ubuntu-bionic + diskimage: ubuntu-bionic + min-ram: 8192 + console-log: true + +diskimages: + - name: ubuntu-bionic + elements: + - ubuntu-minimal + - growroot + - openssh-server + - simple-init + - vm + - zuul-worker + release: bionic + env-vars: + TMPDIR: /opt/nodepool/tmp + DIB_CHECKSUM: '1' + DIB_DEBIAN_COMPONENTS: 'main,universe' + DIB_IMAGE_CACHE: /opt/nodepool/cache diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..b2c729c --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +yamllint diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..dc4cecc --- /dev/null +++ b/tox.ini @@ -0,0 +1,31 @@ +[tox] +minversion = 1.4.2 +envlist = linters +skipsdist = True + +[testenv] +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +[testenv:linters] +basepython = python3 +whitelist_externals = bash +commands = + yamllint -s . + +[testenv:venv] +basepython = python3 +commands = {posargs} +passenv = + HOME + SSH_AUTH_SOCK + TERM + USER + +[flake8] +# E123, E125 skipped as they are invalid PEP-8. + +show-source = True +ignore = E123,E125 +builtins = _ +exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build diff --git a/zuul/main.yaml b/zuul/main.yaml new file mode 100644 index 0000000..dfa1354 --- /dev/null +++ b/zuul/main.yaml @@ -0,0 +1,6 @@ +# This file is generated by Ansible +# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN +# +--- +- tenant: + name: example diff --git a/zuul/zuul.conf.j2 b/zuul/zuul.conf.j2 new file mode 100644 index 0000000..797d256 --- /dev/null +++ b/zuul/zuul.conf.j2 @@ -0,0 +1,55 @@ +# This file is generated by Ansible +# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN +# +[zookeeper] +hosts = {{ groups['zookeeper'] | map('extract', hostvars, ['ansible_host']) | join(':2181,') }}:2181 + +[gearman] +port = 4730 +server = {{ hostvars['gear01'].ansible_host }} +ssl_ca = {{ zuul_file_gearman_ssl_ca_dest }} +ssl_cert = {{ zuul_file_gearman_ssl_cert_dest }} +ssl_key = {{ zuul_file_gearman_ssl_key_dest }} + +[gearman_server] +start = false + +[scheduler] +tenant_config = {{ zuul_file_main_yaml_dest }} +log_config = /etc/zuul/scheduler-logging.conf +pidfile = /var/run/zuul-scheduler/zuul-scheduler.pid +state_dir = {{ zuul_user_home }} + +{% if groups['statsd'] | list and ansible_host | ipv4 %} +[statsd] +server = {{ hostvars['statsd01'].ansible_host }} +{% endif %} + +[executor] +finger_port = 17979 +log_config = /etc/zuul/executor-logging.conf +private_key_file = {{ zuul_user_home }}/.ssh/nodepool_id_rsa +workspace_root = {{ zuul_user_home }}/workspace + +[fingergw] +listen_address = {{ hostvars['zf01'].ansible_host }} +log_config = /etc/zuul/fingergw-logging.conf +user = {{ zuul_user_name }} + +[merger] +git_dir = {{ zuul_user_home }}/git +git_user_email = windmill@example.org +git_user_name = windmill +log_config = /etc/zuul/merger-logging.conf +pidfile = /var/run/zuul-merger/zuul-merger.pid +zuul_url = {{ hostvars['zs01'].ansible_host }} + +[web] +log_config = /etc/zuul/web-logging.conf +listen_address = {{ hostvars['zw01'].ansible_host }} + +[connection gerrit] +driver = gerrit +server = 127.0.0.1 +sshkey = {{ zuul_user_home }}/.ssh/gerrit_id_rsa +user = windmill