Skip to content

Commit

Permalink
NC | conf dir restruct
Browse files Browse the repository at this point in the history
previously known as "account by id"

Main change is that accounts/ dir now has <account_id>.json instead of <account_name>.json file.
By-name indexing is in new root_accounts/<root_account_name>/<iam_account_name>.symlink.
  • Loading branch information
alphaprinz committed Jul 31, 2024
1 parent a7069fc commit 5568f50
Show file tree
Hide file tree
Showing 24 changed files with 1,136 additions and 580 deletions.
34 changes: 27 additions & 7 deletions docs/NooBaaNonContainerized/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ The default config directory structure contains the following files/directories
system.json // Required
access_keys/ // Required
accounts/ // Required
root_accounts/ // Required
buckets/ // Required
config.json // Optional
master_keys.json // Optional
Expand All @@ -82,6 +83,7 @@ config_dir_redirect // Required
system.json // Required
access_keys/ // Required
accounts/ // Required
root_accounts/ // Required
buckets/ // Required
config.json // Optional
master_keys.json // Optional
Expand Down Expand Up @@ -116,13 +118,31 @@ certificates/ // Optional
`accounts/` -
* <u>Type</u>: Directory.
* <u>Required</u>: Yes.
* <u>Description</u>: A directory that contains configuration files for individual accounts, each account configuration file is named {account_name}.json and adheres to the [account schema](../../src/server/system_services/schemas/nsfs_account_schema.js).
* <u>Description</u>: A directory that contains configuration files for individual accounts, each account configuration file is named {account_id}.json and adheres to the [account schema](../../src/server/system_services/schemas/nsfs_account_schema.js).
* <u>Example</u>:
```sh
> ls /etc/noobaa.conf.d/accounts/
alice.json
bob.json
charlie.json
abcd.json
1234.json
ab12.json
```
`root_accounts/` -
* <u>Type</u>: Directory.
* <u>Required</u>: Yes.
* <u>Description</u>: A directory that contains a directory per root account, named {root_account_name}.
Inside each such directory, there is a symlink for the root account, named {root_account_name}.symlink.
There will be also the symlinks for the IAM accounts that are owned by the root account, named {account_name}.symlink.
Symlinks link to an account within account/.
The account symlink points to the relative path of the account rather than an absolute path, eg: `../../accounts/abcd.json`.
* <u>Example</u>:
```sh
> ls /etc/noobaa.conf.d/root_accounts/
alice/
bob/
charlie/
> ls -la /etc/noobaa.conf.d/root_accounts/alice/
alice.symlink -> ../../accounts/abcd.json
bob.symlink -> ../../accounts/1234.json
```

