.. _LicenseManagement:

Flexera License Management
=====================================

As of version 5.0.0, the ICE RemoteWare™ software uses the Flexera License 
Management system to ensure compliance with the terms and regulations described
in the End-User License Agreement.  This section talks about the types
of licenses, how to obtain a license, and how to use your license.

Obtaining a License
-------------------------------------

Licenses can be requested by contacting Penguin Solutions
(``http://www.penguinsolutions.com``) at ``support@penguinsolutions.com``.

Installing a Trial License
-------------------------------------

Use a terminal or command prompt to copy the trial license
``ice-remoteware.lic`` into ice-remoteware using one
of the following commands:

   * Linux: ``sudo cp ice-remoteware.lic /opt/ice-remoteware/bin``
   * Windows: ``copy ice-remoteware.lic C:\Program Files\Penguin Solutions\ICE RemoteWare``
   * MacOS: ``sudo cp ice-remoteware.lic /Applications/ICE RemoteWare.app/Contents/Resources``

Installing a Floating or Node-Locked License
--------------------------------------------

Follow these steps on the ICE FlexLM host:

#. Install the ICE FlexLM license server package (distributed
   by Penguin Solutions) on a host that has network access to all
   ICE RemoteWare hosts.

#. Use a terminal or command prompt to copy the trial license named
   ``ice-flexlm.lic`` into ICE FlexLM using
   one of the following commands:

   * Linux: ``sudo cp ice-flexlm.lic /opt/ice-flexlm/bin``
   * Windows: ``copy ice-flexlm.lic C:\Program Files\Penguin Solutions\ICE FlexLM``
   * MacOS: ``sudo cp ice-flexlm.lic /Applications/ice-flexlm.app/Contents/Resources``

#. For Linux users only, change the owner of the file to ice-flexlm using
   the chown command and make sure the owner has read permission::

     chown ice-flexlm /opt/ice-flexlm/bin/ice-flexlm.lic
     chmod o+r /opt/ice-flexlm/bin/ice-flexlm.lic

#. In ``ice-flexlm.lic``, find the line that looks
   like: ``VENDOR PENGUIN PORT=<port>``.  The last token
   is the vendor port number (typically ``28282``).
   Change your firewall to allow incoming connections to the vendor
   port.

#. Now find the line that looks like: ``SERVER this_host ANY <port>``.
   The last token is the license server port number.  If the port is
   not listed, assume it is ``27002``.  Change your
   firewall to allow incoming connections the license server port.

#. Restart your firewall and the ICE FlexLM service.

Follow these steps on each ICE RemoteWare host:

#. Use a text editor to open the configuration file located at:

   * Linux: ``/opt/ice-remoteware/ice-remoteware.xml``
   * Windows: ``C:\Program Files\Penguin Solutions\ICE RemoteWare\ice-remoteware.xml``
   * MacOS: ``/Applications/ICE RemoteWare.app/Contents/Resources/ice-remoteware.xml``

#. Find the ``Server.License.FileName`` setting in the configuration file.
   If it does not exist you will need to add a
   ``<LicenseFile></LicenseFile>`` tag inside the
   ``<Server></Server>`` tag.

#. Set the value of ``Server.License.FileName`` to the port
   and host of the license server using the ``port@host`` syntax (or
   just ``@host`` if the ICE FlexLM server is using the
   default port (``27002``).

   For example, if ICE FlexLM was running on port
   ``27002`` on a host with hostname ``iceberg``::

     <Server>
       ...
       <LicenseFile>27002@iceberg</LicenseFile>
       ...
     </Server>

   If you are unsure what port and hostname (or IP address) to use, look at
   the ``SERVER`` line in the ``ice-flexlm.lic`` file.  The
   host name will be second token and the port will be the forth
   token.  In the example above this would look like::

     SERVER iceberg 0011223344 27002

.. important:: If the hostname or port of your license server has
               changed, you will need to update this setting and
               restart the ICE RemoteWare service.

.. note:: Flexera typically creates a ``$HOME/.flexlmrc`` file in
          Linux or a Windows registry setting to cache successful
          license checkout locations for future use.

          The order of precedence for license searching paths is as
          follows:

          #. PENGUIN_LICENSE_FILE environment variable
          #. LM_LICENSE_FILE environment variable
          #. Server.License.FileName configuration setting
          #. Flexera cache

Testing your Floating / Node-Locked License Install
---------------------------------------------------

To test if the ICE RemoteWare host can checkout licenses from the
ICE FlexLM host, sign into the ICE RemoteWare host and use the
``lmutil`` tool::

  lmutil lmdiag [-c license-file]

For example, if your ICE FlexLM server is running on port
27002 and the IP address is 192.168.1.7, a successful test will look
like::

  lmutil lmdiag -c 27002@192.168.1.7

  lmutil - Copyright (c) 1989-2016 Flexera Software LLC. All Rights Reserved.
  FlexNet diagnostics on Fri 12/1/2010 08:00

  -----------------------------------------------------
  License file: 27002@192.168.1.7
  -----------------------------------------------------
  "irw" v1.000, vendor: PENGUIN, expiry: 01-aug-2027
    License server: 192.168.1.7
    nodelocked license locked to NOTHING (hostid=ANY)  starts: 1-jan-1990,   expires: 01-aug-2027

  This license can be checked out
  -----------------------------------------------------

If license checkout fails, the output of this command can be useful
for troubleshooting license checkout issues.  If you would like
additional support, please contact Penguin Solutions at
support@penguinsolutions.com.

Once the license file is installed, proceed to: :ref:`Setup`.
