Skip to content

Commit

Permalink
first import
Browse files Browse the repository at this point in the history
  • Loading branch information
eskimo committed Jan 18, 2021
0 parents commit 8398c9c
Show file tree
Hide file tree
Showing 315 changed files with 55,073 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.settings
/target
/.classpath
/.project
/logs
/.idea
/*.iml
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: java

jdk:
- openjdk11

addons:
sonarcloud:
organization: "eskimo-sh-sonarqube-key"
token:
secure: "ET8lYJzM4rRrP7mMqMEcDpZkt7MY9bUIFitZ8hnfOFoMTqJywc8s/tMwpCRHSKk3H2sWsMQ6WiqOWSeVokJegIMeIzQ1430Bx80Drfa9sS3PNan5mDXDBngkggybqQPTzKfRLAHJlN4KIbJfE8xnWYVINl4K75wrelR6miDeUYDwRFUf6kHSyIOPtJo28n5bZEmH7LJdxFegun7guyxByRSFd9edTBqg+nu4HmwIlKYKpFqyZIKxdkYpFVL8im3jUTXbXiHbTq4n0rM2kgBABPGcrPvbn2EB+Lwk5BXUVIPz/IogPySZrjouS6DMmJdzq/AyRf9mhfF5AnDQZ4alI4f0PSF4smpERzOkN5FPi0sUR7CnWlaL9WcEnyIHRf4W02VHr+2EZlxULP/ygehu2wrAtti4xXFeSSAzbXMqHd4jsFKzQVa+MEoQbdeE2nvlw8HWObDR5oqHb+l2xOzQkJjULl9edFgqrmm3tZ73f+ogerN4oRij+sETvwqRnL687rfvc11FJYxYL4+x/hdoB9FfDGeQlMMhoLwDqpGE5TdMa/xSPntA/C4RzY7/Ear4oq3ROndAd7gJAtL41nsGLIw3CmuCl9rdkrmkg44Up4oAfbzcbvIwyO9XB/qY+lQRoVGZqdWeR0pkf16PQNzt0e7Q3/zQqhloDcFynlniT3A="

script:
# the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis
- mvn clean verify
# - mvn clean verify sonar:sonar -Pcoverage -Dsonar.projectKey=eskimo-sh_egmi
209 changes: 209 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
////
This file is part of the eskimo project referenced at www.eskimo.sh. The licensing information below apply just as
well to this individual file than to the Eskimo Project as a whole.

Copyright 2019 www.eskimo.sh - All rights reserved.
Author : http://www.eskimo.sh

Eskimo is available under a dual licensing model : commercial and GNU AGPL.
If you did not acquire a commercial licence for Eskimo, you can still use it and consider it free software under the
terms of the GNU Affero Public License. You can redistribute it and/or modify it under the terms of the GNU Affero
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
Compliance to each and every aspect of the GNU Affero Public License is mandatory for users who did no acquire a
commercial license.

Eskimo is distributed as a free software under GNU AGPL in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero Public License for more details.

You should have received a copy of the GNU Affero Public License along with Eskimo. If not,
see <https://www.gnu.org/licenses/> or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA.

You can be released from the requirements of the license by purchasing a commercial license. Buying such a
commercial license is mandatory as soon as :
- you develop activities involving Eskimo without disclosing the source code of your own product, software,
platform, use cases or scripts.
- you deploy eskimo as part of a commercial product, platform or software.
For more information, please contact eskimo.sh at https://www.eskimo.sh

The above copyright notice and this licensing notice shall be included in all copies or substantial portions of the
Software.
////



:sectnums:
:authors: www.eskimo.sh / 2019
:copyright: www.eskimo.sh / 2019


== EGMI - Eskimo Gluster Management Interface

=== Introduction

EGMI stands for *Eskimo Gluster Management Interface*. EGMI is a daemon running on machines or containers along
https://www.gluster.org/[Gluster FS] and taking care of managing gluster volumes and peers automatically (for most
common operations).

The fundamental idea behind EGMI is that operators should not have to do so much manual operations to build and maintain
a gluster cluster. +
EGMI inspires from the way most widely used Big Data / NoSQL backends manage their shards and replicas transparently,
balancing new replicas to new nodes automatically whenever a node goes down, etc. +
EGMI aims at bringing the same level of automatic operation and reliability on top of Gluster FS and well at
simplifying all aspects of gluster volumes management and repairing.

EGMI also included a web interface for monitoring and to help administrators perform some simple manual operations and
configuration.

image::egmi_platform.png[800, 800, align="center"]

=== EGMI Project Development Status

*Travis CI Integration Build Status* +
image:https://travis-ci.com/eskimo-sh/egmi.svg?branch=master["Build Status", link="https://travis-ci.com/eskimo-sh/egmi"]

// *SonarCloud Quality Checks Status* +
// image:https://sonarcloud.io/api/project_badges/measure?project=eskimo-sh_egmio&metric=alert_status["Sonarcloud Status", link="https://sonarcloud.io/dashboard?id=eskimo-sh_egmi"]


=== Principles

*Automatic nodes and volumes management*

With EGMI, the administrators needs to define in egmi's configuration file:

* *The managed nodes*: the set of nodes where gluster is expected to be running. Additional nodes discovered in gluster
peers are considered as well.
* *The Managed Volumes*: the set of gluster volumes to be created and managed. Additional volumes discovered in gluster
peers are considered as well.
* *The target number of replicas*: EGMI will managed and extend volumes as required to respect this number if possible.
* *The target number of shards*: EGMI will attempt to create as many bricks as required to reach this number of shards
(distribution) times the number of replicas if possible.

*EGMI is deployed on every node running gluster*

EGMI is designed to be deployed along Gluster FS on every node or container from the gluster cluster. This is a strict
requirement since every EGMI instance will administer the co-located Gluster FS instance. +
At every moment in time, only one of these EGMI process is considered master and is taking decisions for the whole
cluster.

*Using Zookeeper for master election*

EGMI uses Zookeeper for master election. Zookeeper is used solely to elect the master taking decisions for the whole
cluster and not for state storage. +
EGMI can also run on a single node deployment without Zookeeper. If no Zookeeper URL is configured, an EGMI instance
assumes it is the master.

*Stateless*

EGMI itself is stateless. EGMI uses Gluster FS to store state and always returns to querying Gluster instances to
recover the Gluster cluster state.

*UI Redirection to master node*

Every EGMI instance running on evefy cluster nodes as a Web UI - Graphical User Interface - up, running and available
on the configured port. However, onl the master node UI is answering. Slave nodes UI on slave nodes redirect the user
to master node UI.

== Building EGMI

=== Prerequisites

EGMI needs following software available in order to be built:

* Open JDK 11 (or compatible) with `java` in `PATH`.
* Apache Maven 3.x (or compatible) with `mvn` in `PATH`

All the rest is expressed as maven dependencies and fetched from maven repositories as part of the maven build proces.

=== Building

Simply type on the command line at the root of the project:

`mvn clean install`

== EGMI Deployment

Again, EGMI has to be installed on every machine or container running _Gluster FS_.
EGMI is started using the startup script `egmi.sh` or the provided SystemD unit file and setup script.

=== Installation

Just extract the EGMI archive to the root folder where you want to install EGMI.

=== Configuration

EGMI is configured in `egmi.properties` configuration file located under `conf` under the root EGMI installation folder.

The most essential configuration properties to be adapted *whenever egmi is to be used outside of eskimo* are as
follows:

* `server.port`: the port EGMI listens to (both EGMI UI and EGMI command server)
* `remote.egmi.port` : the port where the remote EGMI command server listens to. *This should in principe be the same
port as above*. But in case the EGMI master orchestrates remote slaves running on different port, this can be usefull.
* `config-storage-path`: where the EGMI runtime configuration (meta-data) has to be stored. EGMI is more or less
stateless but some of the discovered nodes or volumes are tracked in a meta-data file stored there. (If this file is
deleted, it doesn't impact EGMI significantly)
* `target.ip-addresses` : coma-separated hostnames or IP addresses of the gluster cluster. EGMI will connect all these
nodes together (add peers in pool) if some nodes are disconnected from the gluster.
* `target.volumes`: coma-separated list of volumes to be managed
* `system.statusUpdatePeriodSeconds`: the timeout in seconds between each orchestration iteration (status fetching and
problem resolution iteration)
* `target.numberOfBricks` : the number of bricks to create and manage for volumes (either a fixed number or "ALL_NODES"
to have every volume having a brick on every node or "LOG_DISPATCH" to have shared and replicas distributed on log(n)
nodes)
* `target.defaultNumberReplica` : the target number of replicas to try to respect for every node.
* `hostname` : the hostname this instance of EGMI is identified by on the gluster cluster (most of the time the IP
address of the node)
* `zookeeper.urls` : coma-separated list of IP:PORT where zookeeper is expected.
* `zookeeper.sessionTimeout` : the zookeeper session timeout (used to trigger a new master election)
* `master.redirect.URLPattern` : the URL pattern used to redirect users reaching an EGMI slave to the master.

*Important note*
This configuration needs to be aligned on every node. It is not a strict requirement and a configuration discrepency
between nodes is somewhat tolerated by EGMI. +
However, it can lead to unexpected results and every node in the gluster cluster should have same EGMI configuration







[appendix]
== Copyright and License

EGMI is part of the Eskimo software platform.

Eskimo is Copyright 2019 - 2021 eskimo.sh - All rights reserved. +
Author : http://www.eskimo.sh

Eskimo is available under a dual licensing model : commercial and GNU AGPL. +
If you did not acquire a commercial licence for Eskimo, you can still use it and consider it free software under the
terms of the GNU Affero Public License. You can redistribute it and/or modify it under the terms of the GNU Affero
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
any later version. +
Compliance to each and every aspect of the GNU Affero Public License is mandatory for users who did no acquire a
commercial license.

Eskimo is distributed as a free software under GNU AGPL in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero Public License for more details.

You should have received a copy of the GNU Affero Public License along with Eskimo. If not,
see <https://www.gnu.org/licenses/> or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA.

You can be released from the requirements of the license by purchasing a commercial license. Buying such a
commercial license is mandatory as soon as :

* you develop activities involving Eskimo without disclosing the source code of your own product, software, platform,
use cases or scripts.
* you deploy eskimo as part of a commercial product, platform or software.

For more information, please contact eskimo.sh at https://www.eskimo.sh

The above copyright notice and this licensing notice shall be included in all copies or substantial portions of the
Software.
13 changes: 13 additions & 0 deletions count_lines.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

(for i in `find ./src/main/java`; do if [[ ! -L $i && ! -d $i && `echo $i | grep jquery` == "" && `echo $i | grep bootstrap` == "" ]]; then cat $i; fi; done) | wc -l > /tmp/java_lc
(for i in `find ./src/main/webapp`; do if [[ ! -L $i && ! -d $i && `echo $i | grep jquery` == "" && `echo $i | grep bootstrap` == "" && `echo $i | grep present` == "" && `echo $i | grep img` == "" && `echo $i | grep masonry` == "" && `echo $i | grep font` == "" && `echo $i | grep vendor` == "" ]]; then cat $i; fi; done) | wc -l > /tmp/web_lc
(for i in `find ./src/test`; do if [[ ! -L $i && ! -d $i ]]; then cat $i; fi; done) | wc -l > /tmp/test_lc

echo "Java LC : `cat /tmp/java_lc`"
echo "Web LC : `cat /tmp/web_lc`"
echo "Test LC : `cat /tmp/test_lc`"

rm /tmp/java_lc
rm /tmp/web_lc
rm /tmp/test_lc
Binary file added egmi_platform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions notes/gluster_helpbox.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

gluster volume create test1 replica 3 \
192.168.10.71:/var/lib/gluster/volume_bricks/test1 \
192.168.10.72:/var/lib/gluster/volume_bricks/test2 \
192.168.10.73:/var/lib/gluster/volume_bricks/test3

gluster volume create test1 replica 2 \
192.168.10.71:/var/lib/gluster/volume_bricks/test1 \
192.168.10.72:/var/lib/gluster/volume_bricks/test1

gluster volume start test1


gluster volume create test2 \
192.168.10.71:/var/lib/gluster/volume_bricks/test2 \
192.168.10.72:/var/lib/gluster/volume_bricks/test2

gluster volume start test2
Loading

0 comments on commit 8398c9c

Please sign in to comment.