aojea commented on issue #328: Docker image: add a Docker Compose example file
URL: https://github.com/apache/bookkeeper/issues/328#issuecomment-350398742
 
 
   Thank you very much for your help, I was able to make it work.
   
   I did several mistakes, didn't read the documentation (bookkeeper needs 
minimum 3 bookies) and didn't stop the docker-compose service using 
`docker-compose down`, hence the containers wasn't removed and the environment 
wasn't clean.
   
   With  docker-compose file from #701 and dice docker image from 
https://github.com/caiok/bookkeeper-tutorial/pull/1 you only need to do:
   
   `docker-compose up -d` and it spawns and ensemble of 3 bookies with 1 dice:
   
   ```
   bookie1_1    | 2017-12-08 23:18:11,315 - INFO  - 
[bookie-io-1:BookieRequestHandler@51] - Channel connected  [id: 0x405d690e, 
L:/172.19.0.3:3181 - R:/172.19.0.6:34922]
   bookie2_1    | 2017-12-08 23:18:11,326 - INFO  - 
[bookie-io-1:BookieRequestHandler@51] - Channel connected  [id: 0x7fa8645d, 
L:/172.19.0.4:3181 - R:/172.19.0.6:38862]
   dice_1       | Value = 1, epoch = 5, leading
   dice_1       | Value = 2, epoch = 5, leading
   dice_1       | Value = 4, epoch = 5, leading
   dice_1       | Value = 3, epoch = 5, leading
   ```
   
   If you want to see how it behaves with more dices you only need to use 
`docker-compose up -d --scale dice=3`:
   ```bookie1_1    | 2017-12-08 23:18:11,315 - INFO  - 
[bookie-io-1:BookieRequestHandler@51] - Channel connected  [id: 0x405d690e, 
L:/172.19.0.3:3181 - R:/172.19.0.6:34922]
   bookie2_1    | 2017-12-08 23:18:11,326 - INFO  - 
[bookie-io-1:BookieRequestHandler@51] - Channel connected  [id: 0x7fa8645d, 
L:/172.19.0.4:3181 - R:/172.19.0.6:38862]
   dice_1       | Value = 1, epoch = 5, leading
   dice_1       | Value = 2, epoch = 5, leading
   dice_1       | Value = 4, epoch = 5, leading
   dice_1       | Value = 3, epoch = 5, leading
   ```
   
   Remember to shutdown the docker-compose service with `docker-compose down` 
to remove the containers and avoid errors with leftovers in next executions of 
the service.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to