`access_keys/`
Expand All @@ -132,9 +152,9 @@ certificates/ // Optional
* <u>Example</u>:
```sh
> ls -la /etc/noobaa.conf.d/access_keys/
0kbUZlNM9k4SCvrw1pftEXAMPLE.symlink -> ../accounts/alice.json
1kbUTlNM9k4SCvrw2pfxEXAMPLE.symlink -> ../accounts/bob.json
2kbUMlNM9k4SCvrw3pfyEXAMPLE.symlink -> ../accounts/charlie.json
0kbUZlNM9k4SCvrw1pftEXAMPLE.symlink -> ../accounts/abcd.json
1kbUTlNM9k4SCvrw2pfxEXAMPLE.symlink -> ../accounts/1234.json
2kbUMlNM9k4SCvrw3pfyEXAMPLE.symlink -> ../accounts/ab12.json
```
`buckets/`
* <u>Type</u>: Directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/NooBaaNonContainerized/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ NooBaa Non Containerized solution includes the following components -
5. [Storage File System](#create-storage-file-system-paths) - A File system for storing objects.

### NooBaa High Level Diagram
![NooBaa Non Containerized Components Diagram](https://github.com/noobaa/noobaa-core/assets/35330373/8d6cce71-e9e8-4e6a-ad88-5c65255bacc7)
![NooBaa Non Containerized Components Diagram](https://github.com/user-attachments/assets/601a6220-f236-446e-9ead-404d41a5ffc5)


## Build NooBaa RPM
Expand Down
44 changes: 34 additions & 10 deletions docs/NooBaaNonContainerized/NooBaaCLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,21 @@ The `account add` command is used to create a new account with customizable opti

#### Usage
```sh
noobaa-cli account add --name <account_name> --uid <uid> --gid <gid> [--user]
[--new_buckets_path][--access_key][--secret_key][--fs_backend]
noobaa-cli account add --name <root_account_name> --uid <uid> --gid <gid> [--user]
[--iam_name][--new_buckets_path][--access_key][--secret_key][--fs_backend]
[--allow_bucket_creation][--force_md5_etag][--anonymous][--from_file][--iam_operate_on_root_account]
```
#### Flags -
- `name` (Required)
- Type: String
- Description: Specifies the name of the new account.
- Description: Specifies the name of the root account.
If creating an IAM account, specify the name of the new IAM account with `--iam_name` param in
addition to `--name` param which is the root account that owns this IAM account.

- `iam_name`
- Type: String
- Description: If creating a new IAM account, specifies the name of the new IAM account.
The new IAM account belongs to the root account specified with --name param.

- `uid` (Required)
- Type: Number
Expand Down Expand Up @@ -127,14 +134,21 @@ The `account update` command is used to update an existing account with customiz

#### Usage
```sh
noobaa-cli account update --name <account_name> [--new_name][--uid][--gid][--user]
[--new_buckets_path][--access_key][--secret_key][--regenerate][--fs_backend]
noobaa-cli account update --name <root_account_name> [--new_name][--uid][--gid][--user]
[--iam_name][--new_buckets_path][--access_key][--secret_key][--regenerate][--fs_backend]
[--allow_bucket_creation][--force_md5_etag][--anonymous][--iam_operate_on_root_account]
```
#### Flags -
- `name` (Required)
- Type: String
- Description: Specifies the name of the account to be updated.
- Description: Specifies the name of the root account to be updated.
If updating an IAM account, specify its name with `--iam_name` param, in addition to `--name`
param which is the root account that owns this IAM account.

- `iam_name`
- Type: String
- Description: If updating an IAM account, specifies the name of the IAM account to be updated.
The update IAM account belongs to the root account specified with --name param.

- `new_name`
- Type: String
Expand Down Expand Up @@ -195,12 +209,16 @@ The `account status` command is used to print the status of the account.

#### Usage
```sh
noobaa-cli account status --name <account_name> [--access_key][--anonymous][--show_secrets]
noobaa-cli account status --name <root_account_name> [--iam_name][--access_key][--anonymous][--show_secrets]
```
#### Flags -
- `name` (Required)
- Type: String
- Description: Specifies the name of the account.
- Description: Specifies the name of the root account.

- `iam_name`
- Type: String
- Description: If requesting an IAM account, specifies the name of the IAM account (owned by root account).

- `access_key`
- Type: String
Expand Down Expand Up @@ -260,12 +278,18 @@ The `account delete` command is used to delete an existing account.

#### Usage
```sh
noobaa-cli account delete --name <account_name> [--anonymous]
noobaa-cli account delete --name <root_account_name> [--iam_name][--anonymous]
```
#### Flags -
- `name` (Required)
- Type: String
- Description: Specifies the name of the bucket to be deleted.
- Description: If deleting a root account, specifies the name of the account to be deleted.
If deleting an IAM account, specify the name of the IAM account to be deleted in addition
to `--name` param which is the root account that owns this IAM account.

- `iam_name`
- Type: String
- Description: If deleting an IAM account, specifies the name of the IAM account the be deleted.

- `anonymous`
- Type: Boolean
Expand Down
Loading

0 comments on commit 5568f50

Please sign in to comment.