Install RabitMQ for RPC messaging between processes 97/53597/7
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Mon, 12 Mar 2018 17:03:30 +0000 (17:03 +0000)
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Wed, 21 Mar 2018 09:15:44 +0000 (09:15 +0000)
In NetworkServices Tescases, the TGs (traffic generators) run the traffic in
a separate process. In order to synchronize the traffic injection and the
runner interval loops, an RPC server is needed to publish/subscribe events.

RabbitMQ is a well supported MQ in Linux (used in OpenStack or collectd)
and supported by Python implemented projects like oslo.messaging [1].

RabbitMQ default configuration:
- Port: 5672
- User/password: yardstick/yardstick

[1]https://github.com/openstack/oslo.messaging

JIRA: YARDSTICK-1068

Change-Id: I15db294ee430fb38e574a59b9ce1bf0f8b651a67
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
docker/Dockerfile
docker/Dockerfile.aarch64.patch
install.sh

index 959315c..b97337e 100644 (file)
@@ -39,7 +39,8 @@ RUN ${YARDSTICK_REPO_DIR}/docker/supervisor.sh
 
 RUN echo "daemon off;" >> /etc/nginx/nginx.conf
 
-EXPOSE 5000
+# nginx=5000, rabbitmq=5672
+EXPOSE 5000 5672
 
 ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR}
 ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR}
index a224329..de272f5 100644 (file)
@@ -42,8 +42,8 @@ index 2ee5b4c..23e5ea5 100644
  RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 python-openstackclient==3.11.0 python-heatclient==1.11.0
 
 @@ -43,8 +44,8 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf
-
- EXPOSE 5000
+# nginx=5000, rabbitmq=5672
+EXPOSE 5000 5672
 
 -ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR}
 -ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR}
index 1dbf64d..6f4ab8c 100755 (executable)
@@ -85,6 +85,7 @@ apt-get update && apt-get install -y \
     libxss-dev \
     sudo \
     iputils-ping
+    rabbitmq-server
 
 if [[ "${DOCKER_ARCH}" != "aarch64" ]]; then
     apt-get install -y libc6:arm64
@@ -94,6 +95,10 @@ apt-get -y autoremove && apt-get clean
 
 git config --global http.sslVerify false
 
+# Configure and restart RabbitMQ
+rabbitmqctl add_user yardstick yardstick
+rabbitmqctl set_permissions yardstick ".*" ".*" ".*"
+rabbitmqctl reset
 
 # install yardstick + dependencies
 easy_install -U pip==9.0.1