Machines
Manage machines and their configuration
Usage: clan machines
Commands
- create:
- delete:
- install: Install a configured machine over the network.The target must be a Linux based system reachable via SSH. Installing a machine means overwriting the target's disk.
- list:
- update:
- update-hardware-config: Generates hardware specifics for a machine. Such as the host platform, available kernel modules, etc. The target must be a Linux based system reachable via SSH.
This subcommand provides an interface to machines managed by clan.
Examples
$ clan machines list
List all the machines managed by clan.
$ clan machines update [MACHINES]
Will update the specified machine [MACHINE], if [MACHINE] is omitted, the command will attempt to update every configured machine.
$ clan machines install [MACHINE] --target-host [TARGET_HOST]
Will install the specified machine [MACHINE] to the specified [TARGET_HOST].
If the --target-host
flag is omitted will try to find host information by
checking the deployment configuration inside the specified machine.
For more detailed information, visit: deploy
Machines create
Usage: clan machines create
Positional arguments
- machine_name: The name of the machine to create
Options
- --tags: Tags to associate with the machine. Can be used to assign multiple machines to services.
- --template-name: The name of the template machine to import
- --target-host: Address of the machine to install and update, in the format of user@host:1234
- --debug: Enable debug logging
- --option:
<('name', 'value')>
Nix option to set - --flake:
<PATH>
path to the flake where the clan resides in, can be a remote flake or local, can be set through the [CLAN_DIR] environment variable
Machines delete
Usage: clan machines delete
Positional arguments
- name:
Options
- --debug: Enable debug logging
- --option:
<('name', 'value')>
Nix option to set - --flake:
<PATH>
path to the flake where the clan resides in, can be a remote flake or local, can be set through the [CLAN_DIR] environment variable
Machines install
Install a configured machine over the network. The target must be a Linux based system reachable via SSH. Installing a machine means overwriting the target's disk.
Usage: clan machines install
Positional arguments
- machine: machine to install
Options
- --kexec: use another kexec tarball to bootstrap NixOS
- --no-reboot: do not reboot after installation
- --build-on-remote: build the NixOS configuration on the remote machine
- --yes: do not ask for confirmation
- --update-hardware-config: (Default:
none
) update the hardware configuration - -j, --json: specify the json file for ssh data (generated by starting the clan installer)
- --target-host: ssh address to install to in the form of user@host:2222
- -P, --png: specify the json file for ssh data as the qrcode image (generated by starting the clan installer)
- --debug: Enable debug logging
- --option:
<('name', 'value')>
Nix option to set - --flake:
<PATH>
path to the flake where the clan resides in, can be a remote flake or local, can be set through the [CLAN_DIR] environment variable
Machines list
Usage: clan machines list
Options
- --tags: Tags that machines should be queried for. Multiple tags will intersect.
- --debug: Enable debug logging
- --option:
<('name', 'value')>
Nix option to set - --flake:
<PATH>
path to the flake where the clan resides in, can be a remote flake or local, can be set through the [CLAN_DIR] environment variable
Machines update
Usage: clan machines update
Positional arguments
- machines:
<MACHINE>
Machine to update. If no machine is specified, all machines will be updated.
Options
- --host-key-check: (Default:
ask
) Host key (.ssh/known_hosts) check mode. - --target-host: Address of the machine to update, in the format of user@host:1234.
- --debug: Enable debug logging
- --option:
<('name', 'value')>
Nix option to set - --flake:
<PATH>
path to the flake where the clan resides in, can be a remote flake or local, can be set through the [CLAN_DIR] environment variable
Machines update-hardware-config
Generates hardware specifics for a machine. Such as the host platform, available kernel modules, etc.
The target must be a Linux based system reachable via SSH.
Usage: clan machines update-hardware-config
Positional arguments
- machine: the name of the machine
- target_host: ssh address to install to in the form of user@host:2222
Options
- --password: Pre-provided password the cli will prompt otherwise if needed.
- --backend: (Default:
nixos-generate-config
) The type of hardware report to generate. - --debug: Enable debug logging
- --option:
<('name', 'value')>
Nix option to set - --flake:
<PATH>
path to the flake where the clan resides in, can be a remote flake or local, can be set through the [CLAN_DIR] environment variable