Skip to content
Snippets Groups Projects
Commit 32ca9660 authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

Move start_ood_proxy job to deploy stage

- Relocate start_ood_proxy job from build to deploy stage 
- Ensure consistency with existing environment and variable configurations
parent 405ee2a1
No related branches found
No related tags found
1 merge request!91WIP: Create pipeline job for deploy ood proxy node
Pipeline #11393 failed
...@@ -196,42 +196,6 @@ build_gpu_image: ...@@ -196,42 +196,6 @@ build_gpu_image:
when: never when: never
- when: always - when: always
# New job for manual OOD proxy node deployment
start_ood_proxy:
stage: deploy
environment:
name: knightly
tags:
- build
variables:
PROXY_INSTANCE_NAME: "ood-proxy-${CI_COMMIT_REF_SLUG}"
PROXY_FLAVOR: "m1.small"
script:
- *update_ansible_repo
- *get_ansible_files
- |
openstack server create \
--image $BUILT_OOD_IMAGE_ID \
--flavor $PROXY_FLAVOR \
--network $OOD_INSTANCE_NETWORK \
--security-group ood-https-ports \
--security-group allow-ssh \
--wait \
$PROXY_INSTANCE_NAME
- export PROXY_IP=$(openstack server show $PROXY_INSTANCE_NAME -f value -c addresses | cut -d'=' -f2)
- echo "OOD Proxy started with IP: $PROXY_IP"
- |
ansible-playbook -i "$PROXY_IP," \
-u centos \
--private-key $SSH_PRIV_KEY \
-e "ood_portal_generator_ssl_cert=/etc/pki/tls/certs/ood.crt" \
-e "ood_portal_generator_ssl_key=/etc/pki/tls/private/ood.key" \
CRI_XCBC/ood.yml
when: manual
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"
build_ood_image: build_ood_image:
stage: build stage: build
tags: tags:
...@@ -437,6 +401,40 @@ stop_review: ...@@ -437,6 +401,40 @@ stop_review:
- if: $CI_MERGE_REQUEST_ID - if: $CI_MERGE_REQUEST_ID
when: manual when: manual
start_ood_proxy:
stage: deploy
environment:
name: knightly
tags:
- build
variables:
PROXY_INSTANCE_NAME: "ood-proxy-${CI_COMMIT_REF_SLUG}"
PROXY_FLAVOR: "m1.small"
script:
- *update_ansible_repo
- *get_ansible_files
- |
openstack server create \
--image $BUILT_OOD_IMAGE_ID \
--flavor $PROXY_FLAVOR \
--network $OOD_INSTANCE_NETWORK \
--security-group ood-https-ports \
--security-group allow-ssh \
--wait \
$PROXY_INSTANCE_NAME
- export PROXY_IP=$(openstack server show $PROXY_INSTANCE_NAME -f value -c addresses | cut -d'=' -f2)
- echo "OOD Proxy started with IP: $PROXY_IP"
- |
ansible-playbook -i "$PROXY_IP," \
-u centos \
--private-key $SSH_PRIV_KEY \
-e "ood_portal_generator_ssl_cert=/etc/pki/tls/certs/ood.crt" \
-e "ood_portal_generator_ssl_key=/etc/pki/tls/private/ood.key" \
CRI_XCBC/ood.yml
when: manual
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"
deploy_knightly: deploy_knightly:
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