Software License Management

This guide provides information on how to manage the software license on an Anapaya appliance. For general information about Anapaya appliance software licensing, please refer to the Software License section.

Note

Starting with release v0.38.0 the appliances are compatible with Anapaya’s license management system. The license can be installed on the appliance but are not yet enforced.

To activate a license a 3-step process is required and described in this section.

License Request File

The License Request File (LRF) is used in the Anapaya portal to generate a license. The LRF can be retrieved either by using the CLI on the appliance with the following command:

appliance-cli get software/licenses/request > license_request.json
# or using curl
curl -k -u <user>:<password> https://$APPLIANCE_API_PH/api/v1/software/licenses/request

or in case the appliance is managed via Console, the LRF can be conveniently downloaded from the appliance page on the Console.

Navigate from the Console landing page to -> Appliances -> Select the appliance in question -> On the just opened context on the right side, click on the Software button -> A new page titled Software Management will pop up and the LRF can be generated by clicking on the GET License Request button (see screenshot below)

Associate the LRF with the subscription in the Anapaya portal

To associate the LRF with the corresponding subscription in the Anapaya portal, follow the steps:

Note

This step requires that a subscription has been ordered beforehand in the Anapaya Portal.

  1. Connect to the Anapaya Portal with a user granted with the “license activation” permission.

  2. Go to the “Quotation/Ordering” module and select the “License Activation” menu.

  3. Select the relevant subscription from the list and click on the pencil to take an action.

  4. Upload the LRF file, check the parameters and confirm.

    Note

    If the appliance has not yet been set up, you can select your effective date.

  5. Retrieve the signed license and store it for the next steps.

Upload the signed license

The signed license can be uploaded to the corresponding appliance either using the CLI:

appliance-cli post software/licenses 'license: <license>'
# or using curl
curl -X POST -k -u <user>:<password> https://$APPLIANCE_API_PH/api/v1/software/licenses -H "Content-Type: application/json" -d '{"license": <license>}'

or in case the appliance is managed via Console, the signed license can be uploaded on the same view the LRF was generated with the “Add License” Button. (see screenshot below)

Note

To upload the license, the logged-in user needs to have at least the operator role. Additionally, the user that Console uses to authenticate to the appliance must have the writer role on the appliance.

../../../_images/console-license.drawio1.svg

Troubleshooting

This section provides some initial steps to troubleshoot issues with the license management system.

If you encounter any issues when interacting with the appliance, please check the logs of the appliance-controller:

journalctl -eu appliance-controller.service

If you’re not able to resolve the problem or if the issue is related to the Anapaya portal, please contact the Anapaya support team (ops@anapaya.net). Provide as much information as possible:

  • The precise description of the issue and the potential error messages.

  • The output of the appliance-controller logs for the given time frame.

  • Any additional information that might be relevant (LRF, license file, etc.).

  • The subscription identifier (IC) from the Anapaya portal.

Helpful commands

You can refer to Management API Specification for the complete list of software-license endpoints to interact with the licenses on the system. Here are some useful appliance-cli commands to check the API endpoints:

  • Check the status of the licensing system:

    appliance-cli get software/licenses/status
    
  • List licenses:

    appliance-cli get software/licenses
    
  • Add license:

    appliance-cli post software/licenses 'license: <license>'
    
  • Get a specific license:

    appliance-cli get software/licenses/<license_id>
    
  • Remove a license:

    Warning

    Removing licenses from the appliance is generally not required, and removing the active license may result in restricted-functionality mode.

    appliance-cli delete software/licenses/<license_id>