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.

Docker installation

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.

Additional requirements

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:

aimmsProPostgres:
   image: aimms/pro-postgres:9.3
   volumes:
       – /home/user/aimmsPro/aimmsProPostgres:/var/lib/postgresql/data
       – /etc/timezone:/etc/timezone:ro
       – /etc/localtime:/etc/localtime:ro
aimmsPro:
   image: aimms/pro:PRO_VERSION
   ports:
       – 19340:19340
       – 19341:19341
       – 8080:8080
       – 8443:8443
       – 9191:9191
   volumes:
       – /home/user/aimmsPro/aimmsProData:/data/aimmspro
       – /etc/timezone:/etc/timezone:ro
       – /etc/localtime:/etc/localtime:ro
   hostname: aimms-pro
   links:
    – aimmsProPostgres
   restart: always

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

aimmsProPostgres:

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.

image: aimms/pro-postgres:9.3

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.

volumes:

This section starts the volumes configuration. Volumes are host machine folders mapped to locations at the running container.

- /home/user/aimmsPro/aimmsProPostgres:/var/lib/postgresql/data

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.

- /etc/timezone:/etc/timezone:ro
– /etc/localtime:/etc/localtime:ro

These two lines are used to make the running container to use the same time settings as its host machine.

aimmsPro:

This line starts the AIMMS PRO image section.

image: aimms/pro:PRO_VERSION

Please don’t forget to change the image version to the one that you need.

ports:
    – 19340:19340
    – 19341:19341
    – 8080:8080
    – 8443:8443
    – 9191:9191

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).

volumes:

This section starts the volumes configuration for AIMMS PRO container.

- /home/user/aimmsPro/aimmsProData:/data/aimmspro

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).

hostname: aimms-pro

This is the hostname by which AIMMS PRO would be available from the outside.

links:
  – aimmsProPostgres

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).

restart: always

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.

Notes:

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.

Back to top

Return to AIMMS PRO Manual Index