License server

Connect developers and CI

Make the license server reachable from every machine that runs Tenon, and point Tenon at it.

The license server’s seat service runs inside your cluster, as the Service license-manager-licensed on port 8080, without TLS. Developer machines and CI runners sit outside the cluster, so you give them a route in, with TLS, and let that route through the chart’s network policy. Then you give each machine the address and the trust root, which Tangram can build into the bundles it sends you.

Before you begin

  • The license server installed, with its license applied.
  • An address for it that your machines can resolve, such as licensing.example.com, and a TLS certificate for that address that every developer machine and CI runner trusts.
  • Your trust root, root-pub.pem, from Tangram.

1. Route traffic to the seat service

Point your Ingress controller, gateway or proxy at the seat service, on port 8080, and terminate TLS there. Route everything under the address to it: Tenon uses only paths under /v1/. The chart doesn’t create an Ingress for the seat service, so add your own, such as this one for ingress-nginx.

Keep the seat service on its own address, apart from the dashboard: Tenon needs only the seat service, and the dashboard needs a sign-in to change anything.

An Ingress for the seat service
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: licensing
  namespace: tenon-licensing
spec:
  ingressClassName: nginx
  tls:
    - hosts: [licensing.example.com]
      secretName: licensing-tls
  rules:
    - host: licensing.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: license-manager-licensed
                port:
                  number: 8080

2. Let the traffic through the network policy

The chart’s network policy admits traffic to the seat service only from pods in its own namespace. Add your Ingress controller’s namespace to networkPolicy.clientNamespaces in your values file. If clients reach the seat service some other way, such as through a load balancer, add the address ranges the cluster sees them coming from to networkPolicy.clientCIDRs instead. Then upgrade the release with the new values.

tenon-licensing-values.yaml
global:
  imagePullSecrets:
    - tangram-ecr-registry
networkPolicy:
  clientNamespaces:
    - ingress-nginx
Apply the new values
helm upgrade license-manager \    oci://<registry>/<path>/license-manager \    -n tenon-licensing --version <chart-version> \    -f tenon-licensing-values.yaml

3. Check the route

From a developer machine, ask the license server for its status. It answers without any sign-in, with your license’s seat counts and expiry, and no names.

If that fails, the connection is the problem, rather than Tenon: see Troubleshooting.

Check the route
curl https://licensing.example.com/v1/status

4. Point developer machines at it

Send Tangram the license server’s address. Tangram then builds it, and your trust root, into the Tenon bundles it sends you, and Tenon’s installer sets up licensing by itself. For machines that already have Tenon, or a bundle without the address, each person runs tenon license configure once.

Point a machine at the license server
tenon license configure --server https://licensing.example.com \    --root-pubkey root-pub.pemtenon license status

5. Point CI at it

In your CI settings, set two variables, for a GitLab group or a GitHub organization to cover all its projects: FLEX_LICENSE_SERVER, the license server’s address, and FLEX_LICENSE_ROOT_PUBKEY, your trust root. In GitLab, make the trust root a File variable; in GitHub, paste its text into an Actions variable. Your runners must reach the address, and use floating seats, since each job runs on a fresh machine. Run Tenon in CI covers the rest of the pipeline.

Next steps