From 2c76dd4a26652ebc2e040cc5c943e39ad931c64f Mon Sep 17 00:00:00 2001 From: Sayantani Goswami Date: Tue, 24 Jan 2017 00:03:27 +0000 Subject: [PATCH] Fix RabbitMQ server error in bifrost Update playbooks to ensure rabbitMQ server starts successfully in the bifrost container. Change-Id: I73e3d7f2b50221aeff75576d594f64abcea2d43b Closes-Bug: #1658768 --- ansible/roles/bifrost/tasks/bootstrap.yml | 4 +++- ansible/roles/bifrost/tasks/config.yml | 7 +++++++ ansible/roles/bifrost/templates/rabbitmq-env.conf | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ansible/roles/bifrost/templates/rabbitmq-env.conf diff --git a/ansible/roles/bifrost/tasks/bootstrap.yml b/ansible/roles/bifrost/tasks/bootstrap.yml index e833d6ead5..9da2953da4 100644 --- a/ansible/roles/bifrost/tasks/bootstrap.yml +++ b/ansible/roles/bifrost/tasks/bootstrap.yml @@ -3,9 +3,11 @@ command: > docker exec bifrost_deploy bash -c '/bifrost/scripts/env-setup.sh && source /bifrost/env-vars - && ansible-playbook -vvvv -i /bifrost/playbooks/inventory/localhost + && cp /etc/bifrost/rabbitmq-env.conf /etc/rabbitmq/rabbitmq-env.conf && + ansible-playbook -vvvv -i /bifrost/playbooks/inventory/localhost /bifrost/playbooks/install.yaml -e @/etc/bifrost/bifrost.yml -e @/etc/bifrost/dib.yml -e skip_package_install=true' + - name: Installing ssh keys command: > docker exec bifrost_deploy diff --git a/ansible/roles/bifrost/tasks/config.yml b/ansible/roles/bifrost/tasks/config.yml index 717c4dead2..6fbeb85a7f 100644 --- a/ansible/roles/bifrost/tasks/config.yml +++ b/ansible/roles/bifrost/tasks/config.yml @@ -19,6 +19,13 @@ - "dib" - "servers" +- name: Copying over rabbitmq config + template: + src: "{{ item }}" + dest: "{{ node_config_directory }}/bifrost/{{ item }}" + with_items: + - "rabbitmq-env.conf" + - name: Template ssh keys template: src: "{{ item.src }}" diff --git a/ansible/roles/bifrost/templates/rabbitmq-env.conf b/ansible/roles/bifrost/templates/rabbitmq-env.conf new file mode 100644 index 0000000000..08a56e5b6e --- /dev/null +++ b/ansible/roles/bifrost/templates/rabbitmq-env.conf @@ -0,0 +1,15 @@ +# 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