Connecting to a Remote Licence Server

In this section, you will learn to configure Squore to rely on a remote licence server instead of using the default server embedded into each installation. This is useful when you run a production server and a development server, and you want the licence to be shared between both installations.

Note

Before you follow these steps, ensure that the two Squore servers are installed and start up correctly as described in Chapter 3, Installing Squore and Chapter 4, Starting Squore.

Warning

Ensure that the local server and the remote server run the same version of java. Using java 1.6 on one server and java 1.7 on the other server is not supported.

In order to point a local Squore server to a licence served by a remote Squore installation, carry out the following steps:

  1. On the remote license server (optional):

    By default, the password of the ejb user is changeme. If you want to change the password, then:

    1. Edit <INSTALLDIR>/server/standalone/configuration/application-users.properties.

    2. Get a new password with this command:

      # echo -n "ejb:ApplicationRealm:new_password" | md5sum

      where new_password is the password to assign to the user.

    3. Restart Squore Server.

  2. On the local server:

    1. Stop Squore Server.

    2. Edit <INSTALLDIR>/server/standalone/configuration/squore-server.properties. Add the property:

      license.remote = true

    3. Edit <INSTALLDIR>/server/standalone/configuration/standalone.xml

      .
    4. Find the outbound-socket-binding element with the remote-ejb attribute and edit its remote-destination definition accordingly so that the host and port match the hostname and remoting port of the remote server (4447 plus the offset you defined during installation, so 4547 by default). Here is an example of the complete configuration block:

      <outbound-socket-binding name="remote-ejb">
          <remote-destination host="remoteLicenceServer" port="4547"/>
      </outbound-socket-binding>

    5. Optionally, if you have changed the default password for the ejb user on the remote server, look for the ejb-security-realm security-realm element , and modify the secret value with this content returned by the command

      # echo -n "new_password" | openssl base64

      . Here is an example of the complete block:

      <security-realm name="ejb-security-realm">
        <server-identities>
          <secret value="Y2hhbmdlbWU="/>
        </server-identities>
      </security-realm>

    6. Restart Squore Server

    7. Run the following command, with port matching the controller port of the installation (9999 plus the offset defined at install time, so 10099 by default):

      # <INSTALLDIR>/server/bin/jboss-cli.sh -c \
      					                   --controller=localhost:$port \
      					                   --command="undeploy squore-license.ear"

The local Squore Server is now using a remote licence server.