Smarter and adaptive commands, scripts and configuration files

A central place to upload, edit and reuse your scripts and files

Edit a script

Pseudo commands to include other scripts and files

Use clustermin install other/script or clustermin run other/script to include a script.

Use clustermin get other/file to print out a file contents.

Pseudo commands

Make commands, scripts and configuration files smarter

Twig template

Commands, shell scripts and configuration files are all Twig templates. You have access to:

server: the current server that scripts/commands are running on.

Field Sample value Type Description
server.id 179 integer Server ID, unique for each server.
server.name ubuntu string The current server's name. You can change it at dropdown menu Settings.
server.host 12.34.56.78 string The current server's IP address.
server.port 22 integer The current server's port.
server.username clustermin string The current server's username. When connecting server, if you check the box "Create user", it creates a new user with name clustermin. Otherwise, we'll use the entered username.
server.publicIp 12.34.56.78 string The current server's public IP address. You can change it at Settings.
server.privateIp 192.168.12.34 string The current server's private IP address. You can change it at Settings.
server.distroName Ubuntu string The current server's distro name. Some other example values: Fedora, CentOS, Debian, CoreOS, FreeBSD, Linux, etc.
server.distroVersion 16.04 string The current server's distro version.
server.memory 1024 integer The current server's memory (RAM), in MB.
server.disk 20 integer The current server's disk size, in GB.

cluster: the current server's cluster that scripts/commands are running on.

Field Sample value Type Description
cluster.id 17 integer The current cluster's ID. Unique for each cluster.
cluster.uuid c89a0576-6d6a-4bb6-8c7e-a0109d8350c9 string The current cluster's Universally Unique Identifier (UUID).
cluster.name database string The current cluster's name.
cluster.servers   server[] An array of servers, each contains every fields like the server above.

Other variables

Variable Type Description
targetServer server The server that is added to or removed from a cluster.
targetCluster cluster The added/removed server's cluster.
inClusters cluster[] An array of clusters that have incoming connections (connection type: IN) to the current server cluster.
outClusters cluster[] An array of clusters that have outgoing connections (connection type: OUT) from the current server cluster.
package.name string The current package's name
package.settings.* string The current package's settings, e.g. the setting named "location" can be accessed at package.settings.location
package.statuses.* string The current package's statuses, e.g. the status named "running" can be accessed at package.statuses.running

Besides default base Twig functions and filters, Clustermin also provides these functions and filters