Let us finish the rabbit hunt
This change removes support for RabbitMQ. It's no longer needed by any services, we've agreed to find an alternative for multi-node inspector, and neutron will likely stop needing it with the switch to OVN (and that is assuming we ever get to supporting neutron, which is unlikely). Change-Id: I2dbefe3482addfb9cd65c34d8d1007a501531399
This commit is contained in:
parent
292b16364e
commit
ef51bdc4ad
@ -361,10 +361,9 @@ A few important notes:
|
||||
to nodes. This image can be easily customized if so desired.
|
||||
|
||||
The re-execution of the playbook will cause states to be re-asserted. If not
|
||||
already present, a number of software packages including MySQL and RabbitMQ
|
||||
will be installed on the host. Python code will be reinstalled regardless if
|
||||
it has changed. RabbitMQ user passwords will be reset, and services will be
|
||||
restarted.
|
||||
already present, a number of software packages including MySQL will be
|
||||
installed on the host. Python code will be reinstalled regardless if
|
||||
it has changed.
|
||||
|
||||
Playbook Execution
|
||||
==================
|
||||
|
@ -2,8 +2,7 @@ bifrost-ironic-install
|
||||
======================
|
||||
|
||||
This role installs a standalone ironic deployment with all required substrate
|
||||
in order for it to be utilized, including MySQL, RabbitMQ, dnsmasq, and
|
||||
nginx.
|
||||
in order for it to be utilized, including MySQL, dnsmasq, and nginx.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
@ -29,14 +29,12 @@ transform_boot_image: false
|
||||
# If testing is true, then the environment is setup for using libvirt
|
||||
# virtual machines for the hardware instead of real hardware.
|
||||
testing: false
|
||||
# Use Rabbit MQ as a message bus.
|
||||
use_rabbitmq: false
|
||||
|
||||
# set to true to skip installation completely
|
||||
skip_install: False
|
||||
# set to true to skip installing ironic dependencies
|
||||
skip_package_install: False
|
||||
# set to true to skip generation of configs, ironic db and rabbitmq configuration
|
||||
# set to true to skip generation of configs and database configuration
|
||||
skip_bootstrap: False
|
||||
# set to true to skip starting ironic services and dependencies
|
||||
skip_start: False
|
||||
|
@ -41,24 +41,12 @@
|
||||
ignore_errors: true
|
||||
when: ansible_distribution in ["CentOS", "RedHat"]
|
||||
|
||||
# NOTE(sean-k-mooney) only the RabbitMQ server and MySQL db are started
|
||||
# during bootstrapping. all other services are started in the Start phase.
|
||||
# NOTE(sean-k-mooney) only the MySQL database is started during bootstrapping.
|
||||
# All other services are started in the Start phase.
|
||||
- name: "Start database service"
|
||||
service: name={{ mysql_service_name }} state=started enabled=yes
|
||||
when: ironic.database.host == 'localhost'
|
||||
|
||||
- name: "Create ironic user in RabbitMQ"
|
||||
rabbitmq_user:
|
||||
user: "ironic"
|
||||
password: "{{ ironic_db_password }}"
|
||||
force: yes
|
||||
state: present
|
||||
configure_priv: ".*"
|
||||
write_priv: ".*"
|
||||
read_priv: ".*"
|
||||
no_log: true
|
||||
when: use_rabbitmq
|
||||
|
||||
- name: "Set mysql_username if environment variable mysql_user is set"
|
||||
set_fact:
|
||||
mysql_username: "{{ lookup('env', 'mysql_user') }}"
|
||||
|
@ -51,11 +51,6 @@
|
||||
- "../defaults/required_defaults_{{ ansible_distribution | regex_replace(' ', '_') }}_{{ ansible_distribution_version }}.yml"
|
||||
- "../defaults/dummy-defaults.yml"
|
||||
|
||||
- name: "Install RabbitMQ if required"
|
||||
import_role:
|
||||
name: bifrost-rabbitmq
|
||||
when: use_rabbitmq | bool
|
||||
|
||||
- name: "Install Ironic deps"
|
||||
include: install.yml
|
||||
when: skip_package_install | bool != True
|
||||
|
@ -24,11 +24,6 @@
|
||||
- name: "Start database service"
|
||||
service: name={{ mysql_service_name }} state=started enabled=yes
|
||||
|
||||
- import_role:
|
||||
name: bifrost-rabbitmq
|
||||
tasks_from: start
|
||||
when: use_rabbitmq
|
||||
|
||||
- name: "start ironic-inspector"
|
||||
include: inspector_start.yml
|
||||
when: enable_inspector | bool == true
|
||||
|
@ -15,11 +15,7 @@ debug = {{ inspector_debug | bool }}
|
||||
log_dir = {{ inspector_log_dir }}
|
||||
{% endif %}
|
||||
|
||||
{% if use_rabbitmq is defined and use_rabbitmq | bool == true %}
|
||||
transport_url = rabbit://ironic:{{ironic_db_password }}@{{ message_queue_host | default('127.0.0.1') }}:{{ message_queue_port | default('5672') }}/{{ rabbit_virtual_host | default('') }}
|
||||
{% else %}
|
||||
transport_url = fake://
|
||||
{% endif %}
|
||||
|
||||
[database]
|
||||
connection=mysql+pymysql://{{ ironic_inspector.database.username }}:{{ ironic_inspector.database.password }}@{{ ironic_inspector.database.host }}/{{ ironic_inspector.database.name }}?charset=utf8
|
||||
|
@ -21,11 +21,7 @@ enabled_hardware_types = {{ enabled_hardware_types }}
|
||||
|
||||
default_resource_class = {{ default_resource_class }}
|
||||
|
||||
{% if use_rabbitmq is defined and use_rabbitmq | bool == true %}
|
||||
transport_url = rabbit://ironic:{{ironic_db_password }}@{{ message_queue_host | default('127.0.0.1') }}:{{ message_queue_port | default('5672') }}/{{ rabbit_virtual_host | default('') }}
|
||||
{% else %}
|
||||
rpc_transport = json-rpc
|
||||
{% endif %}
|
||||
|
||||
{% if enable_keystone | bool %}
|
||||
auth_strategy = keystone
|
||||
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
skip_package_install: false
|
||||
# This seems to be the same for all supported distributions.
|
||||
rabbitmq_package: rabbitmq-server
|
||||
rabbitmq_port: 5672
|
||||
rabbitmq_service: rabbitmq-server
|
||||
|
||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
@ -1,62 +0,0 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
---
|
||||
- name: Install RabbitMQ package
|
||||
package:
|
||||
name: "{{ rabbitmq_package }}"
|
||||
state: present
|
||||
when: not skip_package_install | bool
|
||||
|
||||
- name: "Ensure /etc/hosts has good defaults"
|
||||
lineinfile:
|
||||
dest: "/etc/hosts"
|
||||
regexp: "{{ item.regexp }}.*({{ ansible_hostname }}|localhost).*"
|
||||
line: "{{ item.contents }}"
|
||||
loop:
|
||||
- { regexp: '^127\.0\.0\.1', contents: '127.0.0.1 {{ ansible_hostname }} {{ ansible_fqdn }} localhost' }
|
||||
- { regexp: '^::1', contents: '::1 {{ ansible_hostname }} {{ ansible_fqdn }} localhost ipv6-localhost ipv6-loopback' }
|
||||
when: not skip_bootstrap | bool
|
||||
|
||||
# NOTE(hwoarang): The erlang SUSE package forces epmd to listen on localhost
|
||||
# address which breaks rabbitmq-server when listening on a different address.
|
||||
# https://build.opensuse.org/package/view_file/devel:languages:erlang:Factory/erlang/README.SUSE?expand=1
|
||||
- name: "Make epmd listen to all addresses on SUSE"
|
||||
block:
|
||||
- blockinfile:
|
||||
dest: "/etc/systemd/system/epmd.socket.d/port.conf"
|
||||
content: |
|
||||
[Socket]
|
||||
ListenStream=
|
||||
ListenStream=0.0.0.0:4369
|
||||
create: yes
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||
|
||||
- systemd: daemon_reload=yes
|
||||
|
||||
- service: name={{ item }} state=stopped enabled=no
|
||||
loop:
|
||||
- epmd.socket
|
||||
- epmd
|
||||
when:
|
||||
- ansible_os_family == 'Suse'
|
||||
- not skip_bootstrap | bool
|
||||
|
||||
- import_tasks: start.yml
|
||||
when: not skip_start | bool
|
||||
|
||||
- name: "Ensure guest user is removed from rabbitmq"
|
||||
rabbitmq_user:
|
||||
user: "guest"
|
||||
state: absent
|
||||
force: yes
|
||||
when: not skip_bootstrap | bool
|
@ -1,27 +0,0 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
---
|
||||
- name: "Start rabbitmq-server"
|
||||
service:
|
||||
name: "{{ rabbitmq_service }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
# NOTE(cinerama): on some systems, rabbit may not be ready when we want to
|
||||
# make changes to users if we don't wait first
|
||||
# TODO(TheJulia): This needs to be changed to a variable, however
|
||||
# should update this playbook all at once with new variable structures.
|
||||
- name: "Wait for rabbitmq"
|
||||
wait_for:
|
||||
port: "{{ rabbitmq_port }}"
|
||||
delay: 5
|
4
releasenotes/notes/no-rabbit-95434aaea3bb5528.yaml
Normal file
4
releasenotes/notes/no-rabbit-95434aaea3bb5528.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Support for installing and using RabbitMQ has been removed.
|
@ -40,10 +40,6 @@
|
||||
# apt: name=erlang-base state=present
|
||||
# when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Install Rabbit-Server
|
||||
apt: name=rabbitmq-server state=present
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Install MySql-Server
|
||||
apt: name=mariadb-server state=present
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
Loading…
Reference in New Issue
Block a user