Hi,

I'm having some issues with the deployment and redeployment of the json
files containing default definitions (segments, properties, etc..). Many
services have these loadPredefined* methods which load data into ES, based
on json definition files. These methods only load the content once, if the
object does not exist yet in ES. So if a bundle comes with an update of one
of these file, it will just be ignored.

Actually there was one ticket about this :
https://issues.apache.org/jira/browse/UNOMI-182 , where definitions are
always redeployed when a bundle is in "snapshot" version - but never for a
release version. So that's nice when you are in development, but not
possible when upgrading a production environment.

There also a console command to manually deploy a definition - which is
also nice but cannot be automated in a migration.

Of course there's a reason - these objects can be modified afterwards by
using the API, and so restarting should not overwrite the modifications by
reimporting the file. Even if a module is updated and object is modified,
the user may not want to overwrite his changes.

However in some cases the developer may want to force the update of some
specific objects ( it actually happened to us ). I'm looking for some
additional solution to force redeployment of a definition.

So far i was thinking of adding a cfg file, which would list the properties
to redeploy. This file would be removed once the properties are updated, so
that they are reloaded only once and not on every startup.

As a bonus, I would also need to be able to remove definitions the same
way. There's no way to do that now except using the REST API , it could be
good to also have a console command and to be able to remove definitions
with the same cfg file.

What do you think .. ?

Regards,

Reply via email to