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
24 changes: 24 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "azd-template",
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
"forwardPorts": [50505],
"features": {
"ghcr.io/azure/azure-dev/azd:latest": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.azure-dev",
"ms-azuretools.vscode-bicep",
"ms-python.python",
"ms-toolsai.jupyter",
"GitHub.vscode-github-actions"
]
}
},
"postStartCommand": "git pull origin main && python3 -m pip install -r ./src/frontend/requirements.txt && python3 -m pip install -r ./src/backend/requirements.txt",
"remoteUser": "vscode",
"hostRequirements": {
"memory": "4gb"
}
}
33 changes: 33 additions & 0 deletions .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Azure Template Validation
on:
# workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
id-token: write
pull-requests: write
jobs:
template_validation_job:
runs-on: ubuntu-latest
name: Template validation
steps:
# Step 1: Checkout the code from your repository
- name: Checkout code
uses: actions/checkout@v4
# Step 2: Validate the Azure template using microsoft/template-validation-action
- name: Validate Azure Template
uses: microsoft/template-validation-action@v0.3.5
id: validation
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Step 3: Print the result of the validation
- name: Print result
run: cat ${{ steps.validation.outputs.resultFile }}
42 changes: 4 additions & 38 deletions azure.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,10 @@
# # yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json

# name: accl-codegeneration-genericaccelerator-1
name: modernize-your-code-solution-accelerator
#KEEP OFF UNTIL WE ARE READY TO PUBLISH ISH
# metadata:
# template: azd-init@1.13.0
# services:
# backend:
# project: src/backend
# host: containerapp
# language: python
# frontend:
# project: src/frontend
# host: containerapp
# language: python



environment:
name: accl-codegeneration-genericaccelerator-1
location: eastus
name: accl-codegeneration-genericaccelerator-1
metadata:
template: accl-codegeneration-genericaccelerator-1@1.0

parameters:
solutionPrefix:
type: string
default: bs-azdtest
otherLocation:
type: string
default: eastus2
# baseUrl:
# type: string
# default: 'https://raw.githubusercontent.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator/'

deployment:
mode: Incremental
template: ./infra/main2.bicep # Path to the main.bicep file inside the 'deployment' folder
parameters:
solutionPrefix: ${parameters.solutionPrefix}
otherLocation: ${parameters.otherLocation}
#baseUrl: ${parameters.baseUrl}


template: ./infra/main.bicep # Path to the main.bicep file inside the 'deployment' folder
59 changes: 59 additions & 0 deletions infra/main.parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"environmentName": {
"value": "${AZURE_ENV_NAME}"
},
"location": {
"value": "${AZURE_LOCATION}"
},
"backendExists": {
"value": "${SERVICE_BACKEND_RESOURCE_EXISTS=false}"
},
"backendDefinition": {
"value": {
"settings": [
{
"name": "",
"value": "${VAR}",
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR} to use the value of 'VAR' from the current environment."
},
{
"name": "",
"value": "${VAR_S}",
"secret": true,
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR_S} to use the value of 'VAR_S' from the current environment."
}
]
}
},
"frontendExists": {
"value": "${SERVICE_FRONTEND_RESOURCE_EXISTS=false}"
},
"frontendDefinition": {
"value": {
"settings": [
{
"name": "",
"value": "${VAR}",
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR} to use the value of 'VAR' from the current environment."
},
{
"name": "",
"value": "${VAR_S}",
"secret": true,
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR_S} to use the value of 'VAR_S' from the current environment."
}
]
}
},
"principalId": {
"value": "${AZURE_PRINCIPAL_ID}"
}
}
}