License server
Install the license server
Install the license server with Helm, exchange keys with Tangram, and start handing out seats.
Installing the license server takes two passes with Tangram in
between. The first helm install generates the license
server’s own signing key inside your cluster and publishes its public
half. You send that public key to Tangram, who signs it into your
license, and when you apply what Tangram sends back, the license server
starts. The private key never leaves your cluster, and the license
server never contacts Tangram.
The chart and its images come from a private, OCI-compliant registry
that Tangram gives you access to, so the commands below take
<registry> as its host, <path> as
the path the chart sits under, and <chart-version> as
the version to install. Tangram provides all three, with
credentials.
The commands also use the namespace tenon-licensing and
the release name license-manager, which is also the chart’s
name, so the chart’s resources are named
license-manager-licensed,
license-manager-dashboard and so on. Another release name
goes in front of the chart’s: a release named acme gives
you acme-license-manager-licensed.
Before you begin
- A cluster that meets the requirements.
- From Tangram: the registry that holds the chart and its images, the chart version to install, and credentials for the registry; or the chart and the images already in your own registry.
1. Create the namespace
Create a namespace for the license server. Everything the chart installs, and the two Secrets you apply by hand, live in it.
kubectl create namespace tenon-licensing2. Give the cluster credentials for the registry
The license server’s two images are in a private registry, so your cluster needs a pull secret for it. Create one from the credentials Tangram sent, in the license server’s namespace.
Some registries hand out a login that expires rather than a lasting password, in which case a secret you make by hand stops working. The chart can keep one current for an AWS registry; see Keep an AWS registry’s credentials current.
kubectl -n tenon-licensing create secret docker-registry \ tenon-licensing-registry \ --docker-server=<registry> \ --docker-username=<username> \ --docker-password=<password>3. Write your values file
Keep your settings for the chart in a values file, so every upgrade uses the same ones. At the least, name your pull secret. The chart’s defaults pin the images to the chart’s own version, so don’t set image tags here unless your mirror needs them.
Connect developers and CI adds the settings that let Tenon reach the license server, and you can add them now or later. Configuration lists every setting the chart takes.
global:
imagePullSecrets:
- tenon-licensing-registry4. Install the chart
Log in to the registry, then install the chart from it at the version
Tangram gave you. The chart is an OCI artifact, so there’s no repository
to add: helm fetches it from the registry by its
address.
Don’t add --wait: the license server stays in
ContainerCreating until you apply your license in step 6,
so a --wait would time out and mark the release failed.
When the install finishes, the chart’s notes show what to do next,
and its key-generation job has written the license server’s public key
into the ConfigMap licensed-delegate-pub.
helm registry login <registry> \ --username <username> --password-stdinhelm upgrade license-manager --install \ oci://<registry>/<path>/license-manager \ -n tenon-licensing --version <chart-version> \ -f tenon-licensing-values.yaml5. Send the public key to Tangram
Save the public key, and send it to Tangram with what your license should allow: your organization’s name, how many floating seats you need, how many node-locked seats and the fingerprint of each machine that gets one, and how long the license should last.
The public key isn’t secret. Its private half, in the Secret
licensed-delegate, never leaves your cluster; keep a copy of it
somewhere safe.
kubectl -n tenon-licensing get configmap licensed-delegate-pub \ -o jsonpath='{.data.delegate-pub\.pem}' > delegate-pub.pem6. Apply your license
Tangram sends back two files: delegation.json, your
signed license, and root-pub.pem, your trust root. Neither
is secret. Put both in the Secret licensed-trust, and the
license server starts by itself.
When it starts, the license server checks that your license is signed
by your trust root, and refuses to start if it isn’t. Its log then says
delegation verified against root.
kubectl -n tenon-licensing create secret generic licensed-trust \ --from-file=delegation.json --from-file=root-pub.pemkubectl -n tenon-licensing rollout status \ deploy/license-manager-licensed7. Check that it hands out seats
Make the license server reachable from your machines, as Connect developers and CI describes. Then, from
a machine with Tenon, point Tenon at it and check:
tenon license status should show your license’s seats and
when it expires.
tenon license configure --server https://licensing.example.com \ --root-pubkey root-pub.pemtenon license statusOpen the dashboard
The dashboard shows which seats are in use and what they’ve been used
for. Anyone who can reach it can look; releasing seats, or restarting
the license server, needs you to sign in as admin. The
chart generates the admin password when it installs, and keeps it across
upgrades.
Then open http://localhost:8081. Holders’ names appear
only to a signed-in admin.
kubectl -n tenon-licensing get secret \ license-manager-dashboard-auth \ -o jsonpath='{.data.admin-password}' | base64 -d; echokubectl -n tenon-licensing port-forward \ svc/license-manager-dashboard 8081:8080Publish the dashboard
To reach the dashboard without a port-forward, set
dashboard.ingress in your values file, with your own
Ingress controller and a TLS certificate, and add the controller’s
namespace to networkPolicy.dashboardFromNamespaces. Without
that second setting the chart’s network policy blocks the controller,
and the dashboard answers every request with a 502. The
dashboard terminates no TLS and asks for no sign-in to look, so put the
certificate, and whatever access control your network needs, on the
route in.
Keep the dashboard on its own address, apart from the seat service: Tenon needs only the seat service, and the two have different readers.
dashboard:
ingress:
enabled: true
className: nginx
hosts:
- host: licensing-dashboard.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: licensing-dashboard-tls
hosts:
- licensing-dashboard.example.com
networkPolicy:
dashboardFromNamespaces:
- ingress-nginxKeep an AWS registry’s credentials current
A login to an AWS registry lasts 12 hours, so a pull secret you make
by hand stops working within the day. The chart can keep one for you
instead: give it credentials that may read the registry, and it runs a
job every 10 hours that writes a current pull secret into the namespace.
Name that secret in global.imagePullSecrets in place of the
one from step 2, and leave out the account and region to have the chart
work the registry’s host out from them.
The job writes the secret on its first run, which is up to 10 hours
away, so run it once yourself after installing. To keep credentials out
of a values file you commit, put them in a Secret and name it in
ecrPullSecret.existingSecret instead of writing
accessKeyId and secretAccessKey.
ecrPullSecret:
enabled: true
awsAccount: "<aws-account>"
awsRegion: <aws-region>
accessKeyId: <access-key-id>
secretAccessKey: <secret-access-key>
global:
imagePullSecrets:
- tangram-ecr-registrykubectl -n tenon-licensing create secret generic \ tenon-licensing-aws-credentials \ --from-literal=AWS_ACCESS_KEY_ID=<access-key-id> \ --from-literal=AWS_SECRET_ACCESS_KEY=<secret-access-key>kubectl -n tenon-licensing create job pull-secret-now \ --from=cronjob/license-manager-ecr-cronjobMirror the images
If your cluster can’t reach the registry Tangram gives you, copy the
chart and the three images into your own, then set
global.imageRegistry to your registry’s host. The chart
keeps each image’s path and replaces only the host, so mirror the images
under the paths they already have. helm show values prints
the registry and path of each one:
licensed.image, the seat service, which the activity store and the key-generation job run toodashboard.image, the dashboardvalkey.image, the seat store,valkey/valkey:8-alpinefromdocker.io. Valkey’s tag moves as Valkey releases, so mirror the build you’ve tested, and keep it.
With everything in your own registry, install from there and name a
pull secret for it. global.imageRegistry covers every image
the chart runs, so leave the per-image registries alone.
helm show values oci://<registry>/<path>/license-manager \ --version <chart-version>helm pull oci://<registry>/<path>/license-manager \ --version <chart-version>helm push license-manager-<chart-version>.tgz \ oci://registry.example.com/tenonglobal:
imageRegistry: registry.example.com
imagePullSecrets:
- registry-example-comNext steps
- Connect developers and CI: make the license server reachable, and point Tenon at it.
- Configuration: every setting the chart takes.
- Back up and restore activity: what to keep a copy of.