mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 07:43:12 +09:00
Rename clusterctl to clusterioctl
Rename the clusterctl command line utility to clusterioctl in order to be consistent with the naming of the commands for master and slave.
This commit is contained in:
1 parent
bf5a4a8a9c
commit
3485c9ac68
15 files changed
+46
-46
No files matched your search
@@ -6,7 +6,7 @@ configuration system in Clusterio, and unless you're developing
|
||||
Clusterio it's probably not going to be very useful for you.</sub>
|
||||
|
||||
Clusterio uses a group based configuration system to manage settings for
|
||||
the master server, instances, slaves, and the clusterctl utility.
|
||||
the master server, instances, slaves, and the clusterioctl utility.
|
||||
Plugins get their own config group for the master server and instances
|
||||
which they can add their own fields to. The fields are defined early in
|
||||
the startup, and the groups and their fields for disabled plugins will
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
"packages/master/src/",
|
||||
"packages/master/master.js",
|
||||
"packages/slave/slave.js",
|
||||
"packages/ctl/clusterctl.js",
|
||||
"packages/ctl/ctl.js",
|
||||
"packages/lib/",
|
||||
"plugins/"
|
||||
],
|
||||
|
||||
@@ -2,13 +2,13 @@ Managing a Cluster
|
||||
==================
|
||||
|
||||
Clusterio clusers are managed through the master server by using the
|
||||
`clusterctl` command line interface which is invoked by running
|
||||
`npx clusterctl <command>` in the clusterio directory. This document
|
||||
uses the shorthand `ctl> foo` to indicate `npx clusterctl foo` should
|
||||
`clusterioctl` command line interface which is invoked by running
|
||||
`npx clusterioctl <command>` in the clusterio directory. This document
|
||||
uses the shorthand `ctl> foo` to indicate `npx clusterioctl foo` should
|
||||
be executed. Mandatory parameters are shown in `<angles bracket>` and
|
||||
optional pameters are in `[square brackets]`.
|
||||
|
||||
Before `clusterctl` can be used it needs to be configured for the
|
||||
Before `clusterioctl` can be used it needs to be configured for the
|
||||
cluster it will connect to. The easiest way to do this is to run
|
||||
`npx clusteriomaster bootstrap create-ctl-config <username>` on the
|
||||
master server, which creates the necessary `config-control.json` for
|
||||
|
||||
@@ -19,7 +19,7 @@ Contents
|
||||
- [Sending Link Messages](#sending-link-messages)
|
||||
- [Handling connection events](#handling-connection-events)
|
||||
- [Collecting Statistics](#collecting-statistics)
|
||||
- [Adding Custom Commands to clusterctl](#adding-custom-commands-to-clusterctl)
|
||||
- [Adding Custom Commands to clusterioctl](#adding-custom-commands-to-clusterioctl)
|
||||
|
||||
|
||||
Plugin Structure
|
||||
@@ -100,7 +100,7 @@ The following properties are recognized:
|
||||
Path to a Node.js module relative to the plugin directory which
|
||||
contains the ControlPlugin class definition for this plugin. This
|
||||
is an optional paramater. A plugin can be made that only runs on
|
||||
the clusterctl side.
|
||||
the clusterioctl side.
|
||||
|
||||
**messages**:
|
||||
Object with link messages definitions for this plugin. See guide
|
||||
@@ -145,7 +145,7 @@ code can be used:
|
||||
}
|
||||
|
||||
For the instance plugin it's exactly the same except "Master" is
|
||||
replaced with "Instance", and for the clusterctl plugin "Control" is
|
||||
replaced with "Instance", and for the clusterioctl plugin "Control" is
|
||||
used. The available hooks that you can override are documented in the
|
||||
base class [in lib/plugin.js](/packages/lib/plugin.js).
|
||||
|
||||
@@ -591,8 +591,8 @@ hook on both master and instance plugins that is run before the
|
||||
metrics in the default registry are collected.
|
||||
|
||||
|
||||
Adding Custom Commands to clusterctl
|
||||
------------------------------------
|
||||
Adding Custom Commands to clusterioctl
|
||||
--------------------------------------
|
||||
|
||||
The control entrypoint for plugins allows you to extend clustectl with
|
||||
your own commands. The creation of custom commands typically starts
|
||||
@@ -630,15 +630,15 @@ and
|
||||
for setting up positional and optional arguments to commands). The
|
||||
`handler` is an async function that's invoked when the command is
|
||||
executed and it's passed the parsed command line arguments and a
|
||||
reference to the `Control` class of clusterctl. It's possible to optain
|
||||
reference to the `Control` class of clusterioctl. It's possible to optain
|
||||
a reference to the plugin class with `control.plugins.get(info.name)`.
|
||||
|
||||
Note that messages sent from clusterctl needs to have
|
||||
Note that messages sent from clusterioctl needs to have
|
||||
`"control-master"` as a part of the links array for it to be accepted by
|
||||
the master server, see [Defining Link Messages](#defining-link-messages)
|
||||
for how to define the messages that can be sent to the master.
|
||||
|
||||
To have the command tree become part of clusterctl it needs to be added
|
||||
To have the command tree become part of clusterioctl it needs to be added
|
||||
to the rootCommand tree in `addCommands` callback of the Control plugin:
|
||||
|
||||
const plugin = require("@clusterio/lib/plugin");
|
||||
|
||||
Reference in new issue
Block a user