Skip to content

Commit 075a950

Browse files
authored
Merge pull request #7815 from shirady/nsfs-nc-update-doc
NSFS | NC | Update Docs Related to Last Changes in Manage NSFS
2 parents cada310 + 697b7ec commit 075a950

File tree

2 files changed

+42
-36
lines changed

2 files changed

+42
-36
lines changed

docs/design/NonContainerizedNSFSDesign.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ node src/cmd/nsfs ../standalon/nsfs_root --config_dir ../standalon/fs_config
1111

1212
---
1313

14-
## Compments
14+
## Components
1515

16-
### 1. Accounts
16+
### 1. Account
1717

18-
- Account will have a directory and in that, it will map 1 file per account, and the file name will be {account_name}.json
18+
- Account will have a directory and in that, it will map 1 file per account
19+
- Account file name will be {account_name}.json
1920
- Secrets will be saved as plain text
2021
- Note: We had the option to save it as plain text or Encrypted strings.
21-
- JSON Schema - `src/server/object_services/schemas/nsfs_account_schema.js`.
22+
- JSON Schema - `src/server/system_services/schemas/nsfs_account_schema.js`.
2223
- Note: It is based on $ref: account_api#/definitions/account_info.
2324
- `new_buckets_path` in the account schema will be used to populate the namespace store (read_resources, write_resource).
2425
- `BucketSpace` interface is updated with the new method `read_account_by_access_key()`
@@ -27,7 +28,7 @@ node src/cmd/nsfs ../standalon/nsfs_root --config_dir ../standalon/fs_config
2728
```json
2829
{
2930
"name": "user1",
30-
"email": "user1@noobaa.io", // this just an example - the email will be internally (the account name), email will not be set by user
31+
"email": "user1", // the email will be internally (the account name), email will not be set by user
3132
"creation_date": "2024-01-11T08:24:14.937Z",
3233
"access_keys": [
3334
{
@@ -40,28 +41,31 @@ node src/cmd/nsfs ../standalon/nsfs_root --config_dir ../standalon/fs_config
4041
"gid": 1001, //
4142
"new_buckets_path": "/",
4243
},
43-
"allow_bucket_creation": true
44+
"allow_bucket_creation": true,
45+
"_id": "65cb1e7c9e6ae40d499c0ae3" // _id automatically generated
4446
}
4547
```
4648

4749
### 2. Bucket
4850

49-
- Bucket will have a directory and in that, it will map 1 file per Bucket
50-
- bucket files name will be same as bucket name; eg: {bucket_name}.json
51+
- Bucket will have a directory and in that, it will map 1 file per bucket
52+
- Bucket file name will be {bucket_name}.json
5153
- Bucket schema should have a name, bucket_owner, path, etc. The are optional properties that can be added like bucket policy.
52-
- JSON Schema - src/server/object_services/schemas/nsfs_bucket_schema.js
54+
- JSON Schema - `src/server/system_services/schemas/nsfs_bucket_schema.js`.
5355
- It is based on $ref: 'bucket_api#/definitions/bucket_info'
54-
- `BucketSpace`` interface is updated with the new method `read_bucket_sdk_info()`
56+
- `BucketSpace` interface is updated with the new method `read_bucket_sdk_info()`
5557
- Method will read bucket schema referring to bucket name and return the bucket to `bucket_namespace_cache`.
5658

5759
```json
5860
{
59-
"name": "mybucke-test1",
60-
"system_owner": "user1@noobaa.io",
61-
"bucket_owner": "user1@noobaa.io",
62-
"creation_date": "2024-01-11T08:26:16.9731",
61+
"_id": "65cb1efcbec92b33220112d6",
62+
"name": "mybucket-test1",
63+
"owner_account": "65cb1e7c9e6ae40d499c0ae3",
64+
"system_owner": "user1",
65+
"bucket_owner": "user1",
6366
"versioning": "DISABLED",
64-
"path": "mybucke-test1",
67+
"creation_date": "2024-01-11T08:26:16.9731",
68+
"path": "mybucket-test1",
6569
"should_create_underlying_storage": true,
6670
"s3_policy": {
6771
"Version": "2012-10-17",
@@ -77,8 +81,8 @@ node src/cmd/nsfs ../standalon/nsfs_root --config_dir ../standalon/fs_config
7781
"s3:*"
7882
],
7983
"Resource": [
80-
"arn:aws:s3:::mybucke-test1/*",
81-
"arn:aws:s3:::mybucke-test1"
84+
"arn:aws:s3:::mybucket-test1/*",
85+
"arn:aws:s3:::mybucket-test1"
8286
]
8387
}
8488
]

docs/non_containerized_NSFS.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ make_bucket: s3bucket
172172
cat /tmp/noobaa_config_dir/buckets/s3bucket.json
173173

174174
Output -
175-
{"name":"s3bucket","tag":"","system_owner":"account1@noobaa.io","bucket_owner":"account1@noobaa.io","versioning":"DISABLED","path":"/tmp/fs1/s3bucket","should_create_underlying_storage":true,"creation_date":"2023-09-26T05:56:16.252Z"}
175+
{"_id":"65cb1efcbec92b33220112d7","name":"s3bucket","owner_account":"65cb1e7c9e6ae40d499c0ae4","system_owner":"account1","bucket_owner":"account1","versioning":"DISABLED","creation_date":"2023-09-26T05:56:16.252Z","path":"/tmp/fs1/s3bucket","should_create_underlying_storage":true}
176176
```
177177

178178
4.3. Check that the file system bucket directory was created successfully -
@@ -204,7 +204,7 @@ echo "This is the content of object1" | s3-account1 cp - s3://s3bucket/object1.
204204
6.2. Check the object was created on the file system -
205205

206206
```sh
207-
cat /tmp/fs1/s3bucket/object1.txt
207+
sudo cat /tmp/fs1/s3bucket/object1.txt
208208

