This demo aims to be a paved road for anyone who would like to start using ACA with Java-based workloads. The demo demonstrates how to seamlessly deploy infrastructure dependencies, such as storage accounts, alongside an app's infrastructure deployment. Those dependencies are then available during the runtime. On container apps, there are two options for this, Dapr and service connections. Both options are covered by this demo.
/.github/workflows/build-and-push-docker-image.yml
: The pipeline for Docker build/.github/workflows/deploy.yml
: The deploy pipeline (still in development)/apps/storage-account-app
: A sample Java-based Spring Boot demo application/modules
: Directory containing Terraform modules for deploying the application/environments
: Directory containing concrete usage of the modules for different environments (only dev for the demo scope)
/environments/dev/acr
: Demo usage of the ACR module/environments/dev/storage-account-app
: Demo usage of the Container App module
Terraform is used to deploy the application. Follow these steps to deploy the ContainerAppsJavaDemo:
- Install Terraform on your machine
- Navigate to the
/environments/dev
directory - Navigate to the sub directory you want to deploy (e.g.
storage-account-app
) - Review and update the module configuration in
main.tf
- Run
terraform init
to initialize the Terraform backend and download the required providers - Run
terraform plan
to review the changes that will be applied - Run
terraform apply
to apply the changes and deploy the infrastructure - After deployment is complete, you can access the storage-account-app APIs using the generated endpoint
The /apps/storage-account-app
is a Spring Boot application that exposes APIs for demonstrating both accessing a storage account via Dapr and via service connection.
POST /api/serviceconnections/blobstorage/upload
: Upload a UTF-8 string data to a blob storage service connection.POST /api/serviceconnections/blobstorage/download
: Download a UTF-8 string data from a blob storage service connection.GET /api/serviceconnections/blobstorage/
: List all configured service connections to blob storage.
POST /api/dapr/blobstorage/upload
: Upload a UTF-8 string data to a blob storage Dapr state integration.POST /api/dapr/blobstorage/download
: Download a UTF-8 string data from a blob storage Dapr state integration.