From d58a3531ed59dd56bd49f452a73a092149feceb3 Mon Sep 17 00:00:00 2001 From: Eesaan Atluri <atlurie@uab.edu> Date: Thu, 31 Oct 2024 15:13:16 -0400 Subject: [PATCH] feat: Replace default gateway to allow login The instance creation with internal port attached was causing issues with login because the default gateway was set to internal network gateway. This will only allow login via headnode but not the host. This commit will fix that issue by giving a way to define the gw ip for default route. --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d0c81b..98fb237 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -149,6 +149,7 @@ deploy_http_proxy_node: cat > user_data.txt <<EOF #!/bin/bash echo "$DEV_KEY" >> /root/.ssh/authorized_keys + ip route replace default via ${DEFAULT_GATEWAY_IP} dev eth0 git clone ${CI_REPOSITORY_URL} /tmp/${CI_PROJECT_NAME} cd /tmp/${CI_PROJECT_NAME} git checkout ${CI_COMMIT_REF_NAME} @@ -197,6 +198,7 @@ deploy_ssh_proxy_node: cat > user_data.txt <<EOF #!/bin/bash echo "$DEV_KEY" >> /root/.ssh/authorized_keys + ip route replace default via ${DEFAULT_GATEWAY_IP} dev eth0 git clone ${CI_REPOSITORY_URL} /tmp/${CI_PROJECT_NAME} cd /tmp/${CI_PROJECT_NAME} git checkout ${CI_COMMIT_REF_NAME} -- GitLab