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
10
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
!193
Feat deploy ood
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feat deploy ood
atlurie/hpc-factory:feat-deploy-ood
into
main
Overview
0
Commits
1
Pipelines
7
Changes
1
Merged
Eesaan Atluri
requested to merge
atlurie/hpc-factory:feat-deploy-ood
into
main
1 month ago
Overview
0
Commits
1
Pipelines
7
Changes
1
Expand
Closes
#192 (closed)
Edited
1 month ago
by
Bo-Chun Chen
👍
0
👎
0
Merge request reports
Compare
main
version 7
7d7acfce
1 month ago
version 6
bca052ff
1 month ago
version 5
5cae7b67
1 month ago
version 4
e9c409b5
1 month ago
version 3
b4346765
1 month ago
version 2
0fc85cc4
1 month ago
version 1
1e6e487f
1 month ago
main (base)
and
latest version
latest version
7d7acfce
1 commit,
1 month ago
version 7
7d7acfce
2 commits,
1 month ago
version 6
bca052ff
1 commit,
1 month ago
version 5
5cae7b67
8 commits,
1 month ago
version 4
e9c409b5
7 commits,
1 month ago
version 3
b4346765
7 commits,
1 month ago
version 2
0fc85cc4
7 commits,
1 month ago
version 1
1e6e487f
6 commits,
1 month ago
1 file
+
53
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
53
−
0
Options
@@ -373,3 +373,56 @@ deploy_login_node:
@@ -373,3 +373,56 @@ deploy_login_node:
-
if
:
$PIPELINE_TARGET == "deploy" && $LOGIN_IMAGE_ID
-
if
:
$PIPELINE_TARGET == "deploy" && $LOGIN_IMAGE_ID
when
:
always
when
:
always
deploy_ood_node
:
stage
:
deploy
environment
:
name
:
$ENV
tags
:
-
build
script
:
-
openstack image set --accept $OOD_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
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
s3cmd get --force -r --access_key=$AWS_ACCESS_KEY_ID --secret_key=$AWS_SECRET_ACCESS_KEY --host=$AWS_HOST --host-bucket=$AWS_HOST s3://cheaha-cloud-ansible-files/ /tmp/${CI_PROJECT_NAME}/ansible/files/
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
-
|
export cmd="openstack server create"
cmd+=" -c id -f value --image $OOD_IMAGE_ID"
cmd+=" --flavor $INSTANCE_FLAVOR"
for security_group in ${SECURITY_GROUP_LIST[@]};
do
cmd+=" --security-group $security_group"
done
cmd+=" --user-data user_data.txt"
if [ -n "$INSTANCE_NETWORK" ];then cmd+=" --network $INSTANCE_NETWORK"; fi
if [ -n "$OOD_PORT" ];then cmd+=" --port $OOD_PORT"; fi
cmd+=" --wait $OOD_INSTANCE_NAME"
-
export OOD_INSTANCE_ID=$(bash -c "$cmd")
-
|
# Associate the floating IP(s) with the SSH Proxy instance
for OOD_FLOATING_IP in ${OOD_FLOATING_IP_LIST[@]};
do
echo "Associating FLOATING_IP $OOD_FLOATING_IP with OOD_INSTANCE_ID $OOD_INSTANCE_ID"
openstack server add floating ip $OOD_INSTANCE_ID $OOD_FLOATING_IP
done
rules
:
-
if
:
$PIPELINE_TARGET == "deploy" && $OOD_IMAGE_ID
when
:
always
Loading