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 [--csv] [--no-trunc]
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. A server's id is the GUID in the ID column of ts servers, which is also the id that available and servers print; add and remove take it as their second argument.
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. Required when there is no terminal. | |
--csv | Tab-separated output, nothing truncated. | ts fleets only. | |
--no-trunc | Do not truncate columns. | ts fleets only. |
Output
print/servers writes one line per member server — the id first, then name and hostname — or Fleet <id> has no servers:
text
5d0c2a7e-8b41-4f3a-9e6d-2c71b08f4a95 build01 build01.corp.example.com
c3e9f164-0a2d-4b77-8f15-6e4d9a2b7c03 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": "c3e9f164-0a2d-4b77-8f15-6e4d9a2b7c03", "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 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 c3e9f164-0a2d-4b77-8f15-6e4d9a2b7c03
# Take a server back out
ts fleet remove 3a5c9f10-6d2b-4e81-a0c7-9b4f2e6d1358 c3e9f164-0a2d-4b77-8f15-6e4d9a2b7c03
# 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: 'remove' reports success for a server that is not in the fleet, and
# changes nothing. Check the fleet's members with 'ts fleet <id>' afterwards.Exit Codes
0 on success. -1 when no id is given, when new is given no name, when add/remove is given only one of the two ids it needs — the message names the missing argument — and when a fleet or server id is not a GUID. -4 when no account is signed in. -5 when the account is not a Server Administrator. -6 when no fleet or server has that id, and when you ask for the schedule of a fleet that has none.
