Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #372 from NBISweden/feature/mq
Browse files Browse the repository at this point in the history
Update CEGA targets for rabbitMQ
  • Loading branch information
jbygdell committed Oct 25, 2018
2 parents 0f1fbc8 + e617f16 commit e53af13
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions docker/bootstrap/cega.sh
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,17 @@ cat > ${PRIVATE}/cega/mq/defs.json <<EOF
"parameters":[],
"global_parameters":[{"name":"cluster_name", "value":"rabbit@localhost"}],
"policies":[],
"queues":[{"name":"inbox", "vhost":"lega", "durable":true, "auto_delete":false, "arguments":{}},
{"name":"stableIDs", "vhost":"lega", "durable":true, "auto_delete":false, "arguments":{}},
{"name":"files", "vhost":"lega", "durable":true, "auto_delete":false, "arguments":{}},
{"name":"completed", "vhost":"lega", "durable":true, "auto_delete":false, "arguments":{}},
{"name":"errors", "vhost":"lega", "durable":true, "auto_delete":false, "arguments":{}}],
"queues":[{"name":"v1.inbox", "vhost":"lega", "durable":true, "auto_delete":false, "arguments":{}},
{"name":"v1.stableIDs", "vhost":"lega", "durable":true, "auto_delete":false, "arguments":{}},
{"name":"v1.files", "vhost":"lega", "durable":true, "auto_delete":false, "arguments":{}},
{"name":"v1.completed", "vhost":"lega", "durable":true, "auto_delete":false, "arguments":{}},
{"name":"v1.errors", "vhost":"lega", "durable":true, "auto_delete":false, "arguments":{}}],
"exchanges":[{"name":"localega.v1", "vhost":"lega", "type":"topic", "durable":true, "auto_delete":false, "internal":false, "arguments":{}}],
"bindings":[{"source":"localega.v1","vhost":"lega","destination_type":"queue","arguments":{},"destination":"inbox","routing_key":"files.inbox"},
{"source":"localega.v1","vhost":"lega","destination_type":"queue","arguments":{},"destination":"stableIDs","routing_key":"files.stableIDs"},
{"source":"localega.v1","vhost":"lega","destination_type":"queue","arguments":{},"destination":"files","routing_key":"files"},
{"source":"localega.v1","vhost":"lega","destination_type":"queue","arguments":{},"destination":"completed","routing_key":"files.completed"},
{"source":"localega.v1","vhost":"lega","destination_type":"queue","arguments":{},"destination":"errors","routing_key":"files.error"}]
"bindings":[{"source":"localega.v1","vhost":"lega","destination_type":"queue","arguments":{},"destination":"v1.inbox","routing_key":"files.inbox"},
{"source":"localega.v1","vhost":"lega","destination_type":"queue","arguments":{},"destination":"v1.stableIDs","routing_key":"files.stableIDs"},
{"source":"localega.v1","vhost":"lega","destination_type":"queue","arguments":{},"destination":"v1.files","routing_key":"files"},
{"source":"localega.v1","vhost":"lega","destination_type":"queue","arguments":{},"destination":"v1.completed","routing_key":"files.completed"},
{"source":"localega.v1","vhost":"lega","destination_type":"queue","arguments":{},"destination":"v1.errors","routing_key":"files.error"}]
}
EOF

Expand Down
4 changes: 2 additions & 2 deletions docker/images/mq/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ cat > /etc/rabbitmq/defs-cega.json <<EOF
{"value":{"uri":"${CEGA_CONNECTION}",
"ack-mode":"on-confirm",
"trust-user-id":false,
"queue":"files"},
"queue":"v1.files"},
"vhost":"/",
"component":"federation-upstream",
"name":"CEGA-files"},
{"value":{"uri":"${CEGA_CONNECTION}",
"ack-mode":"on-confirm",
"trust-user-id":false,
"queue":"stableIDs"},
"queue":"v1.stableIDs"},
"vhost":"/",
"component":"federation-upstream",
"name":"CEGA-ids"}],
Expand Down
4 changes: 2 additions & 2 deletions docker/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ $(SSH_KEY):
## Checking the results
####################################################################
# We only read the first message from the completed queue
# If it contains COMPLETED, and it is the right user/filepath/stableID,
# If it contains COMPLETED, and it is the right user/filepath/stableID,
# then we say it's ok
# That'll do it for the moment
check: CEGA_MQ_USER=$(shell awk -F= '/CEGA_MQ_USER/ {print $$2}' $(DOCKER_PATH)/private/lega/.trace)
check: CEGA_MQ_PASSWORD=$(shell awk -F= '/CEGA_MQ_PASSWORD/ {print $$2}' $(DOCKER_PATH)/private/lega/.trace)
check: MESSAGE=$(shell ./rabbitmqadmin -H localhost -P 15670 -V lega -u lega -p $(CEGA_MQ_PASSWORD) get queue=completed count=1 requeue=true)
check: MESSAGE=$(shell ./rabbitmqadmin -H localhost -P 15670 -V lega -u lega -p $(CEGA_MQ_PASSWORD) get queue=v1.completed count=1 requeue=true)
check: $(FILE).c4ga $(FILE).sha256
@echo "$(MESSAGE)" | grep 'checksum: {value: $(shell cat $(FILE).sha256), algorithm: sha256}' &>/dev/null
@echo "$(MESSAGE)" | grep 'user: $(USER)' &>/dev/null
Expand Down

0 comments on commit e53af13

Please sign in to comment.