|
8 | 8 | 4) Debug a Single Ceph S3 Test
|
9 | 9 | 5) Compare to AWS Response (Inside Tester Pod)
|
10 | 10 | 6) Examples
|
| 11 | + 7) Run a Single Ceph S3 Test in NC deployment Manually |
11 | 12 | * This guide describes developer steps to run Ceph S3 on a Noobaa system on minikube.
|
12 | 13 |
|
13 | 14 | ## General Settings For Ceph S3 Tests
|
@@ -287,4 +288,48 @@ S3TEST_CONF=${PWD}/src/test/system_tests/ceph_s3_tests/test_ceph_s3_config.conf
|
287 | 288 |
|
288 | 289 | Notice that even though test commands succeeded the test itself was skipped. The test prints `1 skipped` meaning one test was skipped
|
289 | 290 |
|
| 291 | +## Run a Single Ceph S3 Test in NC deployment Manually |
| 292 | + |
| 293 | +### NC local on your machine |
| 294 | +#### Account creation |
| 295 | +Create the needed accounts for the Ceph configurations, for example: |
| 296 | +1. ceph (main account) |
| 297 | +2. ceph_alt (an account that is used on tests when two different accounts are needed, this is the alternative account - for example I saw it used in one of the bucket policy tests) |
| 298 | +3. ceph_tenant |
| 299 | + |
| 300 | +In cases that you don't need additional account you can simply copy the main account access keys in the ceph configuration file. |
| 301 | + |
| 302 | +To create the accounts in NC with access key and secret key that you chose is by running: |
| 303 | +`sudo node src/cmd/manage_nsfs account add --name ceph --new_buckets_path <new-buckets-path> --access_key <access-key> --secret_key <secret-key> --uid <uid> --gid <gid>` |
| 304 | +(more information can be found in [NooBaa CLI](./../../NooBaaNonContainerized/NooBaaCLI.md)) |
| 305 | +for example: |
| 306 | +`sudo node src/cmd/manage_nsfs account add --name ceph --new_buckets_path /private/tmp/nsfs_root1 --access_key <access-key> --secret_key <secret-key> --uid 1001 --gid 1001`. |
| 307 | +Note: before creating the account need to give permission to the `new_buckets_path`, in this example: `mkdir -p /private/tmp/nsfs_root1; sudo chmod 777 /private/tmp/nsfs_root1`. |
| 308 | + |
| 309 | +#### NSFS Server |
| 310 | +Start the NSFS server with: `sudo node src/cmd/nsfs --debug 5` |
| 311 | +Note: on every code change you would need to stop the server (ctrl + c) and run it again. |
| 312 | + |
| 313 | +### Ceph S3 repository: |
| 314 | +1) Clone the repository [ceph/s3-test](https://github.com/ceph/s3-tests): |
| 315 | +`git clone https://github.com/ceph/s3-tests.git` |
| 316 | + |
| 317 | +2) Edit the attached config, you can rename it and use this config only in the commands that you run, for example: |
| 318 | +`cp s3tests.conf.SAMPLE test_nsfs_ceph_s3_config.conf`, inside the file change the following values `vi test_nsfs_ceph_s3_config.conf`: |
| 319 | + - host = localhost |
| 320 | + - port = 6443 |
| 321 | + - is_secure = True |
| 322 | + - ssl_verify = False |
| 323 | + - bucket prefix = your-name-{random} |
| 324 | + - under "[s3 main]" under "main AWS access key" add the ceph account credentials |
| 325 | + - under "[s3 alt]" under "alt AWS access key set in vstart.sh" add the ceph_alt credentials (if your tests do not need it you can copy the ceph credentials) |
| 326 | + - under "[s3 tenant]" under "tenant AWS secret key set in vstart.sh" add 3. ceph_tenant credentials (if your tests do not need it you can copy the ceph credentials) |
| 327 | + - user_id - it depends if your tests uses it and for what purpose, usually you can add the account id, I saw a case where it was for principal in bucket policy and there you can add the account name |
| 328 | + |
| 329 | +3) Run a single test by running: |
| 330 | +`S3TEST_CONF=<configuration-file> tox -- <test-full-name>` |
| 331 | +for example: |
| 332 | +`S3TEST_CONF=test_nsfs_ceph_s3_config.conf tox -- s3tests_boto3/functional/test_s3.py::test_versioning_multi_object_delete_with_marker_create`. |
| 333 | +Make sure that you run it from the Ceph repo: `pwd` will be `<path-to-ceph-S3-repo>/s3-tests`. |
| 334 | +Note: In case you need install boto3 and tox: `python3 -m pip install boto3` and `python3 -m pip install tox` |
290 | 335 |
|
0 commit comments