aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.env.sample4
-rw-r--r--docker-compose.yml3
-rw-r--r--rabbitmq/Dockerfile4
-rwxr-xr-xrabbitmq/init.sh10
-rw-r--r--src/pharos_dashboard/settings.py6
5 files changed, 6 insertions, 21 deletions
diff --git a/config.env.sample b/config.env.sample
index 8d0afd6..a2675ef 100644
--- a/config.env.sample
+++ b/config.env.sample
@@ -20,8 +20,8 @@ JIRA_USER_NAME=sample_jira_user
JIRA_USER_PASSWORD=sample_jira_pass
# Rabbitmq
-RABBITMQ_USER=opnfv
-RABBITMQ_PASSWORD=opnfvopnfv
+RABBITMQ_DEFAULT_USER=opnfv
+RABBITMQ_DEFAULT_PASS=opnfvopnfv
# Cleanup: time is in days
BOOKING_EXPIRE_TIME=30
diff --git a/docker-compose.yml b/docker-compose.yml
index 44a263f..63a778b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -53,8 +53,7 @@ services:
- pharos-data:/var/lib/postgresql/data
rabbitmq:
- restart: always
- build: ./rabbitmq/
+ image: rabbitmq
container_name: rm01
env_file: config.env
ports:
diff --git a/rabbitmq/Dockerfile b/rabbitmq/Dockerfile
deleted file mode 100644
index 71162a4..0000000
--- a/rabbitmq/Dockerfile
+++ /dev/null
@@ -1,4 +0,0 @@
-FROM rabbitmq
-
-ADD init.sh /init.sh
-CMD ["/init.sh"] \ No newline at end of file
diff --git a/rabbitmq/init.sh b/rabbitmq/init.sh
deleted file mode 100755
index 9d04dd1..0000000
--- a/rabbitmq/init.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# Create Rabbitmq user
-( sleep 10 ; \
-rabbitmqctl add_user $RABBITMQ_USER $RABBITMQ_PASSWORD 2>/dev/null ; \
-rabbitmqctl set_user_tags $RABBITMQ_USER administrator ; \
-rabbitmqctl set_permissions -p / $RABBITMQ_USER ".*" ".*" ".*" ; \
-echo "*** User '$RABBITMQ_USER' with password '$RABBITMQ_PASSWORD' completed. ***") &
-
-rabbitmq-server $@
diff --git a/src/pharos_dashboard/settings.py b/src/pharos_dashboard/settings.py
index e3b36b0..8155fd4 100644
--- a/src/pharos_dashboard/settings.py
+++ b/src/pharos_dashboard/settings.py
@@ -165,10 +165,10 @@ OAUTH_CALLBACK_URL = os.environ['DASHBOARD_URL'] + '/accounts/authenticated'
CELERY_TIMEZONE = 'UTC'
RABBITMQ_URL = 'rabbitmq'
-RABBITMQ_USER = os.environ['RABBITMQ_USER']
-RABBITMQ_PASSWORD = os.environ['RABBITMQ_PASSWORD']
+RABBITMQ_DEFAULT_USER = os.environ['RABBITMQ_DEFAULT_USER']
+RABBITMQ_DEFAULT_PASS = os.environ['RABBITMQ_DEFAULT_PASS']
-BROKER_URL = 'amqp://' + RABBITMQ_USER + ':' + RABBITMQ_PASSWORD + '@rabbitmq:5672//'
+BROKER_URL = 'amqp://' + RABBITMQ_DEFAULT_USER + ':' + RABBITMQ_DEFAULT_PASS + '@rabbitmq:5672//'
BOOKING_EXP_TIME = os.environ['BOOKING_EXPIRE_TIME']
BOOKING_MAX_NUM = os.environ['BOOKING_MAXIMUM_NUMBER']