From 8ecc6d1c8330160fb8dff4ed135bfe3337ee58af Mon Sep 17 00:00:00 2001 From: jake-87 Date: Fri, 10 Dec 2021 13:01:03 +1100 Subject: [PATCH] Added instance and user documentation --- docs/managing-a-cluster.md | 71 +++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/docs/managing-a-cluster.md b/docs/managing-a-cluster.md index 48015bf2..71696aac 100644 --- a/docs/managing-a-cluster.md +++ b/docs/managing-a-cluster.md @@ -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 ] + +Generate a token for a slave. `--id` is the slave id, a number. + +### Create config + + ctl> slave create-config [--id ] [--name ] [--generate-token ] [--output ] + +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 [--id ] + +Create a new instance. `name` is the instance name. `--id` is the optional id. + +### Config management + +#### List Configuration + + ctl> instance config list + +List config values for an instance. `instance` is the instance to list config values. + +#### Set config value + + ctl> instance config set [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 [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 [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 [--create] + ctl> user whitelist-bulk-import [--create] + ctl> user admin-bulk-import [--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