This quick start guide describes the steps to install and run Optimization Server on your laptop. It also provides downloadable code samples to run Optimization Server jobs. Finally, a worker sample is provided to start extending Optimization Server.
Install the following pieces of software on the computer where Optimization Server will be run:
The Docker engine needs to be logged in the Optimization Server docker registry to be able to pull images.
Credentials can be requested using the contact section.
Then, use the following shell command to log in the registry:
docker login dbos-registry.decisionbrain.cloud
Create a folder in the computer.
Download the following archive and decompress it into this folder:
Open a shell, go to the created directory, and run the following command:
docker-compose up -d
Docker images will be pulled from the nexus docker registry, that may take a while. When Docker says containers are started, wait a few seconds until Optimization Server starts. You can access the Optimization Server web console in a web browser there: http://localhost/. The default credentials to log in are decisionbrain / optimserver .
You now have a Optimization Server instance running locally, in basic authentication mode. To be able to run some jobs, the next section describes how to start pre-packaged Optimization Server workers.
Pre-packaged Optimization Server workers allow to solve optimization problems with IBM Ilog Cplex, CpOptimizer or OPL.
Open a shell, go to the directory created in the previous section, and run the following command:
docker-compose -f docker-compose-workers.yml up -d
Now Optimization Server and Cplex worker are up and running, let us run a sample Cplex job. Go to the Optimization Server web console and select the job creation view, as shown on the screenshot below.
Fill in the “Model” input with the following sample model from cplex examples: UFL_25_35_1.mps . Then click on the “Submit” button.
A green banner appears on the top of the web browser, with a link to the job execution view. Click on the link.
You are redirected to the job execution view. The job status displayed on the top should be “running”, then “completed” after a couple of seconds.
More information about the web console are available in the dedicated section.
A custom client for Optimization Server could call any of the Optimization Server APIs as defined in the dedicated section.
For example, it could create and start Optimization Server jobs for tasks exposed by pre-packaged workers.
This is what we demonstrate below.
For now, Java and Python clients are available. Thus, a custom client may be written in Java 8+, or Python 2.7+ or Python 3.4+.
To be able to download samples, you have to log in our Nexus artifact repository. The same credentials as to log in our docker registry should be used.
Download the java sample client there: dbos-java-client-sample-2.5.0.zip .
Then, unzip the archive and follow the README instructions.
The Java clients documentation is available in the dedicated section.
Download the python sample client there: dbos-python-sample-2.5.0.zip .
Then, unzip the archive and follow the README instructions.
The Python client documentation is available in the dedicated section.
Install Java 8+ and Gradle 4.10+ (a Java build tool).
A sample custom worker can be downloaded there: dbos-hello-world-worker-2.5.0.zip .
Decompress the archive and follow the instructions given in the README.md file to run this sample worker.
More documentation about writing a custom worker is available in the dedicated section.