Skip to content

Commit 6e38f2d

Browse files
committed
List of MorphoCloudWorkflow changes: ``` $ git shortlog 2dbdd12..d1e7d01 --no-merges Jean-Christophe Fillion-Robin (2): fix(cloud-config): Update to MorphoCloud/exosphere@7f320d432 fix(create-instance): Ensure expected torch version is installed ``` See MorphoCloud/MorphoCloudWorkflow@2dbdd12...d1e7d01
1 parent 3c177c8 commit 6e38f2d

File tree

2 files changed

+82
-1
lines changed

2 files changed

+82
-1
lines changed

.github/workflows/create-instance.yml

+81
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,87 @@ jobs:
515515
516516
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
517517
518+
- name: Reboot instance
519+
id: reboot_instance
520+
run: |
521+
ssh \
522+
-o StrictHostKeyChecking=no \
523+
-o UserKnownHostsFile=/dev/null \
524+
-o LogLevel=ERROR \
525+
exouser@$INSTANCE_IP \
526+
'sudo restart -r now'
527+
sleep 5
528+
function check_instance_ready {
529+
ssh \
530+
-o StrictHostKeyChecking=no \
531+
-o UserKnownHostsFile=/dev/null \
532+
-o LogLevel=ERROR \
533+
exouser@$INSTANCE_IP \
534+
'true'
535+
}
536+
set +e
537+
max_attempts=3
538+
instance_ready=false
539+
for attempt in $(seq 1 $max_attempts); do
540+
echo "Checking if instance is ready ($attempt/$max_attempts)"
541+
if check_instance_ready; then
542+
instance_ready=true
543+
echo "Instance '$INSTANCE_NAME' is ready."
544+
break
545+
else
546+
echo "Instance '$INSTANCE_NAME' is not ready. Retrying in 5 seconds..."
547+
sleep 5
548+
fi
549+
done
550+
if ! $instance_ready; then
551+
echo "::error ::Instance '$INSTANCE_NAME' is not ready after $max_attempts attempts to connect."
552+
exit 1
553+
fi
554+
set -e
555+
env:
556+
INSTANCE_IP: ${{ steps.ip_create.outputs.floating_ip_address }}
557+
INSTANCE_NAME: ${{ steps.define.outputs.instance_name }}
558+
559+
- name: comment (failed to create reboot instance)
560+
if: ${{ steps.reboot_instance.outcome == 'failure' && failure() }}
561+
uses: peter-evans/[email protected]
562+
with:
563+
issue-number: ${{ github.event.issue.number }}
564+
body: |
565+
### Instance Creation Results ❌
566+
567+
Failed to reboot instance **${{ steps.define.outputs.instance_name }}**.
568+
569+
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
570+
571+
- name: Install Slicer extension dependencies
572+
id: slicer_install_extension_dependencies
573+
run: |
574+
support_install_dir=/opt/instance-config-support
575+
slicer_install_dir=/media/volume/MyData
576+
ssh \
577+
-o StrictHostKeyChecking=no \
578+
-o UserKnownHostsFile=/dev/null \
579+
-o LogLevel=ERROR \
580+
exouser@$INSTANCE_IP \
581+
'DISPLAY=:1.0 $slicer_install_dir/Slicer/Slicer --disable-modules --python-script $support_install_dir/dist/slicer-install-extension-dependencies.py'
582+
env:
583+
INSTANCE_IP: ${{ steps.ip_create.outputs.floating_ip_address }}
584+
585+
- name: comment (failed to install Slicer extension dependencies)
586+
if:
587+
${{ steps.slicer_install_extension_dependencies.outcome == 'failure'
588+
&& failure() }}
589+
uses: peter-evans/[email protected]
590+
with:
591+
issue-number: ${{ github.event.issue.number }}
592+
body: |
593+
### Instance Creation Results ❌
594+
595+
Failed to install Slicer extension dependencies on instance **${{ steps.define.outputs.instance_name }}**.
596+
597+
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
598+
518599
- name: Update Request Status Label
519600
id: update-request-status-label
520601
uses: ./.github/actions/update-request-status-label

cloud-config

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ runcmd:
3636
# --checkout "{instance-config-mgt-repo-checkout}"
3737
# -e "{ansible-extra-vars}"
3838
rm -rf /opt/instance-config-mgt
39-
exosphere_sha="e9d099b0caa480533b6654db81e84c49db302b7b" # morpho-cloud-portal-2024.07.17-78a7e2d93
39+
exosphere_sha="7f320d432e77a041c4e3033533fd42e5e4d1c2ba" # morpho-cloud-portal-2024.07.17-78a7e2d93
4040
ansible-pull \
4141
--url "https://github.com/MorphoCloud/exosphere.git" \
4242
--checkout "$exosphere_sha" \

0 commit comments

Comments
 (0)