Git Product home page Git Product logo

elasticsearch-operator-1's Introduction

elasticsearch-operator

Description

The Elasticsearch Operator provides a distributed search and analysis solution using Elasticsearch.

Setup

Increase the maximum number of virtual memory areas on your host system. On a Linux system this can be done using the command line

sudo sysctl -w vm.max_map_count=262144

For a more permanent change edit /etc/sysctl.conf.

Install Dependencies and Build

To build the charm, first install charmcraft, juju and microk8s

snap install charmcraft
snap install juju --classic
snap install microk8s --classic 

Then in this git repository run the command

charmcraft build

Usage

juju deploy ./elasticsearch.charm

To scale up:

juju add-unit -n 2 elasticsearch

Note: When the total number of nodes in the cluster is 2, split brain is possible. If there are currently two nodes, be sure to use juju add-unit to scale up to a functional HA cluster. For more information about how Elasticsearch handles quorum and the effects of split brain, take a look at the Elasticsearch docs.

To check the status of the cluster:

# 1. wait until all units and application is active
watch -c juju status --color
# 2. copy the application IP address from the juju status output
# 3. check the health of the cluster
curl -X GET http://{APP_IP}:9200/_cat/health?v&pretty

Developing

Use your Python 3 development environment or create and activate a virtualenv, and install the development requirements,

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements-dev.txt

Testing

Just run run_tests:

./run_tests

elasticsearch-operator-1's People

Contributors

justinmclark avatar

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.