mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
SMQ-3399 - Unify Magistrala and SuperMQ (#3400)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> Signed-off-by: dusan <borovcanindusan1@gmail.com> Co-authored-by: Steve Munene <stevenyaga2014@gmail.com>
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) Abstract Machines
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
###
|
||||
# Fetches the latest version of the docker files from the Certs repository.
|
||||
###
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
REPO_URL=https://github.com/absmach/certs
|
||||
TEMP_DIR="certs"
|
||||
DOCKER_DIR="docker"
|
||||
DOCKER_DST_DIR="../docker/addons/certs"
|
||||
DEST_DIR="../../docker/addons/certs"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR" || exit 1
|
||||
|
||||
if [ -n "$(git status --porcelain "$DOCKER_DST_DIR")" ]; then
|
||||
echo "There are uncommitted changes in '$DOCKER_DST_DIR' dir. Please commit or stash them before running this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cleanup() {
|
||||
rm -rf "$TEMP_DIR"
|
||||
}
|
||||
cleanup
|
||||
trap cleanup EXIT
|
||||
|
||||
git clone --depth 1 --filter=blob:none --sparse "$REPO_URL"
|
||||
cd "$TEMP_DIR"
|
||||
git sparse-checkout set "$DOCKER_DIR"
|
||||
|
||||
if [ -d "$DEST_DIR" ]; then
|
||||
rm -r "$DEST_DIR"
|
||||
fi
|
||||
mkdir -p "$DEST_DIR"
|
||||
mv -f "$DOCKER_DIR"/.??* "$DOCKER_DIR"/* "$DEST_DIR"/
|
||||
cd ..
|
||||
rm -rf "$TEMP_DIR"
|
||||
+4
-4
@@ -69,10 +69,10 @@ setup_mg() {
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "Compile check for rabbitmq..."
|
||||
SMQ_MESSAGE_BROKER_TYPE=msg_rabbitmq make http
|
||||
echo "Compile check for redis..."
|
||||
SMQ_ES_TYPE=es_redis make http
|
||||
echo "Compile check for nats message broker..."
|
||||
MG_MESSAGE_BROKER_TYPE=msg_nats make re
|
||||
echo "Compile check for redis event store..."
|
||||
MG_ES_TYPE=es_redis make bootstrap
|
||||
make -j$NPROC
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -38,28 +38,28 @@ done
|
||||
###
|
||||
# Users
|
||||
###
|
||||
SMQ_USERS_LOG_LEVEL=info SMQ_USERS_HTTP_PORT=9002 SMQ_USERS_GRPC_PORT=7001 SMQ_USERS_ADMIN_EMAIL=admin@supermq.com SMQ_USERS_ADMIN_PASSWORD=12345678 SMQ_USERS_ADMIN_USERNAME=admin SMQ_PASSWORD_RESET_URL_PREFIX=http://localhost:9002/password/reset SMQ_PASSWORD_RESET_EMAIL_TEMPLATE=../docker/templates/reset-password-email.tmpl SMQ_VERIFICATION_URL_PREFIX=http://localhost:9002/users/verify-email SMQ_VERIFICATION_EMAIL_TEMPLATE=../docker/templates/verification-email.tmpl $BUILD_DIR/supermq-users &
|
||||
MG_USERS_LOG_LEVEL=info MG_USERS_HTTP_PORT=9002 MG_USERS_GRPC_PORT=7001 MG_USERS_ADMIN_EMAIL=admin@supermq.com MG_USERS_ADMIN_PASSWORD=12345678 MG_USERS_ADMIN_USERNAME=admin MG_PASSWORD_RESET_URL_PREFIX=http://localhost:9002/password/reset MG_PASSWORD_RESET_EMAIL_TEMPLATE=../docker/templates/reset-password-email.tmpl MG_VERIFICATION_URL_PREFIX=http://localhost:9002/users/verify-email MG_VERIFICATION_EMAIL_TEMPLATE=../docker/templates/verification-email.tmpl $BUILD_DIR/supermq-users &
|
||||
|
||||
###
|
||||
# Clients
|
||||
###
|
||||
SMQ_CLIENTS_LOG_LEVEL=info SMQ_CLIENTS_HTTP_PORT=9000 SMQ_CLIENTS_GRPC_PORT=7000 SMQ_CLIENTS_AUTH_HTTP_PORT=9002 $BUILD_DIR/supermq-clients &
|
||||
MG_CLIENTS_LOG_LEVEL=info MG_CLIENTS_HTTP_PORT=9000 MG_CLIENTS_GRPC_PORT=7000 MG_CLIENTS_AUTH_HTTP_PORT=9002 $BUILD_DIR/supermq-clients &
|
||||
|
||||
###
|
||||
# HTTP
|
||||
###
|
||||
SMQ_HTTP_ADAPTER_LOG_LEVEL=info SMQ_HTTP_ADAPTER_PORT=8008 SMQ_CLIENTS_GRPC_URL=localhost:7000 $BUILD_DIR/supermq-http &
|
||||
MG_HTTP_ADAPTER_LOG_LEVEL=info MG_HTTP_ADAPTER_PORT=8008 MG_CLIENTS_GRPC_URL=localhost:7000 $BUILD_DIR/supermq-http &
|
||||
|
||||
|
||||
###
|
||||
# MQTT
|
||||
###
|
||||
SMQ_MQTT_ADAPTER_LOG_LEVEL=info SMQ_CLIENTS_GRPC_URL=localhost:7000 $BUILD_DIR/supermq-mqtt &
|
||||
MG_MQTT_ADAPTER_LOG_LEVEL=info MG_CLIENTS_GRPC_URL=localhost:7000 $BUILD_DIR/supermq-mqtt &
|
||||
|
||||
###
|
||||
# CoAP
|
||||
###
|
||||
SMQ_COAP_ADAPTER_LOG_LEVEL=info SMQ_COAP_ADAPTER_PORT=5683 SMQ_CLIENTS_GRPC_URL=localhost:7000 $BUILD_DIR/supermq-coap &
|
||||
MG_COAP_ADAPTER_LOG_LEVEL=info MG_COAP_ADAPTER_PORT=5683 MG_CLIENTS_GRPC_URL=localhost:7000 $BUILD_DIR/supermq-coap &
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user