1 ============================
2 Bucket Notification tests
3 ============================
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
14 You also need to install Kafka which can be done by downloading and unzipping from the following::
16 https://archive.apache.org/dist/kafka/2.6.0/kafka-2.6.0-src.tgz
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::
22 org.apache.kafka.common.security.plain.PlainLoginModule required
24 password="alice-secret";
27 After creating this above file run the following command in kafka directory (``/path/to/kafka-2.6.0-src/``)::
29 ./gradlew jar -PscalaVersion=2.13.2
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::
35 bin/zookeeper-server-start.sh config/zookeeper.properties
37 and then run to start the Kafka service::
39 bin/kafka-server-start.sh config/server.properties
41 If you want to run Zookeeper and Kafka services in background add ``-daemon`` at the end of the command like::
43 bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
47 bin/kafka-server-start.sh -daemon config/server.properties
49 After starting vstart, zookeeper and kafka services you're ready to run the Kafka tests::
51 BNTESTS_CONF=bntests.conf python -m nose -s /path/to/ceph/src/test/rgw/bucket_notification/test_bn.py -v -a 'kafka_test'
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``.
59 You need to install RabbitMQ in the following way::
61 sudo dnf install rabbitmq-server
63 Then you need to run the following command::
65 sudo chkconfig rabbitmq-server on
67 Finally to start the RabbitMQ server you need to run the following command::
69 sudo /sbin/service rabbitmq-server start
71 To confirm that the RabbitMQ server is running you can run the following command to check the status of the server::
73 sudo /sbin/service rabbitmq-server status
75 After starting vstart and RabbitMQ server you're ready to run the AMQP tests::
77 BNTESTS_CONF=bntests.conf python -m nose -s /path/to/ceph/src/test/rgw/bucket_notification/test_bn.py -v -a 'amqp_test'
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::
81 sudo /sbin/service rabbitmq-server stop