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
0
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
Bo-Chun Chen
hpc-factory
Commits
5ff24ed6
Commit
5ff24ed6
authored
6 months ago
by
Eesaan Atluri
Committed by
Bo-Chun Chen
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
feat: Rearrange code for readability
parent
be42fff1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+62
-61
62 additions, 61 deletions
.gitlab-ci.yml
with
62 additions
and
61 deletions
.gitlab-ci.yml
+
62
−
61
View file @
5ff24ed6
...
...
@@ -110,6 +110,32 @@ workflow:
reports
:
dotenv
:
image.env
build_http_proxy_image
:
stage
:
build
environment
:
name
:
$ENV
tags
:
-
build
variables
:
PROXY_ENABLE_VAR
:
"
enable_http_proxy"
<<
:
*build_proxy_image_template
rules
:
-
if
:
$PIPELINE_TARGET == "build" && $BUILD_TARGET == "http-proxy"
when
:
always
build_ssh_proxy_image
:
stage
:
build
environment
:
name
:
$ENV
tags
:
-
build
variables
:
PROXY_ENABLE_VAR
:
"
enable_ssh_proxy"
<<
:
*build_proxy_image_template
rules
:
-
if
:
$PIPELINE_TARGET == "build" && $BUILD_TARGET == "ssh-proxy"
when
:
always
.build_compute_image_template
:
&build_compute_image_template
script
:
-
*update_ansible_repo
...
...
@@ -149,67 +175,6 @@ build_compute_image:
-
if
:
$PIPELINE_TARGET == "build" && $BUILD_TARGET == "compute"
when
:
always
build_http_proxy_image
:
stage
:
build
environment
:
name
:
$ENV
tags
:
-
build
variables
:
PROXY_ENABLE_VAR
:
"
enable_http_proxy"
<<
:
*build_proxy_image_template
rules
:
-
if
:
$PIPELINE_TARGET == "build" && $BUILD_TARGET == "http-proxy"
when
:
always
build_ssh_proxy_image
:
stage
:
build
environment
:
name
:
$ENV
tags
:
-
build
variables
:
PROXY_ENABLE_VAR
:
"
enable_ssh_proxy"
<<
:
*build_proxy_image_template
rules
:
-
if
:
$PIPELINE_TARGET == "build" && $BUILD_TARGET == "ssh-proxy"
when
:
always
deploy_compute_node
:
stage
:
deploy
environment
:
name
:
$ENV
tags
:
-
build
script
:
-
openstack image set --accept $compute-${BUILD_DATE} ||
true
-
FAILED=false
-
|
cat > user_data.txt <<EOF
#!/bin/bash
cat >> /etc/NetworkManager/conf.d/90-dns-none.conf<<EEOF
[main]
dns=none
EEOF
systemctl reload NetworkManager
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}
cat >> ansible/hosts<<EEOF
[$ENV]
127.0.0.1
EEOF
ansible-playbook -c local -i ansible/hosts --extra-vars="$EXTRA_VARS" ansible/cluster.yml | tee -a /tmp/ansible.log
rm -rf /tmp/${CI_PROJECT_NAME}
EOF
-
|
rules
:
-
if
:
$PIPELINE_TARGET == "deploy"
when
:
always
deploy_http_proxy_node
:
stage
:
deploy
environment
:
...
...
@@ -310,3 +275,39 @@ deploy_ssh_proxy_node:
rules
:
-
if
:
$PIPELINE_TARGET == "deploy" && $SSH_PROXY_IMAGE_ID
when
:
always
deploy_compute_node
:
stage
:
deploy
environment
:
name
:
$ENV
tags
:
-
build
script
:
-
openstack image set --accept $compute-${BUILD_DATE} ||
true
-
FAILED=false
-
|
cat > user_data.txt <<EOF
#!/bin/bash
cat >> /etc/NetworkManager/conf.d/90-dns-none.conf<<EEOF
[main]
dns=none
EEOF
systemctl reload NetworkManager
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}
cat >> ansible/hosts<<EEOF
[$ENV]
127.0.0.1
EEOF
ansible-playbook -c local -i ansible/hosts --extra-vars="$EXTRA_VARS" ansible/cluster.yml | tee -a /tmp/ansible.log
rm -rf /tmp/${CI_PROJECT_NAME}
EOF
-
|
rules
:
-
if
:
$PIPELINE_TARGET == "deploy"
when
:
always
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