Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/deploy-orchestrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
required: true
type: string
azure_location:
description: 'Azure Location For Deployment'
description: 'Azure Region (Non-AI Services)'
required: false
default: 'australiaeast'
type: string
Expand All @@ -18,22 +18,27 @@ on:
default: ''
type: string
waf_enabled:
description: 'Enable WAF'
description: 'Deploy WAF'
required: false
default: false
type: boolean
enable_scalability:
description: 'Enable Scalability features for WAF deployments (opt-in, defaults to false)'
required: false
default: false
type: boolean
EXP:
description: 'Enable EXP'
description: 'Deploy EXP'
required: false
default: false
type: boolean
build_docker_image:
description: 'Build And Push Docker Image (Optional)'
description: 'Build & Use Custom Images (Optional)'
required: false
default: false
type: boolean
cleanup_resources:
description: 'Cleanup Deployed Resources'
description: 'Auto Delete RG'
required: false
default: false
type: boolean
Expand All @@ -43,17 +48,17 @@ on:
default: 'GoldenPath-Testing'
type: string
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
description: 'Log Analytics Workspace ID (Optional)'
description: 'Existing Log Analytics Workspace Resource ID (Optional)'
required: false
default: ''
type: string
AZURE_EXISTING_AIPROJECT_RESOURCE_ID:
description: 'AI Project Resource ID (Optional)'
description: 'Existing AI Project Resource ID (Optional)'
required: false
default: ''
type: string
existing_webapp_url:
description: 'Existing Container WebApp URL (Skips Deployment)'
description: 'Run Tests Against Existing RG (Provide Web App URL)'
required: false
default: ''
type: string
Expand Down Expand Up @@ -83,6 +88,7 @@ jobs:
azure_location: ${{ inputs.azure_location }}
resource_group_name: ${{ inputs.resource_group_name }}
waf_enabled: ${{ inputs.waf_enabled }}
enable_scalability: ${{ inputs.enable_scalability }}
EXP: ${{ inputs.EXP }}
build_docker_image: ${{ inputs.build_docker_image }}
existing_webapp_url: ${{ inputs.existing_webapp_url }}
Expand Down
38 changes: 29 additions & 9 deletions .github/workflows/deploy-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- 'Local'
default: 'codespace'
azure_location:
description: 'Azure Location For Deployment'
description: 'Azure Region (Non-AI Services)'
required: false
default: 'australiaeast'
type: choice
Expand All @@ -43,24 +43,31 @@ on:
default: ''
type: string

build_docker_image:
description: 'Build & Use Custom Images (Optional)'
required: false
default: false
type: boolean

waf_enabled:
description: 'Enable WAF'
description: 'Deploy WAF'
required: false
default: false
type: boolean
EXP:
description: 'Enable EXP'
description: 'Deploy EXP'
required: false
default: false
type: boolean
build_docker_image:
description: 'Build & Push Docker Image (Optional)'

enable_scalability:
description: 'Enable Scalability (WAF only)'
required: false
default: false
type: boolean

cleanup_resources:
description: 'Cleanup Deployed Resources'
description: 'Auto Delete RG'
required: false
default: false
type: boolean
Expand All @@ -76,17 +83,17 @@ on:
- 'None'

AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
description: 'Log Analytics Workspace ID (Optional)'
description: 'Existing Log Analytics Workspace Resource ID (Optional)'
required: false
default: ''
type: string
AZURE_EXISTING_AIPROJECT_RESOURCE_ID:
description: 'AI Project Resource ID (Optional)'
description: 'Existing AI Project Resource ID (Optional)'
required: false
default: ''
type: string
existing_webapp_url:
description: 'Existing WebApp URL (Skips Deployment)'
description: 'Run Tests Against Existing RG (Provide Web App URL)'
required: false
default: ''
type: string
Expand All @@ -103,6 +110,7 @@ jobs:
azure_location: ${{ steps.validate.outputs.azure_location }}
resource_group_name: ${{ steps.validate.outputs.resource_group_name }}
waf_enabled: ${{ steps.validate.outputs.waf_enabled }}
enable_scalability: ${{ steps.validate.outputs.enable_scalability }}
exp: ${{ steps.validate.outputs.exp }}
build_docker_image: ${{ steps.validate.outputs.build_docker_image }}
cleanup_resources: ${{ steps.validate.outputs.cleanup_resources }}
Expand All @@ -119,6 +127,7 @@ jobs:
INPUT_AZURE_LOCATION: ${{ github.event.inputs.azure_location }}
INPUT_RESOURCE_GROUP_NAME: ${{ github.event.inputs.resource_group_name }}
INPUT_WAF_ENABLED: ${{ github.event.inputs.waf_enabled }}
INPUT_ENABLE_SCALABILITY: ${{ github.event.inputs.enable_scalability }}
INPUT_EXP: ${{ github.event.inputs.EXP }}
INPUT_BUILD_DOCKER_IMAGE: ${{ github.event.inputs.build_docker_image }}
INPUT_CLEANUP_RESOURCES: ${{ github.event.inputs.cleanup_resources }}
Expand Down Expand Up @@ -178,6 +187,15 @@ jobs:
echo "✅ waf_enabled: '$WAF_ENABLED' is valid"
fi

