Deploying the MDA Archive in a headless mode

4
Hi all, in our current scenario, we intend to host the Mendix Runtime Servers on our infrastructure (internally). We installed the runtime and it went fine. In our company, we intend to orchestrate our deployments in a centralized deployment tool that allows us to properly orchestrate deployments of multi-tier applications targetting different technologies (client tier, Middle tier, DB, back-end...) Now we're wondering how to be able to deploy the MDA archive without any user interaction, aka in headless mode from a script. We need to be able to deploy the binaries as well as apply the delta for database changes. Can we achieve that through APIs (Java) or through a Web Service that will expose the same functionality as the Mendix Server Console? Is there a way to configure the Mendix runtime in order to be able to simply drop the MDA archive to a specific location and to simply restart the service in order to trigger the automated deployment? Please advise!
asked
3 answers
4

Well, yes, and the easy answer is: use the cloud portal.

It sounds like what you're trying to do is replicate this exact same application. My advice (coming from experience ^_^) is: don't do this. You can work around the base case: "same app, same constants, same scheduled events" but you'll eventually want to build all of that as well, which will cost you a lot of headaches to get working properly.

That being said, you should look at the m2ee-tools repo on github, which should point you in the right direction of 'scripting against the application-server configuration at runtime'.

answered
3

Hi Adil,

The Mendix Runtime is fully scriptable as we use the exact same version in our own public cloud. After starting the Java process all commands to load an MDA, run migrations, and start the application are available via the http API.

As Achiel pointed out, the best way to see how this works is to have a look at the m2ee-tools repo on github. This repo contains the python code that is used to start the Mendix Runtime from the Linux commandline. It shows the exact sequences of calls you need to start an application.

answered
0

To make headless builds has been on our wishlist for a while, I suggest filing a feature request so we know there is an actual demand for it. However, this would be done by the modeler, not the runtime server.

answered