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
Eesaan Atluri
hpc-factory
Compare revisions
main to feat-ood-deploy
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
atlurie/hpc-factory
Select target project
No results found
feat-ood-deploy
Select Git revision
Swap
Target
rc/hpc-factory
Select target project
rc/hpc-factory
louistw/hpc-factory
jpr/hpc-factory
krish94/hpc-factory
atlurie/hpc-factory
dwheel7/hpc-factory
6 results
main
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
ci: add ood deploy pipeline
· 1118e5e5
Bo-Chun Chen
authored
5 months ago
and
Eesaan Atluri
committed
2 months ago
1118e5e5
fix: update variable name
· 6be57912
Bo-Chun Chen
authored
5 months ago
and
Eesaan Atluri
committed
2 months ago
6be57912
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+52
-0
52 additions, 0 deletions
.gitlab-ci.yml
with
52 additions
and
0 deletions
.gitlab-ci.yml
View file @
6be57912
...
@@ -373,3 +373,55 @@ deploy_login_node:
...
@@ -373,3 +373,55 @@ 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
-
|
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
mkdir -p /run/shibboleth
chown shibd:shibd /run/shibboleth
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"
cmd+=" --network $INSTANCE_NETWORK"
cmd+=" --security-group ood-https-ports"
cmd+=" --security-group allow-ssh"
cmd+=" --user-data user_data.txt"
if [ -n "$INSTANCE_PORT" ];then cmd+=" --port $INSTANCE_PORT"; fi
cmd+=" --wait $INSTANCE_NAME"
-
export 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 INSTANCE_ID $INSTANCE_ID"
openstack server add floating ip $INSTANCE_ID $OOD_FLOATING_IP
done
rules
:
-
if
:
$PIPELINE_TARGET == "deploy" && $OOD_IMAGE_ID
when
:
always
This diff is collapsed.
Click to expand it.