]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | ========================== |
2 | Bucket Notification Tests | |
3 | ========================== | |
20effc67 TL |
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. | |
1e59de90 TL |
9 | For the tests covering Kafka and RabbitMQ security, the RGW will need to accept use/password without TLS connection between the client and the RGW. |
10 | So, the cluster will have to be started with the following ``rgw_allow_notification_secrets_in_cleartext`` parameter set to ``true``. | |
11 | For example:: | |
20effc67 | 12 | |
1e59de90 | 13 | MON=1 OSD=1 MDS=0 MGR=1 RGW=1 ../src/vstart.sh -n -d -o "rgw_allow_notification_secrets_in_cleartext=true" |
20effc67 | 14 | |
1e59de90 TL |
15 | =========== |
16 | Kafka Tests | |
17 | =========== | |
20effc67 | 18 | |
1e59de90 | 19 | You also need to install Kafka which can be downloaded from: https://kafka.apache.org/downloads |
20effc67 | 20 | |
1e59de90 | 21 | To test Kafka security, you should first run the ``kafka-security.sh`` script inside the Kafka directory. |
20effc67 | 22 | |
1e59de90 TL |
23 | Then edit the Kafka server properties file (``/path/to/kafka/config/server.properties``) |
24 | to have the following lines:: | |
20effc67 | 25 | |
1e59de90 TL |
26 | listeners=PLAINTEXT://localhost:9092,SSL://localhost:9093,SASL_SSL://localhost:9094 |
27 | ssl.keystore.location=/home/ylifshit/kafka-3.3.1-src/server.keystore.jks | |
28 | ssl.keystore.password=mypassword | |
29 | ssl.key.password=mypassword | |
30 | ssl.truststore.location=/home/ylifshit/kafka-3.3.1-src/server.truststore.jks | |
31 | ssl.truststore.password=mypassword | |
32 | sasl.enabled.mechanisms=PLAIN | |
33 | listener.name.sasl_ssl.plain.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \ | |
34 | username="alice" \ | |
35 | password="alice-secret" \ | |
36 | user_alice="alice-secret"; | |
20effc67 | 37 | |
1e59de90 TL |
38 | After following the above steps, start the Zookeeper and Kafka services. |
39 | For starting Zookeeper service run:: | |
20effc67 TL |
40 | |
41 | bin/zookeeper-server-start.sh config/zookeeper.properties | |
42 | ||
1e59de90 | 43 | and then start the Kafka service:: |
20effc67 TL |
44 | |
45 | bin/kafka-server-start.sh config/server.properties | |
46 | ||
1e59de90 | 47 | If you want to run Zookeeper and Kafka services in the background add ``-daemon`` at the end of the command like:: |
20effc67 TL |
48 | |
49 | bin/zookeeper-server-start.sh -daemon config/zookeeper.properties | |
50 | ||
51 | and:: | |
52 | ||
53 | bin/kafka-server-start.sh -daemon config/server.properties | |
54 | ||
1e59de90 | 55 | After running vstart, Zookeeper, and Kafka services you're ready to run the Kafka tests:: |
20effc67 TL |
56 | |
57 | BNTESTS_CONF=bntests.conf python -m nose -s /path/to/ceph/src/test/rgw/bucket_notification/test_bn.py -v -a 'kafka_test' | |
58 | ||
1e59de90 TL |
59 | To run the Kafka security test, you also need to provide the test with the location of the Kafka directory:: |
60 | ||
61 | KAFKA_DIR=/path/to/kafkaBNTESTS_CONF=bntests.conf python -m nose -s /path/to/ceph/src/test/rgw/bucket_notification/test_bn.py -v -a 'kafka_ssl_test' | |
20effc67 | 62 | |
1e59de90 TL |
63 | ============== |
64 | RabbitMQ Tests | |
65 | ============== | |
20effc67 TL |
66 | |
67 | You need to install RabbitMQ in the following way:: | |
68 | ||
69 | sudo dnf install rabbitmq-server | |
70 | ||
71 | Then you need to run the following command:: | |
72 | ||
73 | sudo chkconfig rabbitmq-server on | |
74 | ||
1e59de90 | 75 | Finally, to start the RabbitMQ server you need to run the following command:: |
20effc67 TL |
76 | |
77 | sudo /sbin/service rabbitmq-server start | |
78 | ||
79 | To confirm that the RabbitMQ server is running you can run the following command to check the status of the server:: | |
80 | ||
81 | sudo /sbin/service rabbitmq-server status | |
82 | ||
1e59de90 | 83 | After running vstart and RabbitMQ server you're ready to run the AMQP tests:: |
20effc67 TL |
84 | |
85 | BNTESTS_CONF=bntests.conf python -m nose -s /path/to/ceph/src/test/rgw/bucket_notification/test_bn.py -v -a 'amqp_test' | |
86 | ||
87 | 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:: | |
88 | ||
89 | sudo /sbin/service rabbitmq-server stop | |
1e59de90 TL |
90 | |
91 | To run the RabbitMQ SSL security tests use the following:: | |
92 | ||
93 | BNTESTS_CONF=bntests.conf python -m nose -s /path/to/ceph/src/test/rgw/bucket_notification/test_bn.py -v -a 'amqp_ssl_test' | |
94 | ||
95 | During these tests, the test script will restart the RabbitMQ server with the correct security configuration (``sudo`` privileges will be needed). | |
96 |