This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -p 2181:2181 -v /path/to/my/conf:/opt/zookeeper/conf my/zookeeper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server.1=server1.example.com:2888:3888 | |
server.2=server2.example.com:2888:3888 | |
server.3=server3.example.com:2888:3888 | |
... | |
server.current=[bind address]:[peer binding port]:[election biding port] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -z "$SERVER_ID" ]; then | |
echo "$SERVER_ID" > /opt/zookeeper/data/myid | |
#Find the servers exposed in env. | |
for i in `echo {1..15}`;do | |
HOST=`envValue ZK_PEER_${i}_SERVICE_HOST` | |
PEER=`envValue ZK_PEER_${i}_SERVICE_PORT` | |
ELECTION=`envValue ZK_ELECTION_${i}_SERVICE_PORT` | |
if [ "$SERVER_ID" = "$i" ];then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"image": "fabric8/zookeeper", | |
"name": "zookeeper-server-1", | |
"env": [ | |
{ | |
"name": "ZK_SERVER_ID", | |
"value": "1" | |
} | |
], | |
"ports": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"labels": { | |
"name": "zookeeper-pod", | |
"server": 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apiVersion": "v1beta1", | |
"creationTimestamp": null, | |
"id": "zk-peer-1", | |
"kind": "Service", | |
"port": 2888, | |
"containerPort": "zookeeper-peer-port", | |
"selector": { | |
"name": "zookeeper-pod", | |
"server": 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apiVersion": "v1beta1", | |
"creationTimestamp": null, | |
"id": "zk-client", | |
"kind": "Service", | |
"port": 2181, | |
"createExternalLoadBalancer": "true", | |
"containerPort": "zookeeper-client-port", | |
"selector": { | |
"name": "zookeeper-pod" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create the ensemble provider and feed the initial string | |
DynamicEnsembleProvider dynamicEnsembleProvider = new DynamicEnsembleProvider(cluster.getConnectString()); | |
CuratorFramework client = CuratorFrameworkFactory.builder() | |
.ensembleProvider(dynamicEnsembleProvider) | |
.retryPolicy(new RetryOneTime(1000)) | |
.build(); | |
client.start(); | |
client.blockUntilConnected(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.fabric8.apps.jenkins; | |
import io.fabric8.arquillian.kubernetes.Constants; | |
import io.fabric8.arquillian.kubernetes.Session; | |
import io.fabric8.kubernetes.api.KubernetesClient; | |
import org.jboss.arquillian.junit.Arquillian; | |
import org.jboss.arquillian.test.api.ArquillianResource; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Service: http://172.30.17.76:8080 is not ready! Error: Operation timed out | |
Service: http://172.30.17.149:11222 is ready | |
Service: http://172.30.17.218:11211 is ready | |
Service: http://172.30.17.123:9990 is ready | |
Service: http://172.30.17.149:11222 is ready | |
Service: http://172.30.17.218:11211 is ready | |
Service: http://172.30.17.123:9990 is ready | |
Service: http://172.30.17.76:8080 is not ready! Error: Operation timed out | |
Service: http://172.30.17.123:9990 is ready | |
Service: http://172.30.17.76:8080 is not ready! Error: Operation timed out |
OlderNewer