Exploring License Models

Now that you have successfully run the demo, you might want to spend some time exploring the relationship between the different license models and the licensing system components. We will do this with the pre-built evaluation software.


License Files and License Models

First, let’s take a look at a license file. The license file describes the rights to software that a customer has purchased. As an ISV, you create text descriptions of license rights you wish to grant to your customers, and place them into a license file. You create digital signatures for these licenses with the rlmsign utility, which prevents anyone from modifying the contents of the license itself (if they are modified, the signature is no longer valid). For now, let’s assume that these license rights describe simple nodelocked or floating licenses.

In the license file, there are 3 license line types: SERVER (also called HOST), ISV (also called VENDOR), and LICENSE (also called FEATURE). SERVER lines describe the computers where license servers run, ISV lines describe your ISV-specific license server, and LICENSE lines describe license rights. A license file can contain only LICENSE lines if all licenses are node-locked licenses. If some of the licenses are network floating licenses, then a SERVER and ISV line must also be present.

The first few lines of the example license file (eval.lic or example.lic) which comes in the kit is shown here:

HOST localhost ANY 5053
ISV demo
LICENSE demo test1 1.0 permanent uncounted hostid=any sig=...
LICENSE demo test2 1.0 permanent 2 sig=...

Let us take a look at this license file, line by line, to understand what all the lines are doing:

HOST localhost ANY 5053

This line specifies where the license server is running. The line in the example license file is the most generic version of a SERVER (or HOST) line. This line says that the server is running on the local machine (localhost), with a hostid of ANY (meaning the server will run on any computer – not typical of licenses that you would ship to your customers), and the TCP/IP port that the server listens on is port 5053 (which is the assigned RLM port). Note that *localhost is TCP/IP-speak for “the machine you are running on”. This is why this license file works on your system without modification.

Note

On Unix systems, the INSTALL program will substitute your hostname in the example.lic license file).

ISV demo

This line specifies that the ISV-specific server for ISV demo should be started by the RLM server. This is the shortest example of an ISV line, however an ISV line can also specify a path to the ISV server binary, an options file, and a port number. For now, we will not worry about these other parameters.

LICENSE demo test1 1.0 permanent uncounted hostid=any sig=...

This line specifies a node-locked, uncounted license for version 1.0 of the product “test1”. The ISV is “demo”, and this license is node-locked to hostid “any”, or, in other words, it will work on any machine. (This is not a practical license – in practice, you would supply a machine identifier for a node-locked, uncounted license). This license does not require a license server to operate, and in fact, it could be the only line in the license file.

Note

On Unix kits, the test1 license is a floating license. You can change this to a nodelocked license as in the example above and experiment with checking out nodelocked licenses.

LICENSE demo test2 1.0 permanent 2 sig=...

This line specifies a floating license for version 1.0 of the product “test2”. The ISV is “demo”, and there are 2 licenses available. In order to use this license, a license server must be running (on localhost, at port 5053, on a machine with hostid ANY, in the case of this license file).

Trying different license models

If you are evaluating on Windows, when you ran the evaluation software in the last chapter, you checked out a node-locked test1 license. If you tried it, you may have noticed that you could run as many copies of the test1 program as you wanted – each one would successfully obtain a license. This is what the “uncounted” part of “node-locked, uncounted” means – there is no counting. If you didn’t try that earlier, you might want to try it now – open 2 or 3 windows and run test1 in each (on Windows) – they will all succeed. To try this on Unix or Mac, change the test1 license to a nodelocked, uncounted license (as above), re-sign the license file with rlmsign, then run rlmclient test1 multiple times.

But what if you want to keep track of how many copies of your software are running at one time? This is what a floating license does. In order to use a floating license, you need a license server running. If you are evaluating on Unix or Mac, you have already done this in the previous chapter. If you are on Windows and you want to try that, open another window, and run the RLM license server (rlm or rlm.exe). Then run test2 in 2 or 3 other windows. You will see that the first 2 run, but the 3rd one will not be able to check out a license until you exit one of the first 2 copies of test2.

Notice that in the window where you started rlm, you see lines like these:

../_images/demo-license-activity.png

This is the server debug log indicating license server activity.

We recommend that you experiment with the license servers and the test2 (or rlmclient) program until you are comfortable with the license file and the different license models.