Installing to Servers¶
Documentation for installing license files issued for versions prior to 5.0 can be found here.
Note: Documentation for installing license keys can be found here.
Installing Licenses on Servers¶
The possible ways of installing license files on a server (web applications e.g. JSP pages, Pipeline Pilot):
-
Using system variables (recommended):
The location of the license file can be set with:
CHEMAXON_LICENSE_URLenvironment variable (help on setting environment variables)
-
chemaxon.license.urlJava system propertyFrom version 5.3.2 it is possible to define multiple license files of arbitrary locations. The separator character is "
;".In case license files are set this way, the license files will be read from all locations defined by the environment variable, the Java system property and from the user's home directory.
Example:
-Dchemaxon.license.url="C:\Chemaxon\license2009.cxl;C:\Chemaxon\license2010.cxl"
-
Automatic install:
The license file is automatically recognized when stored in the
.chemaxon(Unix) orchemaxon(Windows) sub-directory under the home directory of the user running the application. The following locations are accepted:(.)chemaxon/license.cxl(file name is fixed)
(.)chemaxon/licenses/*.cxl( from version 5.3.2 only - the license file can have arbitrary name, the extension is fixed)
-
Command line install:
Launch the
licenseshell script (Unix) orlicense.batbatch file (Windows) available in the Marvin Beans and JChem downloadable packages.Type
license -hfor the list of available options. -
Using Java API:
If the licenses are installed later, when a web application is already running, it is not necessary to restart the web server (e.g. Tomcat), the License Manager will automatically and repeatedly check if a license file was installed in the meanwhile. Please note that Marvin JS license installation is different, the installation guide will be sent to you together with the license.
For Windows server administrators:¶
In some cases it can happen if a Chemaxon product is run as a service by the System Profile, than despite all effort no Environment Variable is visible for the product. In this case our license check falls back to search the license in C:\Windows\System32\config\systemprofile\chemaxon\ folder, which is the user home of the System Profile. In this folder you can place a license.cxl file or create a licenses folder and copy all your .cxl files here, as described in the 2. point above.
Hosting servers with Docker¶
Generally, if you run the application in a Docker container, you should attach the license as follows.
This applies regardless of whether you use Docker Compose or build and run the image directly from a Dockerfile.
with license file¶
If you have license file than mount that to $HOME/.chemaxon
If the license file is changed, you can replace the old license file with the new one (using the same name) in your local filesystem, without having to rebuild the image.
Examples¶
Suppose the
docker run --name marvin -d \
-v /home/user/license.cxl:$HOME/.chemaxon/license.cxl \
-p 8080:8080 chemaxon.jfrog.io/cxn-docker-release/chemaxon/marvinws
version: "3.8"
services:
app:
image: chemaxon.jfrog.io/cxn-docker-release/chemaxon/marvinws
environment:
volumes:
- ./license.lic:$HOME/.chemaxon/license.cxl
with license key¶
If you have a license key it's enough to inject your license key with CHEMAXON_LICENSE_SERVER_KEY as environment variable.
If the license key value should be changed (e.g. because of rotation of the license key), rebuild of the image is needed with the new CHEMAXON_LICENSE_SERVER_KEY.
Otherwise, runtime can be kept untouched.
App communicates with license server automatically, meaning any change in the underlying license will be reflected in the app, after the next license server communication round.
Examples¶
docker run --name marvin -d \
-e CHEMAXON_LICENSE_SERVER_KEY="your-license-key-here" \
-p 8080:8080 chemaxon.jfrog.io/cxn-docker-release/chemaxon/marvinws
version: "3.8"
services:
app:
image: chemaxon.jfrog.io/cxn-docker-release/chemaxon/marvinws
environment:
- CHEMAXON_LICENSE_SERVER_KEY=your-license-key-here
However, each application may have its own instructions, so please check those as well.
Hosting servers with Kubernetes¶
with license key¶
To license the application, the CHEMAXON_LICENSE_SERVER_KEY environment variable must be supplied at runtime, ideally using a secret.
If the license key value should be changed (e.g. because of rotation of the license key), re-apply might be needed.
Otherwise, runtime can be kept untouched.
App communicates with license server automatically, meaning any change in the underlying license will be reflected in the app, after the next license server communication round.
apiVersion: v1
kind: Pod
metadata:
name: mypod
spec:
containers:
- name: mypod
image: chemaxon-application
env:
- name: CHEMAXON_LICENSE_SERVER_KEY
valueFrom:
secretKeyRef:
name: licensekey
key: license_server_key
with license file¶
In Kubernetes, administrators have the option to use the secrets API. You can use license file, which can be added as mounted volume. Chemaxon products use $CHEMAXON_HOME to store temporary files, not just license files, so using a secret mount can cause read only file system errors.
It is recommended that administrators use a combination of secret volumes and the environment variable $CHEMAXON_LICENSE_URL.
# An example podspec that assumes that a license file was added as
# kubectl create secret generic licensefile --from-file=license.cxl
apiVersion: v1
kind: Pod
metadata:
name: mypod
spec:
containers:
- name: mypod
image: chemaxon-application
# The full path depends on the file added as a secret
env:
- name: CHEMAXON_LICENSE_URL
value: "/run/secrets/license/license.cxl"
volumeMounts:
- name: licensefile
mountPath: "/run/secrets/license/"
readOnly: true
volumes:
- name: licensefile
secret:
secretName: licensefile