From 92cac1a93604edbe981ef09dd95886beadeba66d Mon Sep 17 00:00:00 2001 From: Alexander Fefelov Date: Mon, 15 Mar 2021 20:23:14 +0300 Subject: [PATCH] Prepare for other messengers See #63 and #64 --- README.md | 3 ++- dns/coredns/build/template.hosts | 5 ++++- doc/architecture.graphml | 2 +- lib/components | 5 ++++- lib/containers | 5 ++++- {mattermost => messengers/mattermost}/Dockerfile | 0 {mattermost => messengers/mattermost}/README.md | 2 +- {mattermost => messengers/mattermost}/build.sh | 0 {mattermost => messengers/mattermost}/clear-logs.sh | 0 .../mattermost}/container/backpack-healthcheck.sh | 0 .../mattermost}/container/mattermost/config/config.json | 0 .../mattermost}/default-configs/5.27.0/config/config.json | 0 .../mattermost}/default-configs/5.27.0/origin.txt | 0 .../mattermost}/init/initialize-database.sql | 0 .../mattermost}/init/initialize-mattermost.sh | 0 {mattermost => messengers/mattermost}/prune.sh | 0 {mattermost => messengers/mattermost}/rm-images.sh | 0 {mattermost => messengers/mattermost}/rm-volumes.sh | 0 {mattermost => messengers/mattermost}/rm.sh | 0 {mattermost => messengers/mattermost}/run.sh | 2 +- {mattermost => messengers/mattermost}/settings.sh | 6 +++--- {mattermost => messengers/mattermost}/show-logs.sh | 0 .../mattermost}/utils/emit-messages.sh | 0 .../mattermost}/utils/get-server-status.sh | 0 {mattermost => messengers/mattermost}/utils/lib.sh | 0 {mattermost => messengers/mattermost}/utils/list-bots.sh | 0 .../mattermost}/utils/list-channels.sh | 0 {mattermost => messengers/mattermost}/utils/list-plugins.sh | 0 {mattermost => messengers/mattermost}/utils/list-teams.sh | 0 {mattermost => messengers/mattermost}/utils/list-users.sh | 0 30 files changed, 20 insertions(+), 10 deletions(-) rename {mattermost => messengers/mattermost}/Dockerfile (100%) rename {mattermost => messengers/mattermost}/README.md (91%) rename {mattermost => messengers/mattermost}/build.sh (100%) rename {mattermost => messengers/mattermost}/clear-logs.sh (100%) rename {mattermost => messengers/mattermost}/container/backpack-healthcheck.sh (100%) rename {mattermost => messengers/mattermost}/container/mattermost/config/config.json (100%) rename {mattermost => messengers/mattermost}/default-configs/5.27.0/config/config.json (100%) rename {mattermost => messengers/mattermost}/default-configs/5.27.0/origin.txt (100%) rename {mattermost => messengers/mattermost}/init/initialize-database.sql (100%) rename {mattermost => messengers/mattermost}/init/initialize-mattermost.sh (100%) rename {mattermost => messengers/mattermost}/prune.sh (100%) rename {mattermost => messengers/mattermost}/rm-images.sh (100%) rename {mattermost => messengers/mattermost}/rm-volumes.sh (100%) rename {mattermost => messengers/mattermost}/rm.sh (100%) rename {mattermost => messengers/mattermost}/run.sh (98%) rename {mattermost => messengers/mattermost}/settings.sh (86%) rename {mattermost => messengers/mattermost}/show-logs.sh (100%) rename {mattermost => messengers/mattermost}/utils/emit-messages.sh (100%) rename {mattermost => messengers/mattermost}/utils/get-server-status.sh (100%) rename {mattermost => messengers/mattermost}/utils/lib.sh (100%) rename {mattermost => messengers/mattermost}/utils/list-bots.sh (100%) rename {mattermost => messengers/mattermost}/utils/list-channels.sh (100%) rename {mattermost => messengers/mattermost}/utils/list-plugins.sh (100%) rename {mattermost => messengers/mattermost}/utils/list-teams.sh (100%) rename {mattermost => messengers/mattermost}/utils/list-users.sh (100%) diff --git a/README.md b/README.md index c567e4a3..8ddc3aa0 100644 --- a/README.md +++ b/README.md @@ -63,10 +63,11 @@ Before you start, run [check-prerequisites.sh](check-prerequisites.sh) to make s - [Telegraf](influxdata/telegraf) - [Jenkins](jenkins) - [LibreSpeed](librespeed) -- [Mattermost](mattermost) - [Message queues](message-queues) - [ActiveMQ](message-queues/activemq), cluster - [RabbitMQ](message-queues/rabbitmq) +- [Messengers](messengers) + - [Mattermost](messengers/mattermost) - [Minecraft](minecraft) - [NetBox](netbox) - [Netdata](netdata) diff --git a/dns/coredns/build/template.hosts b/dns/coredns/build/template.hosts index a306bb20..f1263dec 100644 --- a/dns/coredns/build/template.hosts +++ b/dns/coredns/build/template.hosts @@ -11,7 +11,6 @@ $IP_ADDRESS grafana.backpack.test $IP_ADDRESS graphite-statsd.backpack.test $IP_ADDRESS jenkins.backpack.test $IP_ADDRESS librespeed.backpack.test -$IP_ADDRESS mattermost.backpack.test $IP_ADDRESS minecraft.backpack.test $IP_ADDRESS netbox.backpack.test $IP_ADDRESS redis.backpack.test @@ -92,6 +91,10 @@ $IP_ADDRESS activemq-node-2.backpack.test $IP_ADDRESS activemq-node-3.backpack.test $IP_ADDRESS rabbitmq.backpack.test +# Messengers +# +$IP_ADDRESS mattermost.backpack.test + # Network monitoring # $IP_ADDRESS fastnetmon.backpack.test diff --git a/doc/architecture.graphml b/doc/architecture.graphml index 86b673a7..6da0513d 100644 --- a/doc/architecture.graphml +++ b/doc/architecture.graphml @@ -930,7 +930,7 @@ https://github.com/alexanderfefelov/docker-backpack]]> - + diff --git a/lib/components b/lib/components index 77e148f3..56c4c534 100644 --- a/lib/components +++ b/lib/components @@ -7,7 +7,6 @@ grafana graphite-statsd jenkins librespeed -mattermost minecraft netbox redis @@ -85,6 +84,10 @@ influxdata/v1/kapacitor message-queues/activemq message-queues/rabbitmq +# Messengers +# +messengers/mattermost + # Network monitoring # network-monitoring/fastnetmon diff --git a/lib/containers b/lib/containers index 0f97d7b9..6158fae0 100644 --- a/lib/containers +++ b/lib/containers @@ -7,7 +7,6 @@ backpack-grafana backpack-graphite-statsd backpack-jenkins backpack-librespeed -backpack-mattermost backpack-minecraft backpack-netbox backpack-redis @@ -90,6 +89,10 @@ backpack-activemq-node-2 backpack-activemq-node-3 backpack-rabbitmq +# Messengers +# +backpack-mattermost + # Network monitoring # backpack-fastnetmon diff --git a/mattermost/Dockerfile b/messengers/mattermost/Dockerfile similarity index 100% rename from mattermost/Dockerfile rename to messengers/mattermost/Dockerfile diff --git a/mattermost/README.md b/messengers/mattermost/README.md similarity index 91% rename from mattermost/README.md rename to messengers/mattermost/README.md index 33377c46..39c882cf 100644 --- a/mattermost/README.md +++ b/messengers/mattermost/README.md @@ -1,6 +1,6 @@ # backpack-mattermost -![Mattermost](../doc/assets/logos/mattermost.png) +![Mattermost](../../doc/assets/logos/mattermost.png) Hostname `mattermost.backpack.test` diff --git a/mattermost/build.sh b/messengers/mattermost/build.sh similarity index 100% rename from mattermost/build.sh rename to messengers/mattermost/build.sh diff --git a/mattermost/clear-logs.sh b/messengers/mattermost/clear-logs.sh similarity index 100% rename from mattermost/clear-logs.sh rename to messengers/mattermost/clear-logs.sh diff --git a/mattermost/container/backpack-healthcheck.sh b/messengers/mattermost/container/backpack-healthcheck.sh similarity index 100% rename from mattermost/container/backpack-healthcheck.sh rename to messengers/mattermost/container/backpack-healthcheck.sh diff --git a/mattermost/container/mattermost/config/config.json b/messengers/mattermost/container/mattermost/config/config.json similarity index 100% rename from mattermost/container/mattermost/config/config.json rename to messengers/mattermost/container/mattermost/config/config.json diff --git a/mattermost/default-configs/5.27.0/config/config.json b/messengers/mattermost/default-configs/5.27.0/config/config.json similarity index 100% rename from mattermost/default-configs/5.27.0/config/config.json rename to messengers/mattermost/default-configs/5.27.0/config/config.json diff --git a/mattermost/default-configs/5.27.0/origin.txt b/messengers/mattermost/default-configs/5.27.0/origin.txt similarity index 100% rename from mattermost/default-configs/5.27.0/origin.txt rename to messengers/mattermost/default-configs/5.27.0/origin.txt diff --git a/mattermost/init/initialize-database.sql b/messengers/mattermost/init/initialize-database.sql similarity index 100% rename from mattermost/init/initialize-database.sql rename to messengers/mattermost/init/initialize-database.sql diff --git a/mattermost/init/initialize-mattermost.sh b/messengers/mattermost/init/initialize-mattermost.sh similarity index 100% rename from mattermost/init/initialize-mattermost.sh rename to messengers/mattermost/init/initialize-mattermost.sh diff --git a/mattermost/prune.sh b/messengers/mattermost/prune.sh similarity index 100% rename from mattermost/prune.sh rename to messengers/mattermost/prune.sh diff --git a/mattermost/rm-images.sh b/messengers/mattermost/rm-images.sh similarity index 100% rename from mattermost/rm-images.sh rename to messengers/mattermost/rm-images.sh diff --git a/mattermost/rm-volumes.sh b/messengers/mattermost/rm-volumes.sh similarity index 100% rename from mattermost/rm-volumes.sh rename to messengers/mattermost/rm-volumes.sh diff --git a/mattermost/rm.sh b/messengers/mattermost/rm.sh similarity index 100% rename from mattermost/rm.sh rename to messengers/mattermost/rm.sh diff --git a/mattermost/run.sh b/messengers/mattermost/run.sh similarity index 98% rename from mattermost/run.sh rename to messengers/mattermost/run.sh index e5ba9f85..65a86f05 100755 --- a/mattermost/run.sh +++ b/messengers/mattermost/run.sh @@ -4,7 +4,7 @@ [ $UID -eq 0 ] || exec sudo --preserve-env=VERSION bash "$0" "$@" . settings.sh -. ../lib/lib.sh +. ../../lib/lib.sh readonly MYSQL="mysql --host=$DB_HOST --port=$DB_PORT --user=$DB_ROOT_USERNAME --password=$DB_ROOT_PASSWORD" diff --git a/mattermost/settings.sh b/messengers/mattermost/settings.sh similarity index 86% rename from mattermost/settings.sh rename to messengers/mattermost/settings.sh index 20786736..05f38a46 100644 --- a/mattermost/settings.sh +++ b/messengers/mattermost/settings.sh @@ -8,9 +8,9 @@ readonly CONTAINER_NAME=$BASE_NAME readonly HOST_NAME=$MONIKER.backpack.test readonly WAIT_TIMEOUT=1200 -. ../lib/settings/go.sh -. ../lib/settings/health.sh -. ../lib/settings/log.sh +. ../../lib/settings/go.sh +. ../../lib/settings/health.sh +. ../../lib/settings/log.sh readonly DB_HOST=mysql-main-master.backpack.test readonly DB_PORT=3306 diff --git a/mattermost/show-logs.sh b/messengers/mattermost/show-logs.sh similarity index 100% rename from mattermost/show-logs.sh rename to messengers/mattermost/show-logs.sh diff --git a/mattermost/utils/emit-messages.sh b/messengers/mattermost/utils/emit-messages.sh similarity index 100% rename from mattermost/utils/emit-messages.sh rename to messengers/mattermost/utils/emit-messages.sh diff --git a/mattermost/utils/get-server-status.sh b/messengers/mattermost/utils/get-server-status.sh similarity index 100% rename from mattermost/utils/get-server-status.sh rename to messengers/mattermost/utils/get-server-status.sh diff --git a/mattermost/utils/lib.sh b/messengers/mattermost/utils/lib.sh similarity index 100% rename from mattermost/utils/lib.sh rename to messengers/mattermost/utils/lib.sh diff --git a/mattermost/utils/list-bots.sh b/messengers/mattermost/utils/list-bots.sh similarity index 100% rename from mattermost/utils/list-bots.sh rename to messengers/mattermost/utils/list-bots.sh diff --git a/mattermost/utils/list-channels.sh b/messengers/mattermost/utils/list-channels.sh similarity index 100% rename from mattermost/utils/list-channels.sh rename to messengers/mattermost/utils/list-channels.sh diff --git a/mattermost/utils/list-plugins.sh b/messengers/mattermost/utils/list-plugins.sh similarity index 100% rename from mattermost/utils/list-plugins.sh rename to messengers/mattermost/utils/list-plugins.sh diff --git a/mattermost/utils/list-teams.sh b/messengers/mattermost/utils/list-teams.sh similarity index 100% rename from mattermost/utils/list-teams.sh rename to messengers/mattermost/utils/list-teams.sh diff --git a/mattermost/utils/list-users.sh b/messengers/mattermost/utils/list-users.sh similarity index 100% rename from mattermost/utils/list-users.sh rename to messengers/mattermost/utils/list-users.sh