summaryrefslogtreecommitdiffstats
path: root/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'dashboard')
-rw-r--r--dashboard/config.env.sample4
-rw-r--r--dashboard/docker-compose.yml3
-rw-r--r--dashboard/rabbitmq/Dockerfile4
-rwxr-xr-xdashboard/rabbitmq/init.sh10
-rw-r--r--dashboard/src/pharos_dashboard/settings.py6
5 files changed, 6 insertions, 21 deletions
diff --git a/dashboard/config.env.sample b/dashboard/config.env.sample
index 8d0afd6..a2675ef 100644
--- a/dashboard/config.env.sample
+++ b/dashboard/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/dashboard/docker-compose.yml b/dashboard/docker-compose.yml
index 44a263f..63a778b 100644
--- a/dashboard/docker-compose.yml
+++ b/dashboard/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/dashboard/rabbitmq/Dockerfile b/dashboard/rabbitmq/Dockerfile
deleted file mode 100644
index 71162a4..0000000
--- a/dashboard/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/dashboard/rabbitmq/init.sh b/dashboard/rabbitmq/init.sh
deleted file mode 100755
index 9d04dd1..0000000
--- a/dashboard/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/dashboard/src/pharos_dashboard/settings.py b/dashboard/src/pharos_dashboard/settings.py
index e3b36b0..8155fd4 100644
--- a/dashboard/src/pharos_dashboard/settings.py
+++ b/dashboard/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']