How can I add an Azure File Share to my container deployment to persist data using github workflows and aci-deploy@v1.1.3
Saša
1
Reputation point
Hey there,
I am having trouble using azure file share as mounted volume aci-deploy@v1.1.3.
I use a Service Principal with Contributor privileges and a LRS/ StorageV2 Storage Account.
I am
- pulling the alpine image from docker
- tag the image
- push it to my ACR
- deploy the container using aci-deploy@v1.1.3 https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files
The container is deployed but restarts frequently. The container loges are "No logs available"
and no entries are made in log analytics.
The deployment without the file mount (4 lines starting with azure-file-volume omitted) work fine.
How can I further debug this? Am I doing something wrong here?
name: alpine
## This workflow is triggered on push to development branch and manually by workflow_dispatch.
on:
workflow_dispatch:
push:
branches:
- feature/testing_alpine_with_file_hare
## Jobs to build and deploy the application to Azure Container Instances.
jobs:
build-and-deploy:
runs-on: ubuntu-22.04
environment: 'development'
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: Log in with Azure
uses: azure/login@v2.1.1
with:
creds: ${{ secrets.AZ_TECHNICAL_USER_CREDS }}
- name: 'Log in to Azure Container Registry'
uses: azure/docker-login@v2
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.AZ_TECHNICAL_USER_ID }}
password: ${{ secrets.AZ_TECHNICAL_USER_SECRET }}
- name: Pull and push Weaviate Docker image if not exists
run: |
docker pull alpine:latest
docker tag alpine:latest ${{ secrets.REGISTRY_LOGIN_SERVER }}/alpine:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alpine:latest
- name: 'Deploy Simple Container to Azure Container Instances'
uses: 'azure/aci-deploy@v1.1.3'
with:
resource-group: ${{ secrets.RESOURCE_GROUP }}
dns-name-label: test-alpine
image: ${{ secrets.REGISTRY_LOGIN_SERVER }}/alpine:latest
registry-login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
registry-username: ${{ secrets.AZ_TECHNICAL_USER_ID }}
registry-password: ${{ secrets.AZ_TECHNICAL_USER_SECRET }}
name: test-alpine
azure-file-volume-account-name: ${{ secrets.AZURE_STORAGE_ACCOUNT_NAME }}
azure-file-volume-account-key: ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }}
azure-file-volume-share-name: alpine-data
azure-file-volume-mount-path: /mnt/data
log-analytics-workspace: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }}
log-analytics-workspace-key: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }}
log-type: 'ContainerInstanceLogs'
ports: '8080 50051'
location: ${{ secrets.LOCATION }}
memory: 3
Sign in to answer