I am trying to do exactly what the title suggests. I was reading elsewhere in the forum about using a docker image (kcollins?) to customize your gateway installation, but I simply want to update an existing third-party module. I do a lot of module development, and this would significantly boost development and testing speed. I don't cherish manually re-installing and restarting the designer every single time.
I get this concern and ran into it myself, but I don't know how feasible this is to do. Perhaps, you can get something close to what you want with Docker containers.
However, I'm almost certain this won't work in 8.3 because module hot reloading is going away, so you'll need to do a gateway restart every time you install / uninstall a module - much more intrusive than a designer restart.
What now? Restarting, yes, but re-installing?
I misspoke. I meant to say re-installing/hot updating the module, not the entire Designer. @YF129701 Our customers almost exclusively use 8.1 and below, so I do all my module development for those versions. When 8.3 is stable, I will migrate.
The designer restart only occurs if the module includes jars for Client and/or Designer scope. There is no other way for the designer's common classloader to get the new jars, so you will have to just deal with it.
Yes, it is really annoying if you forget to save something in the designer just before you update the module.
Is there a way to programmatically load the new modl file onto the gateway? I recognize that the designer needs to be restarted no matter what. Perhaps I can add the file loading step to the batch script that builds and signs my modl file already?
The old ant
-based build process supported automated deployment via an endpoint in the gateway. I never used it, and don't know if it was implemented in the maven or gradle processes. Someone from IA would have to comment.
You can simply replace the .modl
file in the user-libs
folder and restart the gateway--that works as long as the EULA and signing certificate are unchanged.
Yes, the Ignition Module Gradle plugin adds a deployModl
task that does exactly this.
You do need the enable the module loading servlet using following parameter in your ignition.conf
file:
-Dia.developer.moduleupload=true
Huh, this is cool, I haven't noticed this task before...
Does that get around the OPs issue though, meaning that when you deploy the module, you don't need to do either a gateway restart as Phil was suggesting above or a designer restart, or are you referring to something else?
The ignition-maven-plugin can also hook into the install phase to upload the module.
No, just a convenience to build and install the module in one step, rather than manually installing it on the Gateway webpage.
This is exactly what I am looking for, as I use maven religiously. I will look into it. Any suggestions/docs on implementation of the plugin? Thank you all for your prompt responses.
I wasn't paying that much attention to what the OP was asking You still definitely need to restart the designer.
Ask @kgamble, I know he's done some work related to live-reloading the designer.
If you launch the Designer in debug mode out of a real IDE, i.e. IntelliJ and not VSCode, you might have the option to do hot code reloading... maybe.
How do you mean launch the designer out of the IDE? I have never heard of this approach.
If you dig through old SDK docs there's some mention of it... to be honest I don't know if it's still supported or possible given the set of public/published artifacts.
By old SDK docs, are you still referring to the SDK programmers guide? Or something more esoteric?
Yeah, but I can't even find a link to it any more. All I can find is the current guide at https://www.sdk-docs.inductiveautomation.com/
I have primarily done work around hot-reloading Perspective component contents and reloading the full JXBrowser automatically with the deploy step. However I am not doing a full hot-reload of the actual java classes being initialized.
looks like the 'post' goal of the maven plugin is what I need. I will attempt and report back.