1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-26 13:48:53 +08:00
Sammy Kerata Oina 83ff4e12ea
MF-512 - Change service default ports (#1737)
* Change service Default ports

Updated ports:
- auth http 9000
- auth grpc 7000
- provision http 9001
- things http 9002
- things auth http 9003
- things auth grpc 7001
- twins http 9004
- users http 9005
- bootstrap http 9006
- cassandra-reader http 9007
- cassandra-writer http 9008
- influxdb-reader http 9009
- influxdb-writer http 9010
- lora http 9011
- mongodb reader http 9012
- mongodb writer http 9013
- postgres-reader http 9014
- postgrs-writer http 9015
- smpp-notifier http 9016
- smtp-notifier http 9017
- timescale-reader http 9018
- timescale-writer http 9019

Signed-off-by: SammyOina <sammyoina@gmail.com>

* change default service ports on env and sh

Signed-off-by: SammyOina <sammyoina@gmail.com>

* change things url default port

Signed-off-by: SammyOina <sammyoina@gmail.com>

* change default ports order by importance
- auth http 9000
- auth grpc 7000
- things http 9001
- things auth http 9002
- things auth grpc 7001
- users http 9003
- cassandra-reader http 9004
- cassandra-writer http 9005
- influxdb-reader http 9006
- influxdb-writer http 9007
- mongodb reader http 9008
- mongodb writer http 9009
- postgres-reader http 9010
- postgres-writer http 9011
- timescale-reader http 9012
- timescale-writer http 9013
- bootstrap http 9014
- smpp-notifier http 9015
- smtp-notifier http 9016
- provision http 9017
- lora http 9018
- twins http 9019

Signed-off-by: SammyOina <sammyoina@gmail.com>

* lower port number in auth service

Signed-off-by: SammyOina <sammyoina@gmail.com>

* change things and users port
- things 9000
- things auth 9001
- things auth grpc 7000
- users 9002

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update documentaton to new port numbers

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update test and metrics

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update host on metrics

Signed-off-by: SammyOina <sammyoina@gmail.com>

* resolving conflics

Signed-off-by: SammyOina <sammyoina@gmail.com>

* set http adapter port to :80

Signed-off-by: SammyOina <sammyoina@gmail.com>

* reassign http port on metrics to :80

Signed-off-by: SammyOina <sammyoina@gmail.com>

* reassign http adapter port

Signed-off-by: SammyOina <sammyoina@gmail.com>

* set http adapter port to 8008

Signed-off-by: SammyOina <sammyoina@gmail.com>

* document http adapter default port

Signed-off-by: SammyOina <sammyoina@gmail.com>

---------

Signed-off-by: SammyOina <sammyoina@gmail.com>
2023-03-23 21:55:11 +01:00

76 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# Copyright (c) Mainflux
# SPDX-License-Identifier: Apache-2.0
###
# Runs all Mainflux microservices (must be previously built and installed).
#
# Expects that PostgreSQL and needed messaging DB are alredy running.
# Additionally, MQTT microservice demands that Redis is up and running.
#
###
BUILD_DIR=../build
# Kill all mainflux-* stuff
function cleanup {
pkill mainflux
pkill nats
}
###
# NATS
###
nats-server &
counter=1
until fuser 4222/tcp 1>/dev/null 2>&1;
do
sleep 0.5
((counter++))
if [ ${counter} -gt 10 ]
then
echo "NATS failed to start in 5 sec, exiting"
exit 1
fi
echo "Waiting for NATS server"
done
###
# Users
###
MF_USERS_LOG_LEVEL=info MF_USERS_ADMIN_EMAIL=admin@mainflux.com MF_USERS_ADMIN_PASSWORD=12345678 MF_EMAIL_TEMPLATE=../docker/templates/users.tmpl $BUILD_DIR/mainflux-users &
###
# Things
###
MF_THINGS_LOG_LEVEL=info MF_THINGS_HTTP_PORT=9000 MF_THINGS_AUTH_GRPC_PORT=7000 MF_THINGS_AUTH_HTTP_PORT=9002 $BUILD_DIR/mainflux-things &
###
# HTTP
###
MF_HTTP_ADAPTER_LOG_LEVEL=info MF_HTTP_ADAPTER_PORT=8008 MF_THINGS_AUTH_GRPC_URL=localhost:7000 $BUILD_DIR/mainflux-http &
###
# WS
###
MF_WS_ADAPTER_LOG_LEVEL=info MF_WS_ADAPTER_PORT=8190 MF_THINGS_AUTH_GRPC_URL=localhost:7000 $BUILD_DIR/mainflux-ws &
###
# MQTT
###
MF_MQTT_ADAPTER_LOG_LEVEL=info MF_THINGS_AUTH_GRPC_URL=localhost:7000 $BUILD_DIR/mainflux-mqtt &
###
# CoAP
###
MF_COAP_ADAPTER_LOG_LEVEL=info MF_COAP_ADAPTER_PORT=5683 MF_THINGS_AUTH_GRPC_URL=localhost:7000 $BUILD_DIR/mainflux-coap &
###
# AUTH
###
MF_AUTH_LOG_LEVEL=debug MF_AUTH_HTTP_PORT=9020 MF_AUTH_GRPC_PORT=7001 MF_AUTH_DB_PORT=5432 MF_AUTH_DB_USER=mainflux MF_AUTH_DB_PASS=mainflux MF_AUTH_DB=auth MF_AUTH_SECRET=secret MF_AUTH_LOGIN_TOKEN_DURATION=10h $BUILD_DIR/mainflux-auth &
trap cleanup EXIT
while : ; do sleep 1 ; done