RousselTMLEARNING

TP · Elasticsearch: from discovery to expertise

Final project: run a simulated production Elasticsearch cluster

What you will learn in this TP
  • Deploy a secured three-node cluster
  • Design ingestion, mappings, data stream and ILM
  • Build a Kibana dashboard
  • Automate and test backups
  • Diagnose an outage and restore data
Mode :

All steps and instructions are shown. Recommended for this lab: autonomous

Introduction #

Context. You take over the log platform of an e-commerce site. Management wants a full demonstration before going live: reliable ingestion, controlled retention, a dashboard, backups, and proof that the team can react to an outage.

Prerequisites: All course modules, Docker Compose, 8 GB of free RAM, Python 3  ·  Estimated time: 180 min

The project that validates administration, search and operations.

Hands-on #

Guided steps, with their solution.

  1. 1. Prepare the environment

    Why? Secrets are generated and never written in the Compose file; vm.max_map_count is required by Elasticsearch.

    Create the project folder and the .env file.
  2. 2. Deploy the cluster

    Why? Three master-eligible nodes tolerate the loss of one node; TLS is mandatory for multi-node security.

    Write the docker-compose.yml: a setup service that generates the certificates and the kibana_system password, three nodes and Kibana.
  3. 3. Check the cluster

    Why? Nothing is built on a cluster that is not green.

    Start the stack and check the three nodes, the elected master and cluster health.
  4. 4. Ingest pipeline

    Why? Structuring at ingest time avoids parsing at every query.

    Create the nginx-access pipeline (grok, date, geoip, user_agent) and validate it with _simulate.
  5. 5. Mappings, data stream and ILM

    Why? Strict mappings and automatic rollover control cost and quality.

    Create the ILM policy, the mappings component template and the index template of the logs-nginx-* data stream.
  6. 6. Ingest

    Why? The Bulk API is the basis of any large-scale ingestion.

    Generate 20,000 realistic lines and send them in batches; check there are no errors.
  7. 7. Kibana dashboard

    Why? The dashboard is what teams will see every day.

    In Kibana (https://localhost:5601 as elastic), create a logs-nginx-* data view then a dashboard: requests per minute, 5xx error rate, top 10 paths, country map, browsers.
  8. 8. Automated backups

    Why? Snapshots are the only protection against human error.

    Declare the repository, create an hourly SLM policy and run it immediately.
  9. 9. Simulated outage

    Why? Understand what the cluster does when a node disappears.

    Stop es02 and analyse health, shards and the allocation explanation.
  10. 10. Human error and restore

    Why? A backup is only worth something if restore has been tested.

    Delete the data stream, restore it from the latest snapshot and check the document count.

Validate your work

Check that each goal above is reached and that you get the result described in the introduction.

Difficulty level : ●●●●● (5/5)

My progress

  • ⏱ Estimated time : ≈ 3 h

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Course Glossary

RBAC (Role-Based Access Control)

An access control method where permissions are assigned to specific roles (e.g., admin, reader) rather than directly to individual users.

Authentication

The process of verifying the identity of a user or system (e.g., login/password, tokens, biometrics).

Authorization

The process that occurs after authentication to determine if the entity has the necessary rights and privileges to access a resource.

API Key

A unique alphanumeric code used to identify, authenticate, and authorize access to an Application Programming Interface (API).

Architecture

The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.

Repository

A centralized storage location. This can refer to a source code repository (e.g., Git) or an artifact and binary repository (e.g., Harbor, Nexus, Arti...

Elasticsearch

A distributed, RESTful search and analytics engine capable of addressing a growing number of use cases, built on Apache Lucene.

Recommended Articles

Elasticsearch distributed architecture: node roles, shards, replicas and allocation

Understand how Elasticsearch works as a distributed system: node roles, master nodes and quorum, ...

Elasticsearch ingestion: Bulk API, ingest pipelines, enrich and reindex

Ingest and transform data in Elasticsearch: Bulk API, ingest pipelines and processors (grok, diss...

Index Lifecycle Management (ILM): data tiers, rollover and retention

Automate the index lifecycle with ILM: hot, warm, cold and frozen data tiers, rollover by size an...

Elasticsearch data streams and templates: component templates, index templates and time series

Manage timestamped data with data streams: index templates and component templates, the type-data...

Elasticsearch monitoring and troubleshooting: health, unassigned shards, JVM, hot threads and slow logs

Diagnose an Elasticsearch cluster: cluster health and CAT APIs, unassigned shards and allocation ...

Snapshot Lifecycle Management: automated backups, restore and disaster recovery

Protect Elasticsearch data: snapshot repositories (S3, GCS, Azure, file system), SLM policies wit...

Elastic path project: centralising and using logs

The validation project of the "Elastic Stack mastery" path: Elastic Agent and Fleet, Logstash, El...

Cross-cluster search and cross-cluster replication: multi-cluster Elasticsearch architectures

Design multi-cluster Elasticsearch architectures: remote clusters, cross-cluster search, cross-cl...

Transforms and enrich: summarising and enriching data in Elasticsearch

Build entity-centric indices with pivot and latest transforms, and enrich documents at ingest tim...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!