Cluster Management

Clusterman comes with a number of command-line tools to help with cluster management.

Discovery

The clusterman list-clusters and clusterman list-pools commands can aid in determining what clusters and pools Clusterman knows about:

Traceback (most recent call last):
  File "/home/docs/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/docs/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/clusterman/checkouts/stable/clusterman/run.py", line 16, in <module>
    from clusterman.args import parse_args
  File "/home/docs/checkouts/readthedocs.org/user_builds/clusterman/checkouts/stable/clusterman/args.py", line 18, in <module>
    import colorlog
ModuleNotFoundError: No module named 'colorlog'
Traceback (most recent call last):
  File "/home/docs/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/docs/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/clusterman/checkouts/stable/clusterman/run.py", line 16, in <module>
    from clusterman.args import parse_args
  File "/home/docs/checkouts/readthedocs.org/user_builds/clusterman/checkouts/stable/clusterman/args.py", line 18, in <module>
    import colorlog
ModuleNotFoundError: No module named 'colorlog'

Management

The clusterman manage command can be used to directly change the state of the cluster:

Traceback (most recent call last):
  File "/home/docs/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/docs/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/clusterman/checkouts/stable/clusterman/run.py", line 16, in <module>
    from clusterman.args import parse_args
  File "/home/docs/checkouts/readthedocs.org/user_builds/clusterman/checkouts/stable/clusterman/args.py", line 18, in <module>
    import colorlog
ModuleNotFoundError: No module named 'colorlog'

The --target-capacity option allows users to directly change the size of the Mesos cluster specified by the --cluster and --pool arguments.

Note that there can be up to a few minutes of “lag time” between when the manage command is issued and when changes are reflected in the cluster. This is due to potential delays introduced into the pipeline while AWS finds and procures new instances for the cluster. Therefore, it is not recommended to run clusterman manage repeatedly in short succession, or immediately after the autoscaler batch has run.

Note

Future versions of Clusterman may include a rate-limiter for the manage command

Note

By providing the existing target capacity value as the argument to --target-capacity, you can force Clusterman to attempt to prune any fulfilled capacity that is above the desired target capacity.

Status

The clusterman status command provides information on the current state of the cluster:

Traceback (most recent call last):
  File "/home/docs/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/docs/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/clusterman/checkouts/stable/clusterman/run.py", line 16, in <module>
    from clusterman.args import parse_args
  File "/home/docs/checkouts/readthedocs.org/user_builds/clusterman/checkouts/stable/clusterman/args.py", line 18, in <module>
    import colorlog
ModuleNotFoundError: No module named 'colorlog'

As noted above, the state of the cluster may take a few minutes to equilibrate after a clusterman manage command or the autoscaler has run, so the output from clusterman status may not accurately reflect the desired status.