Loading docker/README.txt→README.txt +112 −0 Original line number Diff line number Diff line Simple communication test that involes 4 docker containers: - AMQP client (container_name: test_client, file to run test_client.py) - AMQP client (container_name: test_client, file to run: test_client.py) - AMQP server (container_name: transfer_service) - RabbitMQ (container_name: rabbitmq) - Redis (container_name: redis) Loading @@ -8,23 +8,77 @@ Furthermore, other 2 containers have been added: - Tape library frontend, a.k.a. Lenovo (container_name: tape_frontend) - Transfer node (container_name: transfer_node) Start the whole environment with (launch the command from the 'docker' dir): These last two containers are employed to test transfers using xrootd python bindings (ignore them for now) ############################################################################################################### You can start the whole environment with (launch the following command from the 'docker' dir): $ docker-compose up Once all the containers are up and running, open another shell and access the test_client container: $ docker exec -it test_client /bin/bash At this point you can launch the test_client.py within the test_client container: $ python test_client.py At this point you can launch the test_client.py within the test_client container using the following syntax: $ python test_client.py QUEUE_NAME For example: $ python test_client.py start_job_queue The output should be something like this: test_client@a89c0bb962f7:~$ python test_client.py start_job_queue Sending transfer request: { "transfer": { "@version": "2.1", "target": "vos://example.com!vospace/mydata1", "direction": "pullFromVoSpace", "protocol": { "@uri": "ivo://ivoa.net/vospace/core#httpget" } } } Response: { "jobID": "3ff92acedc9611eabf140242ac1f0007", "phase": "PENDING", "quote": null, "startTime": null, "endTime": null, "executionDuration": null, "destruction": null, "parameters": null, "jobInfo": { "transfer": { "@version": "2.1", "target": "vos://example.com!vospace/mydata1", "direction": "pullFromVoSpace", "protocol": { "@uri": "ivo://ivoa.net/vospace/core#httpget" } } } } After processing the request, the server launches an internal thread delayed of 10 seconds which changes the state of the job from "PENDING" to "EXECUTING". You can easily verify this change by launching again the client in this other way: $ python test_client.py QUEUE_NAME JOB_ID For example, in our case: $ python test_client.py poll_job_queue 3ff92acedc9611eabf140242ac1f0007 The output should be something like this: test_client@6a11611d604f:~$ python test_client.py Sending transfer request... test_client@a89c0bb962f7:~$ python test_client.py poll_job_queue 3ff92acedc9611eabf140242ac1f0007 Sending poll request: { "jobID": "3ff92acedc9611eabf140242ac1f0007" } Response: { "jobID": "b85e3fb8db0b11ea8d110242c0a8d006", "phase": "RUN", "jobID": "3ff92acedc9611eabf140242ac1f0007", "phase": "EXECUTING", "quote": null, "startTime": null, "endTime": null, Loading @@ -43,12 +97,14 @@ The output should be something like this: } } ############################################################################################################### You can access the rabbitmq web interface via browser: 1) Find the IP address of the RabbitMQ broker: $ docker network inspect docker_vospace_backend_net | grep -i -A 3 rabbitmq 2) Open your browser and point it to http://IP_ADDRESS:15672 (user: guest, password: guest) Stop the whole environment with: To stop the whole environment: $ docker-compose down Cleanup: Loading docker/docker-compose.yml→docker-compose.yml +0 −0 File moved. View file docker/tape_frontend/Dockerfile→tape_frontend/Dockerfile +0 −0 File moved. View file docker/tape_frontend/aaa/.hidden→tape_frontend/aaa/.hidden +0 −0 File moved. docker/tape_frontend/aaa/1.txt→tape_frontend/aaa/1.txt +0 −0 File moved. View file Loading
docker/README.txt→README.txt +112 −0 Original line number Diff line number Diff line Simple communication test that involes 4 docker containers: - AMQP client (container_name: test_client, file to run test_client.py) - AMQP client (container_name: test_client, file to run: test_client.py) - AMQP server (container_name: transfer_service) - RabbitMQ (container_name: rabbitmq) - Redis (container_name: redis) Loading @@ -8,23 +8,77 @@ Furthermore, other 2 containers have been added: - Tape library frontend, a.k.a. Lenovo (container_name: tape_frontend) - Transfer node (container_name: transfer_node) Start the whole environment with (launch the command from the 'docker' dir): These last two containers are employed to test transfers using xrootd python bindings (ignore them for now) ############################################################################################################### You can start the whole environment with (launch the following command from the 'docker' dir): $ docker-compose up Once all the containers are up and running, open another shell and access the test_client container: $ docker exec -it test_client /bin/bash At this point you can launch the test_client.py within the test_client container: $ python test_client.py At this point you can launch the test_client.py within the test_client container using the following syntax: $ python test_client.py QUEUE_NAME For example: $ python test_client.py start_job_queue The output should be something like this: test_client@a89c0bb962f7:~$ python test_client.py start_job_queue Sending transfer request: { "transfer": { "@version": "2.1", "target": "vos://example.com!vospace/mydata1", "direction": "pullFromVoSpace", "protocol": { "@uri": "ivo://ivoa.net/vospace/core#httpget" } } } Response: { "jobID": "3ff92acedc9611eabf140242ac1f0007", "phase": "PENDING", "quote": null, "startTime": null, "endTime": null, "executionDuration": null, "destruction": null, "parameters": null, "jobInfo": { "transfer": { "@version": "2.1", "target": "vos://example.com!vospace/mydata1", "direction": "pullFromVoSpace", "protocol": { "@uri": "ivo://ivoa.net/vospace/core#httpget" } } } } After processing the request, the server launches an internal thread delayed of 10 seconds which changes the state of the job from "PENDING" to "EXECUTING". You can easily verify this change by launching again the client in this other way: $ python test_client.py QUEUE_NAME JOB_ID For example, in our case: $ python test_client.py poll_job_queue 3ff92acedc9611eabf140242ac1f0007 The output should be something like this: test_client@6a11611d604f:~$ python test_client.py Sending transfer request... test_client@a89c0bb962f7:~$ python test_client.py poll_job_queue 3ff92acedc9611eabf140242ac1f0007 Sending poll request: { "jobID": "3ff92acedc9611eabf140242ac1f0007" } Response: { "jobID": "b85e3fb8db0b11ea8d110242c0a8d006", "phase": "RUN", "jobID": "3ff92acedc9611eabf140242ac1f0007", "phase": "EXECUTING", "quote": null, "startTime": null, "endTime": null, Loading @@ -43,12 +97,14 @@ The output should be something like this: } } ############################################################################################################### You can access the rabbitmq web interface via browser: 1) Find the IP address of the RabbitMQ broker: $ docker network inspect docker_vospace_backend_net | grep -i -A 3 rabbitmq 2) Open your browser and point it to http://IP_ADDRESS:15672 (user: guest, password: guest) Stop the whole environment with: To stop the whole environment: $ docker-compose down Cleanup: Loading