# Validate enable_scalability (boolean, opt-in for WAF deployments)
ENABLE_SCALABILITY="${INPUT_ENABLE_SCALABILITY:-false}"
if [[ "$ENABLE_SCALABILITY" != "true" && "$ENABLE_SCALABILITY" != "false" ]]; then
echo "❌ ERROR: enable_scalability must be 'true' or 'false', got: '$ENABLE_SCALABILITY'"
VALIDATION_FAILED=true
else
echo "✅ enable_scalability: '$ENABLE_SCALABILITY' is valid"
fi

# Validate EXP (boolean)
EXP_ENABLED="${INPUT_EXP:-false}"
if [[ "$EXP_ENABLED" != "true" && "$EXP_ENABLED" != "false" ]]; then
Expand Down Expand Up @@ -270,6 +288,7 @@ jobs:
echo "azure_location=$LOCATION" >> $GITHUB_OUTPUT
echo "resource_group_name=$INPUT_RESOURCE_GROUP_NAME" >> $GITHUB_OUTPUT
echo "waf_enabled=$WAF_ENABLED" >> $GITHUB_OUTPUT
echo "enable_scalability=$ENABLE_SCALABILITY" >> $GITHUB_OUTPUT
echo "exp=$EXP_ENABLED" >> $GITHUB_OUTPUT
echo "build_docker_image=$BUILD_DOCKER" >> $GITHUB_OUTPUT
echo "cleanup_resources=$CLEANUP_RESOURCES" >> $GITHUB_OUTPUT
Expand All @@ -287,6 +306,7 @@ jobs:
azure_location: ${{ needs.validate-inputs.outputs.azure_location || 'australiaeast' }}
resource_group_name: ${{ needs.validate-inputs.outputs.resource_group_name || '' }}
waf_enabled: ${{ needs.validate-inputs.outputs.waf_enabled == 'true' }}
enable_scalability: ${{ needs.validate-inputs.outputs.enable_scalability == 'true' }}
EXP: ${{ needs.validate-inputs.outputs.exp == 'true' }}
build_docker_image: ${{ needs.validate-inputs.outputs.build_docker_image == 'true' }}
cleanup_resources: ${{ needs.validate-inputs.outputs.cleanup_resources == 'true' }}
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/deploy-waf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,19 @@ jobs:
- name: Check and Create Resource Group
id: check_create_rg
run: |
set -e
echo "Checking if resource group exists..."
set -e
OWNER_TAG_VALUE="${{ github.actor }}"
echo "🔍 Checking if resource group '${{ env.RESOURCE_GROUP_NAME }}' exists..."
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
if [ "$rg_exists" = "false" ]; then
echo "Resource group does not exist. Creating..."
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} || { echo "Error creating resource group"; exit 1; }
echo "📦 Resource group does not exist. Creating new resource group '${{ env.RESOURCE_GROUP_NAME }}' in location '${{ env.AZURE_LOCATION }}'..."
echo "🏷️ Adding Owner tag: Owner=${OWNER_TAG_VALUE}"
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} --tags "Owner=${OWNER_TAG_VALUE}" || { echo "❌ Error creating resource group"; exit 1; }
echo "✅ Resource group '${{ env.RESOURCE_GROUP_NAME }}' created successfully."
else
echo "Resource group already exists."
echo "✅ Resource group '${{ env.RESOURCE_GROUP_NAME }}' already exists."
echo "🏷️ Merging Owner tag on existing resource group: Owner=${OWNER_TAG_VALUE}"
az group update --name "${{ env.RESOURCE_GROUP_NAME }}" --set tags.Owner="${OWNER_TAG_VALUE}" --output none || echo "⚠️ Warning: failed to update Owner tag on existing resource group '${{ env.RESOURCE_GROUP_NAME }}'."
fi

