Skip to content

score-spec/score-aca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

score-aca

score-aca is a Score implementation of the Score specification for Azure Container Apps (ACA).

Demo

When executing the following command, the file score.yaml is created with the following content:

go run ./cmd/score-aca init
apiVersion: score.dev/v1b1
containers:
  main:
    image: stefanprodan/podinfo
metadata:
  name: example
service:
  ports:
    web:
     port: 8080

Generate Bicep file

To generate a Bicep file from the score.yaml, execute the following command:

go run ./cmd/score-aca generate score.yaml

The output manifests.bicep contains the following which indicates:

  1. The environment that will hold all other resources.
  2. The Azure Container App based on Container Image.
// Generated by score-aca
// Azure Container Apps Bicep manifest

// Parameters
param environmentName string = 'example-environment'
param containerAppName string = 'example-container-app'
param location string = resourceGroup().location

// Container App Environment
resource containerAppEnvironment 'Microsoft.App/managedEnvironments@2024-03-01' = {
  name: environmentName
  location: location
  properties: {
    appLogsConfiguration: {
      destination: 'azure-monitor'
    }
  }
}

// Container App
resource containerApp 'Microsoft.App/containerApps@2024-03-01' = {
  name: containerAppName
  location: location
  properties: {
    environmentId: containerAppEnvironment.id
    configuration: {
      ingress: {
        external: true
        targetPort: 8080
      }
    }
    template: {
      containers: [
        {
          name: 'main'
          image: 'stefanprodan/podinfo'
        }
      ]
    }
  }
}

// Outputs
output containerAppFQDN string = containerApp.properties.configuration.ingress.fqdn

Deploy Container App in Azure

export LOCATION="eastus"
export RESOURCE_GROUP="rg-score-aca"

az login
# or
az login --use-device-code

az group create --name ${RESOURCE_GROUP} --location ${LOCATION}

az deployment group create --resource-group "${RESOURCE_GROUP}" --template-file ./manifests.bicep

About

[WIP] score-aca is an early try to get a Score implementation for Azure Container Apps (ACA), not ready yet

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •