You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Link Solr Operator for learning on Solr in Kubernetes, and better exp… (#1114)
* Remove docker-networking.adoc page
* Write a few paragraphs about cloud in the FAQ
* Remove bad advice about docker links
* Remove info about legacy v5-7
* Add example of compose file for cloud
Co-authored-by: Jan Høydahl <[email protected]>
== Can I run ZooKeeper and Solr clusters under Docker?
51
51
52
-
At the network level the ZooKeeper nodes need to be able to talk to each other,
53
-
and the Solr nodes need to be able to talk to the ZooKeeper nodes and to each other.
54
-
At the application level, different nodes need to be able to identify and locate each other.
55
-
In ZooKeeper that is done with a configuration file that lists hostnames or IP addresses for each node.
56
-
In Solr that is done with a parameter that specifies a host or IP address, which is then stored in ZooKeeper.
57
-
58
-
In typical clusters, those hostnames/IP addresses are pre-defined and remain static through the lifetime of the cluster.
59
-
In Docker, inter-container communication and multi-host networking can be facilitated by https://docs.docker.com/engine/userguide/networking/[Docker Networks].
60
-
But, crucially, Docker does not normally guarantee that IP addresses of containers remain static during the lifetime of a container.
61
-
In non-networked Docker, the IP address seems to change every time you stop/start.
62
-
In a networked Docker, containers can lose their IP address in certain sequences of starting/stopping, unless you take steps to prevent that.
63
-
64
-
IP changes cause problems:
65
-
66
-
* If you use hardcoded IP addresses in configuration, and the addresses of your containers change after a stops/start, then your cluster will stop working and may corrupt itself.
67
-
* If you use hostnames in configuration, and the addresses of your containers change, then you might run into problems with cached hostname lookups.
68
-
* And if you use hostnames there is another problem: the names are not defined until the respective container is running,
69
-
So when for example the first ZooKeeper node starts up, it will attempt a hostname lookup for the other nodes, and that will fail.
70
-
This is especially a problem for ZooKeeper 3.4.6; future versions are better at recovering.
71
-
72
-
Docker 1.10 has a new `--ip` configuration option that allows you to specify an IP address for a container.
73
-
It also has a `--ip-range` option that allows you to specify the range that other containers get addresses from.
74
-
Used together, you can implement static addresses.
75
-
See the xref:docker-networking.adoc[] for more information.
52
+
Yes. You can simply start your Solr containers in "Cloud mode", pointing
53
+
them to a xref:zookeeper-ensemble.adoc[Zookeeper Ensemble].
54
+
55
+
For local development, using a single zookeeper container is enough.
56
+
Please consult the https://hub.docker.com/_/zookeeper[Zookeeper docker image] for details.
57
+
58
+
For production purposes, we discourage rolling your own Zookeeper orchestration,
59
+
as there are many pitfalls. Instead, use a well-supported container orchestrator
60
+
with support for Solr and Zookeeper. For Kubernetes, we provide the
61
+
https://solr.apache.org/operator/[Solr Operator] sub project.
62
+
There are also 3rd party Helm charts available.
76
63
77
64
== How can I run ZooKeeper and Solr with Docker Compose?
0 commit comments