Setting or Replacing a MemSQL License (MemSQL Ops)
This topic does not apply to MemSQL Helios.
This page describes how to set or replace your MemSQL license in a cluster managed by MemSQL Ops.
All new licenses obtained through the MemSQL Customer Portal are unit-based licenses provided as base64-encoded strings, which is different than the RAM-based licenses files that were used previously. If you have one of these new licenses, you are required to upgrade to a recent version of MemSQL Ops (6.7.6 or later) and MemSQL (6.7.13 or later) in order to use them.
You should not use MemSQL-Ops license capacity (in RAM) as a source of truth if you have a newer unit-based license obtained through the portal, because in our unit-based model, only leaf nodes are counted towards your license capacity limit; however, MemSQL-Ops will still count aggregators in its RAM calculation. As a result, it is expected that you might see an over-capacity warning in the Ops UI.
Also, if you have a unit-based license, you must upgrade to 6.7.13 or later to see your current usage compared to your license capacity; however, if you are using an older RAM-based license, capacity and usage information is correctly reported for all versions of MemSQL 6.7.
Setting a license
If you are deploying a new cluster and are using a new license from the Customer Portal, set your cluster to “Developer Edition” before setting your license through the steps below.
Using MemSQL Ops With Internet Access
Navigate to Settings > Licenses in the MemSQL Ops UI and paste in the MemSQL license key. MemSQL Ops will update all nodes in your MemSQL cluster asynchronously to use the new license.
Or, after you have done your deployment, you can use the CLI LICENSE-ADD command to add a new license:
$ memsql-ops license-add --license-key <license key>
Either workflow is applicable for Customer Portal licenses or older Enterprise licenses obtained from a MemSQL representative.
Using MemSQL Ops Without Internet Access
If you need to replace your license with a new license from the Customer Portal and you do not have internet access, you can replace it using the
--license-key flag as described in the previous section.
If you need to replace your older MemSQL license and you do not have internet access, you will have to use the
<license-file> argument instead of the above
<license key> argument. For this to work, the license file will need to be on the host with the primary memsql-ops agent.
memsql-ops agent-list to check which node is the primary agent.
Then use the following command to add a new license:
memsql-ops license-add --license-file </path/to/file>
Without MemSQL Ops
This process is configuration error prone and we recommend that you use MemSQL Ops to update your license instead. Only use this option if MemSQL Ops is unavailable.
- On each node in your cluster, replace the existing license in <MEMSQL_HOME>/lib with your new license.
- On each node in your cluster, run:
$ sudo service memsql update-license <path to new license>
MemSQL Ops does not allow the addition of 3.2 licenses into MemSQL 4+ nodes.
MemSQL licenses issued before the MemSQL 4 launch may still work with MemSQL 4. That said, we recommend that users update their license to a new MemSQL license when possible.
If you need a new license, contact email@example.com.
Determining capacity and usage for your license
Using MemSQL Ops
The Status and License pages in the MemSQL Ops UI can be used to see your current usage compared against the total RAM capacity available for your license. If you have a unit-based license, only the total RAM of your leaf nodes are counted towards your license capacity. The RAM calculation in the UI includes your aggregator nodes, which are not included, so you might see an over-capacity warning in the UI.
Using MemSQL directly
You can use
SHOW STATUS EXTENDED LIKE "%capacity%" to see your license capacity compared to your current usage. For RAM-based licenses, you will see the following output:
SHOW STATUS EXTENDED LIKE "%capacity%"; **** +--------------------------+-----------+ | Variable_name | Value | +--------------------------+-----------+ | License_capacity | 131072 MB | | Maximum_cluster_capacity | 131072 MB | | Used_cluster_capacity | 13314 MB | +--------------------------+-----------+
And if you have a unit-based license, you will see the following output:
SHOW STATUS EXTENDED LIKE "%capacity%"; **** +--------------------------+---------+ | Variable_name | Value | +--------------------------+---------+ | License_capacity | 4 units | | Maximum_cluster_capacity | 4 units | | Used_cluster_capacity | 2 units | +--------------------------+---------+
Maximum_cluster_capacity is your allowed capacity, while
Used_cluster_capacity shows what you have used against the capacity. In the second example, two out of four units have been used. A unit is a combination of compute (8 vCPU or less) and RAM (32 GB or less) and only applies to host machines that run leaf nodes.
To understand how nodes, host machines, and license units relate to each other, see the MemSQL FAQ.
Using MemSQL Studio
Unlike MemSQL Ops, MemSQL Studio integrates with both RAM-based and unit-based licenses for reporting on capacity versus licensed usage. Accurate usage metrics will be provided regardless of license type. You can install and use MemSQL Studio with existing clusters managed by MemSQL Ops, or use Studio in new deployments managed by the new MemSQL management tools.