bitsofinfo / hazelcast-docker-swarm-discovery-spi

Docker Swarm based discovery strategy SPI for Hazelcast enabled applications
Apache License 2.0
39 stars 33 forks source link

Dont know how to make a search with labels #9

Closed kristoflarcher closed 6 years ago

kristoflarcher commented 6 years ago
 Hi,

We are using your library ( thank you by the way ...) But we dont know how to configure the search according to labels ? Do you have a example ?

Regards

bitsofinfo commented 6 years ago

See the README -DdockerServiceLabels=myLabel1,myLabel2 etc (or hardwire in your hz config xml)

docker service create \
    --network [mynet] \
    --name myHzService1 \
    -e "DOCKER_HOST=http://[swarmmgr]:[port]" \
    [yourappimage] \
    java \
    -DdockerNetworkNames=[mynet] \
    -DdockerServiceNames=myHzService1 \
    -DdockerServiceLabels=myLabel1,myLabel2 \
    -DhazelcastPeerPort=5701 \
    -jar /test.jar
kristoflarcher commented 6 years ago
 Hi, 

And thank you for your reactivity. I know how to make a search with labels : I tagg my service with the label exemple.label = "valeur"

I did a search on key label...but ...nothing happen.. and .i did a search on value label...and nothing happen too

It seems that the search on label did not filter results at all. I would like to understand how I should procede

Regards

bitsofinfo commented 6 years ago

Please provide a reproducible sample project demonstrating the issue as I am not following what you are doing exactly.