AdaptiveConsulting / nexus-casc-plugin

Configuration as code plugin for Sonatype Nexus Repository Manager
MIT License
48 stars 21 forks source link

Approach for making dynamic changes #32

Open piyat opened 2 years ago

piyat commented 2 years ago

Hey - thanks for maintaining this handy plugin. I've been using it to set up a dev environment.

I'm looking for some information to help me make a decision on whether to use this in production. I want to surface Nexus configuration to a Git repo to enable GitOps style configuration management (enabling more frequent configuration tasks like setting up repositories, users & roles). My instance runs on Kubernetes and I want to avoid the need to use a tool like reloader to do a rolling restart of Nexus when the configuration changes. In fact, I don't really want to restart Nexus at all.

As far as I can tell - configuration is only applied by the plugin when Nexus is started. Is this the case? if so - do you have any docs you could point me at to help me understand why? Is there a way to make this happen dynamically when configuration changes?

Thanks!

bdellegrazie commented 2 years ago

@piyat : you're correct, configuration is only applied by the plugin when Nexus is started. In part this is due to the lifecycle of the service - certain parts are applied during certain phases of the Nexus service lifecycle.

As far as I understand it there's nothing in the Nexus APIs that prevents you from doing GitOps style right now, but you would need to structure the order of calls appropriately to avoid conflicts.

Please do let us know how you get on.