From 0903f1b97e7a3562cf5f953962598398135b702e Mon Sep 17 00:00:00 2001 From: cs171027 Date: Sat, 13 Jun 2020 01:32:14 +0000 Subject: [PATCH] Update 'DOC.md' --- DOC.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/DOC.md b/DOC.md index ec1385b..881874b 100644 --- a/DOC.md +++ b/DOC.md @@ -13,7 +13,9 @@ Command for using and attaching to LXC container (e.g. to 'worker1'): ```lxc-att One possible limitation of the deployment process with docker swarm, is that static ip assignments [are missing in docker swarm](https://forums.docker.com/t/docker-swarm-1-13-static-ips-for-containers/28060/13), and so the deployment process is based on the overlay networks, the inclusion of which inside the service deployment adds a degree of environmental complexity for the Galera cluster setup, especially since we use a [custom stack deployment](https://git.swarmlab.io:3000/cs171027/galera-swarm-lxc-ansible/src/branch/master/stack.yaml) for the ```mariadb-galera-swarm``` image. -For checking the service status this command is suitable with the output from below: ```docker service ls``` +For checking the service status this command is suitable with the output from below: + +```docker service ls``` ```ID NAME MODE REPLICAS IMAGE PORTS zwueb8s59c0j stack_anode replicated 1/1 colinmollenhour/mariadb-galera-swarm:latest @@ -32,8 +34,22 @@ worker2 RUNNING 0 - 10.0.3.101, 172.17.0.1, 172.18.0.1 - For checking the current size of the Galera cluster - meaning all the current nodes connected to the cluster - there exist some useful commands, which should be executed inside the docker container cluster nodes (```docker exec -it {container_id} sh```), e.g inside the first MariaDB server node: -```mysql -u root -e "SHOW GLOBAL STATUS LIKE 'wsrep_cluster_size%';"``` +``` +mysql -u root -e "SHOW GLOBAL STATUS LIKE 'wsrep_cluster_size%';" +``` In case the result of this command is 1, it means that only one MariaDB server is running inside the cluster, which is the server from which the cluster is bootstraping from (see also inside the file ```/var/lib/mysql/grastate.dat``` if this line exists: ```safe_to_bootstrap: 1``` to confirm that this is the case). -* **Manual Healthcheck (inside LXC containers)**: ```docker exec {container_id} healthcheck.sh``` \ No newline at end of file +* **Manual Healthcheck (inside LXC containers)**: ```docker exec {container_id} healthcheck.sh``` + + +Also, a new database, named e.g "database" and defined inside the "stack.yaml" deployment file, should initially appear inside the Galera cluster on all the MariaDB nodes: + +``` +MariaDB [(none)]> show databases; ++--------------------+ +| Database | ++--------------------+ +| database | + +``` \ No newline at end of file