Licensing
Seats and the license server
Tenon is licensed by the seat. Your organization runs a license server, which hands out seats from the allowance in your license, and every command that checks, tests or traces your Flex model takes a seat before it runs. A seat is a lease: Tenon renews it while a command runs, and if a machine shuts down or loses its connection, the lease runs out and the seat frees itself.
On your own machine, Tenon keeps the seat when a command finishes, for up to 4 hours, so the next command starts straight away. In CI, where each job is a fresh machine, the seat is returned when the job is done, so a pipeline holds seats only while it runs.
Most seats are floating: any machine that can reach the license server can use one, up to the number your license allows at once. A license can also have node-locked seats, each bound to one registered machine for months at a time, for a machine that must always have one. CI jobs always use floating seats, since there’s no lasting machine to register.
Tenon checks every seat against your trust root, a public key that
comes with your bundle, so it can tell a real seat from a forged one
without asking anyone. Help, tenon license,
tenon init, tenon workflow new,
show and list, tenon report,
tenon upgrade, tenon docs,
tenon flex docs, reading test logs, and a component test’s
--dry-run need no seat; tenon workflow run
takes the seats its steps need. When Tenon can’t get one, it stops with
exit code 10, or 13 when the license server
can’t be reached.
Configure licensing
tenon license configure connects Tenon to your
organization’s license server, and is the one command you need to set
licensing up or change it. It installs the trust root, copying it to
your licensing home as ~/.flex/root-pub.pem, sets the
server’s address, and then shows your license status. Each value you don’t give
as an option is asked for, and a trust root already in your licensing
home is found and used without asking.
The installer runs tenon license configure for you when
your bundle names a license server, so you’ll run it yourself only to
change the server or the trust root. It’s safe to run again. Before
replacing a different trust root, it asks, unless you add
--yes.
Without a terminal, as in CI, there’s no one to ask, so give every
value as an option: a missing one is an error rather than a prompt. The
pipeline tenon workflow ci
writes does this at the start of every job.
Command:
tenon license configure [options]
Options
--server <url>- The license server’s address.
--root-pubkey <file>- The trust root to install. Tenon copies it to your licensing home. Without this option, Tenon uses the trust root already there.
-y, --yes- Replace a different trust root without asking. Needed when there’s no terminal to ask in.
tenon license configuretenon license configure --server https://licensing.example.comtenon license configure --yes \ --server https://licensing.example.com \ --root-pubkey root-pub.pemCheck your license
tenon license status shows whether licensing works, in
three parts. The first says whether licensing is configured, with a
license server and a trust root, and whether the server answers. The
second is your license, from the server: who it’s for, the floating and
node-locked seats in use out of the total, and when it expires. The
third is your own seat: whether you have one checked out, and for how
much longer.
Having no seat checked out is normal, and your next licensed command
takes one. The exit code tells a script which part, if any, is wrong, so
tenon license status makes a quick check at the start of a
CI job or a support call. It takes no seat itself.
Command: tenon license status
Exit codes
| Code | Meaning |
|---|---|
0 |
Licensing is configured, and the license server answers |
10 |
The license has expired |
11 |
Licensing isn’t configured: no license server, or no trust root |
13 |
The license server can’t be checked |
tenon license statusGet this machine’s fingerprint
tenon license fingerprint prints this machine’s
fingerprint, which you need for a node-locked seat. It’s a one-way hash
of the machine’s hardware id, 32 hexadecimal characters on a line of its
own, and reveals nothing about the hardware itself. It stays the same
across reboots, and on macOS, across reinstalls of the operating
system.
To use a node-locked seat, send the fingerprint to whoever runs your
license server. They pass it to Tangram, who adds the machine to your
license (see Add
node-locked machines). Then turn node-locked seats on for the
machine with tenon license set license.node_locked true.
Virtual machines and containers can change their hardware id, or share
one when they’re cloned, so give them floating seats instead.
Command: tenon license fingerprint
tenon license fingerprinttenon license fingerprint > radar-host.fingerprintView and change settings
tenon license list, get and
set show and change Tenon’s license settings one at a time,
in your licensing home. tenon license configure sets the
server and the trust root together, so reach for these to change one
setting, such as turning node-locked seats on, or to read one in a
script. Any other key is an error that lists the supported ones.
Command:
tenon license list | get <key> | set <key> <value>
Arguments
<key>-
The setting:
license.server, the license server’s address;license.root_pubkey, the path to the trust root; orlicense.node_locked,trueto use a node-locked seat on this machine, andfalsefor a floating one. <value>- The setting’s new value.
tenon license listtenon license get license.servertenon license set license.node_locked true