Skip to content

Commit

Permalink
Add Artemis broker to Sandbox stack.
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Hudalla <kai.hudalla@bosch-si.com>
  • Loading branch information
Kai Hudalla committed Oct 20, 2017
1 parent b24b6e5 commit bf0fd16
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 123 deletions.
File renamed without changes.
33 changes: 33 additions & 0 deletions example/src/main/sandbox/artemis/artemis.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ARTEMIS_HOME='/maven'
ARTEMIS_INSTANCE='/opt/artemis'

# The logging config will need an URI
# this will be encoded in case you use spaces or special characters
# on your directory structure
ARTEMIS_INSTANCE_URI='file:/opt/artemis/'

# Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can be referenced in broker.xml
#ARTEMIS_CLUSTER_PROPS="-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446"


# Java Opts
# limit memory consumption to 512MB
JAVA_ARGS=" -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms256M -Xmx512M"

#
# There might be options that you only want to enable on specific commands, like setting a JMX port
# See https://issues.apache.org/jira/browse/ARTEMIS-318
#if [ "$1" = "run" ]; then
# JAVA_ARGS="$JAVA_ARGS -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.rmi.port=1098 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
#fi

#
# Logs Safepoints JVM pauses: Uncomment to enable them
# In addition to the traditional GC logs you could enable some JVM flags to know any meaningful and "hidden" pause that could
# affect the latencies of the services delivered by the broker, including those that are not reported by the classic GC logs
# and dependent by JVM background work (eg method deoptimizations, lock unbiasing, JNI, counted loops and obviously GC activity).
# Replace "all_pauses.log" with the file name you want to log to.
# JAVA_ARGS="$JAVA_ARGS -XX:+PrintSafepointStatistics -XX:PrintSafepointStatisticsCount=1 -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+LogVMOutput -XX:LogFile=all_pauses.log"

# Debug args: Uncomment to enable debug
#DEBUG_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
22 changes: 22 additions & 0 deletions example/src/main/sandbox/sandbox-qdrouterd.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,28 @@
"saslMechanisms": "EXTERNAL"
}],

["connector", {
"sslProfile": "external",
"name": "broker",
"host": "hono-artemis.hono",
"port": 5671,
"role": "route-container",
"saslUsername": "artemis",
"saslPassword": "artemis"
}],

["linkRoute", {
"prefix": "event/",
"dir": "in",
"connection": "broker"
}],

["linkRoute", {
"prefix": "event/",
"dir": "out",
"connection": "broker"
}],

["policy", {
"maxConnections": 220,
"enableVhostPolicy": true,
Expand Down
87 changes: 0 additions & 87 deletions example/src/main/sandbox/sandbox-stack.yml

This file was deleted.

50 changes: 25 additions & 25 deletions example/src/main/sandbox/swarm_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,31 @@ docker service create $CREATE_OPTIONS --name influxdb \
docker service create $CREATE_OPTIONS --name grafana -p 3001:3000 eclipsehono/grafana:${project.version}
echo ... done

#echo
#echo Deploying Artemis broker ...
#docker secret create -l $NS artemis-broker.xml $CONFIG/hono-artemis-jar/etc/artemis-broker.xml
#docker secret create -l $NS artemis-bootstrap.xml $CONFIG/hono-artemis-jar/etc/artemis-bootstrap.xml
#docker secret create -l $NS artemis-users.properties $CONFIG/hono-artemis-jar/etc/artemis-users.properties
#docker secret create -l $NS artemis-roles.properties $CONFIG/hono-artemis-jar/etc/artemis-roles.properties
#docker secret create -l $NS login.config $CONFIG/hono-artemis-jar/etc/login.config
#docker secret create -l $NS logging.properties $CONFIG/hono-artemis-jar/etc/logging.properties
#docker secret create -l $NS artemis.profile $CONFIG/hono-artemis-jar/etc/artemis.profile
#docker secret create -l $NS artemisKeyStore.p12 $CERTS/artemisKeyStore.p12
#docker secret create -l $NS trustStore.jks $CERTS/trustStore.jks
#docker service create $CREATE_OPTIONS --name hono-artemis \
# --env ARTEMIS_CONFIGURATION=/run/secrets \
# --secret artemis-broker.xml \
# --secret artemis-bootstrap.xml \
# --secret artemis-users.properties \
# --secret artemis-roles.properties \
# --secret login.config \
# --secret logging.properties \
# --secret artemis.profile \
# --secret artemisKeyStore.p12 \
# --secret trustStore.jks \
# --entrypoint "/opt/artemis/bin/artemis run xml:/run/secrets/artemis-bootstrap.xml" \
# ${artemis.image.name}
#echo ... done
echo
echo Deploying Artemis broker ...
docker secret create -l $NS artemis-broker.xml $SCRIPTPATH/artemis/artemis-broker.xml
docker secret create -l $NS artemis-bootstrap.xml $CONFIG/hono-artemis-jar/etc/artemis-bootstrap.xml
docker secret create -l $NS artemis-users.properties $CONFIG/hono-artemis-jar/etc/artemis-users.properties
docker secret create -l $NS artemis-roles.properties $CONFIG/hono-artemis-jar/etc/artemis-roles.properties
docker secret create -l $NS login.config $CONFIG/hono-artemis-jar/etc/login.config
docker secret create -l $NS logging.properties $CONFIG/hono-artemis-jar/etc/logging.properties
docker secret create -l $NS artemis.profile $SCRIPTPATH/artemis/artemis.profile
docker secret create -l $NS artemisKeyStore.p12 $CERTS/artemisKeyStore.p12
docker secret create -l $NS trustStore.jks $CERTS/trustStore.jks
docker service create $CREATE_OPTIONS --name hono-artemis \
--env ARTEMIS_CONFIGURATION=/run/secrets \
--secret artemis-broker.xml \
--secret artemis-bootstrap.xml \
--secret artemis-users.properties \
--secret artemis-roles.properties \
--secret login.config \
--secret logging.properties \
--secret artemis.profile \
--secret artemisKeyStore.p12 \
--secret trustStore.jks \
--entrypoint "/opt/artemis/bin/artemis run xml:/run/secrets/artemis-bootstrap.xml" \
${artemis.image.name}
echo ... done

echo
echo Deploying Qpid Dispatch Router ...
Expand Down
22 changes: 11 additions & 11 deletions example/src/main/sandbox/swarm_undeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ docker secret rm \
qdrouter-sasl.conf \
qdrouterd.sasldb

#docker service rm hono-artemis
#docker secret rm \
# artemis-broker.xml \
# artemis-bootstrap.xml \
# artemis-users.properties \
# artemis-roles.properties \
# login.config \
# logging.properties \
# artemis.profile \
# artemisKeyStore.p12 \
# trustStore.jks
docker service rm hono-artemis
docker secret rm \
artemis-broker.xml \
artemis-bootstrap.xml \
artemis-users.properties \
artemis-roles.properties \
login.config \
logging.properties \
artemis.profile \
artemisKeyStore.p12 \
trustStore.jks

docker service rm grafana influxdb
docker secret rm influxdb.conf
Expand Down

0 comments on commit bf0fd16

Please sign in to comment.