- name: Generate Unique Solution Prefix
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,18 @@ jobs:
id: check_create_rg
run: |
set -e
OWNER_TAG_VALUE="${{ github.actor }}"
echo "🔍 Checking if resource group '${{ env.RESOURCE_GROUP_NAME }}' exists..."
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
if [ "$rg_exists" = "false" ]; then
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }}
echo "📦 Resource group does not exist. Creating new resource group '${{ env.RESOURCE_GROUP_NAME }}' in location '${{ env.AZURE_LOCATION }}'..."
echo "🏷️ Adding Owner tag: Owner=${OWNER_TAG_VALUE}"
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} --tags "Owner=${OWNER_TAG_VALUE}" || { echo "❌ Error creating resource group"; exit 1; }
echo "✅ Resource group '${{ env.RESOURCE_GROUP_NAME }}' created successfully."
else
echo "✅ Resource group '${{ env.RESOURCE_GROUP_NAME }}' already exists. Deploying to existing resource group."
echo "🏷️ Merging Owner tag on existing resource group: Owner=${OWNER_TAG_VALUE}"
az group update --name "${{ env.RESOURCE_GROUP_NAME }}" --set tags.Owner="${OWNER_TAG_VALUE}" --output none || echo "⚠️ Warning: failed to update Owner tag on existing resource group '${{ env.RESOURCE_GROUP_NAME }}'."
fi
echo "RESOURCE_GROUP_NAME=${{ env.RESOURCE_GROUP_NAME }}" >> $GITHUB_OUTPUT

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/job-deploy-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ on:
required: false
type: string
default: 'false'
ENABLE_SCALABILITY:
description: 'Enable Scalability features for WAF deployments (opt-in)'
required: false
type: string
default: 'false'
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
required: false
type: string
Expand Down Expand Up @@ -192,10 +197,26 @@ jobs:
shell: bash
env:
INPUT_WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
INPUT_ENABLE_SCALABILITY: ${{ inputs.ENABLE_SCALABILITY }}
run: |
set -euo pipefail
if [[ "$INPUT_WAF_ENABLED" == "true" ]]; then
cp infra/main.waf.parameters.json infra/main.parameters.json
echo "✅ Successfully copied WAF parameters to main parameters file"
SCALABILITY_VALUE="${INPUT_ENABLE_SCALABILITY:-false}"
if [[ "$SCALABILITY_VALUE" != "true" && "$SCALABILITY_VALUE" != "false" ]]; then
echo "❌ ERROR: ENABLE_SCALABILITY must be 'true' or 'false', got: '$SCALABILITY_VALUE'"
exit 1
fi
echo "🔧 Setting enableScalability=${SCALABILITY_VALUE}"
tmpfile=$(mktemp)
if ! jq --argjson v "$SCALABILITY_VALUE" '.parameters.enableScalability.value = $v' infra/main.parameters.json > "$tmpfile"; then
echo "❌ ERROR: jq failed to update enableScalability in infra/main.parameters.json"
rm -f "$tmpfile"
exit 1
fi
mv "$tmpfile" infra/main.parameters.json
echo "✅ enableScalability set to ${SCALABILITY_VALUE}"
else
Comment thread
Vamshi-Microsoft marked this conversation as resolved.
echo "🔧 Configuring Non-WAF deployment - using default main.parameters.json..."
fi
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/job-deploy-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ on:
required: false
type: string
default: 'false'
ENABLE_SCALABILITY:
description: 'Enable Scalability features for WAF deployments (opt-in)'
required: false
type: string
default: 'false'
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
required: false
type: string
Expand Down Expand Up @@ -191,10 +196,26 @@ jobs:
shell: bash
env:
INPUT_WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
INPUT_ENABLE_SCALABILITY: ${{ inputs.ENABLE_SCALABILITY }}
run: |
set -euo pipefail
if [[ "$INPUT_WAF_ENABLED" == "true" ]]; then
cp infra/main.waf.parameters.json infra/main.parameters.json
echo "✅ Successfully copied WAF parameters to main parameters file"
SCALABILITY_VALUE="${INPUT_ENABLE_SCALABILITY:-false}"
if [[ "$SCALABILITY_VALUE" != "true" && "$SCALABILITY_VALUE" != "false" ]]; then
echo "❌ ERROR: ENABLE_SCALABILITY must be 'true' or 'false', got: '$SCALABILITY_VALUE'"
exit 1
fi
echo "🔧 Setting enableScalability=${SCALABILITY_VALUE}"
tmpfile=$(mktemp)
if ! jq --argjson v "$SCALABILITY_VALUE" '.parameters.enableScalability.value = $v' infra/main.parameters.json > "$tmpfile"; then
echo "❌ ERROR: jq failed to update enableScalability in infra/main.parameters.json"
rm -f "$tmpfile"
exit 1
fi
mv "$tmpfile" infra/main.parameters.json
echo "✅ enableScalability set to ${SCALABILITY_VALUE}"
else
Comment thread
Vamshi-Microsoft marked this conversation as resolved.
echo "🔧 Configuring Non-WAF deployment - using default main.parameters.json..."
fi
Expand Down
Loading