Author: Jason De Paola
Updated: September 2024
Audience: Everyone
Environmental details: Self-hosted, Replicated - KOTS
Summary
Under normal circumstances, license management is performed by deploying an updated sequence (containing the new license values) via the admin portal. More details about this process can be found here: https://docs.replicated.com/enterprise/updating-licenses
If the license updates are not visible or are applied to a different Jama Connect version, then a manual license update may be required.
These are the instructions for manually uploading a new Jama license file (.yaml) to KOTS Admin. This works for both Internet and Airgap installations.
**WARNING**
Please get in touch with Jama Support before attempting this operation. We need to pin your application license to your specific version, or this process will try to install the latest release, potentially causing deployment issues.
Solution
Check your kots version
kubectl kots version
Check installed KOTS application
kubectl kots get apps
Example output
SLUG STATUS VERSION
jama-k8s ready 9.6.4
Save the KOTS Admin Console config
kubectl kots get config jama-k8s -n default --current > config.yaml
If your KOTS version is v1.108.0
or later, you can use the --current
flag to get the config for the currently deployed sequence. Otherwise, you will need to explicitly set the currently deployed sequence value. In the example image, you can see that the currently deployed sequence is 10 (though there are later sequences with updated application versions)
In this example, we're using sequence 10 as it corresponds to the currently deployed sequence we want to capture. This number will likely be different and it should match the correct sequence in your specific environment.
kubectl kots get config jama-k8s -n default --sequence=10 > config.yaml
Remove the jama-k8s app
kubectl kots remove jama-k8s -n default -f
Reinstall the jama-k8s app with new license
- Copy the license.yaml file to the app server or create a new file and paste the license contents into a file,
license.yaml
, and save it somewhere on the app server filesystem. - Then, you can run the following command where you need the
config.yaml
file from above and thelicense.yaml
file from the previous step.
kubectl kots install jama-k8s/standardkots --app-version-label=<JAMA_APP_VERSION> --license-file license.yaml --namespace default --config-values config.yaml
--app-version-label=<JAMA_APP_VERSION>
should specify the current version you want to deploy, e.g. --app-version-label=9.17.1
This also assumes you are running the command form the directory where both the config file and license file are saved. If not, you'll want to modify the command to use the full file path.
e.g.
--license-file /full/path/to/license.yaml
Please also understand that
license.yaml
is just an example and your actual customer license will have a different name.In AIRGAPPED environments, you must place your Airgap bundle on the app server and add the --airgap-bundle
flag to the above command. (Note: your specific airgap file will have a different name but it will be a ".airgap" file type. It should look something like:
kubectl kots install jama-k8s/standardkots --airgap-bundle /path/to/jama.airgap --app-version-label=<JAMA_APP_VERSION> --license-file license.yaml --namespace default --config-values config.yaml
The screenshot below demonstrates a successful operation. After that, the KOTS Admin Console should be available with the new license and config restored.
NOTE: You may encounter the following error:
Error: failed to forward port: failed to query healthz: Get http://localhost:8800/healthz: context deadline exceeded (Client.Timeout exceeded while awaiting headers)
In this case, you may need to create an SSH tunnel before attempting the steps above:
ssh -L 8800:<SERVER IP>:8800 <USER>@localhost
Cause
We have noticed that licenses sometimes fail to sync. Here is a method for pushing the license file and preserving KOTS Admin settings.
Final note
If, after manually updating the license, you run into an error where the application returns an error page stating the "tenant is closed" or "tenant does not exist" then please follow the steps in KOTS - Reset tenant state.
If you run into an error validating the installation, please follow the steps in Failed License Upload During KOTS Install
References
Please feel free to leave feedback in the comments below.
Related to
Comments
3 comments
Update: This procedure can also be used to swap license files in KOTS without disrupting the database and assets.
Use case: This was done successfully in a testing environment for a Jama Connect customer that wanted to keep their production environment up, create a new instance and migrate data over, then verify the data before decommissioning the previous app server and switch the license on the new instance from nonProd to prod.
we are using Release 9.0.3. Following the steps given above, at the stage “Wating for admin Console to be ready”, following error comes up.
Deploying Admin Console
• Waiting for Admin Console to be ready ✓
Error: failed to forward port: failed to query healthz: Get "http://localhost:8800/healthz": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Are we missing something?
I had a customer ask for their YAML license file and where they can find it. Eventually they found it. It would be great if this article would mention how to obtain it as well.
Article is closed for comments.