Added instance and user documentation

This commit is contained in:
jake-87 committed 2021-12-10 13:01:03 +11:00
1 parent 6da7b84757
commit 8ecc6d1c83
1 file changed
+70 -1
+70 -1
View File
@@ -10,13 +10,67 @@ The easiest way to do this is to run `npx clusteriomaster bootstrap create-ctl-c
## Slaves
To be written.
### List slaves
ctl> slave list
Lists all slaves.
### Generate token
ctl> slave generate-token [--id <slave id>]
Generate a token for a slave. `--id` is the slave id, a number.
### Create config
ctl> slave create-config [--id <slave id>] [--name <slave name>] [--generate-token <bool>] [--output <path to output, - for stdout>]
Create a slave config. `--id` id the slave id, a number. `--name` is the slave name, a string. `--generate-token` decides whether to also generate a token, a bool, with a default of 0. `--output` is the filename for the output of the config. Default is "config-slave.json", "-" for stdout.
## Instances
### List Instances
ctl> instance list
List instances.
### Create instance
ctl> instance create <name> [--id <instance id>]
Create a new instance. `name` is the instance name. `--id` is the optional id.
### Config management
#### List Configuration
ctl> instance config list <instance>
List config values for an instance. `instance` is the instance to list config values.
#### Set config value
ctl> instance config set <instance> <field> [value] [--stdin]
Set field in instance config. `instance` is instance to set. `field` is field to set. `value` is value to set in field. `--stdin` signals to read value from stdin.
#### Set config property of field
To be written.
#### Edit instance config
ctl> instance config edit <instance> [editor]
Edit instance config in a text editor. Once file is saved and editor has been exited, config values will be read back in. `instance` is the instance to edit, `editor` is the editor to use. If `editor` is not given, clusterioctl will read from the `EDITOR` and `VISUAL` enviroment variables.
### Assign instance to slave
ctl> instace assign <instance> [slave]
Assigns instance to slave. `instance` is instance to assign, `slave` is slave to assign to. If `slave` is not provided, instance will be unassigned.
## Users
@@ -74,6 +128,21 @@ Since ban status is a part of the account data the account must exist for this t
Note: This bans the user from logging in to Factorio servers in the cluster, it does not revoke access to any cluster management they might have, see next section on setting roles for revoking tha.
### Bulk importing admin, whitelist and ban lists
Whitelists, banlists and admin lists can be bulk imported with the following commands:
ctl> user banned-bulk-import <file> [--create]
ctl> user whitelist-bulk-import <file> [--create]
ctl> user admin-bulk-import <file> [--create]
The file should simply be newline seperated names:
joe
bob
allan
The `--create` option will create the user if they do not exist, and then set the relevent value.
### Set Cluster Roles