Generating an Application
Now that DOC 4.0.0 is installed, let us generate an application as described on the Quick Start page of the documentation. For this, we need a JDL description of the application data model. We will use the CP-model.jdl file.
Building the Application
Building the application consists in:
- Generating the Java code for the data model from the JDL description;
- Compiling the Java and Typescript code that was generated either with the application structure (previous section) or from the JDL description;
- Retrieving the DOC 4.0 dependencies (JVM libraries and NPM packages) from the dedicated repository, the credentials to which we have stored in our
~/.gradle/gradle.propertiesin a previous step.
The first build takes way longer than the subsequent ones, because some tools have to set themselves up and because the retrieval of the dependencies. The video below performs the steps described on the Quick Start page of the documentation.
Building Docker Images for the Application
The video below performs the steps described on the Quick Start page of the documentation.
Launching Application from Docker Images
Now that we have packaged our application as Docker images, we will use the Docker Compose deployment scripts to launch the application. The video below performs the steps described at the end of the Quick Start page of the documentation.
Configuring the Application
The application can be configured using the dedicated commands in the interface. In the following video, we are going instead to install some pre-configured settings from the app-config.json file. Then we will create a scenario from the scenario-data.xlsx file.
Adding Optimization Workers
In the previous step, we have loaded some data in a scenario. This data can be visualized in the dashboards, and tasks can be run against it. However, since we did not have any optimization tasks yet, we have to perform additional installation steps. The video below performs the steps described on the Worker Tasks page of the documentation.
Stopping the Application
To stop the application, bring the Docker containers down in the reverse order of the one in which you started them. The Docker container that runs the Postgres database server stores its data in a Docker volume. If you do not want to keep that data for the next run, clean this volume, too.