Background problem
When using App Connect Enterprise in a container environment it is not possible to start and stop individual applications like you can when you dynamically connect to the App Connect Web UI of the ACE runtime. This is because, in general you will be running multiple replicas of the ACE runtime each with your Applications deployed in a BAR. You could in theory connect to each individual replica and stop the application but if any pod restarts this state will be lost and the application will restart again when the ACE pod comes back up. So another solution is needed here which will keep the startup state and allow you to stop and start individual apps when needed.
Workdiroverride solution
There is a solution to this problem which utilises a type of configuration (details here) called workdiroverride (details here). Multiple workdiroverride can be applied to your IntegrationRuntime Custom Resource by specifying them in the spec.configurations list of the IntegrationRuntime CR. A workdiroverride is basically a list of XML override values in txt format.
These workdiroverride configurations are equivalent to running the following command on a standalone integration server. (more details on the format)
ibmint apply overrides --work-directory "C:\DOMS_SERVER" "C:\workspace\My_Configurations\My_Workdiroverride.txt"
The workdiroverride allows you to override specific properties in the broker.xml in the BAR file.
Within the broker.xml there is a property on each Application called startMode this tells the ACE Runtime whether to start or stop the application when it is initially deployed. This can be set to Automatic or Manual. Automatic is the equivalent of start, while Manual is the equivalent of stop. Every line in a workdiroverride file can be used to override a snippet of XML in the broker.xml
eg. These 2 example workdiroverride lines override the CustomerDatabaseV1 Application broker.xml top level startMode property in the BAR file example above
To start the CustomerDatabaseV1 Application
CustomerDatabaseV1/startMode=Automatic
To stop the CustomerDatabaseV1 Application
CustomerDatabaseV1/startMode=Manual
When you update an IntegrationRuntime CR it will cause the App Connect operator to then update the IntegrationRuntime deployment which in turn will cause all the IntegrationRuntime pods to restart with the new workdiroverride applied.
As you can apply multiple overrides, a single workdiroverride can be used to change the start state of multiple Applications in a BAR at once. You can also use the workdiroverride to change other values at the same time too. eg. To change an Input Queue name: TopLevelApplication/sampleFlow#MQ Input.queueName=NEW_INPUT_QUEUE
Conclusion
It is possible to use workdiroverride's in your Red Hat and Kubernetes environments as well as in your CI/ CD pipeline to dynamically start and stop Applications even if the Applications are running in multiple App Connect Enterprise Runtimes pods.