I'm new to Elasticstack and trying to set up a minimal development installation.
I followed the instructions in Install Kibana With Docker and got what I needed. However, it seems silly to run multiple docker run commands every time I want to bring the server up or down since that is what Docker compose is for.
I just spent a few days trying to create a minimal Elastic stack using Docker compose and was unable to do so. I went down a lot of blind alleys, but the problem ultimately came down to the fact that the automatic setup where the security information is printed to the screen does not work when running compose.
This is described in Issue 88272. This issue is closed and looks like it won't be fixed and recommends that people bring up further questions on the Elasticsearch forums.
What are my options if nevertheless I want to use Docker compose for a simple dev installation? Is there some way I can set up security with raw docker run commands and then transition over to using a Docker compose file? (I've been trying to do this, and I think the answer is "no".) Do I have to manually configure the security? (I tried unsuccessfully to do that. I guess I could eventually figure it out, but that's a lot of work.)
There are instructions on how to Start a multi-node cluster with Docker Compose. I started trying to adapt it for a single node, but the Docker compose file has this big unwieldy bash script written into it, which I started to modify and then gave up on. Again, I could eventually figure it out, but that's difficult, and having to deal with an unwieldily bash script in order to do an install defeats the purpose of having Docker in the first place.
Is there an easy way to make a single-node docker-compose.yml setup that I'm overlooking or is that not supported?
Thanks for the example. I'll probably just stick with a short shell script for my service coordination instead of docker compose to reduce the complexity I have to deal with.
But reading through your example brought back a question I had when I was trying to manually set up security. As far as I can tell, the script in the compose file above is just running the steps necessary to set up basic security for the Elastic stack. The compose script and the linked official documentation seem to be doing the same thing, except the script has this additional step where you change the file permissions on the certificate files which the documentation never mentions.
Say I did want to set up basic security manually, do I have to do some file permission work in addition to the steps outlined in the documentation?
I ask because I did try to follow the manual setup steps and at one point got stopped by a mysterious error that I worked around by setting global read write permissions for the certificate files. Or at least I think that's how I got around it. I was deep in the weeds at that point and just trying a bunch of stuff so I can't be sure what worked, but I think file permissions was it.
For Elastic 8.0 and greater security is automatically turned on. Is there some way I can turn it off? There are a few YouTube tutorials that do exactly what I want to with Docker compose, but they were all made with pre-8.0 versions of Elastic.
I'm not building production environments. I'm doing lots of quick and dirty proofs of concept for which having all the Docker bells-and-whistles is helpful.
I'm willing to make the effort to manually set up security when it comes time to go into production, but for right now it's less important that I have security and more important that I can show my colleagues a ten-line Docker compose file and say, "See how easy that is?"
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.