209209
Output -
210210
This is the content of object1
@@ -431,41 +431,43 @@ These error codes will get attached with a specific Bucket or Account schema ins
431431
- Check for schema config file in respective Accounts or Buckets dir.
432432

433433
## Bucket and Account Manage CLI
434-
Users can create, update, delete, and list buckets and accounts using CLI. If the config directory is missing CLI will create one and also create accounts and buckets sub-directories in it and default config directory is `${config.NSFS_NC_DEFAULT_CONF_DIR}`.
434+
Users can create, get status, update, delete, and list buckets and accounts using CLI. If the config directory is missing CLI will create one and also create accounts and buckets sub-directories in it and default config directory is `${config.NSFS_NC_DEFAULT_CONF_DIR}`.
435435

436436
CLI will never create or delete a bucket directory for the user if a bucket directory is missing CLI will return with error.
437437

438438
NOTES -
439439
1. manage_nsfs execution requires root permissions.
440440
2. While path specifies a GPFS path, it's recommended to add fs_backend=GPFS in order to increase performance by ordering NooBaa to use GPFS library.
441441

442-
Bucket Commands
443-
```
444-
sudo node src/cmd/manage_nsfs bucket add --config_root ../standalon/config_root --name bucket1 --owner noobaa --path ../standalon/nsfs_root/1 --fs_backend GPFS 2>/dev/null
445-
446-
sudo node src/cmd/manage_nsfs bucket update --config_root ../standalon/config_root --name bucket1 --owner noobaa --fs_backend GPFS 2>/dev/null
447-
448-
sudo node src/cmd/manage_nsfs bucket list --config_root ../standalon/config_root 2>/dev/null
449-
450-
sudo node src/cmd/manage_nsfs bucket delete --config_root ../standalon/config_root --name bucket1 2>/dev/null
451-
452-
```
453-
454442
Account Commands
455443
```
456444
sudo node src/cmd/manage_nsfs account add --config_root ../standalon/config_root --name noobaa --new_buckets_path ../standalon/nsfs_root/ --fs_backend GPFS 2>/dev/null
457445
458446
sudo node src/cmd/manage_nsfs account update --config_root ../standalon/config_root --name noobaa --fs_backend GPFS 2>/dev/null
459447
460-
sudo node src/cmd/manage_nsfs account delete --config_root ../standalon/config_root --access_key abc 2>/dev/null
448+
sudo node src/cmd/manage_nsfs account status --config_root ../standalon/config_root --name noobaa 2>/dev/null
449+
450+
sudo node src/cmd/manage_nsfs account delete --config_root ../standalon/config_root --name noobaa 2>/dev/null
461451
462452
sudo node src/cmd/manage_nsfs account list --config_root ../standalon/config_root 2>/dev/null
463453
464454
```
465455

466-
`Important`: All the Account/Bucket commands end with `2>/dev/null` to make sure there are no unwanted logs.
456+
Bucket Commands
457+
Note: before creating a bucket, a user must create an account.
458+
```
459+
sudo node src/cmd/manage_nsfs bucket add --config_root ../standalon/config_root --name bucket1 --owner noobaa --path ../standalon/nsfs_root/1 --fs_backend GPFS 2>/dev/null
460+
461+
sudo node src/cmd/manage_nsfs bucket update --config_root ../standalon/config_root --name bucket1 --owner noobaa --fs_backend GPFS 2>/dev/null
462+
463+
sudo node src/cmd/manage_nsfs bucket status --config_root ../standalon/config_root --name bucket1 2>/dev/null
464+
465+
sudo node src/cmd/manage_nsfs bucket delete --config_root ../standalon/config_root --name bucket1 2>/dev/null
466+
467+
sudo node src/cmd/manage_nsfs bucket list --config_root ../standalon/config_root 2>/dev/null
467468
468-
Users can also pass account and bucket/account values in JSON file instead of passing them in cli as arguments.
469+
```
470+
**Important**: All the Account/Bucket commands end with `2>/dev/null` to make sure there are no unwanted logs.
469471

470472

471473
```
@@ -484,7 +486,7 @@ Non containerized NSFS restrict insecure HTTP connections when `ALLOW_HTTP` is s
484486
### Setting Up Self signed SSL/TLS Certificates for Secure Communication Between S3 Client and NooBaa NSFS Service -
485487

486488
#### 1. Creating a SAN (Subject Alternative Name) Config File -
487-
`Important`: This step is needed only if S3 Client and NooBaa Service Running on different nodes.
489+
**Important**: This step is needed only if S3 Client and NooBaa Service Running on different nodes.
488490

489491
To accommodate S3 requests originating from a different node than the one running the NooBaa NSFS service, it is recommended to create a Subject Alternative Name (SAN) configuration file. <br />
490492
This file specifies the domain names or IP addresses that will be included in the SSL certificate.<br />

0 commit comments

Comments
 (0)