├── .gitignore ├── .gitreview ├── CONTRIBUTING.rst ├── LICENSE ├── README.rst ├── Vagrantfile ├── bindep.txt ├── defaults └── main.yml ├── doc ├── Makefile ├── requirements.txt └── source │ ├── _static │ └── .gitkeep │ ├── conf.py │ ├── configure-aodh.rst │ └── index.rst ├── examples └── playbook.yml ├── handlers └── main.yml ├── manual-test.rc ├── meta ├── main.yml └── openstack-ansible.yml ├── releasenotes ├── notes │ ├── .placeholder │ ├── add-xenial-support-5c117335b7b7b407.yaml │ ├── aodh-init-config-overrides-f152b8fd098efb0d.yaml │ ├── aodh-service-setup-host-d28f6974160fd939.yaml │ ├── aodh_init_time_settings-9661d23a9bb6682c.yaml │ ├── capping_aodh_wsgi_processes-6db6da9ba36c8851.yaml │ ├── deprecate_auth_plugin-71a83567d996752e.yaml │ ├── journal-log-cxcb512642b49617.yaml │ ├── openstack-distribution-packages-416a67fc03d79dc9.yaml │ ├── os_aodh-centos-support-6817cfd617e83bec.yaml │ ├── os_aodh-only-install-venv-3c80a0a66824fcd7.yaml │ ├── oslo-messaging-separate-backends-60f81dae397b1c96.yaml │ ├── package-list-name-changes-4d5ad2e6ff5ecae2.yaml │ ├── package-state-b032231a3cc99ee0.yaml │ ├── remove-requirements-git-bed8d47512188ad1.yaml │ ├── removed-aodh-api-init-9e2406629196efff.yaml │ ├── use-galera-storage-d1a51c051d2740ad.yaml │ └── use-uwsgi-001d7b0c4d6def73.yaml └── source │ ├── _static │ └── .placeholder │ ├── _templates │ └── .placeholder │ ├── conf.py │ ├── index.rst │ ├── mitaka.rst │ ├── newton.rst │ ├── ocata.rst │ ├── pike.rst │ ├── queens.rst │ ├── rocky.rst │ ├── stein.rst │ ├── train.rst │ ├── unreleased.rst │ ├── ussuri.rst │ └── zed.rst ├── run_tests.sh ├── tasks ├── aodh_db_sync.yml ├── aodh_install.yml ├── aodh_post_install.yml ├── aodh_pre_install.yml └── main.yml ├── templates ├── aodh.conf.j2 └── api_paste.ini.j2 ├── tests ├── ansible-role-requirements.yml ├── group_vars │ └── all_containers.yml ├── host_vars │ ├── aodh.yml │ ├── gnocchi.yml │ ├── infra1.yml │ ├── localhost.yml │ └── openstack1.yml ├── inventory ├── os_aodh-overrides.yml ├── test-install-aodh.yml └── test.yml ├── tox.ini ├── vars ├── debian.yml ├── distro_install.yml ├── main.yml ├── redhat.yml └── source_install.yml └── zuul.d └── project.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # Add patterns in here to exclude files created by tools integrated with this 2 | # repository, such as test frameworks from the project's recommended workflow, 3 | # rendered documentation and package builds. 4 | # 5 | # Don't add patterns to exclude files created by preferred personal tools 6 | # (editors, IDEs, your operating system itself even). These should instead be 7 | # maintained outside the repository, for example in a ~/.gitignore file added 8 | # with: 9 | # 10 | # git config --global core.excludesfile '~/.gitignore' 11 | 12 | # Compiled source # 13 | ################### 14 | *.com 15 | *.class 16 | *.dll 17 | *.exe 18 | *.o 19 | *.so 20 | *.pyc 21 | build/ 22 | dist/ 23 | doc/build/ 24 | 25 | # Packages # 26 | ############ 27 | # it's better to unpack these files and commit the raw source 28 | # git has its own built in compression methods 29 | *.7z 30 | *.dmg 31 | *.gz 32 | *.iso 33 | *.jar 34 | *.rar 35 | *.tar 36 | *.zip 37 | 38 | # Logs and databases # 39 | ###################### 40 | *.log 41 | *.sql 42 | *.sqlite 43 | logs/* 44 | 45 | # OS generated files # 46 | ###################### 47 | ._* 48 | .tox 49 | *.egg-info 50 | .eggs 51 | .ansible 52 | 53 | # Generated by pbr while building docs 54 | ###################################### 55 | AUTHORS 56 | ChangeLog 57 | 58 | # Files created by releasenotes build 59 | releasenotes/build 60 | 61 | # Test temp files 62 | tests/common 63 | tests/*.retry 64 | 65 | # Vagrant artifacts 66 | .vagrant 67 | 68 | # Git clones 69 | openstack-ansible-ops 70 | previous 71 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=review.opendev.org 3 | port=29418 4 | project=openstack/openstack-ansible-os_aodh.git 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | The source repository for this project can be found at: 2 | 3 | https://opendev.org/openstack/openstack-ansible-os_aodh 4 | 5 | Pull requests submitted through GitHub are not monitored. 6 | 7 | To start contributing to OpenStack, follow the steps in the contribution guide 8 | to set up and use Gerrit: 9 | 10 | https://docs.openstack.org/contributors/code-and-documentation/quick-start.html 11 | 12 | Bugs should be filed on Launchpad: 13 | 14 | https://bugs.launchpad.net/openstack-ansible 15 | 16 | For more specific information about contributing to this repository, see the 17 | openstack-ansible contributor guide: 18 | 19 | https://docs.openstack.org/openstack-ansible/latest/contributor/contributing.html 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | Team and repository tags 3 | ======================== 4 | 5 | .. image:: https://governance.openstack.org/tc/badges/openstack-ansible-os_aodh.svg 6 | :target: https://governance.openstack.org/tc/reference/tags/index.html 7 | 8 | .. Change things from this point on 9 | 10 | OpenStack Aodh 11 | ############## 12 | 13 | Ansible role that installs and configures OpenStack Aodh as the alarm 14 | functionality of Telemetry. 15 | 16 | This role will install the following: 17 | * aodh-api 18 | * aodh-listener 19 | * aodh-evaluator 20 | * aodh-notifier 21 | 22 | The role will configure Aodh to use MongoDB for data storage, but does 23 | not install or configure MongoDB. 24 | 25 | Default Variables 26 | ================= 27 | 28 | .. literalinclude:: ../../defaults/main.yml 29 | :language: yaml 30 | :start-after: under the License. 31 | 32 | Required Variables 33 | ================== 34 | 35 | To use this role, define the following variables: 36 | 37 | .. code-block:: yaml 38 | 39 | # Needed for aodh to talk to MongoDB 40 | aodh_container_db_password: "secrete" 41 | # Password used for Keystone aodh service user 42 | aodh_service_password: "secrete" 43 | # Needed for aodh to talk to memcached 44 | memcached_servers: 127.0.0.1 45 | memcached_encryption_key: "some_key" 46 | # Needed for aodh to locate and connect to Oslo.Messaging 47 | aodh_oslomsg_rpc_transport: rabbit 48 | aodh_oslomsg_rpc_password: "secrete" 49 | aodh_oslomsg_rpc_servers: "10.100.100.2" 50 | aodh_oslomsg_rpc_use_ssl: true 51 | aodh_oslomsg_rpc_port: 5671 52 | aodh_oslomsg_notify_transport: rabbit 53 | aodh_oslomsg_notify_password: "secrete" 54 | aodh_oslomsg_notify_servers: "10.100.100.2" 55 | aodh_oslomsg_notify_use_ssl: true 56 | aodh_oslomsg_notify_port: 5671 57 | # Needed to setup the aodh service in Keystone 58 | keystone_admin_user_name: admin 59 | keystone_admin_tenant_name: admin 60 | keystone_auth_admin_password: "SuperSecretePassword" 61 | keystone_service_adminuri_insecure: false 62 | keystone_service_internaluri_insecure: false 63 | keystone_service_internaluri: "http://1.2.3.4:5000" 64 | keystone_service_internalurl: "{{ keystone_service_internaluri }}/v3" 65 | keystone_service_adminuri: "http://5.6.7.8:5000" 66 | keystone_service_adminurl: "{{ keystone_service_adminuri }}/v3" 67 | 68 | ====================== 69 | OpenStack-Ansible Aodh 70 | ====================== 71 | 72 | Ansible role to install OpenStack Aodh. 73 | 74 | Documentation for the project can be found at: 75 | https://docs.openstack.org/openstack-ansible-os_aodh/latest/ 76 | 77 | Release notes for the project can be found at: 78 | https://docs.openstack.org/releasenotes/openstack-ansible-os_aodh 79 | 80 | The project source code repository is located at: 81 | https://opendev.org/openstack/openstack-ansible-os_aodh/ 82 | 83 | The project home is at: 84 | https://launchpad.net/openstack-ansible 85 | 86 | The project bug tracker is located at: 87 | https://bugs.launchpad.net/openstack-ansible 88 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # Note: 2 | # This file is maintained in the openstack-ansible-tests repository. 3 | # https://opendev.org/openstack/openstack-ansible-tests/src/Vagrantfile 4 | # 5 | # If you need to perform any change on it, you should modify the central file, 6 | # then, an OpenStack CI job will propagate your changes to every OSA repository 7 | # since every repo uses the same Vagrantfile 8 | 9 | # Verify whether required plugins are installed. 10 | required_plugins = [ "vagrant-disksize" ] 11 | required_plugins.each do |plugin| 12 | if not Vagrant.has_plugin?(plugin) 13 | raise "The vagrant plugin #{plugin} is required. Please run `vagrant plugin install #{plugin}`" 14 | end 15 | end 16 | 17 | Vagrant.configure(2) do |config| 18 | config.vm.provider "virtualbox" do |v| 19 | v.memory = 6144 20 | v.cpus = 2 21 | # https://github.com/hashicorp/vagrant/issues/9524 22 | v.customize ["modifyvm", :id, "--audio", "none"] 23 | end 24 | 25 | config.vm.synced_folder ".", "/vagrant", type: "rsync" 26 | 27 | config.vm.provision "shell", 28 | privileged: false, 29 | inline: <<-SHELL 30 | cd /vagrant 31 | ./run_tests.sh 32 | SHELL 33 | 34 | config.vm.define "centos8" do |centos8| 35 | centos8.vm.box = "centos/8" 36 | end 37 | 38 | config.vm.define "debian10" do |debian10| 39 | debian10.vm.box = "debian/buster64" 40 | end 41 | 42 | config.vm.define "ubuntu2004" do |focal| 43 | focal.disksize.size = "40GB" 44 | focal.vm.box = "ubuntu/focal64" 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /bindep.txt: -------------------------------------------------------------------------------- 1 | # This file facilitates OpenStack-CI package installation 2 | # before the execution of any tests. 3 | # 4 | # See the following for details: 5 | # - https://docs.openstack.org/infra/bindep/ 6 | # - https://opendev.org/openstack-infra/bindep 7 | # 8 | # Even if the role does not make use of this facility, it 9 | # is better to have this file empty, otherwise OpenStack-CI 10 | # will fall back to installing its default packages which 11 | # will potentially be detrimental to the tests executed. 12 | # 13 | # Note: 14 | # This file is maintained in the openstack-ansible-tests repository. 15 | # https://opendev.org/openstack/openstack-ansible-tests/src/bindep.txt 16 | # If you need to remove or add extra dependencies, you should modify 17 | # the central file instead and once your change is accepted then update 18 | # this file as well. The purpose of this file is to ensure that Python and 19 | # Ansible have all their necessary binary requirements on the test host before 20 | # tox executes. Any binary requirements needed by services/roles should be 21 | # installed by those roles in their applicable package install tasks, not through 22 | # using this file. 23 | # 24 | 25 | # The gcc compiler 26 | gcc 27 | 28 | # Base requirements for Ubuntu 29 | git-core [platform:dpkg] 30 | libssl-dev [platform:dpkg] 31 | libffi-dev [platform:dpkg] 32 | python3 [platform:dpkg] 33 | python3-apt [platform:dpkg] 34 | python3-dev [platform:dpkg] 35 | 36 | # Base requirements for RPM distros 37 | gcc-c++ [platform:rpm] 38 | git [platform:rpm] 39 | libffi-devel [platform:rpm] 40 | openssl-devel [platform:rpm] 41 | python3-dnf [platform:fedora] 42 | python3-devel [platform:rpm] 43 | 44 | # For SELinux 45 | libselinux-python3 [platform:redhat] 46 | libsemanage-python3 [platform:redhat] 47 | iptables [platform:redhat] 48 | -------------------------------------------------------------------------------- /defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | ## Verbosity Options 17 | debug: false 18 | 19 | # Set the host which will execute the shade modules 20 | # for the service setup. The host must already have 21 | # clouds.yaml properly configured. 22 | aodh_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}" 23 | aodh_service_setup_host_python_interpreter: >- 24 | {{ 25 | openstack_service_setup_host_python_interpreter | default( 26 | (aodh_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) 27 | }} 28 | 29 | # Set the package install state for distribution packages 30 | # Options are 'present' and 'latest' 31 | aodh_package_state: "{{ package_state | default('latest') }}" 32 | 33 | # Set installation method. 34 | aodh_install_method: "{{ service_install_method | default('source') }}" 35 | aodh_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}" 36 | 37 | ## The git source/branch 38 | aodh_git_repo: https://opendev.org/openstack/aodh 39 | aodh_git_install_branch: master 40 | aodh_upper_constraints_url: >- 41 | {{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }} 42 | aodh_git_constraints: 43 | - "--constraint {{ aodh_upper_constraints_url }}" 44 | 45 | aodh_pip_install_args: "{{ pip_install_options | default('') }}" 46 | 47 | # Name of the virtual env to deploy into 48 | aodh_venv_tag: "{{ venv_tag | default('untagged') }}" 49 | aodh_bin: "{{ _aodh_bin }}" 50 | 51 | ## System info 52 | aodh_system_user_name: aodh 53 | aodh_system_group_name: aodh 54 | aodh_system_shell: /bin/false 55 | aodh_system_comment: aodh system user 56 | aodh_system_user_home: "/var/lib/{{ aodh_system_user_name }}" 57 | 58 | ## Database info 59 | aodh_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}" 60 | aodh_db_setup_python_interpreter: >- 61 | {{ 62 | openstack_db_setup_python_interpreter | default( 63 | (aodh_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) 64 | }} 65 | aodh_db_address: "{{ galera_address | default('127.0.0.1') }}" 66 | aodh_database_name: aodh 67 | aodh_database_user: aodh 68 | aodh_db_type: "mysql+pymysql" 69 | aodh_galera_use_ssl: "{{ galera_use_ssl | default(False) }}" 70 | aodh_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('') }}" 71 | aodh_connection_string: >- 72 | {{ aodh_db_type }}://{{ aodh_database_user }}:{{ aodh_container_db_password }}@{{ aodh_db_address }}:{{ aodh_galera_port }}/{{ aodh_database_name 73 | }}?charset=utf8{% if aodh_galera_use_ssl | bool %}&ssl_verify_cert=true{% 74 | if aodh_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ aodh_galera_ssl_ca_cert }}{% endif %}{% endif %} 75 | aodh_galera_port: "{{ galera_port | default('3306') }}" 76 | aodh_db_max_overflow: "{{ openstack_db_max_overflow | default('50') }}" 77 | aodh_db_max_pool_size: "{{ openstack_db_max_pool_size | default('5') }}" 78 | aodh_db_pool_timeout: "{{ openstack_db_pool_timeout | default('30') }}" 79 | aodh_db_connection_recycle_time: "{{ openstack_db_connection_recycle_time | default('600') }}" 80 | 81 | # Oslo Messaging 82 | # RPC 83 | aodh_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}" 84 | aodh_oslomsg_rpc_setup_host: "{{ (aodh_oslomsg_rpc_host_group in groups) | ternary(groups[aodh_oslomsg_rpc_host_group][0], 'localhost') }}" 85 | aodh_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}" 86 | aodh_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers | default('127.0.0.1') }}" 87 | aodh_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}" 88 | aodh_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}" 89 | aodh_oslomsg_rpc_userid: aodh 90 | aodh_oslomsg_rpc_policies: [] 91 | # vhost name depends on value of oslomsg_rabbit_quorum_queues. In case quorum queues 92 | # are not used - vhost name will be prefixed with leading `/`. 93 | aodh_oslomsg_rpc_vhost: 94 | - name: /aodh 95 | state: "{{ aodh_oslomsg_rabbit_quorum_queues | ternary('absent', 'present') }}" 96 | - name: aodh 97 | state: "{{ aodh_oslomsg_rabbit_quorum_queues | ternary('present', 'absent') }}" 98 | aodh_oslomsg_rpc_ssl_version: "{{ oslomsg_rpc_ssl_version | default('TLSv1_2') }}" 99 | aodh_oslomsg_rpc_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}" 100 | 101 | # Notify 102 | aodh_oslomsg_notify_configure: "{{ oslomsg_notify_configure | default(True) }}" 103 | aodh_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}" 104 | aodh_oslomsg_notify_setup_host: "{{ (aodh_oslomsg_notify_host_group in groups) | ternary(groups[aodh_oslomsg_notify_host_group][0], 'localhost') }}" 105 | aodh_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}" 106 | aodh_oslomsg_notify_servers: "{{ oslomsg_notify_servers | default('127.0.0.1') }}" 107 | aodh_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}" 108 | aodh_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}" 109 | aodh_oslomsg_notify_userid: "{{ aodh_oslomsg_rpc_userid }}" 110 | aodh_oslomsg_notify_password: "{{ aodh_oslomsg_rpc_password }}" 111 | aodh_oslomsg_notify_vhost: "{{ aodh_oslomsg_rpc_vhost }}" 112 | aodh_oslomsg_notify_ssl_version: "{{ oslomsg_notify_ssl_version | default('TLSv1_2') }}" 113 | aodh_oslomsg_notify_ssl_ca_file: "{{ oslomsg_notify_ssl_ca_file | default('') }}" 114 | aodh_oslomsg_notify_policies: [] 115 | 116 | ## RabbitMQ integration 117 | aodh_oslomsg_rabbit_quorum_queues: "{{ oslomsg_rabbit_quorum_queues | default(True) }}" 118 | aodh_oslomsg_rabbit_stream_fanout: "{{ oslomsg_rabbit_stream_fanout | default(aodh_oslomsg_rabbit_quorum_queues) }}" 119 | aodh_oslomsg_rabbit_transient_quorum_queues: "{{ oslomsg_rabbit_transient_quorum_queues | default(aodh_oslomsg_rabbit_stream_fanout) }}" 120 | aodh_oslomsg_rabbit_qos_prefetch_count: "{{ oslomsg_rabbit_qos_prefetch_count | default(aodh_oslomsg_rabbit_stream_fanout | ternary(10, 0)) }}" 121 | aodh_oslomsg_rabbit_queue_manager: "{{ oslomsg_rabbit_queue_manager | default(aodh_oslomsg_rabbit_quorum_queues) }}" 122 | aodh_oslomsg_rabbit_quorum_delivery_limit: "{{ oslomsg_rabbit_quorum_delivery_limit | default(0) }}" 123 | aodh_oslomsg_rabbit_quorum_max_memory_bytes: "{{ oslomsg_rabbit_quorum_max_memory_bytes | default(0) }}" 124 | 125 | ## uWSGI setup 126 | aodh_wsgi_threads: 1 127 | aodh_wsgi_processes_max: 16 128 | aodh_wsgi_processes: >- 129 | {{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, aodh_wsgi_processes_max] | min }} 130 | aodh_uwsgi_tls: 131 | crt: "{{ aodh_ssl_cert }}" 132 | key: "{{ aodh_ssl_key }}" 133 | 134 | # Aodh services info 135 | aodh_service_role_names: 136 | - admin 137 | - service 138 | aodh_service_token_roles: 139 | - service 140 | aodh_service_token_roles_required: "{{ openstack_service_token_roles_required | default(True) }}" 141 | 142 | ## Service Type and Data 143 | aodh_service_region: "{{ service_region | default('RegionOne') }}" 144 | aodh_service_endpoint_type: internalURL 145 | aodh_service_name: aodh 146 | aodh_service_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}" 147 | aodh_service_port: 8042 148 | aodh_service_proto: http 149 | aodh_service_publicuri_proto: "{{ openstack_service_publicuri_proto | default(aodh_service_proto) }}" 150 | aodh_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(aodh_service_proto) }}" 151 | aodh_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(aodh_service_proto) }}" 152 | aodh_service_type: alarming 153 | aodh_service_description: "Telemetry" 154 | aodh_service_project_domain_id: default 155 | aodh_service_user_domain_id: default 156 | aodh_service_user_name: aodh 157 | aodh_keystone_auth_plugin: "{{ aodh_keystone_auth_type }}" 158 | aodh_keystone_auth_type: password 159 | aodh_service_tenant_name: service 160 | aodh_service_project_name: service 161 | aodh_service_publicuri: "{{ aodh_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ aodh_service_port }}" 162 | aodh_service_publicurl: "{{ aodh_service_publicuri }}" 163 | aodh_service_internaluri: "{{ aodh_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ aodh_service_port }}" 164 | aodh_service_internalurl: "{{ aodh_service_internaluri }}" 165 | aodh_service_adminuri: "{{ aodh_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ aodh_service_port }}" 166 | aodh_service_adminurl: "{{ aodh_service_adminuri }}" 167 | 168 | aodh_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}" 169 | 170 | # Common pip packages 171 | aodh_pip_packages: 172 | - "git+{{ aodh_git_repo }}@{{ aodh_git_install_branch }}#egg=aodh" 173 | - aodh 174 | - ceilometermiddleware 175 | - cryptography 176 | - gnocchiclient 177 | - osprofiler 178 | - PyMySQL 179 | - pymemcache 180 | - python-memcached 181 | - sqlalchemy 182 | - sqlalchemy-utils 183 | - systemd-python 184 | - warlock 185 | aodh_user_pip_packages: [] 186 | 187 | aodh_memcached_servers: "{{ memcached_servers }}" 188 | 189 | aodh_alarm_notifier_init_overrides: {} 190 | aodh_alarm_evaluator_init_overrides: {} 191 | aodh_api_init_overrides: {} 192 | aodh_listener_init_overrides: {} 193 | 194 | ## Service Name-Group Mapping 195 | aodh_services: 196 | aodh-api: 197 | group: aodh_api 198 | service-name: aodh-api 199 | init_config_overrides: "{{ aodh_api_init_overrides }}" 200 | wsgi_app: true 201 | wsgi_name: aodh-api 202 | uwsgi_overrides: "{{ aodh_uwsgi_conf_overrides }}" 203 | uwsgi_port: "{{ aodh_service_port }}" 204 | uwsgi_bind_address: "{{ aodh_service_bind_address }}" 205 | uwsgi_tls: "{{ aodh_backend_ssl | ternary(aodh_uwsgi_tls, {}) }}" 206 | aodh-notifier: 207 | group: aodh_alarm_notifier 208 | service_name: aodh-notifier 209 | execstarts: "{{ aodh_bin }}/aodh-notifier" 210 | init_config_overrides: "{{ aodh_alarm_notifier_init_overrides }}" 211 | aodh-evaluator: 212 | group: aodh_alarm_evaluator 213 | service_name: aodh-evaluator 214 | execstarts: "{{ aodh_bin }}/aodh-evaluator" 215 | init_config_overrides: "{{ aodh_alarm_evaluator_init_overrides }}" 216 | aodh-listener: 217 | group: aodh_listener 218 | service_name: aodh-listener 219 | execstarts: "{{ aodh_bin }}/aodh-listener" 220 | init_config_overrides: "{{ aodh_listener_init_overrides }}" 221 | 222 | aodh_required_secrets: 223 | - memcached_encryption_key 224 | - aodh_container_db_password 225 | - aodh_oslomsg_rpc_password 226 | - aodh_oslomsg_notify_password 227 | - aodh_service_password 228 | 229 | install_test_packages: false 230 | 231 | ## Tunable overrides 232 | aodh_policy_overrides: {} 233 | aodh_aodh_conf_overrides: {} 234 | aodh_api_paste_ini_overrides: {} 235 | aodh_uwsgi_conf_overrides: {} 236 | 237 | ### 238 | ### Backend TLS 239 | ### 240 | 241 | # Define if communication between haproxy and service backends should be 242 | # encrypted with TLS. 243 | aodh_backend_ssl: "{{ openstack_service_backend_ssl | default(False) }}" 244 | 245 | # Storage location for SSL certificate authority 246 | aodh_pki_dir: "{{ openstack_pki_dir | default('/etc/openstack_deploy/pki') }}" 247 | 248 | # Delegated host for operating the certificate authority 249 | aodh_pki_setup_host: "{{ openstack_pki_setup_host | default('localhost') }}" 250 | 251 | # aodh server certificate 252 | aodh_pki_keys_path: "{{ aodh_pki_dir ~ '/certs/private/' }}" 253 | aodh_pki_certs_path: "{{ aodh_pki_dir ~ '/certs/certs/' }}" 254 | aodh_pki_intermediate_cert_name: "{{ openstack_pki_service_intermediate_cert_name | default('ExampleCorpIntermediate') }}" 255 | aodh_pki_regen_cert: "" 256 | aodh_pki_san: "{{ openstack_pki_san | default('DNS:' ~ ansible_facts['hostname'] ~ ',IP:' ~ management_address) }}" 257 | aodh_pki_certificates: 258 | - name: "aodh_{{ ansible_facts['hostname'] }}" 259 | provider: ownca 260 | cn: "{{ ansible_facts['hostname'] }}" 261 | san: "{{ aodh_pki_san }}" 262 | signed_by: "{{ aodh_pki_intermediate_cert_name }}" 263 | 264 | # aodh destination files for SSL certificates 265 | aodh_ssl_cert: /etc/aodh/aodh.pem 266 | aodh_ssl_key: /etc/aodh/aodh.key 267 | 268 | # Installation details for SSL certificates 269 | aodh_pki_install_certificates: 270 | - src: "{{ aodh_user_ssl_cert | default(aodh_pki_certs_path ~ 'aodh_' ~ ansible_facts['hostname'] ~ '-chain.crt') }}" 271 | dest: "{{ aodh_ssl_cert }}" 272 | owner: "{{ aodh_system_user_name }}" 273 | group: "{{ aodh_system_user_name }}" 274 | mode: "0644" 275 | - src: "{{ aodh_user_ssl_key | default(aodh_pki_keys_path ~ 'aodh_' ~ ansible_facts['hostname'] ~ '.key.pem') }}" 276 | dest: "{{ aodh_ssl_key }}" 277 | owner: "{{ aodh_system_user_name }}" 278 | group: "{{ aodh_system_user_name }}" 279 | mode: "0600" 280 | 281 | # Define user-provided SSL certificates 282 | # aodh_user_ssl_cert: 283 | # aodh_user_ssl_key: 284 | -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " applehelp to make an Apple Help Book" 34 | @echo " devhelp to make HTML files and a Devhelp project" 35 | @echo " epub to make an epub" 36 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 37 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 38 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 39 | @echo " text to make text files" 40 | @echo " man to make manual pages" 41 | @echo " texinfo to make Texinfo files" 42 | @echo " info to make Texinfo files and run them through makeinfo" 43 | @echo " gettext to make PO message catalogs" 44 | @echo " changes to make an overview of all changed/added/deprecated items" 45 | @echo " xml to make Docutils-native XML files" 46 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 47 | @echo " linkcheck to check all external links for integrity" 48 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 49 | @echo " coverage to run coverage check of the documentation (if enabled)" 50 | 51 | clean: 52 | rm -rf $(BUILDDIR)/* 53 | 54 | html: 55 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 56 | @echo 57 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 58 | 59 | dirhtml: 60 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 61 | @echo 62 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 63 | 64 | singlehtml: 65 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 66 | @echo 67 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 68 | 69 | pickle: 70 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 71 | @echo 72 | @echo "Build finished; now you can process the pickle files." 73 | 74 | json: 75 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 76 | @echo 77 | @echo "Build finished; now you can process the JSON files." 78 | 79 | htmlhelp: 80 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 81 | @echo 82 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 83 | ".hhp project file in $(BUILDDIR)/htmlhelp." 84 | 85 | qthelp: 86 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 87 | @echo 88 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 89 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 90 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/openstack-ansible-os_aodh.qhcp" 91 | @echo "To view the help file:" 92 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/openstack-ansible-os_aodh.qhc" 93 | 94 | applehelp: 95 | $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp 96 | @echo 97 | @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." 98 | @echo "N.B. You won't be able to view it unless you put it in" \ 99 | "~/Library/Documentation/Help or install it in your application" \ 100 | "bundle." 101 | 102 | devhelp: 103 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 104 | @echo 105 | @echo "Build finished." 106 | @echo "To view the help file:" 107 | @echo "# mkdir -p $$HOME/.local/share/devhelp/openstack-ansible-os_aodh" 108 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/openstack-ansible-os_aodh" 109 | @echo "# devhelp" 110 | 111 | epub: 112 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 113 | @echo 114 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 115 | 116 | latex: 117 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 118 | @echo 119 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 120 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 121 | "(use \`make latexpdf' here to do that automatically)." 122 | 123 | latexpdf: 124 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 125 | @echo "Running LaTeX files through pdflatex..." 126 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 127 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 128 | 129 | latexpdfja: 130 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 131 | @echo "Running LaTeX files through platex and dvipdfmx..." 132 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 133 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 134 | 135 | text: 136 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 137 | @echo 138 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 139 | 140 | man: 141 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 142 | @echo 143 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 144 | 145 | texinfo: 146 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 147 | @echo 148 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 149 | @echo "Run \`make' in that directory to run these through makeinfo" \ 150 | "(use \`make info' here to do that automatically)." 151 | 152 | info: 153 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 154 | @echo "Running Texinfo files through makeinfo..." 155 | make -C $(BUILDDIR)/texinfo info 156 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 157 | 158 | gettext: 159 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 160 | @echo 161 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 162 | 163 | changes: 164 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 165 | @echo 166 | @echo "The overview file is in $(BUILDDIR)/changes." 167 | 168 | linkcheck: 169 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 170 | @echo 171 | @echo "Link check complete; look for any errors in the above output " \ 172 | "or in $(BUILDDIR)/linkcheck/output.txt." 173 | 174 | doctest: 175 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 176 | @echo "Testing of doctests in the sources finished, look at the " \ 177 | "results in $(BUILDDIR)/doctest/output.txt." 178 | 179 | coverage: 180 | $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage 181 | @echo "Testing of coverage in the sources finished, look at the " \ 182 | "results in $(BUILDDIR)/coverage/python.txt." 183 | 184 | xml: 185 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 186 | @echo 187 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 188 | 189 | pseudoxml: 190 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 191 | @echo 192 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 193 | 194 | livehtml: html 195 | sphinx-autobuild -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 196 | -------------------------------------------------------------------------------- /doc/requirements.txt: -------------------------------------------------------------------------------- 1 | # The order of packages is significant, because pip processes them in the order 2 | # of appearance. Changing the order has an impact on the overall integration 3 | # process, which may cause wedges in the gate later. 4 | 5 | # WARNING: 6 | # This file is maintained in the openstack-ansible-tests repository. 7 | # https://opendev.org/openstack/openstack-ansible-tests/src/branch/master/sync/doc/requirements.txt 8 | # If you need to modify this file, update the one in the 9 | # openstack-ansible-tests repository. Once it merges there, the changes will 10 | # automatically be proposed to all the repositories which use it. 11 | 12 | sphinx>=2.0.0,!=2.1.0 # BSD 13 | sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD 14 | openstackdocstheme>=2.2.1 # Apache-2.0 15 | reno>=3.1.0 # Apache-2.0 16 | doc8>=0.6.0 # Apache-2.0 17 | -------------------------------------------------------------------------------- /doc/source/_static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/openstack-ansible-os_aodh/bb06623482d4d4ba638a30dd0ce46de9bb927234/doc/source/_static/.gitkeep -------------------------------------------------------------------------------- /doc/source/conf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # This file is execfile()d with the current directory set to its 17 | # containing dir. 18 | # 19 | # Note that not all possible configuration values are present in this 20 | # autogenerated file. 21 | # 22 | # All configuration values have a default; values that are commented out 23 | # serve to show the default. 24 | 25 | # If extensions (or modules to document with autodoc) are in another directory, 26 | # add these directories to sys.path here. If the directory is relative to the 27 | # documentation root, use os.path.abspath to make it absolute, like shown here. 28 | # sys.path.insert(0, os.path.abspath('.')) 29 | 30 | # -- General configuration ------------------------------------------------ 31 | 32 | # If your documentation needs a minimal Sphinx version, state it here. 33 | # needs_sphinx = '1.0' 34 | 35 | # Add any Sphinx extension module names here, as strings. They can be 36 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 37 | # ones. 38 | extensions = [ 39 | 'openstackdocstheme', 40 | 'sphinx.ext.autodoc', 41 | 'sphinxcontrib.rsvgconverter', 42 | ] 43 | 44 | # Add any paths that contain templates here, relative to this directory. 45 | templates_path = ['_templates'] 46 | 47 | # The suffix(es) of source filenames. 48 | # You can specify multiple suffix as a list of string: 49 | # source_suffix = ['.rst', '.md'] 50 | source_suffix = '.rst' 51 | 52 | # The encoding of source files. 53 | # source_encoding = 'utf-8-sig' 54 | 55 | # The master toctree document. 56 | master_doc = 'index' 57 | 58 | # General information about the project. 59 | author = 'OpenStack-Ansible Contributors' 60 | category = 'Miscellaneous' 61 | copyright = '2014-2016, OpenStack-Ansible Contributors' 62 | description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.' 63 | project = 'OpenStack-Ansible' 64 | role_name = 'os_aodh' 65 | target_name = 'openstack-ansible-' + role_name 66 | title = 'OpenStack-Ansible Documentation: ' + role_name + ' role' 67 | 68 | # openstackdocstheme options 69 | openstackdocs_repo_name = 'openstack/' + target_name 70 | openstackdocs_pdf_link = True 71 | openstackdocs_bug_project = project.lower() 72 | openstackdocs_bug_tag = '' 73 | 74 | # The language for content autogenerated by Sphinx. Refer to documentation 75 | # for a list of supported languages. 76 | # 77 | # This is also used if you do content translation via gettext catalogs. 78 | # Usually you set "language" from the command line for these cases. 79 | language = 'en' 80 | 81 | # There are two options for replacing |today|: either, you set today to some 82 | # non-false value, then it is used: 83 | # today = '' 84 | # Else, today_fmt is used as the format for a strftime call. 85 | # today_fmt = '%B %d, %Y' 86 | 87 | # List of patterns, relative to source directory, that match files and 88 | # directories to ignore when looking for source files. 89 | exclude_patterns = [] 90 | 91 | # The reST default role (used for this markup: `text`) to use for all 92 | # documents. 93 | # default_role = None 94 | 95 | # If true, '()' will be appended to :func: etc. cross-reference text. 96 | # add_function_parentheses = True 97 | 98 | # If true, the current module name will be prepended to all description 99 | # unit titles (such as .. function::). 100 | # add_module_names = True 101 | 102 | # If true, sectionauthor and moduleauthor directives will be shown in the 103 | # output. They are ignored by default. 104 | # show_authors = False 105 | 106 | # The name of the Pygments (syntax highlighting) style to use. 107 | pygments_style = 'native' 108 | 109 | # A list of ignored prefixes for module index sorting. 110 | # modindex_common_prefix = [] 111 | 112 | # If true, keep warnings as "system message" paragraphs in the built documents. 113 | # keep_warnings = False 114 | 115 | # If true, `todo` and `todoList` produce output, else they produce nothing. 116 | todo_include_todos = False 117 | 118 | 119 | # -- Options for HTML output ---------------------------------------------- 120 | 121 | # The theme to use for HTML and HTML Help pages. See the documentation for 122 | # a list of builtin themes. 123 | html_theme = 'openstackdocs' 124 | 125 | # Theme options are theme-specific and customize the look and feel of a theme 126 | # further. For a list of options available for each theme, see the 127 | # documentation. 128 | # html_theme_options = {} 129 | 130 | # Add any paths that contain custom themes here, relative to this directory. 131 | # html_theme_path = [] 132 | 133 | # The name for this set of Sphinx documents. If None, it defaults to 134 | # " v documentation". 135 | # html_title = None 136 | 137 | # A shorter title for the navigation bar. Default is the same as html_title. 138 | # html_short_title = None 139 | 140 | # The name of an image file (relative to this directory) to place at the top 141 | # of the sidebar. 142 | # html_logo = None 143 | 144 | # The name of an image file (within the static path) to use as favicon of the 145 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 146 | # pixels large. 147 | # html_favicon = None 148 | 149 | # Add any paths that contain custom static files (such as style sheets) here, 150 | # relative to this directory. They are copied after the builtin static files, 151 | # so a file named "default.css" will overwrite the builtin "default.css". 152 | html_static_path = ['_static'] 153 | 154 | # Add any extra paths that contain custom files (such as robots.txt or 155 | # .htaccess) here, relative to this directory. These files are copied 156 | # directly to the root of the documentation. 157 | # html_extra_path = [] 158 | 159 | # If true, SmartyPants will be used to convert quotes and dashes to 160 | # typographically correct entities. 161 | # html_use_smartypants = True 162 | 163 | # Custom sidebar templates, maps document names to template names. 164 | # html_sidebars = {} 165 | 166 | # Additional templates that should be rendered to pages, maps page names to 167 | # template names. 168 | # html_additional_pages = {} 169 | 170 | # If false, no module index is generated. 171 | # html_domain_indices = True 172 | 173 | # If false, no index is generated. 174 | # html_use_index = True 175 | 176 | # If true, the index is split into individual pages for each letter. 177 | # html_split_index = False 178 | 179 | # If true, links to the reST sources are added to the pages. 180 | # html_show_sourcelink = True 181 | 182 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 183 | # html_show_sphinx = True 184 | 185 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 186 | # html_show_copyright = True 187 | 188 | # If true, an OpenSearch description file will be output, and all pages will 189 | # contain a tag referring to it. The value of this option must be the 190 | # base URL from which the finished HTML is served. 191 | # html_use_opensearch = '' 192 | 193 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 194 | # html_file_suffix = None 195 | 196 | # Language to be used for generating the HTML full-text search index. 197 | # Sphinx supports the following languages: 198 | # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' 199 | # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr' 200 | # html_search_language = 'en' 201 | 202 | # A dictionary with options for the search language support, empty by default. 203 | # Now only 'ja' uses this config value 204 | # html_search_options = {'type': 'default'} 205 | 206 | # The name of a javascript file (relative to the configuration directory) that 207 | # implements a search results scorer. If empty, the default will be used. 208 | # html_search_scorer = 'scorer.js' 209 | 210 | # Output file base name for HTML help builder. 211 | htmlhelp_basename = target_name + '-docs' 212 | 213 | # -- Options for LaTeX output --------------------------------------------- 214 | 215 | latex_elements = { 216 | # The paper size ('letterpaper' or 'a4paper'). 217 | # 'papersize': 'letterpaper', 218 | 219 | # The font size ('10pt', '11pt' or '12pt'). 220 | # 'pointsize': '10pt', 221 | 222 | # Additional stuff for the LaTeX preamble. 223 | # 'preamble': '', 224 | 225 | # Latex figure (float) alignment 226 | # 'figure_align': 'htbp', 227 | } 228 | 229 | # Grouping the document tree into LaTeX files. List of tuples 230 | # (source start file, target name, title, 231 | # author, documentclass [howto, manual, or own class]). 232 | latex_documents = [ 233 | (master_doc, 'doc-' + target_name + '.tex', 234 | title.replace("_", r"\_"), author, 'manual'), 235 | ] 236 | 237 | latex_use_xindy = False 238 | 239 | # The name of an image file (relative to this directory) to place at the top of 240 | # the title page. 241 | # latex_logo = None 242 | 243 | # For "manual" documents, if this is true, then toplevel headings are parts, 244 | # not chapters. 245 | # latex_use_parts = False 246 | 247 | # If true, show page references after internal links. 248 | # latex_show_pagerefs = False 249 | 250 | # If true, show URL addresses after external links. 251 | # latex_show_urls = False 252 | 253 | # Documents to append as an appendix to all manuals. 254 | # latex_appendices = [] 255 | 256 | # If false, no module index is generated. 257 | # latex_domain_indices = True 258 | 259 | 260 | # -- Options for manual page output --------------------------------------- 261 | 262 | # One entry per manual page. List of tuples 263 | # (source start file, name, description, authors, manual section). 264 | man_pages = [ 265 | (master_doc, target_name, 266 | title, [author], 1) 267 | ] 268 | 269 | # If true, show URL addresses after external links. 270 | # man_show_urls = False 271 | 272 | 273 | # -- Options for Texinfo output ------------------------------------------- 274 | 275 | # Grouping the document tree into Texinfo files. List of tuples 276 | # (source start file, target name, title, author, 277 | # dir menu entry, description, category) 278 | texinfo_documents = [ 279 | (master_doc, target_name, 280 | title, author, project, 281 | description, category), 282 | ] 283 | 284 | # Documents to append as an appendix to all manuals. 285 | # texinfo_appendices = [] 286 | 287 | # If false, no module index is generated. 288 | # texinfo_domain_indices = True 289 | 290 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 291 | # texinfo_show_urls = 'footnote' 292 | 293 | # If true, do not generate a @detailmenu in the "Top" node's menu. 294 | # texinfo_no_detailmenu = False 295 | # -- Options for PDF output -------------------------------------------------- 296 | 297 | pdf_documents = [ 298 | (master_doc, target_name, 299 | title, author) 300 | ] 301 | 302 | locale_dirs = ['locale/'] 303 | -------------------------------------------------------------------------------- /doc/source/configure-aodh.rst: -------------------------------------------------------------------------------- 1 | ======================================= 2 | Configuring the Aodh service (optional) 3 | ======================================= 4 | 5 | The Telemetry alarming services perform the following functions: 6 | 7 | - Creates an API endpoint for controlling alarms. 8 | 9 | - Allows you to set alarms based on threshold evaluation for a collection of 10 | samples. 11 | 12 | 13 | 14 | Configuring the hosts 15 | ~~~~~~~~~~~~~~~~~~~~~ 16 | 17 | Configure Aodh by specifying the ``metering-alarm_hosts`` directive in 18 | the ``/etc/openstack_deploy/conf.d/aodh.yml`` file. The following shows 19 | the example included in the 20 | ``etc/openstack_deploy/conf.d/aodh.yml.example`` file: 21 | 22 | .. code-block:: yaml 23 | 24 | # The infra nodes that the Aodh services run on. 25 | metering-alarm_hosts: 26 | infra1: 27 | ip: 172.20.236.111 28 | infra2: 29 | ip: 172.20.236.112 30 | infra3: 31 | ip: 172.20.236.113 32 | 33 | The ``metering-alarm_hosts`` provides several services: 34 | 35 | - An API server (``aodh-api``): Runs on one or more central management 36 | servers to provide access to the alarm information in the 37 | data store. 38 | 39 | - An alarm evaluator (``aodh-evaluator``): Runs on one or more central 40 | management servers to determine alarm fire due to the 41 | associated statistic trend crossing a threshold over a sliding 42 | time window. 43 | 44 | - A notification listener (``aodh-listener``): Runs on a central 45 | management server and fire alarms based on defined rules against 46 | event captured by ceilometer's module's notification agents. 47 | 48 | - An alarm notifier (``aodh-notifier``). Runs on one or more central 49 | management servers to allow the setting of alarms to base on the 50 | threshold evaluation for a collection of samples. 51 | 52 | These services communicate by using the OpenStack messaging bus. Only 53 | the API server has access to the data store. 54 | 55 | To install aodh on an existing OpenStack-Ansible environment, run the 56 | ``os-aodh-install.yml`` playbook. 57 | -------------------------------------------------------------------------------- /doc/source/index.rst: -------------------------------------------------------------------------------- 1 | =============================== 2 | Aodh role for OpenStack-Ansible 3 | =============================== 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | configure-aodh.rst 9 | 10 | To clone or view the source code for this repository, visit the role repository 11 | for `os_aodh `_. 12 | 13 | Default variables 14 | ~~~~~~~~~~~~~~~~~ 15 | 16 | .. literalinclude:: ../../defaults/main.yml 17 | :language: yaml 18 | :start-after: under the License. 19 | 20 | Example playbook 21 | ~~~~~~~~~~~~~~~~ 22 | 23 | .. literalinclude:: ../../examples/playbook.yml 24 | :language: yaml 25 | 26 | Dependencies 27 | ~~~~~~~~~~~~ 28 | 29 | This role needs pip >= 7.1 installed on the target host. 30 | 31 | To use this role, define the following variables: 32 | 33 | .. code-block:: yaml 34 | 35 | # Needed for aodh to talk to MongoDB 36 | aodh_container_db_password: "secrete" 37 | # Password used for Keystone aodh service user 38 | aodh_service_password: "secrete" 39 | # Needed for aodh to talk to memcached 40 | memcached_servers: 127.0.0.1 41 | memcached_encryption_key: "some_key" 42 | # Needed for aodh to locate and connect to Oslo.Messaging 43 | aodh_oslomsg_rpc_transport: rabbit 44 | aodh_oslomsg_rpc_password: "secrete" 45 | aodh_oslomsg_rpc_servers: "10.100.100.2" 46 | aodh_oslomsg_rpc_use_ssl: true 47 | aodh_oslomsg_rpc_port: 5671 48 | aodh_oslomsg_notify_transport: rabbit 49 | aodh_oslomsg_notify_password: "secrete" 50 | aodh_oslomsg_notify_servers: "10.100.100.2" 51 | aodh_oslomsg_notify_use_ssl: true 52 | aodh_oslomsg_notify_port: 5671 53 | # Needed to setup the aodh service in Keystone 54 | keystone_admin_user_name: admin 55 | keystone_admin_tenant_name: admin 56 | keystone_auth_admin_password: "SuperSecretePassword" 57 | keystone_service_adminuri_insecure: false 58 | keystone_service_internaluri_insecure: false 59 | keystone_service_internaluri: "http://1.2.3.4:5000" 60 | keystone_service_internalurl: "{{ keystone_service_internaluri }}/v3" 61 | keystone_service_adminuri: "http://5.6.7.8:5000" 62 | keystone_service_adminurl: "{{ keystone_service_adminuri }}/v3" 63 | 64 | Tags 65 | ~~~~ 66 | 67 | This role supports two tags: ``aodh-install`` and 68 | ``aodh-config``. The ``aodh-install`` tag can be used to install 69 | and upgrade. The ``aodh-config`` tag can be used to maintain the 70 | configuration of the service. 71 | -------------------------------------------------------------------------------- /examples/playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install aodh services 3 | hosts: aodh_all 4 | user: root 5 | roles: 6 | - role: "os_aodh" 7 | vars: 8 | # Needed for aodh to talk to MongoDB 9 | aodh_container_db_password: "secrete" 10 | # Password used for Keystone aodh service user 11 | aodh_service_password: "secrete" 12 | # Needed for aodh to talk to memcached 13 | memcached_servers: 127.0.0.1 14 | memcached_encryption_key: "some_key" 15 | # Needed for aodh to locate and connect to Oslo.Messaging 16 | aodh_oslomsg_rpc_password: "secrete" 17 | # Needed to setup the aodh service in Keystone 18 | keystone_admin_user_name: admin 19 | keystone_admin_tenant_name: admin 20 | keystone_auth_admin_password: "SuperSecretePassword" 21 | keystone_service_adminuri_insecure: false 22 | keystone_service_internaluri_insecure: false 23 | keystone_service_internaluri: "http://1.2.3.4:5000" 24 | keystone_service_internalurl: "{{ keystone_service_internaluri }}/v3" 25 | keystone_service_adminuri: "http://5.6.7.8:5000" 26 | keystone_service_adminurl: "{{ keystone_service_adminuri }}/v3" 27 | galera_root_user: root 28 | vars_prompt: 29 | - name: "galera_root_password" 30 | prompt: "What is galera_root_password?" 31 | -------------------------------------------------------------------------------- /handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | - name: Stop services 17 | ansible.builtin.service: 18 | name: "{{ item.service_name }}" 19 | enabled: true 20 | state: "stopped" 21 | daemon_reload: true 22 | with_items: "{{ filtered_aodh_services }}" 23 | register: _stop 24 | until: _stop is success 25 | retries: 5 26 | delay: 2 27 | listen: 28 | - "Restart aodh services" 29 | - "venv changed" 30 | - "systemd service changed" 31 | - "cert installed" 32 | 33 | - name: Start services 34 | ansible.builtin.service: 35 | name: "{{ item.service_name }}" 36 | enabled: true 37 | state: "started" 38 | daemon_reload: true 39 | with_items: "{{ filtered_aodh_services }}" 40 | register: _start 41 | until: _start is success 42 | retries: 5 43 | delay: 2 44 | listen: 45 | - "Restart aodh services" 46 | - "venv changed" 47 | - "systemd service changed" 48 | - "cert installed" 49 | -------------------------------------------------------------------------------- /manual-test.rc: -------------------------------------------------------------------------------- 1 | export VIRTUAL_ENV=$(pwd) 2 | export ANSIBLE_HOST_KEY_CHECKING=False 3 | export ANSIBLE_SSH_CONTROL_PATH=/tmp/%%h-%%r 4 | 5 | # TODO (odyssey4me) These are only here as they are non-standard folder 6 | # names for Ansible 1.9.x. We are using the standard folder names for 7 | # Ansible v2.x. We can remove this when we move to Ansible 2.x. 8 | export ANSIBLE_ACTION_PLUGINS=${HOME}/.ansible/plugins/action 9 | export ANSIBLE_CALLBACK_PLUGINS=${HOME}/.ansible/plugins/callback 10 | export ANSIBLE_FILTER_PLUGINS=${HOME}/.ansible/plugins/filter 11 | export ANSIBLE_LOOKUP_PLUGINS=${HOME}/.ansible/plugins/lookup 12 | 13 | # This is required as the default is the current path or a path specified 14 | # in ansible.cfg 15 | export ANSIBLE_LIBRARY=${HOME}/.ansible/plugins/library 16 | 17 | # This is required as the default is '/etc/ansible/roles' or a path 18 | # specified in ansible.cfg 19 | export ANSIBLE_ROLES_PATH=${HOME}/.ansible/roles:$(pwd)/.. 20 | 21 | export ANSIBLE_SSH_ARGS="-o ControlMaster=no \ 22 | -o UserKnownHostsFile=/dev/null \ 23 | -o StrictHostKeyChecking=no \ 24 | -o ServerAliveInterval=64 \ 25 | -o ServerAliveCountMax=1024 \ 26 | -o Compression=no \ 27 | -o TCPKeepAlive=yes \ 28 | -o VerifyHostKeyDNS=no \ 29 | -o ForwardX11=no \ 30 | -o ForwardAgent=yes" 31 | 32 | echo "Run manual functional tests by executing the following:" 33 | echo "# ./.tox/functional/bin/ansible-playbook -i tests/inventory tests/test.yml" 34 | -------------------------------------------------------------------------------- /meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | galaxy_info: 17 | author: rcbops 18 | description: Installation and setup of aodh 19 | company: Rackspace 20 | license: Apache2 21 | role_name: os_aodh 22 | namespace: openstack 23 | min_ansible_version: "2.10" 24 | platforms: 25 | - name: Debian 26 | versions: 27 | - bullseye 28 | - name: Ubuntu 29 | versions: 30 | - focal 31 | - jammy 32 | - name: EL 33 | versions: 34 | - "9" 35 | galaxy_tags: 36 | - cloud 37 | - python 38 | - ceilometer 39 | - aodh 40 | - development 41 | - openstack 42 | dependencies: 43 | - role: apt_package_pinning 44 | when: 45 | - ansible_facts['pkg_mgr'] == 'apt' 46 | -------------------------------------------------------------------------------- /meta/openstack-ansible.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # (c) 2017, Jean-Philippe Evrard 17 | 18 | maturity_info: 19 | status: complete 20 | created_during: mitaka 21 | -------------------------------------------------------------------------------- /releasenotes/notes/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/openstack-ansible-os_aodh/bb06623482d4d4ba638a30dd0ce46de9bb927234/releasenotes/notes/.placeholder -------------------------------------------------------------------------------- /releasenotes/notes/add-xenial-support-5c117335b7b7b407.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | feature: 3 | - Support has been added to deploy Aodh services for Ubuntu 16.04 LTS. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/aodh-init-config-overrides-f152b8fd098efb0d.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - New variables have been added to allow a deployer to customize 4 | a aodh systemd unit file to their liking. 5 | - The task dropping the aodh systemd unit files now uses the 6 | ``config_template`` action plugin allowing deployers access to 7 | customize the unit files as they see fit without having to 8 | load extra options into the defaults and polute the generic 9 | systemd unit file with jinja2 variables and conditionals. 10 | 11 | -------------------------------------------------------------------------------- /releasenotes/notes/aodh-service-setup-host-d28f6974160fd939.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The service setup in keystone for aodh will now be executed 5 | through delegation to the ``aodh_service_setup_host`` which, 6 | by default, is ``localhost`` (the deploy host). Deployers can 7 | opt to rather change this to the utility container by implementing 8 | the following override in ``user_variables.yml``. 9 | 10 | .. code-block:: yaml 11 | 12 | aodh_service_setup_host: "{{ groups['utility_all'][0] }}" 13 | 14 | deprecations: 15 | - | 16 | The variable ``aodh_requires_pip_packages`` is no longer required 17 | and has therefore been removed. 18 | -------------------------------------------------------------------------------- /releasenotes/notes/aodh_init_time_settings-9661d23a9bb6682c.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - For the ``os_aodh`` role, the systemd unit ``TimeoutSec`` value which 4 | controls the time between sending a SIGTERM signal and a SIGKILL signal 5 | when stopping or restarting the service has been reduced from 300 seconds 6 | to 120 seconds. This provides 2 minutes for long-lived sessions to drain 7 | while preventing new ones from starting before a restart or a stop. The 8 | ``RestartSec`` value which controls the time between the service stop and 9 | start when restarting has been reduced from 150 seconds to 2 seconds to 10 | make the restart happen faster. These values can be adjusted by using the 11 | ``aodh_*_init_config_overrides`` variables which use the 12 | ``config_template`` task to change template defaults. 13 | upgrade: 14 | - For the ``os_aodh`` role, the systemd unit ``TimeoutSec`` value which 15 | controls the time between sending a SIGTERM signal and a SIGKILL signal 16 | when stopping or restarting the service has been reduced from 300 seconds 17 | to 120 seconds. This provides 2 minutes for long-lived sessions to drain 18 | while preventing new ones from starting before a restart or a stop. The 19 | ``RestartSec`` value which controls the time between the service stop and 20 | start when restarting has been reduced from 150 seconds to 2 seconds to 21 | make the restart happen faster. These values can be adjusted by using the 22 | ``aodh_*_init_config_overrides`` variables which use the 23 | ``config_template`` task to change template defaults. 24 | -------------------------------------------------------------------------------- /releasenotes/notes/capping_aodh_wsgi_processes-6db6da9ba36c8851.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Capping the default value for the variable ``aodh_wsgi_processes`` 4 | to 16 when the user doesn't configure this variable. Default value 5 | is twice the number of vCPUs available on the machine with a capping 6 | value of 16. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_auth_plugin-71a83567d996752e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - The ``aodh_keystone_auth_plugin`` variable has been deprecated. 4 | ``aodh_keystone_auth_type`` should be used instead to configure 5 | authentication type. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/journal-log-cxcb512642b49617.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - The log path, ``/var/log/aodh`` is no longer used to capture service 4 | logs. All logging for the aodh service will now be sent directly to the 5 | systemd journal. 6 | other: 7 | - When running aodh with apache(httpd) all apache logs will be stored in 8 | the standard apache log directory which is controlled by the distro specific 9 | variable ``aodh_apache_default_log_folder``. 10 | -------------------------------------------------------------------------------- /releasenotes/notes/openstack-distribution-packages-416a67fc03d79dc9.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The role now supports using the distribution packages for the OpenStack 5 | services instead of the pip ones. This feature is disabled by default 6 | and can be enabled by simply setting the ``aodh_install_method`` 7 | variable to ``distro``. 8 | -------------------------------------------------------------------------------- /releasenotes/notes/os_aodh-centos-support-6817cfd617e83bec.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - CentOS7/RHEL support has been added to the os_aodh role. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/os_aodh-only-install-venv-3c80a0a66824fcd7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - Installation of aodh and its dependent pip packages will now only 4 | occur within a Python virtual environment. The ``aodh_venv_enabled`` 5 | and ``aodh_venv_bin`` variables have been removed. -------------------------------------------------------------------------------- /releasenotes/notes/oslo-messaging-separate-backends-60f81dae397b1c96.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Support separate oslo.messaging services for RPC and Notifications 4 | to enable operation of separate and different messaging backend 5 | servers in aodh. 6 | deprecations: 7 | - | 8 | The rabbitmq server parameters have been replaced by corresponding 9 | oslo.messaging RPC and Notify parameters in order to abstract the 10 | messaging service from the actual backend server deployment. 11 | - aodh_oslomsg_rpc_servers replaces aodh_rabbitmq_servers 12 | - aodh_oslomsg_rpc_port replaces aodh_rabbitmq_port 13 | - aodh_oslomsg_rpc_use_ssl replaces aodh_rabbitmq_use_ssl 14 | - aodh_oslomsg_rpc_userid replaces aodh_rabbitmq_userid 15 | - aodh_oslomsg_rpc_vhost replaces aodh_rabbitmq_vhost 16 | - aodh_oslomsg_rpc_password replaces aodh_rabbitmq_password 17 | -------------------------------------------------------------------------------- /releasenotes/notes/package-list-name-changes-4d5ad2e6ff5ecae2.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - The variable ``aodh_apt_packages`` has been renamed to 4 | ``aodh_distro_packages``. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/package-state-b032231a3cc99ee0.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - The os_aodh role now supports the ability to configure whether 4 | apt/yum tasks install the latest available package, or just ensure 5 | that the package is present. The default action is to ensure that 6 | the latest package is present. The action taken may be changed to 7 | only ensure that the package is present by setting 8 | ``aodh_package_state`` to ``present``. 9 | upgrade: 10 | - The os_aodh role always checks whether the latest package is 11 | installed when executed. If a deployer wishes to change the check to 12 | only validate the presence of the package, the option 13 | ``aodh_package_state`` should be set to ``present``. 14 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-requirements-git-bed8d47512188ad1.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - The variables ``aodh_requirements_git_repo`` and 4 | ``aodh_requirements_git_install_branch`` have been 5 | removed in favour of using the URL/path to the 6 | upper-constraints file using the 7 | variable ``pip_install_upper_constraints`` instead. 8 | -------------------------------------------------------------------------------- /releasenotes/notes/removed-aodh-api-init-9e2406629196efff.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - The aodh-api init service is removed since aodh-api is deployed as an 4 | apache mod_wsgi service. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/use-galera-storage-d1a51c051d2740ad.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - The Aodh data migration script should be run to 4 | migrate alarm data from MongoDB storage to Galera 5 | due to the pending removal of MongoDB support. 6 | fixes: 7 | - Aodh has deprecated support for NoSQL storage (MongoDB 8 | and Cassandra) in Mitaka with removal scheduled for 9 | the O* release. This causes warnings in the logs. The 10 | default of using MongoDB storage for Aodh is replaced 11 | with the use of Galera. Continued use of MongoDB will 12 | require the use of vars to specify a correct 13 | ``aodh_connection_string`` and add pymongo to the 14 | ``aodh_pip_packages`` list. 15 | -------------------------------------------------------------------------------- /releasenotes/notes/use-uwsgi-001d7b0c4d6def73.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Aodh migrated from usage of Apache mod_wsgi or native daemon to uWSGI 5 | daemon. This means, that `aodh_apache_*` variables are not available and has no effect 6 | anymore. 7 | 8 | During upgrade process role will drop `aodh_service_port` from apache 9 | listeners (ports.conf) and aodh virtualhost, which by default means 10 | misconfigured apache service (since it won't have any listeners) unless 11 | it's aio build and this apache server is in use by other role/service. 12 | Apache server won't be dropped from aodh_api hosts, so deployers 13 | are encoureged to remove it manually. -------------------------------------------------------------------------------- /releasenotes/source/_static/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/openstack-ansible-os_aodh/bb06623482d4d4ba638a30dd0ce46de9bb927234/releasenotes/source/_static/.placeholder -------------------------------------------------------------------------------- /releasenotes/source/_templates/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/openstack-ansible-os_aodh/bb06623482d4d4ba638a30dd0ce46de9bb927234/releasenotes/source/_templates/.placeholder -------------------------------------------------------------------------------- /releasenotes/source/conf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # This file is execfile()d with the current directory set to its 17 | # containing dir. 18 | # 19 | # Note that not all possible configuration values are present in this 20 | # autogenerated file. 21 | # 22 | # All configuration values have a default; values that are commented out 23 | # serve to show the default. 24 | 25 | # If extensions (or modules to document with autodoc) are in another directory, 26 | # add these directories to sys.path here. If the directory is relative to the 27 | # documentation root, use os.path.abspath to make it absolute, like shown here. 28 | # sys.path.insert(0, os.path.abspath('.')) 29 | 30 | # -- General configuration ------------------------------------------------ 31 | 32 | # If your documentation needs a minimal Sphinx version, state it here. 33 | # needs_sphinx = '1.0' 34 | 35 | # Add any Sphinx extension module names here, as strings. They can be 36 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 37 | # ones. 38 | extensions = [ 39 | 'openstackdocstheme', 40 | 'reno.sphinxext', 41 | ] 42 | 43 | # Add any paths that contain templates here, relative to this directory. 44 | templates_path = ['_templates'] 45 | 46 | # The suffix of source filenames. 47 | source_suffix = '.rst' 48 | 49 | # The encoding of source files. 50 | # source_encoding = 'utf-8-sig' 51 | 52 | # The master toctree document. 53 | master_doc = 'index' 54 | 55 | # General information about the project. 56 | author = 'OpenStack-Ansible Contributors' 57 | category = 'Miscellaneous' 58 | copyright = '2014-2016, OpenStack-Ansible Contributors' 59 | description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.' 60 | project = 'OpenStack-Ansible' 61 | role_name = 'os_aodh' 62 | target_name = 'openstack-ansible-' + role_name 63 | title = 'OpenStack-Ansible Release Notes: ' + role_name + 'role' 64 | 65 | # The full version, including alpha/beta/rc tags. 66 | release = '' 67 | # The short X.Y version. 68 | version = '' 69 | 70 | # openstackdocstheme options 71 | openstackdocs_repo_name = 'openstack/' + target_name 72 | openstackdocs_bug_project = project.lower() 73 | openstackdocs_bug_tag = '' 74 | 75 | # The language for content autogenerated by Sphinx. Refer to documentation 76 | # for a list of supported languages. 77 | # language = None 78 | 79 | # There are two options for replacing |today|: either, you set today to some 80 | # non-false value, then it is used: 81 | # today = '' 82 | # Else, today_fmt is used as the format for a strftime call. 83 | # today_fmt = '%B %d, %Y' 84 | 85 | # List of patterns, relative to source directory, that match files and 86 | # directories to ignore when looking for source files. 87 | exclude_patterns = [] 88 | 89 | # The reST default role (used for this markup: `text`) to use for all 90 | # documents. 91 | # default_role = None 92 | 93 | # If true, '()' will be appended to :func: etc. cross-reference text. 94 | # add_function_parentheses = True 95 | 96 | # If true, the current module name will be prepended to all description 97 | # unit titles (such as .. function::). 98 | # add_module_names = True 99 | 100 | # If true, sectionauthor and moduleauthor directives will be shown in the 101 | # output. They are ignored by default. 102 | # show_authors = False 103 | 104 | # The name of the Pygments (syntax highlighting) style to use. 105 | pygments_style = 'native' 106 | 107 | # A list of ignored prefixes for module index sorting. 108 | # modindex_common_prefix = [] 109 | 110 | # If true, keep warnings as "system message" paragraphs in the built documents. 111 | # keep_warnings = False 112 | 113 | 114 | # -- Options for HTML output ---------------------------------------------- 115 | 116 | # The theme to use for HTML and HTML Help pages. See the documentation for 117 | # a list of builtin themes. 118 | html_theme = 'openstackdocs' 119 | 120 | # Theme options are theme-specific and customize the look and feel of a theme 121 | # further. For a list of options available for each theme, see the 122 | # documentation. 123 | # html_theme_options = {} 124 | 125 | # Add any paths that contain custom themes here, relative to this directory. 126 | # html_theme_path = [] 127 | 128 | # The name for this set of Sphinx documents. If None, it defaults to 129 | # " v documentation". 130 | # html_title = None 131 | 132 | # A shorter title for the navigation bar. Default is the same as html_title. 133 | # html_short_title = None 134 | 135 | # The name of an image file (relative to this directory) to place at the top 136 | # of the sidebar. 137 | # html_logo = None 138 | 139 | # The name of an image file (within the static path) to use as favicon of the 140 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 141 | # pixels large. 142 | # html_favicon = None 143 | 144 | # Add any paths that contain custom static files (such as style sheets) here, 145 | # relative to this directory. They are copied after the builtin static files, 146 | # so a file named "default.css" will overwrite the builtin "default.css". 147 | html_static_path = ['_static'] 148 | 149 | # Add any extra paths that contain custom files (such as robots.txt or 150 | # .htaccess) here, relative to this directory. These files are copied 151 | # directly to the root of the documentation. 152 | # html_extra_path = [] 153 | 154 | # If true, SmartyPants will be used to convert quotes and dashes to 155 | # typographically correct entities. 156 | # html_use_smartypants = True 157 | 158 | # Custom sidebar templates, maps document names to template names. 159 | # html_sidebars = {} 160 | 161 | # Additional templates that should be rendered to pages, maps page names to 162 | # template names. 163 | # html_additional_pages = {} 164 | 165 | # If false, no module index is generated. 166 | # html_domain_indices = True 167 | 168 | # If false, no index is generated. 169 | # html_use_index = True 170 | 171 | # If true, the index is split into individual pages for each letter. 172 | # html_split_index = False 173 | 174 | # If true, links to the reST sources are added to the pages. 175 | # html_show_sourcelink = True 176 | 177 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 178 | # html_show_sphinx = True 179 | 180 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 181 | # html_show_copyright = True 182 | 183 | # If true, an OpenSearch description file will be output, and all pages will 184 | # contain a tag referring to it. The value of this option must be the 185 | # base URL from which the finished HTML is served. 186 | # html_use_opensearch = '' 187 | 188 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 189 | # html_file_suffix = None 190 | 191 | # Output file base name for HTML help builder. 192 | htmlhelp_basename = target_name + '-docs' 193 | 194 | 195 | # -- Options for LaTeX output --------------------------------------------- 196 | 197 | latex_elements = { 198 | # The paper size ('letterpaper' or 'a4paper'). 199 | # 'papersize': 'letterpaper', 200 | 201 | # The font size ('10pt', '11pt' or '12pt'). 202 | # 'pointsize': '10pt', 203 | 204 | # Additional stuff for the LaTeX preamble. 205 | # 'preamble': '', 206 | } 207 | 208 | # Grouping the document tree into LaTeX files. List of tuples 209 | # (source start file, target name, title, 210 | # author, documentclass [howto, manual, or own class]). 211 | latex_documents = [ 212 | (master_doc, target_name + '.tex', 213 | title, author, 'manual'), 214 | ] 215 | 216 | # The name of an image file (relative to this directory) to place at the top of 217 | # the title page. 218 | # latex_logo = None 219 | 220 | # For "manual" documents, if this is true, then toplevel headings are parts, 221 | # not chapters. 222 | # latex_use_parts = False 223 | 224 | # If true, show page references after internal links. 225 | # latex_show_pagerefs = False 226 | 227 | # If true, show URL addresses after external links. 228 | # latex_show_urls = False 229 | 230 | # Documents to append as an appendix to all manuals. 231 | # latex_appendices = [] 232 | 233 | # If false, no module index is generated. 234 | # latex_domain_indices = True 235 | 236 | 237 | # -- Options for manual page output --------------------------------------- 238 | 239 | # One entry per manual page. List of tuples 240 | # (source start file, name, description, authors, manual section). 241 | man_pages = [ 242 | (master_doc, target_name, 243 | title, [author], 1) 244 | ] 245 | 246 | # If true, show URL addresses after external links. 247 | # man_show_urls = False 248 | 249 | 250 | # -- Options for Texinfo output ------------------------------------------- 251 | 252 | # Grouping the document tree into Texinfo files. List of tuples 253 | # (source start file, target name, title, author, 254 | # dir menu entry, description, category) 255 | texinfo_documents = [ 256 | (master_doc, target_name, 257 | title, author, project, 258 | description, category), 259 | ] 260 | 261 | # Documents to append as an appendix to all manuals. 262 | # texinfo_appendices = [] 263 | 264 | # If false, no module index is generated. 265 | # texinfo_domain_indices = True 266 | 267 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 268 | # texinfo_show_urls = 'footnote' 269 | 270 | # If true, do not generate a @detailmenu in the "Top" node's menu. 271 | # texinfo_no_detailmenu = False 272 | 273 | # -- Options for Internationalization output ------------------------------ 274 | locale_dirs = ['locale/'] 275 | -------------------------------------------------------------------------------- /releasenotes/source/index.rst: -------------------------------------------------------------------------------- 1 | ================================ 2 | OpenStack-Ansible Release Notes 3 | ================================ 4 | 5 | .. toctree:: 6 | :maxdepth: 1 7 | 8 | unreleased 9 | zed 10 | ussuri 11 | train 12 | stein 13 | rocky 14 | queens 15 | pike 16 | ocata 17 | newton 18 | mitaka 19 | -------------------------------------------------------------------------------- /releasenotes/source/mitaka.rst: -------------------------------------------------------------------------------- 1 | ============================= 2 | Mitaka Series Release Notes 3 | ============================= 4 | 5 | .. release-notes:: 6 | :branch: origin/stable/mitaka 7 | -------------------------------------------------------------------------------- /releasenotes/source/newton.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Newton Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: origin/stable/newton 7 | -------------------------------------------------------------------------------- /releasenotes/source/ocata.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Ocata Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: origin/stable/ocata 7 | -------------------------------------------------------------------------------- /releasenotes/source/pike.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Pike Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/pike 7 | -------------------------------------------------------------------------------- /releasenotes/source/queens.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Queens Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/queens 7 | -------------------------------------------------------------------------------- /releasenotes/source/rocky.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Rocky Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/rocky 7 | -------------------------------------------------------------------------------- /releasenotes/source/stein.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Stein Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/stein 7 | -------------------------------------------------------------------------------- /releasenotes/source/train.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | Train Series Release Notes 3 | ========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/train 7 | -------------------------------------------------------------------------------- /releasenotes/source/unreleased.rst: -------------------------------------------------------------------------------- 1 | ============================== 2 | Current Series Release Notes 3 | ============================== 4 | 5 | .. release-notes:: 6 | -------------------------------------------------------------------------------- /releasenotes/source/ussuri.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | Ussuri Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/ussuri 7 | -------------------------------------------------------------------------------- /releasenotes/source/zed.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | Zed Series Release Notes 3 | ======================== 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/zed 7 | -------------------------------------------------------------------------------- /run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # PURPOSE: 17 | # This script clones the openstack-ansible-tests repository to the 18 | # tests/common folder in order to be able to re-use test components 19 | # for role testing. This is intended to be the thinnest possible 20 | # shim for test execution outside of OpenStack CI. 21 | 22 | # WARNING: 23 | # This file is maintained in the openstack-ansible-tests repository. 24 | # https://opendev.org/openstack/openstack-ansible-tests/src/run_tests.sh 25 | # If you need to modify this file, update the one in the openstack-ansible-tests 26 | # repository and then update this file as well. The purpose of this file is to 27 | # prepare the host and then execute all the tox tests. 28 | # 29 | 30 | ## Shell Opts ---------------------------------------------------------------- 31 | set -xeu 32 | 33 | ## Vars ---------------------------------------------------------------------- 34 | 35 | WORKING_DIR="$(readlink -f $(dirname $0))" 36 | OSA_PROJECT_NAME="$(sed -n 's|^project=openstack/\(.*\).git$|\1|p' $(pwd)/.gitreview)" 37 | 38 | COMMON_TESTS_PATH="${WORKING_DIR}/tests/common" 39 | TESTING_HOME=${TESTING_HOME:-$HOME} 40 | ZUUL_TESTS_CLONE_LOCATION="/home/zuul/src/opendev.org/openstack/openstack-ansible-tests" 41 | 42 | # Use .gitreview as the key to determine the appropriate 43 | # branch to clone for tests. 44 | TESTING_BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' "${WORKING_DIR}/.gitreview") 45 | if [[ "${TESTING_BRANCH}" == "" ]]; then 46 | TESTING_BRANCH="master" 47 | fi 48 | 49 | ## Main ---------------------------------------------------------------------- 50 | 51 | # Source distribution information 52 | source /etc/os-release || source /usr/lib/os-release 53 | 54 | # Figure out the appropriate package install command 55 | case ${ID,,} in 56 | centos|rhel|fedora|rocky) pkg_mgr_cmd="dnf install -y" ;; 57 | ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;; 58 | *) echo "unsupported distribution: ${ID,,}"; exit 1 ;; 59 | esac 60 | 61 | # Install git so that we can clone the tests repo if git is not available 62 | which git &>/dev/null || eval sudo "${pkg_mgr_cmd}" git 63 | 64 | # Clone the tests repo for access to the common test script 65 | if [[ ! -d "${COMMON_TESTS_PATH}" ]]; then 66 | # The tests repo doesn't need a clone, we can just 67 | # symlink it. 68 | if [[ "${OSA_PROJECT_NAME}" == "openstack-ansible-tests" ]]; then 69 | ln -s "${WORKING_DIR}" "${COMMON_TESTS_PATH}" 70 | 71 | # In zuul v3 any dependent repository is placed into 72 | # /home/zuul/src/opendev.org, so we check to see 73 | # if there is a tests checkout there already. If so, we 74 | # symlink that and use it. 75 | elif [[ -d "${ZUUL_TESTS_CLONE_LOCATION}" ]]; then 76 | ln -s "${ZUUL_TESTS_CLONE_LOCATION}" "${COMMON_TESTS_PATH}" 77 | 78 | # Otherwise we're clearly not in zuul or using a previously setup 79 | # repo in some way, so just clone it from upstream. 80 | else 81 | git clone -b "${TESTING_BRANCH}" \ 82 | https://opendev.org/openstack/openstack-ansible-tests \ 83 | "${COMMON_TESTS_PATH}" 84 | fi 85 | fi 86 | 87 | # Execute the common test script 88 | source tests/common/run_tests_common.sh 89 | -------------------------------------------------------------------------------- /tasks/aodh_db_sync.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2016, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | - name: Perform a Aodh DB sync 17 | ansible.builtin.command: "{{ aodh_bin }}/aodh-dbsync" 18 | become: true 19 | become_user: "{{ aodh_system_user_name }}" 20 | changed_when: false 21 | -------------------------------------------------------------------------------- /tasks/aodh_install.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | - name: Record the installation method 17 | community.general.ini_file: 18 | dest: "/etc/ansible/facts.d/openstack_ansible.fact" 19 | section: "aodh" 20 | option: "install_method" 21 | value: "{{ aodh_install_method }}" 22 | mode: "0644" 23 | 24 | - name: Refresh local facts to ensure the aodh section is present 25 | ansible.builtin.setup: 26 | filter: ansible_local 27 | gather_subset: "!all" 28 | 29 | - name: Install distro packages 30 | ansible.builtin.package: 31 | name: "{{ aodh_package_list }}" 32 | state: "{{ aodh_package_state }}" 33 | update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" 34 | cache_valid_time: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary(cache_timeout, omit) }}" 35 | register: install_packages 36 | until: install_packages is success 37 | retries: 5 38 | delay: 2 39 | 40 | - name: Install distro packages for testing 41 | ansible.builtin.package: 42 | name: "{{ aodh_test_distro_packages }}" 43 | state: "{{ aodh_package_state }}" 44 | update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" 45 | cache_valid_time: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary(cache_timeout, omit) }}" 46 | register: install_packages 47 | until: install_packages is success 48 | retries: 5 49 | delay: 2 50 | when: install_test_packages|bool 51 | 52 | - name: Install the python venv 53 | ansible.builtin.import_role: 54 | name: "python_venv_build" 55 | vars: 56 | venv_python_executable: "{{ aodh_venv_python_executable }}" 57 | venv_build_constraints: "{{ aodh_git_constraints }}" 58 | venv_build_distro_package_list: "{{ aodh_devel_distro_packages }}" 59 | venv_install_destination_path: "{{ aodh_bin | dirname }}" 60 | venv_pip_install_args: "{{ aodh_pip_install_args }}" 61 | venv_pip_packages: "{{ aodh_pip_packages | union(aodh_user_pip_packages) }}" 62 | venv_facts_when_changed: 63 | - section: "aodh" 64 | option: "venv_tag" 65 | value: "{{ aodh_venv_tag }}" 66 | when: aodh_install_method == 'source' 67 | -------------------------------------------------------------------------------- /tasks/aodh_post_install.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | - name: Copy aodh config 17 | openstack.config_template.config_template: 18 | src: "{{ item.src }}" 19 | dest: "{{ item.dest }}" 20 | owner: "{{ aodh_system_user_name }}" 21 | group: "{{ aodh_system_group_name }}" 22 | mode: "0644" 23 | config_overrides: "{{ item.config_overrides }}" 24 | config_type: "{{ item.config_type }}" 25 | with_items: 26 | - src: "aodh.conf.j2" 27 | dest: "/etc/aodh/aodh.conf" 28 | config_overrides: "{{ aodh_aodh_conf_overrides }}" 29 | config_type: "ini" 30 | - src: "api_paste.ini.j2" 31 | dest: "/etc/aodh/api_paste.ini" 32 | config_overrides: "{{ aodh_api_paste_ini_overrides }}" 33 | config_type: "ini" 34 | notify: 35 | - Restart aodh services 36 | - Restart uwsgi services 37 | tags: 38 | - aodh-config 39 | 40 | - name: Implement policy.yaml if there are overrides configured 41 | openstack.config_template.config_template: 42 | dest: "/etc/aodh/policy.yaml" 43 | content: "{{ aodh_policy_overrides }}" 44 | owner: "{{ aodh_system_user_name }}" 45 | group: "{{ aodh_system_group_name }}" 46 | mode: "0644" 47 | config_type: "yaml" 48 | when: 49 | - aodh_policy_overrides | length > 0 50 | tags: 51 | - aodh-policy-override 52 | 53 | - name: Remove legacy policy.yaml file 54 | ansible.builtin.file: 55 | path: "/etc/aodh/policy.yaml" 56 | state: absent 57 | when: 58 | - aodh_policy_overrides | length == 0 59 | tags: 60 | - aodh-policy-override 61 | -------------------------------------------------------------------------------- /tasks/aodh_pre_install.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | - name: Create the system group 17 | ansible.builtin.group: 18 | name: "{{ aodh_system_group_name }}" 19 | state: "present" 20 | system: "yes" 21 | 22 | - name: Create the aodh system user 23 | ansible.builtin.user: 24 | name: "{{ aodh_system_user_name }}" 25 | group: "{{ aodh_system_group_name }}" 26 | comment: "{{ aodh_system_comment }}" 27 | shell: "{{ aodh_system_shell }}" 28 | system: "yes" 29 | createhome: "yes" 30 | home: "{{ aodh_system_user_home }}" 31 | 32 | - name: Create aodh dir 33 | ansible.builtin.file: 34 | path: "{{ item.path }}" 35 | state: directory 36 | owner: "{{ item.owner | default(aodh_system_user_name) }}" 37 | group: "{{ item.group | default(aodh_system_group_name) }}" 38 | mode: "{{ item.mode | default('0755') }}" 39 | with_items: 40 | - { path: "/openstack/venvs", mode: "0755", owner: "root", group: "root" } 41 | - { path: "/etc/aodh" } 42 | - { path: "{{ aodh_system_user_home }}" } 43 | - { path: "{{ aodh_system_user_home }}/.ssh", mode: "0700" } 44 | - { path: "/var/cache/aodh", mode: "0700" } 45 | -------------------------------------------------------------------------------- /tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | - name: Fail if our required secrets are not present 17 | ansible.builtin.fail: 18 | msg: "Please set the {{ item }} variable prior to applying this role." 19 | when: (item is undefined) or (item is none) 20 | with_items: "{{ aodh_required_secrets }}" 21 | tags: 22 | - always 23 | 24 | - name: Gather variables for each operating system 25 | ansible.builtin.include_vars: "{{ lookup('first_found', params) }}" 26 | vars: 27 | params: 28 | files: 29 | - "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml" 30 | - "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml" 31 | - "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml" 32 | - "{{ ansible_facts['distribution'] | lower }}.yml" 33 | - "{{ ansible_facts['os_family'] | lower }}.yml" 34 | paths: 35 | - "{{ role_path }}/vars" 36 | tags: 37 | - always 38 | 39 | - name: Fail if service was deployed using a different installation method 40 | ansible.builtin.fail: 41 | msg: "Switching installation methods for OpenStack services is not supported" 42 | when: 43 | - ansible_local is defined 44 | - ansible_local.openstack_ansible is defined 45 | - ansible_local.openstack_ansible.aodh is defined 46 | - ansible_local.openstack_ansible.aodh.install_method is defined 47 | - ansible_local.openstack_ansible.aodh.install_method != aodh_install_method 48 | 49 | - name: Gather variables for installation method 50 | ansible.builtin.include_vars: "{{ aodh_install_method }}_install.yml" 51 | tags: 52 | - always 53 | 54 | - name: Including osa.db_setup role 55 | ansible.builtin.include_role: 56 | name: openstack.osa.db_setup 57 | apply: 58 | tags: 59 | - common-db 60 | - aodh-config 61 | when: 62 | - _aodh_is_first_play_host 63 | vars: 64 | _oslodb_setup_host: "{{ aodh_db_setup_host }}" 65 | _oslodb_ansible_python_interpreter: "{{ aodh_db_setup_python_interpreter }}" 66 | _oslodb_setup_endpoint: "{{ aodh_db_address }}" 67 | _oslodb_setup_port: "{{ aodh_galera_port }}" 68 | _oslodb_databases: 69 | - name: "{{ aodh_database_name }}" 70 | users: 71 | - username: "{{ aodh_database_user }}" 72 | password: "{{ aodh_container_db_password }}" 73 | tags: 74 | - always 75 | 76 | - name: Including osa.mq_setup role 77 | ansible.builtin.include_role: 78 | name: openstack.osa.mq_setup 79 | apply: 80 | tags: 81 | - common-mq 82 | - aodh-config 83 | when: 84 | - _aodh_is_first_play_host 85 | vars: 86 | _oslomsg_rpc_setup_host: "{{ aodh_oslomsg_rpc_setup_host }}" 87 | _oslomsg_rpc_userid: "{{ aodh_oslomsg_rpc_userid }}" 88 | _oslomsg_rpc_password: "{{ aodh_oslomsg_rpc_password }}" 89 | _oslomsg_rpc_vhost: "{{ aodh_oslomsg_rpc_vhost }}" 90 | _oslomsg_rpc_transport: "{{ aodh_oslomsg_rpc_transport }}" 91 | _oslomsg_rpc_policies: "{{ aodh_oslomsg_rpc_policies }}" 92 | _oslomsg_notify_setup_host: "{{ aodh_oslomsg_notify_setup_host }}" 93 | _oslomsg_notify_userid: "{{ aodh_oslomsg_notify_userid }}" 94 | _oslomsg_notify_password: "{{ aodh_oslomsg_notify_password }}" 95 | _oslomsg_notify_vhost: "{{ aodh_oslomsg_notify_vhost }}" 96 | _oslomsg_notify_transport: "{{ aodh_oslomsg_notify_transport }}" 97 | _oslomsg_notify_policies: "{{ aodh_oslomsg_notify_policies }}" 98 | _oslomsg_notify_configure: "{{ aodh_oslomsg_notify_configure }}" 99 | tags: 100 | - always 101 | 102 | - name: Importing aodh_pre_install install 103 | ansible.builtin.import_tasks: aodh_pre_install.yml 104 | tags: 105 | - aodh-install 106 | 107 | - name: Importing aodh_install install 108 | ansible.builtin.import_tasks: aodh_install.yml 109 | tags: 110 | - aodh-install 111 | 112 | - name: Create and install SSL certificates 113 | ansible.builtin.include_role: 114 | name: pki 115 | tasks_from: main_certs.yml 116 | apply: 117 | tags: 118 | - aodh-config 119 | - pki 120 | vars: 121 | pki_setup_host: "{{ aodh_pki_setup_host }}" 122 | pki_dir: "{{ aodh_pki_dir }}" 123 | pki_create_certificates: "{{ aodh_user_ssl_cert is not defined and aodh_user_ssl_key is not defined }}" 124 | pki_regen_cert: "{{ aodh_pki_regen_cert }}" 125 | pki_certificates: "{{ aodh_pki_certificates }}" 126 | pki_install_certificates: "{{ aodh_pki_install_certificates }}" 127 | when: 128 | - aodh_backend_ssl 129 | tags: 130 | - always 131 | 132 | - name: Importing aodh_post_install tasks 133 | ansible.builtin.import_tasks: aodh_post_install.yml 134 | tags: 135 | - aodh-config 136 | - post-install 137 | 138 | - name: Run the systemd service role 139 | ansible.builtin.import_role: 140 | name: systemd_service 141 | vars: 142 | systemd_user_name: "{{ aodh_system_user_name }}" 143 | systemd_group_name: "{{ aodh_system_group_name }}" 144 | systemd_tempd_prefix: openstack 145 | systemd_slice_name: aodh 146 | systemd_lock_path: /var/lock/aodh 147 | systemd_service_cpu_accounting: true 148 | systemd_service_block_io_accounting: true 149 | systemd_service_memory_accounting: true 150 | systemd_service_tasks_accounting: true 151 | systemd_services: "{{ filtered_aodh_services }}" 152 | tags: 153 | - aodh-config 154 | - systemd-service 155 | 156 | - name: Importing aodh_db_sync tasks 157 | ansible.builtin.import_tasks: aodh_db_sync.yml 158 | when: 159 | - _aodh_is_first_play_host 160 | tags: 161 | - aodh-config 162 | 163 | - name: Import uwsgi role 164 | ansible.builtin.import_role: 165 | name: uwsgi 166 | vars: 167 | uwsgi_services: "{{ uwsgi_aodh_services }}" 168 | uwsgi_install_method: "{{ aodh_install_method }}" 169 | tags: 170 | - aodh-config 171 | - uwsgi 172 | 173 | - name: Including osa.service_setup roles 174 | ansible.builtin.include_role: 175 | name: openstack.osa.service_setup 176 | apply: 177 | tags: 178 | - common-service 179 | - aodh-config 180 | vars: 181 | _service_adminuri_insecure: "{{ keystone_service_adminuri_insecure }}" 182 | _service_in_ldap: "{{ aodh_service_in_ldap }}" 183 | _service_setup_host: "{{ aodh_service_setup_host }}" 184 | _service_setup_host_python_interpreter: "{{ aodh_service_setup_host_python_interpreter }}" 185 | _service_project_name: "{{ aodh_service_project_name }}" 186 | _service_region: "{{ aodh_service_region }}" 187 | _service_users: 188 | - name: "{{ aodh_service_user_name }}" 189 | password: "{{ aodh_service_password }}" 190 | role: "{{ aodh_service_role_names }}" 191 | _service_endpoints: 192 | - service: "{{ aodh_service_name }}" 193 | interface: "public" 194 | url: "{{ aodh_service_publicurl }}" 195 | - service: "{{ aodh_service_name }}" 196 | interface: "internal" 197 | url: "{{ aodh_service_internalurl }}" 198 | - service: "{{ aodh_service_name }}" 199 | interface: "admin" 200 | url: "{{ aodh_service_adminurl }}" 201 | _service_catalog: 202 | - name: "{{ aodh_service_name }}" 203 | type: "{{ aodh_service_type }}" 204 | description: "{{ aodh_service_description }}" 205 | when: 206 | - _aodh_is_first_play_host 207 | tags: 208 | - always 209 | -------------------------------------------------------------------------------- /templates/aodh.conf.j2: -------------------------------------------------------------------------------- 1 | #{{ ansible_managed}} 2 | 3 | [DEFAULT] 4 | use_journal = True 5 | # Disable stderr logging 6 | use_stderr = False 7 | auth_strategy = keystone 8 | debug = {{ debug }} 9 | transport_url = {{ aodh_oslomsg_rpc_transport }}://{% for host in aodh_oslomsg_rpc_servers.split(',') %}{{ aodh_oslomsg_rpc_userid }}:{{ aodh_oslomsg_rpc_password }}@{{ host }}:{{ aodh_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ _aodh_oslomsg_rpc_vhost_conf }}{% if aodh_oslomsg_rpc_use_ssl | bool %}?ssl=1&ssl_version={{ aodh_oslomsg_rpc_ssl_version }}&ssl_ca_file={{ aodh_oslomsg_rpc_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} 10 | 11 | [oslo_messaging_rabbit] 12 | ssl = {{ aodh_oslomsg_rpc_use_ssl }} 13 | rabbit_quorum_queue = {{ aodh_oslomsg_rabbit_quorum_queues }} 14 | rabbit_transient_quorum_queue = {{ aodh_oslomsg_rabbit_transient_quorum_queues }} 15 | rabbit_qos_prefetch_count = {{ aodh_oslomsg_rabbit_qos_prefetch_count }} 16 | use_queue_manager = {{ aodh_oslomsg_rabbit_queue_manager }} 17 | {% if aodh_oslomsg_rabbit_queue_manager %} 18 | hostname = {{ [ansible_facts['hostname'], aodh_service_name] | join('-') }} 19 | {% endif %} 20 | rabbit_stream_fanout = {{ aodh_oslomsg_rabbit_stream_fanout }} 21 | rabbit_quorum_delivery_limit = {{ aodh_oslomsg_rabbit_quorum_delivery_limit }} 22 | rabbit_quorum_max_memory_bytes = {{ aodh_oslomsg_rabbit_quorum_max_memory_bytes }} 23 | 24 | [api] 25 | port = {{ aodh_service_port }} 26 | 27 | [database] 28 | connection = {{ aodh_connection_string }} 29 | max_overflow = {{ aodh_db_max_overflow }} 30 | max_pool_size = {{ aodh_db_max_pool_size }} 31 | pool_timeout = {{ aodh_db_pool_timeout }} 32 | connection_recycle_time = {{ aodh_db_connection_recycle_time }} 33 | 34 | [keystone_authtoken] 35 | insecure = {{ keystone_service_internaluri_insecure | bool }} 36 | auth_type = {{ aodh_keystone_auth_plugin }} 37 | auth_url = {{ keystone_service_adminurl }} 38 | www_authenticate_uri = {{ keystone_service_internaluri }} 39 | project_domain_id = {{ aodh_service_project_domain_id }} 40 | user_domain_id = {{ aodh_service_user_domain_id }} 41 | project_name = {{ aodh_service_project_name }} 42 | username = {{ aodh_service_user_name }} 43 | password = {{ aodh_service_password }} 44 | region_name = {{ keystone_service_region }} 45 | 46 | 47 | service_token_roles_required = {{ aodh_service_token_roles_required | bool }} 48 | service_token_roles = {{ aodh_service_token_roles | join(',') }} 49 | service_type = {{ aodh_service_type }} 50 | 51 | memcached_servers = {{ aodh_memcached_servers }} 52 | 53 | token_cache_time = 300 54 | 55 | # if your memcached server is shared, use these settings to avoid cache poisoning 56 | memcache_security_strategy = ENCRYPT 57 | memcache_secret_key = {{ memcached_encryption_key }} 58 | 59 | [oslo_messaging_notifications] 60 | driver = {{ (aodh_oslomsg_notify_configure | bool) | ternary('messagingv2', 'noop') }} 61 | transport_url = {{ aodh_oslomsg_notify_transport }}://{% for host in aodh_oslomsg_notify_servers.split(',') %}{{ aodh_oslomsg_notify_userid }}:{{ aodh_oslomsg_notify_password }}@{{ host }}:{{ aodh_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ _aodh_oslomsg_notify_vhost_conf }}{% if aodh_oslomsg_notify_use_ssl | bool %}?ssl=1&ssl_version={{ aodh_oslomsg_notify_ssl_version }}&ssl_ca_file={{ aodh_oslomsg_notify_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} 62 | 63 | [service_credentials] 64 | auth_type = {{ aodh_keystone_auth_plugin }} 65 | auth_url = {{ keystone_service_internalurl }} 66 | project_domain_id = {{ aodh_service_project_domain_id }} 67 | user_domain_id = {{ aodh_service_user_domain_id }} 68 | project_name = {{ aodh_service_project_name }} 69 | username = {{ aodh_service_user_name }} 70 | tenant_name = {{ aodh_service_tenant_name }} 71 | password = {{ aodh_service_password }} 72 | region_name = {{ aodh_service_region }} 73 | interface = {{ aodh_service_endpoint_type }} 74 | -------------------------------------------------------------------------------- /templates/api_paste.ini.j2: -------------------------------------------------------------------------------- 1 | [composite:aodh+noauth] 2 | use = egg:Paste#urlmap 3 | / = aodhversions_pipeline 4 | /v2 = aodhv2_noauth_pipeline 5 | /healthcheck = healthcheck 6 | 7 | [composite:aodh+keystone] 8 | use = egg:Paste#urlmap 9 | / = aodhversions_pipeline 10 | /v2 = aodhv2_keystone_pipeline 11 | /healthcheck = healthcheck 12 | 13 | [app:healthcheck] 14 | use = egg:oslo.middleware#healthcheck 15 | oslo_config_project = aodh 16 | 17 | [pipeline:aodhversions_pipeline] 18 | pipeline = cors http_proxy_to_wsgi aodhversions 19 | 20 | [app:aodhversions] 21 | paste.app_factory = aodh.api.app:app_factory 22 | root = aodh.api.controllers.root.VersionsController 23 | 24 | [pipeline:aodhv2_keystone_pipeline] 25 | pipeline = cors http_proxy_to_wsgi request_id authtoken aodhv2 26 | 27 | [pipeline:aodhv2_noauth_pipeline] 28 | pipeline = cors http_proxy_to_wsgi request_id aodhv2 29 | 30 | [app:aodhv2] 31 | paste.app_factory = aodh.api.app:app_factory 32 | root = aodh.api.controllers.v2.root.V2Controller 33 | 34 | [filter:authtoken] 35 | paste.filter_factory = keystonemiddleware.auth_token:filter_factory 36 | oslo_config_project = aodh 37 | 38 | [filter:request_id] 39 | paste.filter_factory = oslo_middleware:RequestId.factory 40 | 41 | [filter:cors] 42 | paste.filter_factory = oslo_middleware.cors:filter_factory 43 | oslo_config_project = aodh 44 | 45 | [filter:http_proxy_to_wsgi] 46 | paste.filter_factory = oslo_middleware.http_proxy_to_wsgi:HTTPProxyToWSGI.factory 47 | oslo_config_project = aodh 48 | -------------------------------------------------------------------------------- /tests/ansible-role-requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: apt_package_pinning 3 | src: https://opendev.org/openstack/openstack-ansible-apt_package_pinning 4 | scm: git 5 | version: master 6 | - name: memcached_server 7 | src: https://opendev.org/openstack/openstack-ansible-memcached_server 8 | scm: git 9 | version: master 10 | - name: openstack_hosts 11 | src: https://opendev.org/openstack/openstack-ansible-openstack_hosts 12 | scm: git 13 | version: master 14 | - name: lxc_hosts 15 | src: https://opendev.org/openstack/openstack-ansible-lxc_hosts 16 | scm: git 17 | version: master 18 | - name: lxc_container_create 19 | src: https://opendev.org/openstack/openstack-ansible-lxc_container_create 20 | scm: git 21 | version: master 22 | - name: galera_client 23 | src: https://opendev.org/openstack/openstack-ansible-galera_client 24 | scm: git 25 | version: master 26 | - name: galera_server 27 | src: https://opendev.org/openstack/openstack-ansible-galera_server 28 | scm: git 29 | version: master 30 | - name: rabbitmq_server 31 | src: https://opendev.org/openstack/openstack-ansible-rabbitmq_server 32 | scm: git 33 | version: master 34 | - name: os_keystone 35 | src: https://opendev.org/openstack/openstack-ansible-os_keystone 36 | scm: git 37 | version: master 38 | - name: os_gnocchi 39 | src: https://opendev.org/openstack/openstack-ansible-os_gnocchi 40 | scm: git 41 | version: master 42 | - name: openstack_openrc 43 | src: https://opendev.org/openstack/openstack-ansible-openstack_openrc 44 | scm: git 45 | version: master 46 | - name: os_tempest 47 | src: https://opendev.org/openstack/openstack-ansible-os_tempest 48 | scm: git 49 | version: master 50 | - name: systemd_service 51 | src: https://opendev.org/openstack/ansible-role-systemd_service 52 | scm: git 53 | version: master 54 | - name: python_venv_build 55 | src: https://opendev.org/openstack/ansible-role-python_venv_build 56 | scm: git 57 | version: master 58 | - name: uwsgi 59 | src: https://opendev.org/openstack/ansible-role-uwsgi 60 | scm: git 61 | version: master 62 | -------------------------------------------------------------------------------- /tests/group_vars/all_containers.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2016, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | ansible_host: "{{ ansible_host }}" 17 | container_networks: 18 | management_address: 19 | address: "{{ ansible_host }}" 20 | bridge: "br-mgmt" 21 | interface: "eth1" 22 | netmask: "255.255.255.0" 23 | type: "veth" 24 | physical_host: localhost 25 | properties: 26 | service_name: "{{ inventory_hostname }}" 27 | -------------------------------------------------------------------------------- /tests/host_vars/aodh.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2016, Rackspace US, Inc. 3 | # Copyright 2018, VEXXHOST, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | ansible_host: 10.1.0.5 18 | ansible_become: True 19 | ansible_user: root 20 | container_name: aodh 21 | -------------------------------------------------------------------------------- /tests/host_vars/gnocchi.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2016, Rackspace US, Inc. 3 | # Copyright 2018, VEXXHOST, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | ansible_host: 10.1.0.4 18 | ansible_become: True 19 | ansible_user: root 20 | container_name: gnocchi 21 | -------------------------------------------------------------------------------- /tests/host_vars/infra1.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2016, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | ansible_host: 10.1.0.2 17 | ansible_become: True 18 | ansible_user: root 19 | container_name: infra1 20 | -------------------------------------------------------------------------------- /tests/host_vars/localhost.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2016, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | bridges: 17 | - "br-mgmt" 18 | 19 | -------------------------------------------------------------------------------- /tests/host_vars/openstack1.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2016, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | ansible_host: 10.1.0.3 17 | ansible_become: True 18 | ansible_user: root 19 | container_name: openstack1 20 | -------------------------------------------------------------------------------- /tests/inventory: -------------------------------------------------------------------------------- 1 | [all] 2 | localhost 3 | infra1 4 | openstack1 5 | aodh 6 | gnocchi 7 | 8 | [all_containers] 9 | infra1 10 | openstack1 11 | aodh 12 | gnocchi 13 | 14 | [oslomsg_rpc_all] 15 | infra1 16 | 17 | [oslomsg_notify_all] 18 | infra1 19 | 20 | [rabbitmq_all] 21 | infra1 22 | 23 | [galera_all] 24 | infra1 25 | 26 | [memcached_all] 27 | infra1 28 | 29 | [service_all:children] 30 | rabbitmq_all 31 | galera_all 32 | memcached_all 33 | 34 | [keystone_all] 35 | openstack1 36 | 37 | [utility_all] 38 | infra1 39 | 40 | [gnocchi_all] 41 | gnocchi 42 | 43 | [aodh_all] 44 | aodh 45 | 46 | [aodh_alarm_notifier] 47 | aodh 48 | 49 | [aodh_alarm_evaluator] 50 | aodh 51 | 52 | [aodh_api] 53 | aodh 54 | 55 | [aodh_listener] 56 | aodh 57 | -------------------------------------------------------------------------------- /tests/os_aodh-overrides.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | aodh_container_db_password: "secrete" 17 | aodh_db_address: "{{ test_galera_host }}" 18 | aodh_oslomsg_rpc_password: "secrete" 19 | aodh_developer_mode: true 20 | aodh_service_password: "secrete" 21 | aodh_service_publicuri: "{{ aodh_service_proto }}://{{ hostvars[groups['aodh_all'][0]]['ansible_host'] }}:{{ aodh_service_port }}" 22 | aodh_service_internaluri: "{{ aodh_service_proto }}://{{ hostvars[groups['aodh_all'][0]]['ansible_host'] }}:{{ aodh_service_port }}" 23 | aodh_service_adminuri: "{{ aodh_service_proto }}://{{ hostvars[groups['aodh_all'][0]]['ansible_host'] }}:{{ aodh_service_port }}" 24 | 25 | tempest_run: yes 26 | 27 | tempest_plugins: 28 | - name: tempest-aodh 29 | repo: https://opendev.org/openstack/telemetry-tempest-plugin 30 | branch: master 31 | 32 | tempest_test_whitelist: 33 | - telemetry_tempest_plugin.aodh.api.test_alarming_api 34 | -------------------------------------------------------------------------------- /tests/test-install-aodh.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | - name: Playbook for deploying aodh 17 | hosts: aodh_all 18 | user: root 19 | gather_facts: true 20 | vars_files: 21 | - common/test-vars.yml 22 | roles: 23 | - role: "os_aodh" 24 | -------------------------------------------------------------------------------- /tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2015, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Setup the host 17 | - import_playbook: common/test-setup-host.yml 18 | 19 | # Install RabbitMQ/MariaDB 20 | - import_playbook: common/test-install-infra.yml 21 | 22 | # Install Keystone 23 | - import_playbook: common/test-install-keystone.yml 24 | 25 | # Install Gnocchi 26 | - import_playbook: common/test-install-gnocchi.yml 27 | 28 | # Install Aodh 29 | - import_playbook: test-install-aodh.yml 30 | 31 | # Install and execute Tempest 32 | - import_playbook: common/test-install-tempest.yml 33 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | minversion = 3.18.0 3 | skipsdist = True 4 | envlist = docs,linters,functional 5 | ignore_basepython_conflict = True 6 | 7 | [testenv] 8 | basepython = python3 9 | usedevelop = False 10 | commands = 11 | /usr/bin/find . -type f -name "*.pyc" -delete 12 | passenv = 13 | COMMON_TESTS_PATH 14 | HOME 15 | http_proxy 16 | HTTP_PROXY 17 | https_proxy 18 | HTTPS_PROXY 19 | no_proxy 20 | NO_PROXY 21 | TESTING_BRANCH 22 | TESTING_HOME 23 | USER 24 | allowlist_externals = 25 | bash 26 | setenv = 27 | PYTHONUNBUFFERED=1 28 | ROLE_NAME=os_aodh 29 | TEST_IDEMPOTENCE=false 30 | VIRTUAL_ENV={envdir} 31 | WORKING_DIR={toxinidir} 32 | 33 | [testenv:docs] 34 | deps = 35 | -r{toxinidir}/doc/requirements.txt 36 | -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} 37 | commands = 38 | bash -c "rm -rf doc/build" 39 | doc8 doc 40 | sphinx-build --keep-going -b html doc/source doc/build/html 41 | 42 | [testenv:pdf-docs] 43 | deps = {[testenv:docs]deps} 44 | allowlist_externals = 45 | make 46 | commands = 47 | sphinx-build -W --keep-going -b latex doc/source doc/build/pdf 48 | make -C doc/build/pdf 49 | 50 | [doc8] 51 | extensions = .rst 52 | 53 | [testenv:releasenotes] 54 | deps = 55 | -r{toxinidir}/doc/requirements.txt 56 | -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} 57 | commands = 58 | sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html 59 | 60 | [testenv:venv] 61 | commands = 62 | {posargs} 63 | 64 | [testenv:pep8] 65 | commands = 66 | bash -c "{toxinidir}/tests/common/test-pep8.sh" 67 | 68 | [flake8] 69 | ignore = F403 70 | 71 | [testenv:bashate] 72 | commands = 73 | bash -c "{toxinidir}/tests/common/test-bashate.sh" 74 | 75 | [testenv:ansible-syntax] 76 | commands = 77 | bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh" 78 | 79 | [testenv:ansible-lint] 80 | commands = 81 | bash -c "{toxinidir}/tests/common/test-ansible-lint.sh" 82 | 83 | [testenv:functional] 84 | commands = 85 | bash -c "{toxinidir}/tests/common/test-ansible-functional.sh" 86 | 87 | [testenv:distro_install] 88 | setenv = 89 | {[testenv]setenv} 90 | ANSIBLE_PARAMETERS=-e @{toxinidir}/tests/common/test-distro_install-vars.yml 91 | commands = 92 | bash -c "{toxinidir}/tests/common/test-ansible-functional.sh" 93 | 94 | [testenv:linters] 95 | commands = 96 | bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh" 97 | {[testenv:pep8]commands} 98 | {[testenv:bashate]commands} 99 | {[testenv:ansible-lint]commands} 100 | {[testenv:ansible-syntax]commands} 101 | -------------------------------------------------------------------------------- /vars/debian.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2016, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | ## APT Cache options 17 | cache_timeout: 600 18 | 19 | # Common apt packages 20 | aodh_distro_packages: 21 | - git 22 | - rpcbind 23 | - libxml2 24 | 25 | aodh_devel_distro_packages: 26 | - libffi-dev 27 | - libssl-dev 28 | - libsystemd-dev 29 | - libxml2-dev 30 | - libxslt1-dev 31 | - pkg-config 32 | 33 | aodh_service_distro_packages: 34 | - python3-aodh 35 | - python3-systemd 36 | 37 | aodh_test_distro_packages: 38 | - git 39 | -------------------------------------------------------------------------------- /vars/distro_install.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2018, SUSE Linux GmbH. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | aodh_package_list: |- 17 | {% set packages = aodh_distro_packages + aodh_service_distro_packages %} 18 | {{ packages }} 19 | 20 | _aodh_bin: "/usr/bin" 21 | -------------------------------------------------------------------------------- /vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | _aodh_is_first_play_host: >- 17 | {{ 18 | (aodh_services['aodh-api']['group'] in group_names and 19 | inventory_hostname == (groups[aodh_services['aodh-api']['group']] | select('in', ansible_play_hosts)) | first) | bool 20 | }} 21 | 22 | _aodh_oslomsg_rpc_vhost_conf: >- 23 | {{ 24 | (aodh_oslomsg_rpc_vhost is string) | ternary(aodh_oslomsg_rpc_vhost, aodh_oslomsg_rpc_vhost | selectattr( 25 | 'state', 'eq', 'present') | map(attribute='name') | first) 26 | }} 27 | 28 | _aodh_oslomsg_notify_vhost_conf: >- 29 | {{ 30 | (aodh_oslomsg_notify_vhost is string) | ternary(aodh_oslomsg_notify_vhost, aodh_oslomsg_notify_vhost | selectattr( 31 | 'state', 'eq', 'present') | map(attribute='name') | first) 32 | }} 33 | 34 | filtered_aodh_services: |- 35 | {% set services = [] %} 36 | {% for key, value in aodh_services.items() %} 37 | {% if (value['group'] in group_names) and 38 | not ('wsgi_app' in value and value['wsgi_app']) %} 39 | {% set _ = value.update( 40 | { 41 | 'service_key': key, 42 | 'enabled': value['enabled'] | default(True), 43 | 'state': value['state'] | default('started'), 44 | 'config_overrides': value.init_config_overrides 45 | } 46 | ) 47 | %} 48 | {% set _ = value.pop('init_config_overrides') -%} 49 | {% set _ = services.append(value) %} 50 | {% endif %} 51 | {% endfor %} 52 | {{ services }} 53 | 54 | uwsgi_aodh_services: |- 55 | {% set services = {} %} 56 | {% for key, value in aodh_services.items() %} 57 | {% if (value['group'] in group_names) and 58 | ('wsgi_app' in value and value['wsgi_app']) %} 59 | {% set _ = value.update( 60 | { 61 | 'wsgi_path': aodh_bin ~ '/' ~ value.wsgi_name, 62 | 'wsgi_venv': ((aodh_install_method == 'source') | ternary(aodh_bin | dirname, None)), 63 | 'uwsgi_uid': aodh_system_user_name, 64 | 'uwsgi_guid': aodh_system_group_name, 65 | 'uwsgi_processes': aodh_wsgi_processes, 66 | 'uwsgi_threads': aodh_wsgi_threads 67 | } 68 | ) %} 69 | {% set _ = services.update({key: value}) %} 70 | {% endif %} 71 | {% endfor %} 72 | {{ services }} 73 | -------------------------------------------------------------------------------- /vars/redhat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2016, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Common packages 17 | aodh_distro_packages: 18 | - git-core 19 | - rpcbind 20 | 21 | aodh_devel_distro_packages: 22 | - libffi-devel 23 | - openssl-devel 24 | - libxml2-devel 25 | - libxslt-devel 26 | - systemd-devel 27 | - which 28 | 29 | aodh_service_distro_packages: 30 | - openstack-aodh-api 31 | - openstack-aodh-evaluator 32 | - openstack-aodh-expirer 33 | - openstack-aodh-listener 34 | - openstack-aodh-notifier 35 | - python3-systemd 36 | 37 | aodh_test_distro_packages: 38 | - git 39 | -------------------------------------------------------------------------------- /vars/source_install.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2018, SUSE Linux GmbH. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | aodh_package_list: |- 17 | {% set packages = aodh_distro_packages %} 18 | {{ packages }} 19 | 20 | _aodh_bin: "/openstack/venvs/aodh-{{ aodh_venv_tag }}/bin" 21 | -------------------------------------------------------------------------------- /zuul.d/project.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017, Rackspace US, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | - project: 17 | templates: 18 | - check-requirements 19 | - openstack-ansible-linters-jobs 20 | - openstack-ansible-deploy-aio_metal-jobs 21 | - openstack-ansible-deploy-aio_distro_metal-jobs 22 | - openstack-ansible-deploy-aio_telemetry_metal-jobs 23 | - publish-openstack-docs-pti 24 | - build-release-notes-jobs-python3 25 | --------------------------------------------------------------------------------