https://toitlang.org/ logo
Move a device from one group to another
# help
i
Is it possible to move a device from Group 1 to Group 2 without re-flashing it using artemis?
Goal: we flash all devices using a "basis group" which have no defined customer. Once the customer is defined and the devices are installed we change the group and move the device into a new customer specific group. In our case this is WiFi independent because we are using ethernet - so no connection credentials are needed.
f
Yes. Groups are only used to determine which pod the device should use.
Once you move a device to a different group and do a roll-out it will receive the pod from the new group.
i
okay can you tell me how this is done?
or whats the best-practice to do so
f
I think at the moment you can just edit the devices.json file.
I think there isn't a command for it yet.
that said. I have a vague memory. Let me check.
artemis fleet group move
Copy code
ᐅ artemis fleet group move --help
Move devices between groups.

Usage:
  artemis fleet group move --to=<string> [<options>] [--] [<device>...]

Options:
      --group string  A group to move the devices from. (multi)
  -h, --help          Show help for this command.
      --to string     The group to move the devices to. (required)

Rest:
  device string  The ID, namer or alias of a device to move. (multi)

Global options:
      --fleet directory|reference                        Specify the fleet. Can also be set with the ARTEMIS_FLEET environment variable.
      --output-format text|json                          Specify the format used when printing to the console. (default: text)
      --verbose                                          Enable verbose output. Shorthand for --verbosity-level=verbose.
      --verbosity-level debug|info|verbose|quiet|silent  Specify the verbosity level.

Examples:
  # Move all devices from group 'g1' to group 'g2':
  artemis fleet group move --to=g2 --group=g1

  # Move devices 'big-whale' and 12345678-1234-1234-1234-123456789abc to group 'g2':
  artemis fleet group move --to=g2 big-whale 12345678-1234-1234-1234-123456789abc
i
perfect - exactly what we where looking for