Skip to content
This repository was archived by the owner on May 11, 2024. It is now read-only.

Latest commit

 

History

History
150 lines (87 loc) · 5.67 KB

File metadata and controls

150 lines (87 loc) · 5.67 KB

user Command

Use this command to create, delete, and manage users. The following main topics are discussed in this section:

create Subcommand

Synopsis

Use the create subcommand to create and initializes a new Nauta user. This command must be executed when kubectl used by the nctl command entered by a k8s administrator. If this command is executed by someone other than a k8s administrator, it fails. By default, this command saves a configuration of a newly created user to a file. The format of this file is compliant with the kubectl format configuration files. To create a User Account, refer to Creating a User Account.

Syntax

nctl user create [options] USERNAME

Arguments

Name Required Description
USERNAME Yes The name of a user that will be created.

Options

Name Required Description
-lo, --list-only No If given, the content of the generated user's config file is displayed on the screen only.
If not given, the file with configuration is saved on disk
-fl, --filename
TEXT
No The name of file where user's configuration will be stored. If not given, the
configuration is stored in the config.<username> file.
-f, --force No Force command execution by ignoring (most) confirmation prompts.
-v, --verbose No Set verbosity level:
-v for INFO,
-vv for DEBUG
-h, --help No Displays help messaging information.

Additional Remarks

In case of any errors during saving of a file with a configuration, the command displays the content of the configuration file on the screen, even if -lo option was not used.

If an administrator creates a user with a name that was used previously by a deleted user, it may happen that the create command displays information that the previous user is still being deleted, even if the previous user is not listed on a list of existing users. In this case, before creating a new user, postpone the operation for 10 minutes, until all the user's objects are removed.

Returns

If any issues occur, a message is displayed describing their cause/causes. Otherwise, a message is returned indicating success. If --list-only option was given, the command displays also a content of a configuration file.

User Name Requirements

A user name must meet the following requirements:

  1. Cannot be longer than 32-characters.

  2. Cannot be an empty string.

  3. Must conform to Kubernetes naming cconvention, and can only contain lower-case alphanumeric characters and "-" and "."

User Name Limitations

If an administrator creates a user with a name that was used previously by a deleted user, the createcommand displays the previous user is still being deleted, even if the previous user is not listed on a list of existing users

In this case, before creating a new user, postpone the operation for a short period (at least 3 minutes) until all the user's objects are removed. To create a user account, refer to Creating a User Account and to delete a user account, refer to Deleting a User Account.

Example

nctl user create jdoe

Outcome

This creates the user jdoe, as shown in the example.

delete Subcommand

Synopsis

The delete subcommand deletes a user with a given name. If the option -p, --purge was used, it also removes all artifacts related to that removed user, such as the content of user's folders and data of experiments and runs.

Syntax

nctl user delete [options] USERNAME

Arguments

Name Required Description
USERNAME Yes The name of a user to be removed from the Nauta user accounts.

Aditional Remarks

Before removing a user, the commands requires a final confirmation. If user chooses Yes, the chosen user is deleted.
Deletion of a user may take a while (a few minutes) to be fully completed.

If after this time a user has not been deleted completely, the command displays information that a user is still being deleted. In this case the user will not be listed on a list of existing users, but there is no possibility to create a user with the same name until the command completes and the user is deleted.

Options

Name Required Description
-p, --purge No If set, the system also removes all logs generated by the user's experiments.
-f, --force No Force command execution by ignoring (most) confirmation prompts.
-v, --verbose No Set verbosity level:
-v for INFO,
-vv for DEBUG
-h, --help No Displays help messaging information.

Returns

A message regarding the command's completion. If an issue occurs, a short description of the cause(s) displays.

Example

nctl user delete jdoe -p

Outcome

This removes the created jdoe user along with all their artifacts.

list Subcommand

Synopsis

Use the list subcommand to list all currently configured users.

Syntax

nctl user list [options]

Arguments

None.

Options

Name Required Description
-c, --count
INTEGER RANGE
No If given, the command displays c last rows.
-f, --force No Force command execution by ignoring (most) confirmation prompts.
-v, --verbose No Set verbosity level:
-v for INFO,
-vv for DEBUG
-h, --help No Displays help messaging information.

Return to Start of Document