https://github.com/georges034302/azure-acr-demo
A practical demo using Azure Container Instances (ACI) + Azure Container Registry (ACR) with GitHub Actions for CI/CD
https://github.com/georges034302/azure-acr-demo
azure-container-instances azure-container-registry bash docker github-actions python
Last synced: 3 months ago
JSON representation
A practical demo using Azure Container Instances (ACI) + Azure Container Registry (ACR) with GitHub Actions for CI/CD
- Host: GitHub
- URL: https://github.com/georges034302/azure-acr-demo
- Owner: Georges034302
- Created: 2025-05-04T07:22:03.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-12T08:52:50.000Z (5 months ago)
- Last Synced: 2025-05-12T09:57:34.844Z (5 months ago)
- Topics: azure-container-instances, azure-container-registry, bash, docker, github-actions, python
- Language: HTML
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ๐ Word Count CI/CD with ACR + ACI + GitHub Actions
_This project demonstrates a complete CI/CD pipeline using **Azure Container Registry (ACR)**, **Azure Container Instances (ACI)**, and **GitHub Actions**, triggered by changes to a data file._### ๐ Project Highlights:
- โ๏ธ Integration: Fully integrates (GitHub Actions + ACR + ACI) CI/CD pipeline.
- ๐ Setup: Configure Azure (Resource Group, ACR, Service Principal) and set GitHub Actions secrets.
- ๐งช Demo App: A Python script counts words in specific data.txt
- ๐ ๏ธ Automation: GitHub Actions runs the entire pipeline using Bash and Python scripts.
- ๐ณ Docker Build: A custom Docker image is built on every change and pushed to ACR.
- ๐ Deployment: The container is automatically deployed to ACI.
- ๐ Trigger: The CI/CD workflow is triggered by changes to specific data.txt.
- โ Sucess: Dynamically update `index.html` with the word count
- ๐ Live Output: The updated word count is viewable at a public URL (FQDN) after deployment.---
### ๐ Project Structure
.github/workflows/\
โ\
โโโ apps/\
โ โโโโโโ app.py
โโโ scripts/\
โ โโโโโโ setup.sh (One-time script - initialization)
โ โโโโโโ gh_setup.sh (One-time script - initialization)
โ โโโโโโ update_html.sh\
โ โโโโโโ deploy.sh
โ โโโโโโ entrypoint.sh
โ โโโโโโ cleanup.sh (One-time script - cleanup azure resources)
โโโ ci.yml
โโโ deploy.ymlindex.html
data.txt
Dockerfile\
.gitignore---
### ๐งฐ Stack Overview
- Cloud: Azure Container Registry (ACR)
- Cloud: Azure Container Instances (ACI)
- CI/CD: GitHub Actions
- Deployment Tool: Bash scripts & Azure CLI
- App Example: Python word count app served via Python HTTP server
- CLI Tools: az, gh, docker
---### ๐ How to Deploy
1. **Install dependencies**
```
chmod +x setup.sh
./.github/scripts/setup.sh
```2. **Run the deployment**
```
chmod +x deploy.sh
./.github/scripts/deploy.sh
```* โ Example Output:
๐ Live App Access (FQDN): http://\.\.azurecontainer.io
---### ๐งน Cleanup
To delete Azure resources:
```
chmod +x cleanup.sh
./.github/scripts/cleanup.sh
```
---### ๐จโ๐ป Author: Georges Bou Ghantous
This repository demonstrates automated deployment of a Python app to ACI+ACR using GitHub Actions. ๐