thelabdude commented on a change in pull request #1769:
URL: https://github.com/apache/lucene-solr/pull/1769#discussion_r479380781



##########
File path: solr/docker/docs/docker-networking.md
##########
@@ -0,0 +1,249 @@
+Example of Zookeeper and Solr cluster with Docker networking
+------------------------------------------------------------
+
+_Note: this article dates from Jan 2016. While this approach would still work, 
in Jan 2019 this would typically done with Docker cluster and orchestration 
tools like Kubernetes. See for example [this blog 
post](https://lucidworks.com/2019/02/07/running-solr-on-kubernetes-part-1/)._
+
+In this example I'll create a cluster with 3 ZooKeeper nodes and 3 Solr nodes, 
distributed over 3 machines (trinity10, trinity20, trinity30).
+I'll use an overlay network, specify fixed IP addresses when creating 
containers, and I'll pass in explicit `/etc/hosts` entries to make sure they 
are available even when nodes are down.
+I won't show the configuration of the key-value store to configuration to 
enable networking, see [the 
docs](https://docs.docker.com/engine/userguide/networking/get-started-overlay/) 
for that.
+I'll not use Docker Swarm in this example, but specifically place and 
configure containers where I want them by ssh'ing into the appropriate Docker 
host.
+
+To make this example easier to understand I'll just use shell commands.
+For actual use you may want to use a fancier deployment tool like 
[Fabric](http://www.fabfile.org).
+
+Note: this example requires Docker 1.10.
+
+I'll run these commands from the first machine, trinity10.
+
+Create a network named "netzksolr" for this cluster. The `--ip-range` 
specifies the range of
+addresses to use for containers, whereas the `--subnet` specifies all possible 
addresses in this
+network. So effectively, addresses in the subnet but outside the range are 
reserved for containers
+that specifically use the `--ip` option.
+
+```
+docker network create --driver=overlay --subnet 192.168.22.0/24 
--ip-range=192.168.22.128/25 netzksolr
+```
+
+As a simple test, check the automatic assignment and specific assignment work:
+
+```
+mak@trinity10:~$ docker run -i --rm --net=netzksolr busybox ip -4 addr show 
eth0 | grep inet

Review comment:
       let's remove `mak@trinity10:~$` from the commands




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to