3723a191b9cbcd5f140470574eb42f310aa413d0
[dmaap/messagerouter/messageservice.git] / docs / Installation / Installation.rst
1 =================================\r
2 DMAAP MESSAGE ROUTER INSTALLATION\r
3 =================================\r
4 This document describes how to install and access DMaaP Message Router.\r
5 Message Router has 3 docker containers. Dmaap\_container,\r
6 kafka\_contaienr and zookeeper\_container. Zookeeper runs on 172.18.0.3,\r
7 kafka runs on 172.18.0.2 and dmaap on 172.18.0.4.\r
8 \r
9 1) Clone message service repo\r
10 \r
11    git clone http://gerrit.onap.org/r/dmaap/messagerouter/messageservice\r
12 \r
13 2) copy\r
14    messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties\r
15    to /var/tmp directory\r
16 \r
17 3) In /var/tmp/MsgRtrApi.properties, change value of below variables as\r
18    shown below:\r
19 \r
20    config.zk.servers=172.18.0.3\r
21 \r
22    kafka.metadata.broker.list=172.18.0.2:9092\r
23 \r
24 4) Install docker and docker-compose\r
25 \r
26 5) Go to messageservice/src/main/resources/docker-compose and run:\r
27 \r
28    docker-compose up \96d\r
29 \r
30    This should start 3 containers.\r
31 \r
32 6) Run docker ps. It should show 3 containers.\r
33 \r
34    |image0|\r
35    \r
36    .. |image0| image:: docker.png\r
37   \r
38 Testing\r
39 -------\r
40 \r
41 -  For publishing, create a sample.txt file with some content in the\r
42    directory where you will run below rest api. Run below rest api:\r
43 \r
44    curl -H "Content-Type:text/plain" -X POST -d @sample.txt\r
45    http://172.18.0.4:3904/events/TestTopic1\r
46 \r
47 -  For subscribing, run below rest api:\r
48 \r
49    curl -H "Content-Type:text/plain" -XGET\r
50    http://172.18.0.4:3904/events/TestTopic1/CG1/C1?timeout=1000\r
51 \r
52    Note: You will only receive messages which have been published after\r
53    you have subscribed to a topic.\r
54 \r
55 \r