Install CDM Service¶
During the development of an application using CDM, the embedded CDM server is ideal, as mistakes and restarts are easily captured by manually switching and/or clearing the database that stores the CDM data.
When publishing applications in an AIMMS cloud, you do not have to install a CDM service. The appropriate CDM service is started on demand, and stops itself after some idle time.
When testing or deploying an application with multiple collaborating users a CDM service needs to be installed that handles commits by storing the data and informing other users of these commits. The architecture that we want to achieve looks as follows:
We will first focus on the central part of the above, namely to get a CDM service installed, next we will link it to a database and finally, we will illustrate an application directly connected to a CDM service.
Installation of CDM Service¶
Uninstalling an older version of the CDM service¶
First make sure there is no other (older) CDM service installed on the target machine. If it is, you will need to uninstall that first before you can install the new version. You can check whether the CDM service is installed by starting the Windows Service Manager/Windows 10 services app.
When the service is installed, you will need to identify the installation folder by right-clicking on the service and selecting Properties. This will show the following dialog and tell you from which folder it is installed:
- Open a command prompt (run as administrator)
cdto go to that folder
Download the new CDM service executable¶
Let’s start with downloading the executable on the machine that should run the CDM service. Depending on the protocol of choice this download can be:
This is correct at the time of writing this article. To make sure the protocol is up to date, check the value of the string parameter
cdm::WindowsServiceDownloadLocation which contains the URL for the download that corresponds to the protocol of your library.
Installing a new CDM service¶
Now we can install CDM.
- First run the executable, it will just unpack itself and create new folder.
- Move the created folder to an appropriate place.
- Open a command prompt with elevated rights (run as administrator).
- cd to the created folder
- Execute the command
- Open the Windows Service Manager/Windows 10 services app
- Open the properties of the CDM service
- Make sure the start up type is
automatic, and the service is started.
Ensure the CDM service is accessible¶
Make sure that the port chosen, typically 19999, is open on the machine that hosts the CDM service.
You can check whether this port is open using the command
netstat -a on a CMD prompt.