Coder Social home page Coder Social logo

vinicius-marcondes / elkcs Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 65 KB

A complete ELK Stack environment containerized and able to be used in DEV

License: MIT License

Dockerfile 100.00%
docker docker-compose elk elk-stack logstash filebeat elasticsearch kibana metricbeat cluster elastic-certificates elk-docker linux monitoring monitoring-tool apm apm-server

elkcs's Introduction

Elastic Containerized Stack (ELKCS)

A complete ELK Stack environment containerized and able to be used in DEV or PROD

Contains

  • Elasticsearch (cluster)
  • Kibana
  • Logstash
  • Metricbeat for Metrics Monitoring
  • Filebeat to collect logs

Status

For now you can create a cluster of Elasticsearch to handle more data processing and with a little tricks and magic be able to run the cluster on swarm mode.

How to use

Here we need some adaptations, as the stack is suposed to be used on development or production(only for reading logs) the x-autentication needs to be enabled.

Basic

To start the cluster

docker-compose up -d 

To stop the cluster

docker-compose down

Setting up the cluster

Creating Elastisearch Nodes

  • Create the stack-cert on Master Node ( es01 )
$ docker exec es01 bin/elasticsearc-certutil ca && mv elastic-stack.p12 config/certs/

Obs: no need to create a password, if you want you'll need extra steps to make the cluster works. You can find the information you need here

  • On Each Node ( including Master )
$ docker exec esXX bin/elasticsearch-certutil cert --ca /config/certs/elastic-stack-ca.p12 && mv elastic-certificates.p12 /config/certs

After generating the certs you can uncomment the volume that binds the elasticsearch.yml from each node on docker-compose.yml and run the following commands:

$ chown 1000:0 -R volumes/

Running a single node

To run a single elasticsearch node you don't need to set up the certs, so you can remove these lines from your elasticsearch.yml file:

xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

Set passwords for default users

You have two options, set ut the passwords manually or automatic, if you choose automatic don't forget to save the passwords, otherwise you won't be able to use your cluster.

  • Manually
$ docker exec es01 bin/elasticsearch-setup-passwords interactive -b
  • Automatic
$ docker exec es01 bin/elasticsearch-setup-passwords auto

Test cluster health

$ curl -u elastic:<your_awesome_password>  -XGET "172.100.22.4:9200/_cluster/health?pretty"

( in progress....)

Contact

elkcs's People

Contributors

vinicius-marcondes avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

msellamitn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.