Node balancer config file deployment

pull/605/head
kompotkot 2022-05-10 19:00:49 +00:00
rodzic d6db6878d5
commit 77c7abbda7
4 zmienionych plików z 18 dodań i 2 usunięć

Wyświetl plik

@ -24,6 +24,8 @@ PARAMETERS_ENV_PATH="${SECRETS_DIR}/app.env"
AWS_SSM_PARAMETER_PATH="${AWS_SSM_PARAMETER_PATH:-/moonstream/prod}"
SCRIPT_DIR="$(realpath $(dirname $0))"
PARAMETERS_SCRIPT="${SCRIPT_DIR}/parameters.py"
NODE_BALANCER_CONFIG_PATH="${NODE_BALANCER_CONFIG_PATH:-/home/ubuntu/.nodebalancer/config.txt}"
NODE_BALANCER_CONFIG_SOURCE_FILE="node-balancer-config.txt"
# Service file
NODE_BALANCER_SERVICE_FILE="node-balancer.service"
@ -59,6 +61,11 @@ cd "${APP_NODES_DIR}/node_balancer"
HOME=/root /usr/local/go/bin/go build -o "${APP_NODES_DIR}/node_balancer/nodebalancer" "${APP_NODES_DIR}/node_balancer/main.go"
cd "${EXEC_DIR}"
echo
echo
echo -e "${PREFIX_INFO} Update nodebalancer configuration file"
cp "${SCRIPT_DIR}/${NODE_BALANCER_CONFIG_SOURCE_FILE}" "${NODE_BALANCER_CONFIG_PATH}"
echo
echo
echo -e "${PREFIX_INFO} Replacing existing load balancer for nodes service definition with ${NODE_BALANCER_SERVICE_FILE}"

Wyświetl plik

@ -0,0 +1,5 @@
ethereum,a.ethereum.moonstream.internal,8545
ethereum,b.ethereum.moonstream.internal,8545
polygon,a.polygon.moonstream.internal,8545
polygon,b.polygon.moonstream.internal,8545
xdai,a.xdai.moonstream.internal,8545

Wyświetl plik

@ -11,7 +11,11 @@ WorkingDirectory=/home/ubuntu/moonstream/nodes/node_balancer
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
Restart=on-failure
RestartSec=15s
ExecStart=/home/ubuntu/moonstream/nodes/node_balancer/nodebalancer -host "${AWS_LOCAL_IPV4}" -port 8544 -healthcheck
ExecStart=/home/ubuntu/moonstream/nodes/node_balancer/nodebalancer \
-host "${AWS_LOCAL_IPV4}" \
-port 8544 \
-healthcheck \
-config /home/ubuntu/.nodebalancer/config.txt
SyslogIdentifier=node-balancer
[Install]

Wyświetl plik

@ -1,3 +1,3 @@
package configs
var NB_VERSION = "0.0.1"
var NB_VERSION = "0.0.2"