Appearance
ts fleet
Group application servers into a fleet, and see which servers are in one, which are still unassigned, and when the fleet is scheduled to be powered on.
Usage
text
ts fleets
ts fleet [print | servers] <id>
ts fleet new <name>
ts fleet delete <id> [--force]
ts fleet add <id> <server-id>
ts fleet remove <id> <server-id>
ts fleet schedule <id>
ts fleet availableDescription
A fleet is a named group of application servers that you power on and off together. ts fleets lists them — name, creation time, and the id every other action takes. ts fleet <id> with no action, or the explicit servers action, prints the servers currently in the fleet as id, name, and hostname, one per line.
ts fleet available is the odd one out: it takes no id at all, and lists the application servers that are not in any fleet yet. Reach for it before add, because it prints the numeric server id that add and remove require. The ID column of ts servers is a different identifier and will not work here.
ts fleet new <name> creates an empty fleet and confirms the name. It does not print the new id in text output, so run ts fleets afterwards to pick it up — or use --format=json, whose envelope carries the created fleet. ts fleet add and ts fleet remove move one server at a time and do not prompt. Removal is reversible — adding the same server back restores the original membership row rather than creating a second one.
ts fleet schedule <id> prints the fleet's power schedule: a start time, an end time, and the bitmask of days it applies to. It is read-only from the CLI; there is no action here that sets or clears a schedule. A fleet with no schedule reports that the resource was not found rather than printing an empty one.
ts fleet delete prompts unless you pass --force. It is a soft delete — the fleet stops appearing in ts fleets, and its memberships and schedule are retired with it, but nothing is erased from disk and no server is touched. The servers keep running and become available again, so they show up in ts fleet available ready to be assigned elsewhere.
Options
| Flag | Description | Default/Values | Notes |
|---|---|---|---|
--force, -f | Delete without confirming. | delete only; remove never prompts. |
Output
print/servers writes one line per member server — the numeric id first, then name and hostname:
text
4 build01 build01.corp.example.com
7 build02 build02.corp.example.comavailable and schedule emit JSON rather than a table. available is the list of unassigned application servers, and its id is what add takes:
json
[{ "id": 7, "name": "build02", "hostname": "build02.corp.example.com" }]schedule is the window and the days it applies to:
json
{ "start": "07:00:00", "end": "19:00:00", "daysBitmask": 62 }Examples
bash
# What fleets exist?
ts fleets
# Who is in one
ts fleet 3a5c9f10-6d2b-4e81-a0c7-9b4f2e6d1358
# Which application servers are not in a fleet yet — and their add-able ids
ts fleet available
# Stand up a new fleet, find its id, then populate it
ts fleet new "West Build"
ts fleets
ts fleet add 3a5c9f10-6d2b-4e81-a0c7-9b4f2e6d1358 7
# Take a server back out
ts fleet remove 3a5c9f10-6d2b-4e81-a0c7-9b4f2e6d1358 7
# When is this fleet supposed to be up?
ts fleet schedule 3a5c9f10-6d2b-4e81-a0c7-9b4f2e6d1358
# Retire the grouping; the servers keep running
ts fleet delete 3a5c9f10-6d2b-4e81-a0c7-9b4f2e6d1358 --force
# Gotcha: 'add' wants the numeric server id from 'ts fleet available', not the
# GUID that 'ts servers' prints. Passing the GUID fails as a missing resource,
# which reads like a bad fleet id but is the second argument's fault.Exit Codes
0 on success. -1 when no id is given, when new is given no name, or when add/remove is given only one of the two ids it needs — the message names the missing argument. -4 when no account is signed in, and also when the account is signed in but is not a Server Administrator, since these endpoints report both the same way. -6 when no fleet has that id, when the server id is not a numeric server, and when you ask for the schedule of a fleet that has none.
Related Commands
- ts servers — The application servers a fleet groups, and their per-machine settings.
- ts sessions — What is actually running on those servers right now.
- ts status — Whether a server in a powered-on fleet is answering.
