Skip to content

Commit

Permalink
aca mirgation
Browse files Browse the repository at this point in the history
  • Loading branch information
tommasodotNET committed Nov 20, 2024
1 parent a14dc58 commit 22b5407
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 0 deletions.
40 changes: 40 additions & 0 deletions aca/documentprocessing.tmpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
api-version: 2024-02-02-preview
location: westeurope
identity:
type: UserAssigned
userAssignedIdentities:
"/subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourcegroups/rg-supp-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apps-tstocchi": {}
properties:
environmentId: /subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourceGroups/rg-sk-rag-demo-aca/providers/Microsoft.App/managedEnvironments/aca-env-sk-rag-demo
configuration:
activeRevisionsMode: single
runtime:
dotnet:
autoConfigureDataProtection: true
ingress:
external: false
targetPort: 8080
transport: http
allowInsecure: true
registries:
- server: acrskragdemo.azurecr.io
identity: /subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourcegroups/rg-supp-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apps-tstocchi
dapr:
enabled: true
appPort: 8080
appProtocol: http
httpReadBufferSize: 30
httpMaxRequestSize: 10
logLevel: debug
enableApiLogging: true
template:
containers:
- image: acrskragdemo.azurecr.io/document-processing:latest
name: document-processing
env:
- name: AZURE_CLIENT_ID
value: 72544e19-0f70-4b48-b547-e2f7259b8dcb
- name: ASPNETCORE_FORWARDEDHEADERS_ENABLED
value: "true"
scale:
minReplicas: 1
40 changes: 40 additions & 0 deletions aca/frontend.tmpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
api-version: 2024-02-02-preview
location: westeurope
identity:
type: UserAssigned
userAssignedIdentities:
"/subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourcegroups/rg-supp-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apps-tstocchi": {}
properties:
environmentId: /subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourceGroups/rg-sk-rag-demo-aca/providers/Microsoft.App/managedEnvironments/aca-env-sk-rag-demo
configuration:
activeRevisionsMode: single
runtime:
dotnet:
autoConfigureDataProtection: true
ingress:
external: true
targetPort: 8080
transport: http
allowInsecure: false
registries:
- server: acrskragdemo.azurecr.io
identity: /subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourcegroups/rg-supp-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apps-tstocchi
dapr:
enabled: true
appPort: 8080
appProtocol: http
httpReadBufferSize: 30
httpMaxRequestSize: 10
logLevel: debug
enableApiLogging: true
template:
containers:
- image: acrskragdemo.azurecr.io/frontend:latest
name: frontend
env:
- name: AZURE_CLIENT_ID
value: 72544e19-0f70-4b48-b547-e2f7259b8dcb
- name: ASPNETCORE_FORWARDEDHEADERS_ENABLED
value: "true"
scale:
minReplicas: 1
40 changes: 40 additions & 0 deletions aca/knowledgeprocessing.tmpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
api-version: 2024-02-02-preview
location: westeurope
identity:
type: UserAssigned
userAssignedIdentities:
"/subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourcegroups/rg-supp-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apps-tstocchi": {}
properties:
environmentId: /subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourceGroups/rg-sk-rag-demo-aca/providers/Microsoft.App/managedEnvironments/aca-env-sk-rag-demo
configuration:
activeRevisionsMode: single
runtime:
dotnet:
autoConfigureDataProtection: true
ingress:
external: false
targetPort: 8080
transport: http
allowInsecure: true
registries:
- server: acrskragdemo.azurecr.io
identity: /subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourcegroups/rg-supp-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apps-tstocchi
dapr:
enabled: true
appPort: 8080
appProtocol: http
httpReadBufferSize: 30
httpMaxRequestSize: 10
logLevel: debug
enableApiLogging: true
template:
containers:
- image: acrskragdemo.azurecr.io/knowledge-processing:latest
name: knowledge-processing
env:
- name: AZURE_CLIENT_ID
value: 72544e19-0f70-4b48-b547-e2f7259b8dcb
- name: ASPNETCORE_FORWARDEDHEADERS_ENABLED
value: "true"
scale:
minReplicas: 1
40 changes: 40 additions & 0 deletions aca/searchknowledge.tmpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
api-version: 2024-02-02-preview
location: westeurope
identity:
type: UserAssigned
userAssignedIdentities:
"/subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourcegroups/rg-supp-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apps-tstocchi": {}
properties:
environmentId: /subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourceGroups/rg-sk-rag-demo-aca/providers/Microsoft.App/managedEnvironments/aca-env-sk-rag-demo
configuration:
activeRevisionsMode: single
runtime:
dotnet:
autoConfigureDataProtection: true
ingress:
external: false
targetPort: 8080
transport: http
allowInsecure: true
registries:
- server: acrskragdemo.azurecr.io
identity: /subscriptions/8c831b26-1aef-4843-9513-06420f059cd7/resourcegroups/rg-supp-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apps-tstocchi
dapr:
enabled: true
appPort: 8080
appProtocol: http
httpReadBufferSize: 30
httpMaxRequestSize: 10
logLevel: debug
enableApiLogging: true
template:
containers:
- image: acrskragdemo.azurecr.io/search-knowledge:latest
name: search-knowledge
env:
- name: AZURE_CLIENT_ID
value: 72544e19-0f70-4b48-b547-e2f7259b8dcb
- name: ASPNETCORE_FORWARDEDHEADERS_ENABLED
value: "true"
scale:
minReplicas: 1
19 changes: 19 additions & 0 deletions scripts/migrate-to-aca.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Authenticate with Azure
# az login

# Variables
$resourceGroup = "rg-sk-rag-demo-aca"
$location = "westeurope"
$envName = "aca-env-sk-rag-demo"
$containerRegistry = "acrskragdemo.azurecr.io"

az containerapp create -n "document-processing" -g $resourceGroup --yaml "./aca/documentprocessing.tmpl.yaml"
az containerapp create -n "knowledge-processing" -g $resourceGroup --yaml "./aca/knowledgeprocessing.tmpl.yaml"
az containerapp create -n "search-knowledge" -g $resourceGroup --yaml "./aca/searchknowledge.tmpl.yaml"
az containerapp create -n "frontend" -g $resourceGroup --yaml "./aca/frontend.tmpl.yaml"

# # Create Resource Group
# az group create --name $resourceGroup --location $location

# # Create Container Apps Environment with Managed Identity
# az containerapp env create --name $envName --resource-group $resourceGroup --location $location

0 comments on commit 22b5407

Please sign in to comment.