Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-factory
Manage
Activity
Members
Labels
Plan
Issues
68
Issue boards
Milestones
Wiki
Code
Merge requests
11
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
hpc-factory
Commits
969227df
Commit
969227df
authored
7 months ago
by
Krish Moodbidri
Browse files
Options
Downloads
Patches
Plain Diff
rename variables for consistency in proxy deployment
parent
543c233d
No related branches found
No related tags found
2 merge requests
!117
This MR merges the feat-hpc-factory branch, which was focused on building and deploying proxy images for the COD cluster.
,
!101
Refactor CI/CD pipeline to include workflow rules and retain only deploy jobs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+21
-21
21 additions, 21 deletions
.gitlab-ci.yml
with
21 additions
and
21 deletions
.gitlab-ci.yml
+
21
−
21
View file @
969227df
...
...
@@ -27,14 +27,14 @@ workflow:
-
if
:
$CI_PIPELINE_SOURCE == "web"
-
if
:
$CI_PIPELINE_SOURCE == "schedule"
deploy_
ood
_proxy_node
:
deploy_
http
_proxy_node
:
stage
:
deploy
environment
:
name
:
knightly
tags
:
-
build
script
:
-
openstack image set --accept $PROXY_
OOD_
IMAGE_ID
-
openstack image set --accept $
HTTP_
PROXY_IMAGE_ID
-
FAILED=false
-
|
cat > user_data.txt <<EOF
...
...
@@ -42,8 +42,8 @@ deploy_ood_proxy_node:
echo "$DEV_KEY" >> /root/.ssh/authorized_keys
EOF
-
>
export PROXY_
OOD_
INSTANCE_ID=$(openstack server create
-c id -f value --image $PROXY_
OOD_
IMAGE_ID
export
HTTP_
PROXY_INSTANCE_ID=$(openstack server create
-c id -f value --image $
HTTP_
PROXY_IMAGE_ID
--network $OOD_PROXY_NETWORK
--security-group https-port
--security-group http-port
...
...
@@ -51,13 +51,13 @@ deploy_ood_proxy_node:
--user-data user_data.txt
--flavor $INSTANCE_FLAVOR
--wait
$
OOD
_PROXY_INSTANCE_NAME)
# Create and assign a floating IP
PROXY_
OOD_
FLOATING_IP=$(openstack floating ip create $PKR_VAR_floating_ip_network -f value -c floating_ip_address)
echo "Created FLOATING_IP: $PROXY_
OOD_
FLOATING_IP"
# Associate the floating IP with the
ood p
roxy instance
openstack server add floating ip $PROXY_
OOD_
INSTANCE_ID $PROXY_
OOD_
FLOATING_IP
echo "Associated FLOATING_IP $PROXY_
OOD_
FLOATING_IP with PROXY_
OOD_
INSTANCE_ID $PROXY_
OOD_
INSTANCE_ID"
$
HTTP
_PROXY_INSTANCE_NAME)
# Create and assign a floating IP
to the HTTP Proxy instance
HTTP_
PROXY_FLOATING_IP=$(openstack floating ip create $PKR_VAR_floating_ip_network -f value -c floating_ip_address)
echo "Created FLOATING_IP: $
HTTP_
PROXY_FLOATING_IP"
# Associate the floating IP with the
HTTP P
roxy instance
openstack server add floating ip $
HTTP_
PROXY_INSTANCE_ID $
HTTP_
PROXY_FLOATING_IP
echo "Associated FLOATING_IP $
HTTP_
PROXY_FLOATING_IP with
HTTP_
PROXY_INSTANCE_ID $
HTTP_
PROXY_INSTANCE_ID"
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "schedule"
when
:
always
...
...
@@ -71,7 +71,7 @@ deploy_ssh_proxy_node:
tags
:
-
build
script
:
-
openstack image set --accept $PROXY_
SSH_
IMAGE_ID
-
openstack image set --accept $
SSH_
PROXY_IMAGE_ID
-
FAILED=false
-
|
cat > user_data.txt <<EOF
...
...
@@ -79,22 +79,22 @@ deploy_ssh_proxy_node:
echo "$DEV_KEY" >> /root/.ssh/authorized_keys
EOF
-
>
export PROXY_
SSH_
INSTANCE_ID=$(openstack server create
-c id -f value --image $PROXY_
SSH_
IMAGE_ID
export
SSH_
PROXY_INSTANCE_ID=$(openstack server create
-c id -f value --image $
SSH_
PROXY_IMAGE_ID
--network $OOD_PROXY_NETWORK
--security-group allow-ssh
--user-data user_data.txt
--flavor $INSTANCE_FLAVOR
--wait
$SSH_PROXY_INSTANCE_NAME)
# Create and assign a
proxy ssh
floating IP
PROXY_
SSH_
FLOATING_IP=$(openstack floating ip create $PKR_VAR_floating_ip_network -f value -c floating_ip_address)
echo "Created PROXY_
SSH_
FLOATING_IP: $PROXY_
SSH_
FLOATING_IP"
# Associate the floating IP with the
ssh p
roxy instance
openstack server add floating ip $PROXY_
SSH_
INSTANCE_ID $PROXY_
SSH_
FLOATING_IP
echo "Associated FLOATING_IP $PROXY_
SSH_
FLOATING_IP with PROXY_
SSH_
INSTANCE_ID $PROXY_
SSH_
INSTANCE_ID"
# Create and assign a floating IP
to the SSH Proxy instance
SSH_
PROXY_FLOATING_IP=$(openstack floating ip create $PKR_VAR_floating_ip_network -f value -c floating_ip_address)
echo "Created
SSH_
PROXY_FLOATING_IP: $
SSH_
PROXY_FLOATING_IP"
# Associate the floating IP with the
SSH P
roxy instance
openstack server add floating ip $
SSH_
PROXY_INSTANCE_ID $
SSH_
PROXY_FLOATING_IP
echo "Associated FLOATING_IP $
SSH_
PROXY_FLOATING_IP with
SSH_
PROXY_INSTANCE_ID $
SSH_
PROXY_INSTANCE_ID"
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "schedule"
when
:
always
-
if
:
$CI_PIPELINE_SOURCE == "web"
when
:
always
when
:
always
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment