Skip to content

Commit

Permalink
Merge branch 'main' into testml102
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdjscott committed Nov 14, 2023
2 parents 245c9ca + 7aeafa7 commit 7c532fa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/redeploy-ml102.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
WILD_CERT_KEY_BASE64: "${{ secrets.WILD_CERT_KEY_BASE64 }}"

- name: Redeploy ML102
run: ansible-playbook redeploy-ml102.yml
run: ansible-playbook -i host.ini redeploy-ml102.yml -u "${TF_VAR_vm_user}" --key-file '${TF_VAR_key_file}' -e terraform_workspace="${GITHUB_BASE_REF:-$GITHUB_REF_NAME}"
env:
TF_VAR_key_file: "${{ runner.temp }}/my_ci_private_key"
ANSIBLE_HOST_KEY_CHECKING: "False"
Expand Down
27 changes: 20 additions & 7 deletions redeploy-ml102.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
# workflow to redploy ML102 on the training environment
#
# 1. Get the list of all training/trainer home directories
# 2. Delete any "ml102_workshop" directories in the homes
# 3. Delete the ML102 apptainer image
# 2. Remove any "ml102_workshop" directories in the homes
# 3. Remove the ML102 apptainer image
# 4. Pull the apptainer image
#
# Following this, any user that starts a new ML102 session
# will get the version from the newly downloaded image
#
# Note: this doesn't redeploy the OOD ML102 app
---
- name: Get list of home directories on ML102 node
- name: Clean ML102 directories in homes
become: yes
hosts: webnode
hosts: servicesnode
tasks:
- name: List home directories
find:
paths: /home/shared
paths: /srv/homes
file_type: directory
recurse: no
register: homes_find

- debug:
var: item.path
- name: Remove any ML102 directories in homes
ansible.builtin.file:
path: "{{ item.path }}/ml102_workshop"
state: absent
with_items: "{{ homes_find.files }}"

- name: Redeploy ML102 image
become: yes
hosts: webnode
pre_tasks:
- name: Remove the ML102 apptainer image
ansible.builtin.file:
path: /opt/ml102_workshop/ML102.sif
state: absent
roles:
- ml102_workshop
3 changes: 1 addition & 2 deletions roles/nfs_homes_server/templates/exports.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
# TODO: variable for hostname
{{ nfs_remote_homes }} 10.1.0.0/24(rw,sync,no_subtree_check)
{{ nfs_remote_homes }} 10.1.0.0/24(rw,sync,no_subtree_check,no_root_squash)

0 comments on commit 7c532fa

Please sign in to comment.