Skip to content
Snippets Groups Projects
Commit 84750afb authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Deploy nightly build

parent 110b9de1
No related branches found
No related tags found
1 merge request!10Add gitlab ci into project
......@@ -101,7 +101,34 @@ deploy_knightly:
tags:
- build
script:
- echo $OS_APPLICATION_CREDENTIAL_ID
- source venv/bin/activate
- OLD_INSTANCE_ID=$(openstack server list --name ood-knightly -c ID -f value)
- if [ ! -z $OLD_INSTANCE_ID ]; then openstack server delete $OLD_INSTANCE_ID; fi
- |
cat > user_data.txt << OEOF
#!/bin/bash
cat > /etc/resolv.conf << EOF
search openstack.internal cm.cluster rc.uab.edu ib.cluster drac.cluster eth.cluster ib-hdr.cluster
nameserver 172.20.0.25
EOF
ip route replace default via 10.250.0.3 dev eth0
ip route add 172.20.0.0/16 via 10.250.0.1 dev eth0
mount -a
OEOF
- >
NEW_INSTANCE_ID=$(openstack server create
-c id -f value --image $BUILT_OOD_IMAGE_ID
--network openstack-cheaha-internal
--security-group ood-https-ports
--security-group allow-ssh
--user-data user_data.txt
--flavor m1.medium
ood-knightly)
- |
if [ ! -z $NEW_INSTANCE_ID ]; then
openstack server add floating ip $NEW_INSTANCE_ID $CAMPUS_IP
openstack server add floating ip $NEW_INSTANCE_ID $CHEAHA_IP
fi
only:
- feat-gitlab-ci
......
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