Running AIMMS PRO on a Linux Server
Running AIMMS PRO on a Linux Server is somewhat different from running AIMMS PRO on a Windows Server. The main difference lies in a field of AIMMS PRO installation. Windows installation requires running an installer, an MSI file you get from AIMMS. Linux setup uses Docker.
What is Docker
Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux. Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces to allow independent “containers” to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines (from Wikipedia).
You can read more about Docker and its advantages on its official website.
AIMMS PRO supports Ubuntu 14.04 or Centos 6.6 with Docker version 1.6.0 or higher. Also please note that Docker requires the Linux kernel to be 3.10 at minimum. You may find detailed information about Docker installation on different platforms (including cloud, e.g. AWS) on Docker website.
Please also walk through the official Docker Get Started guide in order to understand the basic concepts and terminology of Docker.
There are lots of tools that you can use to manage your Docker containers. This manual will focus on using Docker Compose because that tool allows to easily manage several Docker containers at a time and at the same time Docker Compose is easily configurable. You may find documentation about installing Docker Compose on its website.
What needs to be configured
First of all, you will need to get an AIMMS PRO image. AIMMS PRO images are located on Docker hub https://hub.docker.com/u/aimms/
Once you have an image you can run it but you first need to configure several things:
1. Ports. You need to decide what ports would be available from the AIMMS PRO image to the outside world. AIMMS PRO uses the following port:
– HTTP(S) port for AIMMS PRO Configurator. By default 9191.
– HTTP and/or HTTPS ports for AIMMS PRO Web (Portal). By default 8080.
– TCP and/or SSL ports for internal communication between PRO components. These ports does not need to be exposed if you’re not running a cluster.
2. Data folder. The folder (called a volume in Docker terminology) that stores AIMMS PRO Data. Please note that in case you have a cluster, you need to make sure that Storage subfolder is shared between all nodes (e.g. pointing to a shared mounted network folder).
3. Host. The hostname under which your running container would be reachable from the outside.
How to start AIMMS PRO as a Docker container
As we said before, we think that Docker Compose is a tool that eases configuration and deployment of Docker container. Here is a Docker Compose configuration file (let’s call it aimmsProWithPostgres.yml, you need to create this file with following configuration) that can be used to run AIMMS PRO as a Docker container using Docker Compose:
And now you can run AIMMS PRO using command
docker-compose -f aimmsProWithPostgres.yml up -d
And to stop AIMMS PRO use
docker-compose -f aimmsProWithPostgres.yml stop
Walk through proposed config file line by line
This line starts the Postgres image section. Remove this section completely if you’re planning to use standalone database or a Postgres instance on another node of you cluster.
This line means “take Postgres image from AIMMS Docker repository”. AIMMS PRO Postgres image is a slightly modified official Postgres image, the only difference is that it already has AIMMS PRO DB user and schema.
This section starts the volumes configuration. Volumes are host machine folders mapped to locations at the running container.
This line means that Postgres will store its data at /home/user/aimmsPro/aimmsProPostgres folder at the host machine. Change this configuration to the folder you want.
These two lines are used to make the running container to use the same time settings as its host machine.
This line starts the AIMMS PRO image section.
Please don’t forget to change the image version to the one that you need.
This is the section with ports mappings that were described above. Change them if needed (e.g. put 9292:9191 instead of 9191:9191 if you want AIMMS PRO Configurator to be available at port 9292).
This section starts the volumes configuration for AIMMS PRO container.
This line means that AIMMS PRO will store all of its changing data (logs, configs, published apps, etc) at /home/user/aimmsPro/aimmsProData folder at the host machine. Change this configuration to the folder you need. Please note that in case you have a cluster, you need to make sure that Storage subfolder is shared between all nodes (e.g. a hyperlink to a network folder).
This is the hostname by which AIMMS PRO would be available from the outside.
This section says that our AIMMS PRO container would be linked to AIMMS PRO Postgres container that we’ve described above. You may read more about linking containers at Docker website. But in few words: by linking container we allow one container to access another container. So AIMMS PRO container can access Postgres database running in AIMMS PRO Postgres container using hostname aimmsProPostgres and port 5432 (which is not exposed from AIMMS PRO Postgres container to the outer world, but can be reached from the linked container).
Always restart the container regardless of the exit status. This is useful to have your AIMMS PRO instance always running.
Managing started AIMMS PRO
When AIMMS PRO container has successfully started, you may configure AIMMS PRO using a tool called AIMMS PRO Configurator. It should be available at http://your AIMMS PRO host:Configurator Port. Please read above how you can change AIMMS PRO host and Configurator port.
Please read AIMMS PRO manual to get the information about AIMMS PRO Configurator and the overall configuration of your AIMMS PRO.
Once you’ve successfully configured AIMMS PRO and started its services, the services would be started automatically once you’ve started AIMMS PRO Docker container.
- In order to run your Apps from linux PRO server, you need to publish it with linux AIMMS Version (i.e. linux compatible AimmsPROPackages) which are available with each AIMMS release starting from AIMMS 4.14.
- License Server: You can use Windows license server or Linux license server. Please contact our support staff to get Linux license server.
AIMMS PRO Upgrade
In order to upgrade your existing installation of AIMMS PRO, do the following:
1. Stop AIMMS PRO container if it’s running.
2. Change AIMMS PRO image version in aimmsProWithPostgres.yml
3. Start AIMMS PRO container.
No additional setup is required.