Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jcfr committed Dec 15, 2024
1 parent 3c177c8 commit 6e38f2d
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
81 changes: 81 additions & 0 deletions .github/workflows/create-instance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,87 @@ jobs:
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Reboot instance
id: reboot_instance
run: |
ssh \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-o LogLevel=ERROR \
exouser@$INSTANCE_IP \
'sudo restart -r now'
sleep 5
function check_instance_ready {
ssh \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-o LogLevel=ERROR \
exouser@$INSTANCE_IP \
'true'
}
set +e
max_attempts=3
instance_ready=false
for attempt in $(seq 1 $max_attempts); do
echo "Checking if instance is ready ($attempt/$max_attempts)"
if check_instance_ready; then
instance_ready=true
echo "Instance '$INSTANCE_NAME' is ready."
break
else
echo "Instance '$INSTANCE_NAME' is not ready. Retrying in 5 seconds..."
sleep 5
fi
done
if ! $instance_ready; then
echo "::error ::Instance '$INSTANCE_NAME' is not ready after $max_attempts attempts to connect."
exit 1
fi
set -e
env:
INSTANCE_IP: ${{ steps.ip_create.outputs.floating_ip_address }}
INSTANCE_NAME: ${{ steps.define.outputs.instance_name }}

- name: comment (failed to create reboot instance)
if: ${{ steps.reboot_instance.outcome == 'failure' && failure() }}
uses: peter-evans/[email protected]
with:
issue-number: ${{ github.event.issue.number }}
body: |
### Instance Creation Results ❌
Failed to reboot instance **${{ steps.define.outputs.instance_name }}**.
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Install Slicer extension dependencies
id: slicer_install_extension_dependencies
run: |
support_install_dir=/opt/instance-config-support
slicer_install_dir=/media/volume/MyData
ssh \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-o LogLevel=ERROR \
exouser@$INSTANCE_IP \
'DISPLAY=:1.0 $slicer_install_dir/Slicer/Slicer --disable-modules --python-script $support_install_dir/dist/slicer-install-extension-dependencies.py'
env:
INSTANCE_IP: ${{ steps.ip_create.outputs.floating_ip_address }}

- name: comment (failed to install Slicer extension dependencies)
if:
${{ steps.slicer_install_extension_dependencies.outcome == 'failure'
&& failure() }}
uses: peter-evans/[email protected]
with:
issue-number: ${{ github.event.issue.number }}
body: |
### Instance Creation Results ❌
Failed to install Slicer extension dependencies on instance **${{ steps.define.outputs.instance_name }}**.
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Update Request Status Label
id: update-request-status-label
uses: ./.github/actions/update-request-status-label
Expand Down
2 changes: 1 addition & 1 deletion cloud-config
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runcmd:
# --checkout "{instance-config-mgt-repo-checkout}"
# -e "{ansible-extra-vars}"
rm -rf /opt/instance-config-mgt
exosphere_sha="e9d099b0caa480533b6654db81e84c49db302b7b" # morpho-cloud-portal-2024.07.17-78a7e2d93
exosphere_sha="7f320d432e77a041c4e3033533fd42e5e4d1c2ba" # morpho-cloud-portal-2024.07.17-78a7e2d93
ansible-pull \
--url "https://github.com/MorphoCloud/exosphere.git" \
--checkout "$exosphere_sha" \
Expand Down

0 comments on commit 6e38f2d

Please sign in to comment.