Marvin Live install guide¶
Marvin Live is a NodeJS based application for molecule design and idea management. It includes an HTTP and WebSocket server to serve multiple clients running the embedded web application.
Installation is only required for the server, clients access the web server through the configured host and port.
Server requirements¶
- Windows Server 2012 or newer, or Ubuntu 16.04.3 LTS, RHEL/CentOS 7.0 or newer
- Min 1GB free RAM
- 100MB free space
- recommended: check JChem Web Services’s requirements as well
- live internet connection to https://hub.chemaxon.com/ and https://github.com during installation
Client requirements¶
Installing NodeJS¶
You need NodeJS 10.12.0 or newer v10 LTS version to run Marvin Live. Download the installer from https://nodejs.org/ and follow the installation wizard. Linux users may install from their mainline repositories if available, or use NodeSource’s fantastic install scripts. To verify a successful installation, open the terminal and type:
NodeJS installs its package manager as well, called npm. To verify it’s been installed:
Note 1: if node or npm command are unrecognized, it’s missing from the environmental variables. On Windows, closing and opening the command prompt or restarting the server may help.
Note 2: on Ubuntu servers, if you install NodeJS from the mainline repository, the node executable may be called nodejs.
Prerequisites on RedHat / CentOS 6.x releases¶
From version v16.11.7, RedHat / CentOS 6.x releases with glibc 2.14 or older require additional steps before a successful installation.
Installing Marvin Live - network installer¶
Now you need to point npm to the ChemAxon download site, and login. The instructions on the download page provide you with the API key used to access the repository. This is required the first time only.
You may set your proxy configuration if needed, these settings will be used for outgoing HTTP requests that download Marvin Live and its components. Usage is described in the npm docs.
Choose an application directory where you want to install the application, to store configuration files and persistent storage. Once there, you can install the application with:
This will download and install the latest version of the application in the app directory. You can find the full list of recently added features and changes in the History of changes document.
Note: at this point on Windows 8 and Windows Server 2008 and Windows Server 2012, you may get this error: Error: ENOENT, stat 'C:\Users\User\AppData\Roaming\npm'. This error message is about a missing folder. You can resolve this issue by creating the quoted folder or starting the command prompt as administrator.
You can upgrade Marvin Live with the install command, which will fetch the latest version. To install a specific version (not recommended), append its version number to the package name with the following syntax: marvin-live@18.25.0Upgrading to a new version¶
This will replace the existing Marvin Live installation folder, but leave any configuration, persistence intact.
Installing Marvin Live - offline bundle¶
With the offline installer bundle, you can warm the cache with all required dependencies that would be otherwise fetched from the (external) NPM repository.
This will install the latest version of the application in the app directory. You can find the full list of recently added features and changes in the History of changes document.
Note: at this point on Windows 8 and Windows Server 2008 and Windows Server 2012, you might get this error: Error: ENOENT, stat 'C:\Users\User\AppData\Roaming\npm'. This error message is about a missing folder. You can resolve this issue by creating the quoted folder or starting the command prompt as administrator.
You can upgrade Marvin Live by re-running the above command and a new offline installer package.¶
Upgrading to a new version¶
This will replace the existing Marvin Live installation folder, but leave any configuration, persistence intact.
Configuration¶
This application requires a configuration file to be passed as a command line argument. The configuration file holds all the key settings regarding networking, security, persistence, plugins and more. A sample file with defaults is provided within the application: ~/app/node_modules/marvin-live/config-sample.json.
Please copy this to your application directory, and rename it to your preference. Do not modify this file in place, and do not store your settings within the node_modulesdirectory, because it is automatically removed / replaced on upgrade !
Note: on Windows, make sure you save the json file with ANSI encoding when editing with a text editor such as Notepad.
The minimum configuration requires port and license attributes to be specified, but a more general sample of the options is below. Note that some values point to files or other services. These should be changed to match your environment - of course you can store your ChemAxon license files or Marvin Live plugins anywhere. See below in the spreadsheet for your full list of options:
In the Configuration Guide you can find a detailed description for options and further customization instructions.
Starting Marvin Live¶
Once a basic config file is available, you can start the server in foreground mode with:
When the application is ready to use, it prints Listening on http://localhost:8888/.
To stop a running instance, simply press Ctrl+C.
Given the IP or hostname of your server and the port set in the configuration, you may now distribute the web interface link to the users of the application.
Setting up a service¶
To run Marvin Live as a daemon/service, you could create configurations in supervisord/supervisorctl, use an init script or a systemd script. Below you can find an example for both:
/etc/supervisor/conf.d/marvinlive.conf
/etc/init.d/marvin-live
/lib/systemd/system/marvinlive.service
Marvin Live behind a proxy¶
Marvin Live uses a persistent websocket connection between each client and the server for messaging. If you deploy the application behind a proxy, you need to make sure the proxy doesn't interfere with websockets. In case of nginx, you should review the websocket module’s configuration options.