]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/rgw/bucket_notification/README.rst
import quincy beta 17.1.0
[ceph.git] / ceph / src / test / rgw / bucket_notification / README.rst
1 ============================
2 Bucket Notification tests
3 ============================
4
5 You will need to use the sample configuration file named ``bntests.conf.SAMPLE``
6 that has been provided at ``/path/to/ceph/src/test/rgw/bucket_notification/``. You can also copy this file to the directory where you are
7 running the tests and modify it if needed. This file can be used to run the bucket notification tests on a Ceph cluster started
8 with vstart.
9
10 ============
11 Kafka tests
12 ============
13
14 You also need to install Kafka which can be done by downloading and unzipping from the following::
15
16 https://archive.apache.org/dist/kafka/2.6.0/kafka-2.6.0-src.tgz
17
18 Then inside the kafka config directory (``/path/to/kafka-2.6.0-src/config/``) you need to create a file named ``kafka_server_jaas.conf``
19 with the following content::
20
21 KafkaClient {
22 org.apache.kafka.common.security.plain.PlainLoginModule required
23 username="alice"
24 password="alice-secret";
25 };
26
27 After creating this above file run the following command in kafka directory (``/path/to/kafka-2.6.0-src/``)::
28
29 ./gradlew jar -PscalaVersion=2.13.2
30
31 After following the above steps next is you need to start the Zookeeper and Kafka services.
32 Here's the commands which can be used to start these services. For starting
33 Zookeeper service run::
34
35 bin/zookeeper-server-start.sh config/zookeeper.properties
36
37 and then run to start the Kafka service::
38
39 bin/kafka-server-start.sh config/server.properties
40
41 If you want to run Zookeeper and Kafka services in background add ``-daemon`` at the end of the command like::
42
43 bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
44
45 and::
46
47 bin/kafka-server-start.sh -daemon config/server.properties
48
49 After starting vstart, zookeeper and kafka services you're ready to run the Kafka tests::
50
51 BNTESTS_CONF=bntests.conf python -m nose -s /path/to/ceph/src/test/rgw/bucket_notification/test_bn.py -v -a 'kafka_test'
52
53 After running the tests you need to stop the vstart cluster (``/path/to/ceph/src/stop.sh``), zookeeper and kafka services which could be stopped by ``Ctrl+C``.
54
55 ===============
56 RabbitMQ tests
57 ===============
58
59 You need to install RabbitMQ in the following way::
60
61 sudo dnf install rabbitmq-server
62
63 Then you need to run the following command::
64
65 sudo chkconfig rabbitmq-server on
66
67 Finally to start the RabbitMQ server you need to run the following command::
68
69 sudo /sbin/service rabbitmq-server start
70
71 To confirm that the RabbitMQ server is running you can run the following command to check the status of the server::
72
73 sudo /sbin/service rabbitmq-server status
74
75 After starting vstart and RabbitMQ server you're ready to run the AMQP tests::
76
77 BNTESTS_CONF=bntests.conf python -m nose -s /path/to/ceph/src/test/rgw/bucket_notification/test_bn.py -v -a 'amqp_test'
78
79 After running the tests you need to stop the vstart cluster (``/path/to/ceph/src/stop.sh``) and the RabbitMQ server by running the following command::
80
81 sudo /sbin/service rabbitmq-server stop