Skip to content
Permalink
Browse files

Initial commit to Internet2 Github

  • Loading branch information
ethan committed Apr 11, 2018
0 parents commit b50f5ecbd15c0580669342c1176a65788a9a8ca1
Showing with 279 additions and 0 deletions.
  1. +28 −0 Dockerfile
  2. +13 −0 README.md
  3. +6 −0 rabbitmq.ini
  4. +215 −0 rabbitmq.json
  5. +6 −0 rabbitmqctl.ini
  6. +4 −0 rabbitmqctl.sh
  7. BIN rabbittrace-0.1-jar-with-dependencies.jar
  8. +7 −0 trace.ini
@@ -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"]
@@ -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

@@ -0,0 +1,6 @@
[program:rabbitmq]
command=rabbitmq-server
priority=1
redirect_stderr=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
@@ -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": "/"
}
]
}
@@ -0,0 +1,6 @@
[program:rabbitmqctl]
command=/root/rabbitmqctl.sh
priority=3
redirect_stderr=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
@@ -0,0 +1,4 @@
#!/bin/bash
sleep 5
rabbitmqctl trace_on
tail -f /dev/null
Binary file not shown.
@@ -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

0 comments on commit b50f5ec

Please sign in to comment.
You can’t perform that action at this time.