Installing and configuring Elasticsearch using Ansible
ฝัง
- เผยแพร่เมื่อ 14 พ.ย. 2024
- Elasticsearch can be installed and configured very easily using Ansible!
I demonstrate how to do this by creating a single node cluster, changing the configuration, and extending it to a two node cluster. All the installation and configuration is taken care of by Elastic's Elasticsearch Ansible role.
A little Ansible knowledge is assumed, but there isn't anything advanced in this video. If you've never used Ansible before, this could be a great opportunity to have a go with it!
-----------------------------
My blog can be found here: georgebridgema...
My courses on Elasticsearch can be found here: school.georgeb...
IMPORTANT! Elastic have now deprecated their Ansible collection. The GitHub repo for it is now archived: github.com/elastic/ansible-elasticsearch
Ansible can still be used to install Elasticsearch and configure the host appropriately. There's also no reason to think that Elastic's collection will stop working all of a sudden. It'll need updating with the repositories for Elasticsearch 8, but the host configuration is still correct (I think).
thx for this one - just applied it on a cluster of 3 raspberry 4b (4gb + 8gb + 8gb) ... to avoid cloud fees & ... elaborate elastic cluster learning.
That's awesome!
good video, but, how to di it with certs, i mean lots of certs, lots of chages we need to create certs and send it to other nodes and there move to anoter paths, and rewrite some code, My queston is how to send it via ansible?
Config management is great for new installs. It breaks down when doing a rolling upgrades because of the process of shutting down and restarting a node and waiting for the shard allocation to complete.
didn't know elastic had their own official ansible role, or that you could put variables in the hosts file..neat! thanks for sharing.
I’m glad it was useful! Elastic have recently deprecated the role, unfortunately. It’s still available but will likely need maintenance from the community at some point.
Great job George thanks a lot, I'm new on Elasticsearch and I must configure 33 nodes so I'm very confusing and I don't found someone who talk about multi-node elasticsearch configuration so keep going :)
Thanks! Ansible will make managing a cluster that size MUCH easier.
You can deploy config without the Elastic collection. It's actually easier doing it yourself with a basic Ansible template.
I'll be doing a video on deploying new config and performing a rolling restart of the cluster. I'll use a five node cluster for that, with dedicated master nodes.
@@GeorgeBridgemanData Many thanks Sir :)
Thanks George, great video. I think it's good Idea to start my first ansible with basic template.
I'm glad it was helpful!
Hi all. Is it just me or is running the ELK stack on vms much easier than on kubernettes. Im talking om prem set ups here. thoughts on this?
I agree with you completely; VMs are the way.
I've never used K8s. No-one has sold me on why it's great at the scale most of us work at. It introduces a lot more complexity and a whole new suite of tools to learn to use effectively.
Do they have documentation for On Prem for Ansible -Elastic
The GitHub repo for Elastic's Ansible collection is here: github.com/elastic/ansible-elasticsearch
They've recently deprecated the collection, which is a real shame. They're now pushing Elastic Cloud (their managed service), ECK (K8s), and Docker.
You can still create your own Ansible playbooks for installing Elasticsearch and configuring the host, but it's more work than using their handy collection :(
which version of elasticsearch database is being installed ?
How about using Helm on k8s???
That's something I really couldn't help with. I've managed to avoid K8s so far; I haven't found a viable need for it.
I've spoken with plenty of people who manage Elasticsearch clusters, and I think K8s only becomes useful at much larger scale than is typical - hundreds of nodes. It requires a whole set of new skills!
I may have to look at K8s at some stage and I'd go to ECK first, I think.