Remove RabbitMQ support from Bifrost

During the Train cycle, Bifrost switched to using JSON-RPC by default
for Ironic's internal communication [1], avoiding the need to install
RabbitMQ. This simplifies things, so we may as well remove our custom
configuration of RabbitMQ.

[1] https://review.openstack.org/645093

Change-Id: I3107349530aa753d68fd59baaf13eb7dd5485ae6
This commit is contained in:
Mark Goddard 2019-04-09 15:22:35 +01:00
parent d93c604d7a
commit 33564a0097
6 changed files with 12 additions and 46 deletions

View File

@ -15,9 +15,7 @@
- name: Bootstrap bifrost (this may take several minutes) - name: Bootstrap bifrost (this may take several minutes)
command: > command: >
docker exec bifrost_deploy docker exec bifrost_deploy
bash -c 'source /bifrost/env-vars bash -c 'source /bifrost/env-vars &&
&& cp /etc/bifrost/rabbitmq-env.conf /etc/rabbitmq/rabbitmq-env.conf &&
chown rabbitmq:rabbitmq /etc/rabbitmq/rabbitmq-env.conf &&
ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target
/bifrost/playbooks/install.yaml -e @/etc/bifrost/bifrost.yml /bifrost/playbooks/install.yaml -e @/etc/bifrost/bifrost.yml
-e @/etc/bifrost/dib.yml -e skip_package_install=true' -e @/etc/bifrost/dib.yml -e skip_package_install=true'

View File

@ -24,15 +24,6 @@
- "dib" - "dib"
- "servers" - "servers"
- name: Copying over rabbitmq config
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/bifrost/{{ item }}"
mode: "0660"
become: true
with_items:
- "rabbitmq-env.conf"
- name: Template ssh keys - name: Template ssh keys
template: template:
src: "{{ item.src }}" src: "{{ item.src }}"
@ -43,17 +34,3 @@
- { src: "id_rsa", dest: "id_rsa" } - { src: "id_rsa", dest: "id_rsa" }
- { src: "id_rsa.pub", dest: "id_rsa.pub" } - { src: "id_rsa.pub", dest: "id_rsa.pub" }
- { src: "ssh_config", dest: "ssh_config" } - { src: "ssh_config", dest: "ssh_config" }
# NOTE(mgoddard): The following task was lifted from a Bifrost play
# (playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml). Because
# Bifrost cannot modify /etc/hosts from within the container we must do it
# here.
- name: "Ensure /etc/hosts has good defaults"
lineinfile:
dest: "/etc/hosts"
regexp: "{{ item.regexp }}.*({{ ansible_hostname }}|localhost).*"
line: "{{ item.contents }}"
with_items:
- { 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' }
become: true

View File

@ -15,5 +15,4 @@
- "bifrost_httpboot:/httpboot/" - "bifrost_httpboot:/httpboot/"
- "bifrost_ironic:/var/lib/ironic/" - "bifrost_ironic:/var/lib/ironic/"
- "bifrost_mariadb:/var/lib/mysql/" - "bifrost_mariadb:/var/lib/mysql/"
- "bifrost_rabbitmq:/var/lib/rabbitmq/"
- "bifrost_tftpboot:/tftpboot/" - "bifrost_tftpboot:/tftpboot/"

View File

@ -1,15 +0,0 @@
# Defaults to rabbit. This can be useful if you want to run more than one node
# per machine - RABBITMQ_NODENAME should be unique per erlang-node-and-machine
# combination. See the clustering on a single machine guide for details:
# http://www.rabbitmq.com/clustering.html#single-machine
#NODENAME=rabbit
# By default RabbitMQ will bind to all interfaces, on IPv4 and IPv6 if
# available. Set this if you only want to bind to one network interface or#
# address family.
#NODE_IP_ADDRESS=127.0.0.1
HOME=/var/lib/rabbitmq
# Defaults to 5672.
#NODE_PORT=5672

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
Removes support for RabbitMQ from the Bifrost container. During the Train
cycle, Bifrost switched its default to use JSON-RPC rather than RabbitMQ
for internal Ironic communication. This simplifies the deployment and
should improve reliability.

View File

@ -12,7 +12,7 @@ function test_bifrost {
# TODO(mgoddard): Use openstackclient when clouds.yaml works. See # TODO(mgoddard): Use openstackclient when clouds.yaml works. See
# https://bugs.launchpad.net/bifrost/+bug/1754070. # https://bugs.launchpad.net/bifrost/+bug/1754070.
attempts=0 attempts=0
while [[ $(sudo docker exec bifrost_deploy bash -c "source env-vars && ironic driver-list" | wc -l) -le 4 ]]; do while [[ $(sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal driver list -f value" | wc -l) -eq 0 ]]; do
attempts=$((attempts + 1)) attempts=$((attempts + 1))
if [[ $attempts -gt 6 ]]; then if [[ $attempts -gt 6 ]]; then
echo "Timed out waiting for ironic conductor to become active" echo "Timed out waiting for ironic conductor to become active"
@ -20,9 +20,9 @@ function test_bifrost {
fi fi
sleep 10 sleep 10
done done
sudo docker exec bifrost_deploy bash -c "source env-vars && ironic node-list" sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal node list"
sudo docker exec bifrost_deploy bash -c "source env-vars && ironic node-create --driver ipmi --name test-node" sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal node create --driver ipmi --name test-node"
sudo docker exec bifrost_deploy bash -c "source env-vars && ironic node-delete test-node" sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal node delete test-node"
} }