Skip to content
Snippets Groups Projects
Commit c951eb62 authored by Krish Moodbidri's avatar Krish Moodbidri Committed by Bo-Chun Chen
Browse files

compute node deploy

parent 47b6c1b4
No related branches found
No related tags found
2 merge requests!158Feat login build and deploy,!117This MR merges the feat-hpc-factory branch, which was focused on building and deploying proxy images for the COD cluster.
...@@ -160,6 +160,41 @@ build_ssh_proxy_image: ...@@ -160,6 +160,41 @@ build_ssh_proxy_image:
- if: $PIPELINE_TARGET == "build" && $BUILD_TARGET == "ssh-proxy" - if: $PIPELINE_TARGET == "build" && $BUILD_TARGET == "ssh-proxy"
when: always 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: deploy_http_proxy_node:
stage: deploy stage: deploy
environment: environment:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment