From 6375a0475c7a82f707fdb0e880e9446c245ceef8 Mon Sep 17 00:00:00 2001 From: Bo-Chun Louis Chen <louistw@uab.edu> Date: Mon, 3 Mar 2025 14:11:54 -0600 Subject: [PATCH] feat: add node exporter security group when enable Using flag ENBLE_NODE_EXPORTER --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e2956f7..fd43b5b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -209,6 +209,9 @@ deploy_http_proxy_node: cmd+=" --network $PROXY_NETWORK" cmd+=" --security-group webserver_sec_group" cmd+=" --security-group allow-ssh" + if [ ${ENABLE_NODE_EXPORTER:-false} = true ]; then + cmd+=" --security-group node-exporter" + fi cmd+=" --user-data user_data.txt" if [ -n "$HTTP_PROXY_PORT" ];then cmd+=" --port $HTTP_PROXY_PORT"; fi cmd+=" --wait $HTTP_PROXY_INSTANCE_NAME" @@ -259,6 +262,9 @@ deploy_ssh_proxy_node: cmd+=" --flavor $INSTANCE_FLAVOR" cmd+=" --network $PROXY_NETWORK" cmd+=" --security-group allow-ssh" + if [ ${ENABLE_NODE_EXPORTER:-false} = true ]; then + cmd+=" --security-group node-exporter" + fi cmd+=" --user-data user_data.txt" if [ -n "$SSH_PROXY_PORT" ];then cmd+=" --port $SSH_PROXY_PORT"; fi cmd+=" --wait $SSH_PROXY_INSTANCE_NAME" @@ -310,6 +316,9 @@ deploy_login_node: cmd+=" --flavor $INSTANCE_FLAVOR" cmd+=" --network $INSTANCE_NETWORK" cmd+=" --security-group allow-ssh" + if [ ${ENABLE_NODE_EXPORTER:-false} = true ]; then + cmd+=" --security-group node-exporter" + fi cmd+=" --user-data user_data.txt" if [ -n "$LOGIN_PORT" ];then cmd+=" --port $LOGIN_PORT"; fi cmd+=" --wait $LOGIN_INSTANCE_NAME" -- GitLab