Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-factory
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
2
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
Krish Moodbidri
hpc-factory
Commits
8e5faecb
Commit
8e5faecb
authored
6 months ago
by
Krish Moodbidri
Browse files
Options
Downloads
Patches
Plain Diff
initial framework for compute deploy
parent
67a2fa9a
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
Feat add compute
Pipeline
#12444
failed with stage
Stage: deploy
in 6 minutes and 4 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+44
-3
44 additions, 3 deletions
.gitlab-ci.yml
with
44 additions
and
3 deletions
.gitlab-ci.yml
+
44
−
3
View file @
8e5faecb
...
@@ -178,7 +178,31 @@ deploy_compute_node:
...
@@ -178,7 +178,31 @@ deploy_compute_node:
tags
:
tags
:
-
build
-
build
script
:
script
:
-
openstack image set --accept $compute-${BUILD_DATE} ||
true
-
openstack image set --accept $BUILT_COMPUTE_IMAGE_ID ||
true
-
FAILED=false
-
|
cat > user_data.txt <<EOF
#!/bin/bash
cat >> /etc/NetworkManager/conf.d/90-dns-none.conf<<EEOF
[main]
dns=none
EEOF
echo "$DEV_KEY" >> /root/.ssh/authorized_keys
EOF
-
|
rules
:
-
if
:
$PIPELINE_TARGET == "deploy"
when
:
always
deploy_compute_node
:
stage
:
deploy
environment
:
name
:
$ENV
tags
:
-
build
script
:
-
openstack image set --accept $HTTP_PROXY_IMAGE_ID ||
true
-
FAILED=false
-
FAILED=false
-
|
-
|
cat > user_data.txt <<EOF
cat > user_data.txt <<EOF
...
@@ -201,11 +225,28 @@ deploy_compute_node:
...
@@ -201,11 +225,28 @@ deploy_compute_node:
rm -rf /tmp/${CI_PROJECT_NAME}
rm -rf /tmp/${CI_PROJECT_NAME}
EOF
EOF
-
|
-
|
export cmd="openstack server create"
cmd+=" -c id -f value --image $HTTP_PROXY_IMAGE_ID"
cmd+=" --flavor $INSTANCE_FLAVOR"
cmd+=" --network $PROXY_NETWORK"
cmd+=" --security-group webserver_sec_group"
cmd+=" --security-group allow-ssh"
cmd+=" --user-data user_data.txt"
if [ -n "$HTTP_PROXY_PORT" ];then cmd+=" --port $HTTP_PROXY_PORT"; fi
cmd+=" --wait $HTTP_PROXY_INSTANCE_NAME"
-
export HTTP_PROXY_INSTANCE_ID=$(bash -c "$cmd")
-
|
# Associate the floating IP(s) with the HTTP Proxy instance
for HTTP_PROXY_FLOATING_IP in ${HTTP_PROXY_FLOATING_IP_LIST[@]};
do
echo "Associating FLOATING_IP $HTTP_PROXY_FLOATING_IP with HTTP_PROXY_INSTANCE_ID $HTTP_PROXY_INSTANCE_ID"
openstack server add floating ip $HTTP_PROXY_INSTANCE_ID $HTTP_PROXY_FLOATING_IP
done
rules
:
rules
:
-
if
:
$PIPELINE_TARGET == "deploy"
-
if
:
$PIPELINE_TARGET == "deploy"
&& $HTTP_PROXY_IMAGE_ID
when
:
always
when
:
always
deploy_http_proxy_node
:
deploy_http_proxy_node
:
stage
:
deploy
stage
:
deploy
environment
:
environment
:
...
...
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