Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-factory
Manage
Activity
Members
Labels
Plan
Issues
74
Issue boards
Milestones
Wiki
Code
Merge requests
14
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
Merge requests
!198
Added OpenStack VM deployment job
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Added OpenStack VM deployment job
krish94/hpc-factory:feat-deploy-user-defined-instance
into
main
Overview
0
Commits
1
Pipelines
1
Changes
1
Open
Krish Moodbidri
requested to merge
krish94/hpc-factory:feat-deploy-user-defined-instance
into
main
1 month ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Add
deploy_user_defined_vm
job for configurable VM provisioning
Implement dynamic OpenStack CLI command construction supporting:
Image selection by name/UUID via $VM_IMAGE
Flavor specification with $VM_FLAVOR
Security group array input ($VM_SECURITY_GROUPS)
Network/port options (
VM_NETWORK/
VM_PORT)
Floating IP association ($VM_FLOATING_IPS)
Require core variables: VM_IMAGE, VM_FLAVOR, VM_SECURITY_GROUPS, VM_INSTANCE_NAME
Add pipeline rule trigger via $DEPLOY_VM == "true"
👍
0
👎
0
Merge request reports
Compare
main
main (HEAD)
and
latest version
latest version
3d4d83b6
1 commit,
1 month ago
1 file
+
34
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
34
−
0
Options
@@ -426,3 +426,37 @@ deploy_ood_node:
@@ -426,3 +426,37 @@ deploy_ood_node:
rules
:
rules
:
-
if
:
$PIPELINE_TARGET == "deploy" && $OOD_IMAGE_ID
-
if
:
$PIPELINE_TARGET == "deploy" && $OOD_IMAGE_ID
when
:
always
when
:
always
deploy_user_defined_vm
:
stage
:
deploy
environment
:
name
:
$ENV
tags
:
-
build
script
:
-
|
export cmd="openstack server create"
cmd+=" -c id -f value --image $VM_IMAGE"
cmd+=" --flavor $VM_FLAVOR"
for security_group in ${VM_SECURITY_GROUPS[@]};
do
cmd+=" --security-group $security_group"
done
if [ -n "$VM_NETWORK" ]; then
cmd+=" --network $VM_NETWORK"
fi
if [ -n "$VM_PORT" ]; then
cmd+=" --port $VM_PORT"
fi
cmd+=" --wait $VM_INSTANCE_NAME"
-
export VM_INSTANCE_ID=$(bash -c "$cmd")
-
|
for FLOATING_IP in ${VM_FLOATING_IPS[@]};
do
openstack server add floating ip $VM_INSTANCE_ID $FLOATING_IP
echo "Associated IP: $FLOATING_IP"
done
rules
:
-
if
:
$DEPLOY_VM == "true"
when
:
always
Loading