Deploy Azure CycleCloud Workspace for Slurm (CCWS) #124
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Azure CycleCloud Workspace for Slurm (CCWS) | |
| on: | |
| push: | |
| paths: | |
| - ".github/workflows/deploy-ccws.yml" | |
| - ".github/workflows/deploy-ccws-callable.yml" | |
| - "infrastructure_references/azure_cyclecloud_workspace_for_slurm/scripts/deploy-ccws.sh" | |
| workflow_dispatch: | |
| inputs: | |
| location: | |
| description: "Azure region (e.g., westus3, westeurope, westus2)" | |
| required: true | |
| type: string | |
| default: "westus3" | |
| data_filesystem: | |
| description: "Enable Azure Managed Lustre data filesystem" | |
| required: false | |
| default: false | |
| type: boolean | |
| deploy_immediately: | |
| description: "Deploy immediately after generating parameters" | |
| required: false | |
| default: false | |
| type: boolean | |
| with_openondemand: | |
| description: "Enable Open OnDemand web portal" | |
| required: false | |
| default: false | |
| type: boolean | |
| image: | |
| description: "VM image to use for all nodes (Scheduler, Compute, Login) (optional)" | |
| required: false | |
| type: string | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| init: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| location: ${{ steps.params.outputs.location }} | |
| data_filesystem: ${{ steps.params.outputs.data_filesystem }} | |
| deploy_immediately: ${{ steps.params.outputs.deploy_immediately }} | |
| with_openondemand: ${{ steps.params.outputs.with_openondemand }} | |
| slurm_no_start: ${{ steps.params.outputs.slurm_no_start }} | |
| image: ${{ steps.params.outputs.image }} | |
| steps: | |
| - name: Set deployment parameters | |
| id: params | |
| env: | |
| EVENT_NAME: ${{ github.event_name }} | |
| LOCATION_IN: ${{ inputs.location }} | |
| DATA_FILESYSTEM_IN: ${{ inputs.data_filesystem }} | |
| DEPLOY_IMMEDIATELY_IN: ${{ inputs.deploy_immediately }} | |
| WITH_OPENONDEMAND_IN: ${{ inputs.with_openondemand }} | |
| IMAGE_IN: ${{ inputs.image }} | |
| run: | | |
| set -euo pipefail | |
| if [ "${EVENT_NAME}" = "push" ]; then | |
| # Push defaults (different HPC/GPU defaults per your original intent) | |
| { | |
| echo "location=westus3" | |
| echo "data_filesystem=false" | |
| echo "deploy_immediately=false" | |
| echo "with_openondemand=false" | |
| echo "image=" | |
| } >> "$GITHUB_OUTPUT" | |
| else | |
| # Inputs with shell defaults | |
| location="${LOCATION_IN:-westus3}" | |
| data_filesystem="${DATA_FILESYSTEM_IN:-false}" | |
| # Note: GitHub passes booleans as strings; default to "false" | |
| deploy_immediately="${DEPLOY_IMMEDIATELY_IN:-false}" | |
| with_openondemand="${WITH_OPENONDEMAND_IN:-false}" | |
| image="${IMAGE_IN:-}" | |
| { | |
| echo "location=${location}" | |
| echo "data_filesystem=${data_filesystem}" | |
| echo "deploy_immediately=${deploy_immediately}" | |
| echo "with_openondemand=${with_openondemand}" | |
| echo "image=${image}" | |
| } >> "$GITHUB_OUTPUT" | |
| fi | |
| call-deployment: | |
| needs: init | |
| uses: ./.github/workflows/deploy-ccws-callable.yml | |
| with: | |
| location: ${{ needs.init.outputs.location }} | |
| data_filesystem: ${{ needs.init.outputs.data_filesystem == 'true' }} | |
| deploy_immediately: ${{ needs.init.outputs.deploy_immediately == 'true' }} | |
| with_openondemand: ${{ needs.init.outputs.with_openondemand == 'true' }} | |
| image: ${{ needs.init.outputs.image }} | |
| secrets: inherit |