Difference between revisions of "Licensing"

From YateBTS
Jump to: navigation, search
(Operations on products machine)
(About)
 
(15 intermediate revisions by 2 users not shown)
Line 6: Line 6:
  
 
There are two major usage scenarios:
 
There are two major usage scenarios:
* Product and license on the same machine
+
* [[Licensing#Products_and_Licenses_on_the_same_server | '''Product and licenses on the same server''']]
** One license per machine
+
** One license per server
** Each license is bound to one machine
+
** Each license is bound to only one server/virtual machine
* Products use one of the licenses on a license server
+
* [[Licensing#Products_and_Licenses_on_different_servers | '''Products and licenses on different servers''']]
** One server can hold a number of licenses
+
** One server can hold N number of licenses
** All licenses are bound to the server machine
+
** All licenses are bound to the License Server.
** Each application machine is granted one license on start, up to the number of licenses bought
+
** Each Yate based application can run in different VM Guests and is granted one license on start, up to the number of bought licenses.
  
 
License activation is strongly bounded to the hardware, because on any license request (as action) made by the licensee, a machine fingerprint (containing hardware, environment and OS informations) is generated and stored in the .WibuCmRaC file.
 
License activation is strongly bounded to the hardware, because on any license request (as action) made by the licensee, a machine fingerprint (containing hardware, environment and OS informations) is generated and stored in the .WibuCmRaC file.
Line 19: Line 19:
  
 
Moving the VM to another host would invalidate the license so in this case it is undesirable to install the license in the VM, a separate license server should be used.
 
Moving the VM to another host would invalidate the license so in this case it is undesirable to install the license in the VM, a separate license server should be used.
 +
 +
If the stability of hardware cannot be guaranteed please see the [[Licensing#License on USB Dongle | ''USB Dongle'']] alternative below.
  
 
To obtain a license request code, log in to your machine and use '''yate-mgmt''' command-line utility as shown in [[Licensing#License_request | ''License request'']]
 
To obtain a license request code, log in to your machine and use '''yate-mgmt''' command-line utility as shown in [[Licensing#License_request | ''License request'']]
Line 45: Line 47:
 
[root@licensee-machine][~]# urpmi yate-mgmt-core
 
[root@licensee-machine][~]# urpmi yate-mgmt-core
 
... </pre>
 
... </pre>
 
 
These packages will be installed: yate-mgmt-core-*.mga5.noarch , yate-mgmt-*.mga5.noarch and CodeMeter-*.x86_64
 
These packages will be installed: yate-mgmt-core-*.mga5.noarch , yate-mgmt-*.mga5.noarch and CodeMeter-*.x86_64
 +
 +
If repository access is restricted to users who authenticate with a ''username'' and ''password'', please edit '''/etc/urpmi/urpmi.cfg''' file, to contain in the first set of braces '''curl-options''' specifying username and password as shown below.
 +
<pre>
 +
[root@licensee-machine][~]$ head -n 5 /etc/urpmi/urpmi.cfg
 +
{
 +
  curl-options: --user username:password
 +
}
 +
</pre>
  
 
Our work as root is temporarily done, to exit root environment, just type 'exit'
 
Our work as root is temporarily done, to exit root environment, just type 'exit'
Line 57: Line 66:
 
<pre>[yate@licensee-machine][~]$ yate-mgmt
 
<pre>[yate@licensee-machine][~]$ yate-mgmt
 
Usage: yate-mgmt options...
 
Usage: yate-mgmt options...
     --cert-view [filename.txt]             Display Apache SSL certificate
+
     --cert-view [filename.txt]               Display Apache SSL certificate
     --cert-update filename.crt            Update Apache certificate and restart the service
+
     --cert-update filename.pem                Update Apache certificate and restart service
     --license-view [filename.txt]         View current license information
+
     --license-view [filename.txt]             View current license information
     --license-dump [filename.txt]         Dump Wibu licensing info for troubleshooting
+
     --license-dump [filename.txt]             Dump Wibu licensing info for troubleshooting        
     --license-prepare [filename.wbb]       Create license container from template
+
    --license-verbose [filename.txt]          Show details about current licenses                 
     --license-request [filename.WibuCmRaC] Create a license request
+
     --license-prepare [filename.wbb]         Create license container from template              
     --license-update filename.WibuCmRaU   Install or update license, use - for stdin
+
     --license-request [filename.WibuCmRaC]   Create a license request                            
     --license-receipt [filename.WibuCmRaC] Create a license activation receipt
+
     --license-update filename.WibuCmRaU       Install or update license, use - for stdin          
 +
     --license-receipt [filename.WibuCmRaC]   Create a license activation receipt                  
 +
    --license-deactivate [filename.WibuCmRaC] Create a license deactivation request
 
[yate@licensee-machine][~]$</pre>
 
[yate@licensee-machine][~]$</pre>
  
Line 134: Line 145:
 
... </pre>
 
... </pre>
  
== License on a License Server ==
 
If the licensee machine is '''virtual''' or '''is not the same as the machine where our Core Network products are running''', you must store the licenses on a '''license server'''.
 
  
Virtual machines must have installed also yate-mgmt-core as described in [[Licensing#Requirements | ''Requirements'']] chapter.
+
==Products and Licenses on the same server ==
  
In this case YateHSS and YateUCN or any other Yate Core products are running on another/virtual machine and the license server is another machine.
+
'''Below, there are four scenarios:'''
  
License prepare and license request operations will be made on the '''license server''' and ''here the license files will be stored/installed''.
+
'''1.''' [[File:lic_single_file.png|382px|Single server with license as file]] <span style="margin-right:30px"></span> '''2.''' [[File:lic_single_usb.png|382px|Single server with license s USB]]
 +
 
 +
'''3.''' [[File:lic_single_vm_file.png|382px|Single VM with license as file]] <span style="margin-right:30px"></span> '''4.''' [[File:lic_single_vm_usb.png|382px|Single VM setup with USB license]]
 +
 
 +
PLEASE BE AWARE THAT EQUIPMENTS/SERVERS COLORED IN <span style="color:#ffa3a3">'''RED'''</span> SHOULDN'T BE CHANGED AT ALL!
 +
'''ANY CHANGE WILL INVALIDATE THE LICENSE!''' MORE DETAILS ABOUT '''LICENSE BONDING''' CAN BE FOUND AT THE TOP OF THIS DOCUMENT.
 +
 
 +
== Products and Licenses on different servers ==
 +
Licenses are installed on a License Server (we recommend a physical machine), because any hardware changes will invalidate the licenses.
 +
 
 +
Yate products (Core network products) are running on different machines than the License Server.
 +
<!-- If the licensee machine is '''virtual''' or '''is NOT the same as the machine where our Core Network products are running''', you can store the licenses on a '''License Server'''. -->
 +
 
 +
'''In the pictures below are two scenarios:'''
 +
 
 +
'''1.''' [[File:lic_server_file.png|382px|license as file]] <span style="margin-right:30px"></span> '''2.''' [[File:lic_server_usb.png|382px|license as usb]]
 +
 
 +
PLEASE BE AWARE THAT EQUIPMENTS/SERVERS COLORED IN <span style="color:#ffa3a3">'''RED'''</span> SHOULDN'T BE CHANGED AT ALL!
 +
'''ANY CHANGE WILL INVALIDATE THE LICENSE!''' MORE DETAILS ABOUT '''LICENSE BONDING''' CAN BE FOUND AT THE TOP OF THIS DOCUMENT.
 +
 
 +
In this two cases Yate Core products are running on VMs in two different servers and the License Server is running on another server.
 +
 
 +
Each VM must have '''yate-mgmt-core''' package installed as described in [[Licensing#Requirements | ''Requirements'']] chapter.
 +
 
 +
License prepare and license request operations will be made on the '''License Server''', because ''there will be stored/installed license files''.
 +
 
 +
Below are detailed changes that should be made on License Server settings from CodeMeter WebAdmin:
 +
* Activate network server
 +
* Add IP addresses of Yate services machines in License Access Permission
  
 
===Easy access & Forwarding===
 
===Easy access & Forwarding===
Line 158: Line 195:
 
* Open in browser http://localhost:8035/ and see the output of the license server on port 22350 (the CodeMeter default port).
 
* Open in browser http://localhost:8035/ and see the output of the license server on port 22350 (the CodeMeter default port).
  
* Enable Network Server from menu -> Configuration -> Server -> Server Access tab -> Network Server -> [X] Enable  
+
* '''Enable Network Server''' from menu -> Configuration -> Server -> Server Access tab -> Network Server -> ['''X'''] Enable  
  
 
[[File:CodeMeter_License_Server.png|600px]]
 
[[File:CodeMeter_License_Server.png|600px]]
  
* Add licensee machine IP address in License Access Permission tab next to Server Access tab by clicking 'Add' and then Apply.
+
* '''Add licensee machine IP address''' in License Access Permission tab next to Server Access tab by clicking 'Add' and then Apply.
  
 
* Restart CodeMeter service  
 
* Restart CodeMeter service  
  
  [root@license-server][~]# service codemeter restart
+
  [root@license-server][~]# systemctl restart codemeter.service
  
 
=== Operations on products machine ===
 
=== Operations on products machine ===
 +
 +
Add License Server IP address in '''Server Search List''' from CodeMeter WebAdmin for each machine were Yate is installed.
  
 
* Connect trough ssh and forward remote 22350 port of licensee machine '''were Yate products are running''' to local 8034 port like this:
 
* Connect trough ssh and forward remote 22350 port of licensee machine '''were Yate products are running''' to local 8034 port like this:
Line 175: Line 214:
  
 
* Open http://localhost:8034/ in browser and modify CodeMeter settings, to search for licenses on a specific IP address (IP address of the License Server).
 
* Open http://localhost:8034/ in browser and modify CodeMeter settings, to search for licenses on a specific IP address (IP address of the License Server).
 +
** '''Configuration''' -> '''Basic''' -> '''Server Search List''' : ''Add server IP address'' -> '''Apply'''
  
 
[[File:CodeMeter_Licensee_Machine.png|600px]]
 
[[File:CodeMeter_Licensee_Machine.png|600px]]
  
* It is very important to '''restart the CodeMeter service''' so changes can take effect.
+
* It is very important to '''restart CodeMeter service''' so changes can take effect.
  
  [root@licensee-machine][~]# service codemeter restart
+
  [root@licensee-machine][~]# systemctl restart codemeter.service
  
 
* Check [[Licensing#Finalizing_installation | ''Finalizing instalation'']] section to finish installing your Yate products.
 
* Check [[Licensing#Finalizing_installation | ''Finalizing instalation'']] section to finish installing your Yate products.
 +
 +
== License on USB Dongle ==
 +
 +
For special cases we may provide licenses on an [http://www.wibu.com/us/codemeter/cmdongle.html USB dongle]. In this case the license is not tied to the machine hardware but to the dongle.
 +
 +
On the machine where the Application or the License Server is to be run only the CodeMeter package needs to be installed.
 +
 +
Licensed products pull the package automatically but on a license server it needs to be installed manually from the YateCore repository.
 +
 +
Since the license comes preinstalled on the dongle most of the procedures above are not required. Just plug in the USB dongle and wait a few seconds.
 +
 +
If the license server or product runs in a Virtual Machine the USB device needs to be forwarded from the host to the guest.
 +
 +
''Please see case '''4.''' from'' [[Licensing#Products_and_Licenses_on_the_same_server | '''Product and licenses on the same server''']]
 +
 +
If the USB dongle is used as a License Server then the product machine still needs to be [[Licensing#Operations on products machine | set up to connect to server]].

Latest revision as of 17:32, 1 February 2019

About

Our licensing system, called "CodeMeter" is provided in collaboration with Wibu-Systems, one of the top suppliers in the industry.

Our clients (hereinafter called "licensee") must activate license on their machine, as our licensing system permits that one licence can cover any of our Core Network Products installed or used on a single machine (virtual or not).

There are two major usage scenarios:

License activation is strongly bounded to the hardware, because on any license request (as action) made by the licensee, a machine fingerprint (containing hardware, environment and OS informations) is generated and stored in the .WibuCmRaC file.

In case of a Virtual Machine the license will be bound to characteristics of both the VM and the host's hardware.

Moving the VM to another host would invalidate the license so in this case it is undesirable to install the license in the VM, a separate license server should be used.

If the stability of hardware cannot be guaranteed please see the USB Dongle alternative below.

To obtain a license request code, log in to your machine and use yate-mgmt command-line utility as shown in License request

The .WibuCmRaC file (which also contains the license request code) must be sent to us via Support system and in turn, we will send back an update file ( .WibuCmRaU ) to the licensee.

With this file, a license update operation is made only once on the licensee machine.

This procedure sums 'license update' and 'license receipt' operations and will be made also with yate-mgmt as shown in License activation

Once license is updated and license receipt is generated, please upload license receipt to our Support system.

This procedure will allow future rebuilding of the license on that specific machine if the license is destroyed.

Installing

Requirements

All our Yate based core products are built on top of Mageia 5 so this Linux distribution should be already installed on the machine.

On every machine with private Yate packages installed, we need to add the YateCore repository and install the yate-mgmt-core package as root.

[yate@licensee-machine][~]$ su -
Password:
[root@licensee-machine][~]#
[root@licensee-machine][~]# urpmi.addmedia --update YateCore http://repo.yate.ro/licensed/mga5/x86_64
[root@licensee-machine][~]# urpmi yate-mgmt-core
... 

These packages will be installed: yate-mgmt-core-*.mga5.noarch , yate-mgmt-*.mga5.noarch and CodeMeter-*.x86_64

If repository access is restricted to users who authenticate with a username and password, please edit /etc/urpmi/urpmi.cfg file, to contain in the first set of braces curl-options specifying username and password as shown below.

[root@licensee-machine][~]$ head -n 5 /etc/urpmi/urpmi.cfg 
{
  curl-options: --user username:password
}

Our work as root is temporarily done, to exit root environment, just type 'exit'

[root@licensee-machine][~]# exit
[yate@licensee-machine][~]$

After the installation we will have yate-mgmt in our /usr/bin directory, typing yate-mgmt (we can check if yate-mgmt-core installed successfully) in your console we will have this output message:

[yate@licensee-machine][~]$ yate-mgmt
Usage: yate-mgmt options...
    --cert-view [filename.txt]                Display Apache SSL certificate
    --cert-update filename.pem                Update Apache certificate and restart service
    --license-view [filename.txt]             View current license information
    --license-dump [filename.txt]             Dump Wibu licensing info for troubleshooting          
    --license-verbose [filename.txt]          Show details about current licenses                   
    --license-prepare [filename.wbb]          Create license container from template                
    --license-request [filename.WibuCmRaC]    Create a license request                              
    --license-update filename.WibuCmRaU       Install or update license, use - for stdin            
    --license-receipt [filename.WibuCmRaC]    Create a license activation receipt                   
    --license-deactivate [filename.WibuCmRaC] Create a license deactivation request
[yate@licensee-machine][~]$

Verifying and preparing environment

The environment must be set up on the client's machine or on his license server (if there is one -> check License on a License Server section).

Before we install any license we must check if there are current license information on licensee system by typing: "yate-mgmt --license-view" or the short command: yate-mgmt -lv

[yate@licensee-machine][~]$ yate-mgmt -lv
[yate@licensee-machine][~]$

If there is no result it means our licensee system has no license at all and we may continue.

To add a license we must prepare the environment for the license by creating a license container with the command: "yate-mgmt --license-prepare" or we can use the short command yate-mgmt -lp

[yate@licensee-machine][~]$ yate-mgmt -lp

You may skip preparation in this case this step is executed automatically when creating a License Request.

License request

Next in our process is the license request step and by typing "yate-mgmt --license-request" or the short command yate-mgmt -lr

A file ending in .WibuCmRaC is created. The license request generates and stores also the machine fingerprint in the license request file (ending in .WibuCmRaC)

License request will be made on licensee machine. If our Core Network products are not running on the same machine, check License on a License Server section.

[yate@licensee-machine][~]$ yate-mgmt -lr
[yate@licensee-machine][~]$
[yate@licensee-machine][~]$ ls *Wibu*
-rw-r--r--  1 yate yate  33358 Sep  2 15:57 32767-16385_5000676.WibuCmRaC
[yate@licensee-machine][~]$

The generated file (in our case 32767-16385_5000676.WibuCmRaC) must sent to us via our Support system.

We will send a .WibuCmRaU file used for licence update which will generate a licence receipt. Generated license receipt file must be sent to us in order to activate the license.

License activation

The license update procedure sums 'license update' and 'license receipt' operations and are will be made with yate-mgmt as shown below:

[yate@licensee-machine][~]$ yate-mgmt -lu 15767-16385_5000676.WibuCmRaU
[yate@licensee-machine][~]$ 
[yate@licensee-machine][~]$ yate-mgmt -lR 
[yate@licensee-machine][~]$

After that a new file ending in .WibuCmRaC is generated (128-26881_5000676-receipt.WibuCmRaC), please upload the file to our Support system.

The license request operation also changes the license container on the licensee machine from 32767-16385_5000676 to 128-26881_5000676.

This change can be verified with yate-mgmt --license-view command.

[yate@licensee-machine][~]$ yate-mgmt --license-view
SER=128-26881 FC=5000676 PC=100 QTY=1 FEAT=0x8000000f NAME=Yate based core network products
[yate@licensee-machine][~]$

Finalizing installation

Once the license is set up it is time to install the product themselves on their machines. This job needs root access.

Here is an example for installing YateHSS:

[yate@licensee-machine][~]$ su -
Password:
[root@licensee-machine][~]#
[root@licensee-machine][~]# urpmi yate-hss
...
[root@licensee-machine][~]# systemctl status yate-hss.service
● yate-hss.service - YATE based Home Subscribers Server
   Loaded: loaded (/usr/lib/systemd/system/yate-hss.service; enabled)
   Active: active (running) since Tue 2017-06-06 17:45:33 CEST; 14s ago
... 


Products and Licenses on the same server

Below, there are four scenarios:

1. Single server with license as file 2. Single server with license s USB

3. Single VM with license as file 4. Single VM setup with USB license

PLEASE BE AWARE THAT EQUIPMENTS/SERVERS COLORED IN RED SHOULDN'T BE CHANGED AT ALL!
ANY CHANGE WILL INVALIDATE THE LICENSE! MORE DETAILS ABOUT LICENSE BONDING CAN BE FOUND AT THE TOP OF THIS DOCUMENT.

Products and Licenses on different servers

Licenses are installed on a License Server (we recommend a physical machine), because any hardware changes will invalidate the licenses.

Yate products (Core network products) are running on different machines than the License Server.

In the pictures below are two scenarios:

1. license as file 2. license as usb

PLEASE BE AWARE THAT EQUIPMENTS/SERVERS COLORED IN RED SHOULDN'T BE CHANGED AT ALL!
ANY CHANGE WILL INVALIDATE THE LICENSE! MORE DETAILS ABOUT LICENSE BONDING CAN BE FOUND AT THE TOP OF THIS DOCUMENT.

In this two cases Yate Core products are running on VMs in two different servers and the License Server is running on another server.

Each VM must have yate-mgmt-core package installed as described in Requirements chapter.

License prepare and license request operations will be made on the License Server, because there will be stored/installed license files.

Below are detailed changes that should be made on License Server settings from CodeMeter WebAdmin:

  • Activate network server
  • Add IP addresses of Yate services machines in License Access Permission

Easy access & Forwarding

CodeMeter License Server by default works on port 22350 and it accepts connexions only from 127.0.0.1, to access it a local port forwarding is needed.

We will connect trough ssh and forward remote 22350 port to local 8035 port like this:

[user@localhost][~]$ ssh -L 8035:localhost:22350 yate@license-server
Password: 
Last login: Tue Sep  6 14:24:33 2016 from about.lan
[yate@license-server][~]$ 

Operations on License Server

  • Open in browser http://localhost:8035/ and see the output of the license server on port 22350 (the CodeMeter default port).
  • Enable Network Server from menu -> Configuration -> Server -> Server Access tab -> Network Server -> [X] Enable

CodeMeter License Server.png

  • Add licensee machine IP address in License Access Permission tab next to Server Access tab by clicking 'Add' and then Apply.
  • Restart CodeMeter service
[root@license-server][~]# systemctl restart codemeter.service

Operations on products machine

Add License Server IP address in Server Search List from CodeMeter WebAdmin for each machine were Yate is installed.

  • Connect trough ssh and forward remote 22350 port of licensee machine were Yate products are running to local 8034 port like this:
[user@localhost][~]$ ssh -L 8034:localhost:22350 yate@licensee-machine
  • Open http://localhost:8034/ in browser and modify CodeMeter settings, to search for licenses on a specific IP address (IP address of the License Server).
    • Configuration -> Basic -> Server Search List : Add server IP address -> Apply

CodeMeter Licensee Machine.png

  • It is very important to restart CodeMeter service so changes can take effect.
[root@licensee-machine][~]# systemctl restart codemeter.service

License on USB Dongle

For special cases we may provide licenses on an USB dongle. In this case the license is not tied to the machine hardware but to the dongle.

On the machine where the Application or the License Server is to be run only the CodeMeter package needs to be installed.

Licensed products pull the package automatically but on a license server it needs to be installed manually from the YateCore repository.

Since the license comes preinstalled on the dongle most of the procedures above are not required. Just plug in the USB dongle and wait a few seconds.

If the license server or product runs in a Virtual Machine the USB device needs to be forwarded from the host to the guest.

Please see case 4. from Product and licenses on the same server

If the USB dongle is used as a License Server then the product machine still needs to be set up to connect to server.