Skip to content
Snippets Groups Projects
Commit 54777d59 authored by Eesaan Atluri's avatar Eesaan Atluri
Browse files

Add missing code to create instance and associate FIP

parent 992bc3c4
No related branches found
No related tags found
No related merge requests found
Pipeline #12481 failed with stage
in 53 minutes and 25 seconds
......@@ -302,8 +302,23 @@ deploy_login_node:
rm -rf /tmp/${CI_PROJECT_NAME}
EOF
- |
export cmd="openstack server create"
cmd+=" -c id -f value --image $LOGIN_IMAGE_ID"
cmd+=" --flavor $INSTANCE_FLAVOR"
cmd+=" --network $INSTANCE_NETWORK"
cmd+=" --security-group allow-ssh"
cmd+=" --user-data user_data.txt"
if [ -n "$LOGIN_PORT" ];then cmd+=" --port $LOGIN_PORT"; fi
cmd+=" --wait $LOGIN_INSTANCE_NAME"
- export LOGIN_INSTANCE_ID=$(bash -c "$cmd")
- |
# Associate the floating IP(s) with the SSH Proxy instance
for LOGIN_FLOATING_IP in ${LOGIN_FLOATING_IP_LIST[@]};
do
echo "Associating FLOATING_IP $LOGIN_FLOATING_IP with LOGIN_INSTANCE_ID $LOGIN_INSTANCE_ID"
openstack server add floating ip $LOGIN_INSTANCE_ID $LOGIN_FLOATING_IP
done
rules:
- if: $PIPELINE_TARGET == "deploy"
- if: $PIPELINE_TARGET == "deploy" && $LOGIN_IMAGE_ID
when: always
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment