-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b50f5ec
Showing
8 changed files
with
279 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| FROM centos:latest | ||
| MAINTAINER ethan@unc.edu ekromhout@gmail.com | ||
| RUN yum -y install epel-release && yum -y update && yum -y install pwgen rabbitmq-server supervisor wget | ||
| ENV RABBITMQ_LOGS=- RABBITMQ_SASL_LOGS=- | ||
| RUN /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management | ||
| RUN /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_tracing | ||
| RUN sed -i s/'%% {load_definitions, .*"},'/'{load_definitions, "\/etc\/rabbitmq\/rabbitmq.json"}'/ /etc/rabbitmq/rabbitmq.config | ||
| ENV JAVA_VERSION=8u162 | ||
| ENV BUILD_VERSION=b12 | ||
| ENV JAVA_BUNDLE_ID=0da788060d494f5095bf8624735fa2f1 | ||
| # ==> By uncommenting these next 6 lines, you agree to the Oracle Binary Code License Agreement for Java SE (http://www.oracle.com/technetwork/java/javase/terms/license/index.html) | ||
| RUN wget -nv --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION-$BUILD_VERSION/$JAVA_BUNDLE_ID/jdk-$JAVA_VERSION-linux-x64.rpm" -O /tmp/jdk-$JAVA_VERSION-$BUILD_VERSION-linux-x64.rpm && \ | ||
| yum -y install /tmp/jdk-$JAVA_VERSION-$BUILD_VERSION-linux-x64.rpm && \ | ||
| rm -f /tmp/jdk-$JAVA_VERSION-$BUILD_VERSION-linux-x64.rpm && \ | ||
| alternatives --install /usr/bin/java jar $JAVA_HOME/bin/java 200000 && \ | ||
| alternatives --install /usr/bin/javaws javaws $JAVA_HOME/bin/javaws 200000 && \ | ||
| alternatives --install /usr/bin/javac javac $JAVA_HOME/bin/javac 200000 | ||
|
|
||
| RUN sed -i s/'nodaemon=false'/'nodaemon=true'/ /etc/supervisord.conf | ||
| COPY rabbitmqctl.sh /root/ | ||
| COPY rabbittrace-0.1-jar-with-dependencies.jar /root/ | ||
| COPY trace.ini /etc/supervisord.d/ | ||
| COPY rabbitmq.ini /etc/supervisord.d/ | ||
| COPY rabbitmqctl.ini /etc/supervisord.d/ | ||
| COPY rabbitmq.json /etc/rabbitmq/ | ||
| COPY rabbittrace-0.1-jar-with-dependencies.jar /root/ | ||
| EXPOSE 5672 15672 4369 25672 | ||
| CMD ["supervisord","-c","/etc/supervisord.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # rabbitmq-docker | ||
|
|
||
| This container has rabbitmq built on centos latest | ||
| and has a Java based trace class that uses rabbitmq | ||
| firehose tracing to write message traces to | ||
| /var/log/rabbitmq/trace.log as well as to stdout. | ||
|
|
||
| Supervisor is used to start rabbitmq-server and Java | ||
| for the trace class, as well as to turn on rabbitmq | ||
| tracing. | ||
|
|
||
| Ethan Kromhout ethan@kromhout.us ethan@unc.edu | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [program:rabbitmq] | ||
| command=rabbitmq-server | ||
| priority=1 | ||
| redirect_stderr=true | ||
| stdout_logfile=/dev/fd/1 | ||
| stdout_logfile_maxbytes=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,215 @@ | ||
| { | ||
| "bindings": [ | ||
| { | ||
| "arguments": {}, | ||
| "destination": "firehose.topic", | ||
| "destination_type": "exchange", | ||
| "routing_key": "#", | ||
| "source": "amq.rabbitmq.trace", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "destination": "midpoint_hr", | ||
| "destination_type": "queue", | ||
| "routing_key": "midpoint_hr", | ||
| "source": "midpoint", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "destination": "sor_person", | ||
| "destination_type": "queue", | ||
| "routing_key": "sor_person", | ||
| "source": "sor", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "destination": "ACCT101", | ||
| "destination_type": "queue", | ||
| "routing_key": "basis.courses.ACCT101", | ||
| "source": "amq.topic", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "destination": "CS101", | ||
| "destination_type": "queue", | ||
| "routing_key": "basis.courses.CS101", | ||
| "source": "amq.topic", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "destination": "CS102", | ||
| "destination_type": "queue", | ||
| "routing_key": "basis.courses.CS102", | ||
| "source": "amq.topic", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "destination": "MATH101", | ||
| "destination_type": "queue", | ||
| "routing_key": "basis.courses.MATH101", | ||
| "source": "amq.topic", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "destination": "TIER101", | ||
| "destination_type": "queue", | ||
| "routing_key": "basis.courses.TIER101", | ||
| "source": "amq.topic", | ||
| "vhost": "/" | ||
| } | ||
| ], | ||
| "exchanges": [ | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "internal": false, | ||
| "name": "midpoint", | ||
| "type": "topic", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "internal": false, | ||
| "name": "sor", | ||
| "type": "topic", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "internal": false, | ||
| "name": "firehose.topic", | ||
| "type": "topic", | ||
| "vhost": "/" | ||
| } | ||
| ], | ||
| "parameters": [], | ||
| "permissions": [ | ||
| { | ||
| "configure": ".*", | ||
| "read": ".*", | ||
| "user": "guest", | ||
| "vhost": "/", | ||
| "write": ".*" | ||
| }, | ||
| { | ||
| "configure": ".*", | ||
| "read": ".*", | ||
| "user": "mysql", | ||
| "vhost": "/", | ||
| "write": ".*" | ||
| }, | ||
| { | ||
| "configure": ".*", | ||
| "read": ".*", | ||
| "user": "sis_user", | ||
| "vhost": "/", | ||
| "write": ".*" | ||
| }, | ||
| { | ||
| "configure": ".*", | ||
| "read": ".*", | ||
| "user": "midpoint", | ||
| "vhost": "/", | ||
| "write": ".*" | ||
| } | ||
| ], | ||
| "policies": [], | ||
| "queues": [ | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "name": "firehose", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "name": "midpoint_hr", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "name": "sor_person", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "name": "CS102", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "name": "CS101", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "name": "MATH101", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "name": "ACCT101", | ||
| "vhost": "/" | ||
| }, | ||
| { | ||
| "arguments": {}, | ||
| "auto_delete": false, | ||
| "durable": true, | ||
| "name": "TIER101", | ||
| "vhost": "/" | ||
| } | ||
| ], | ||
| "rabbit_version": "3.3.5", | ||
| "users": [ | ||
| { | ||
| "name": "midpoint", | ||
| "password_hash": "NPRHRH/7sII4hjRpMjx7nGv8Hts=", | ||
| "tags": "" | ||
| }, | ||
| { | ||
| "name": "mysql", | ||
| "password_hash": "F/ngi0JcvYcXYbloSEISdlYqKfo=", | ||
| "tags": "" | ||
| }, | ||
| { | ||
| "name": "sis_user", | ||
| "password_hash": "5x3yS5eXea8iSGejDoh4L9Ex2xk=", | ||
| "tags": "administrator" | ||
| }, | ||
| { | ||
| "name": "guest", | ||
| "password_hash": "4e2kx67rm/QsibQrLcfxyMQMDv4=", | ||
| "tags": "administrator" | ||
| } | ||
| ], | ||
| "vhosts": [ | ||
| { | ||
| "name": "/" | ||
| } | ||
| ] | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [program:rabbitmqctl] | ||
| command=/root/rabbitmqctl.sh | ||
| priority=3 | ||
| redirect_stderr=true | ||
| stdout_logfile=/dev/fd/1 | ||
| stdout_logfile_maxbytes=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/bash | ||
| sleep 5 | ||
| rabbitmqctl trace_on | ||
| tail -f /dev/null |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [program:trace] | ||
| command=/usr/java/latest/bin/java -cp rabbittrace-0.1-jar-with-dependencies.jar edu.unc.tier.rabbittrace.Trace '#' | ||
| directory=/root | ||
| priority=2 | ||
| redirect_stderr=true | ||
| stdout_logfile=/dev/fd/1 | ||
| stdout_logfile_maxbytes=0 |