-
Notifications
You must be signed in to change notification settings - Fork 85
Iot device registry backed with infinispan #2498
Iot device registry backed with infinispan #2498
Conversation
@lulf @kornys I changed the tests to use Junit but now I can't get any tests to run no matter how I change the pom file. Maybe it is related to the fact that the tests are extending abstract tests classes in hono, which are built with Junit4 (e.g. https://github.com/eclipse/hono/blob/master/service-base/src/test/java/org/eclipse/hono/service/registration/AbstractCompleteRegistrationServiceTest.java) |
@jbtrystram could you show me your pom with junit5 ? |
@kornys it looks like [1] at the moment. But I've looked a bit deeper into it, it look like i would need to change all the assertions etc.. Maybe i can just leave the tests in junit4 and use the |
@jbtrystram yes you need to change all assertions, test annotation etc to jupiter (junit5), personally I don't want to have vintage module here, junit4 is dead so we should use only junit5. |
@jbtrystram @kornys I think junit4 is fine for now, as there are hono dependencies that use junit4. Longer term, we'll try to get Hono up to junit5 which will resolve the issue. |
@lulf what I don’t personally like is that when we crate a new test it will offers junit 4 tag in idea which is not supported by junit5 |
cfe237d
to
96a542d
Compare
e9c36e0
to
7b317d1
Compare
7b317d1
to
2fc7a71
Compare
@lulf @ctron @dejanb I think this is ready for review, as it works now. Here is how you can test it :
At this point if you build this branch you can deploy it following the @dejanb IoT guide steps. In the docs : "5. Internet of Things (IoT) guide" Here are some highlights :
|
Looking at the deployment files I have a few questions:
|
I would agree with you, as it seems straightforward enough. We would have to maintain / keep those files updated though. If we do it we can probably remove the rbac file, as we'll probably match the roles we already use in enmasse.
would we be able to manage the infnispan cluster then ? I'm thinking things like scale down / up.. |
There are two ways to achieve that:
And the truth lies in the middle I guess ... having a good balance between enforcing configurations and leaving it alone, not overwriting changes by the admin. I think in the beginning we don't have much to offer in specialized behavior, so I would suggest to focus on 1. and add specialized fields in the structure when we start to see a need. |
So what you suggest is we spin up the infinispan operator, generate a cr according to our need and let the infinispan operaor spins up the services. Am I correct ? Also -> No need for junit4 anymore when eclipse-hono/hono#1195 is merged in hono |
9343e9b
to
7eccb7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @jbtrystram !
10c1fc5
to
3ffea6a
Compare
- Updated iot controller to deploy the infinspan image when specified in the iotconfig CR - Relies on a external / manually deployed infinispan instance.
Signed-off-by: Trystram Jean-Baptiste <[email protected]>
Signed-off-by: Trystram Jean-Baptiste <[email protected]>
73c6b10
to
a4c1c5d
Compare
FMPV it's ready to be merge, if we assume the user must deploy a infinispan endpoint on his own, for now. Let's do that for the beginning, so we can progress further toward asserting it works well to our needs. @ctron @dejanb what do you think ? we can update the documentation to point the user to the infnispan/datagrid operator. @famartinrh @kornys About the tests :
|
@jbtrystram about having coverage of infinispan-based and file-based device-registry I'll do some slight modifications to |
7936a9a
to
37b2a2e
Compare
Great work @jbtrystram. I think we should go ahead and merge this and continue working on all things mentioned in comments |
file: | ||
numberOfDevicesPerTenant: 100000 | ||
infinispan: | ||
infinispanServerAddress: example-infinispan:11222 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to extract this value from Infinispan service?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment we assume the user will deploy infinispan on his own, hence putting the correct value in here. WDYT ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should remove this so the file-based registry stays the default ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah ... And create a new example config for infinispan
thanks :) Next thing is to document it I suppose |
@enmasse-ci run tests profile=shared-iot |
We can add basic docs to the iot/examples/README.md while we still working on it. And then we'll move it to the docs, once it's finalized. |
@jbtrystram please let me know if I can help when you're ready to move the "draft" docs to the actual docs |
@jenmalloy OK. I'll probably do that in a separate PR |
@enmasse-ci run tests profile=shared-iot |
I am not sure exatcly how enmasse modules works so here is a draft PR so I can get feedback on this :)