azure-deploy-cli 0.1.12__tar.gz → 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/.github/workflows/1-3-release.yaml +5 -6
  2. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/.github/workflows/2-build.yaml +6 -2
  3. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/.pre-commit-config.yaml +1 -1
  4. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/CHANGELOG.md +10 -0
  5. azure_deploy_cli-1.0.1/CONTRIBUTING.md +163 -0
  6. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/Makefile +10 -11
  7. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/PKG-INFO +85 -64
  8. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/README.md +65 -45
  9. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/pyproject.toml +27 -8
  10. azure_deploy_cli-1.0.1/setup.sh +35 -0
  11. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/_version.py +3 -3
  12. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/aca/aca_cli.py +41 -75
  13. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/aca/deploy_aca.py +111 -60
  14. azure_deploy_cli-1.0.1/src/azure_deploy_cli/aca/model.py +81 -0
  15. azure_deploy_cli-1.0.1/src/azure_deploy_cli/aca/yaml_loader.py +53 -0
  16. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/utils/docker.py +43 -33
  17. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/utils/logging.py +1 -1
  18. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli.egg-info/PKG-INFO +85 -64
  19. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli.egg-info/SOURCES.txt +4 -2
  20. azure_deploy_cli-1.0.1/src/azure_deploy_cli.egg-info/requires.txt +20 -0
  21. azure_deploy_cli-1.0.1/tests/test_probe_config.py +165 -0
  22. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/test_retag_image.py +94 -55
  23. azure_deploy_cli-1.0.1/uv.lock +1463 -0
  24. azure_deploy_cli-0.1.12/requirements-dev.txt +0 -9
  25. azure_deploy_cli-0.1.12/requirements.txt +0 -7
  26. azure_deploy_cli-0.1.12/setup.sh +0 -52
  27. azure_deploy_cli-0.1.12/src/azure_deploy_cli/aca/model.py +0 -35
  28. azure_deploy_cli-0.1.12/src/azure_deploy_cli.egg-info/requires.txt +0 -18
  29. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/.github/dependabot.yml +0 -0
  30. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/.github/workflows/1-1-pr-build-check.yaml +0 -0
  31. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/.github/workflows/1-2-staging.yaml +0 -0
  32. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/.gitignore +0 -0
  33. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/LICENSE +0 -0
  34. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/setup.cfg +0 -0
  35. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/__init__.py +0 -0
  36. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/aca/bash/aca-cert/create.sh +0 -0
  37. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/aca/bash/aca-cert/destroy.sh +0 -0
  38. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/cli.py +0 -0
  39. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/identity/__init__.py +0 -0
  40. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/identity/group.py +0 -0
  41. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/identity/identity_cli.py +0 -0
  42. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/identity/managed_identity.py +0 -0
  43. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/identity/models.py +0 -0
  44. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/identity/py.typed +0 -0
  45. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/identity/role.py +0 -0
  46. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/identity/service_principal.py +0 -0
  47. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/py.typed +0 -0
  48. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/utils/__init__.py +0 -0
  49. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/utils/azure_cli.py +0 -0
  50. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/utils/env.py +0 -0
  51. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/utils/key_vault.py +0 -0
  52. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli/utils/py.typed +0 -0
  53. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli.egg-info/dependency_links.txt +0 -0
  54. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli.egg-info/entry_points.txt +0 -0
  55. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/src/azure_deploy_cli.egg-info/top_level.txt +0 -0
  56. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/__init__.py +0 -0
  57. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/fixtures/.env.example +0 -0
  58. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/identity/__init__.py +0 -0
  59. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/identity/test_models.py +0 -0
  60. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/roles-config.json +0 -0
  61. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/test.sh +0 -0
  62. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/test_aca_cli.py +0 -0
  63. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/test_deploy_aca.py +0 -0
  64. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/test_env.py +0 -0
  65. {azure_deploy_cli-0.1.12 → azure_deploy_cli-1.0.1}/tests/test_package.py +0 -0
@@ -61,16 +61,15 @@ jobs:
61
61
  uses: actions/setup-python@v6
62
62
  with:
63
63
  python-version: '3.11'
64
- cache: 'pip'
65
64
 
66
- - name: Install build dependencies
67
- run: |
68
- python -m pip install --upgrade pip
69
- pip install build
65
+ - name: Install uv
66
+ uses: astral-sh/setup-uv@v3
67
+ with:
68
+ enable-cache: true
70
69
 
71
70
  - name: Build package
72
71
  run: |
73
- python -m build
72
+ uv build
74
73
 
75
74
  - name: Publish package distributions to PyPI
76
75
  uses: pypa/gh-action-pypi-publish@release/v1
@@ -15,10 +15,14 @@ jobs:
15
15
  uses: actions/setup-python@v6
16
16
  with:
17
17
  python-version: '3.11'
18
- cache: 'pip'
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v3
21
+ with:
22
+ enable-cache: true
19
23
 
20
24
  - name: Install dependencies
21
- run: make install-dev
25
+ run: source setup.sh --install
22
26
 
23
27
  - name: Lint
24
28
  run: make lint
@@ -22,7 +22,7 @@ repos:
22
22
  rev: v1.11.2
23
23
  hooks:
24
24
  - id: mypy
25
- additional_dependencies: []
25
+ additional_dependencies: [types-PyYAML]
26
26
  args: [--config-file=pyproject.toml]
27
27
  exclude: ^tests/
28
28
 
@@ -1,3 +1,13 @@
1
+ ## [1.0.1] - 2026-01-18
2
+
3
+ ### ⚙️ Miscellaneous Tasks
4
+
5
+ - Use uv (#29)
6
+ ## [1.0.0] - 2026-01-09
7
+
8
+ ### 🚀 Features
9
+
10
+ - [**breaking**] Add new required YAML-based multi-container configuration for Azure Container Apps (#27)
1
11
  ## [0.1.12] - 2026-01-06
2
12
 
3
13
  ### 🐛 Bug Fixes
@@ -0,0 +1,163 @@
1
+ # Contributing to Azure Deploy CLI
2
+
3
+ ## Prerequisites
4
+
5
+ - Python 3.11 or higher
6
+ - `uv` (Python package manager) - [Install uv](https://docs.astral.sh/uv/getting-started/installation/)
7
+
8
+ ## Development Setup
9
+
10
+ **Create and activate a virtual environment:**
11
+
12
+ ```bash
13
+ source setup.sh -i
14
+ ```
15
+
16
+ This will:
17
+ - Create a `.venv` virtual environment using `uv` with Python 3.11
18
+ - Install all dependencies (base + dev)
19
+ - Print activation instructions
20
+
21
+ **Manual setup without setup.sh:**
22
+
23
+ ```bash
24
+ uv venv -p 3.11 .venv
25
+ source .venv/bin/activate
26
+ uv sync --all-extras
27
+ ```
28
+
29
+ ## Managing Dependencies
30
+
31
+ This project uses `uv` for dependency management with pinned versions in `pyproject.toml` for reproducibility.
32
+
33
+ ### Tips for pip users transitioning to uv
34
+
35
+ | Task | pip | uv |
36
+ |------|-----|-----|
37
+ | **Install dependencies** | `pip install -r requirements.txt` | `uv sync` |
38
+ | **Add a package** | `pip install package-name` | `uv pip install package-name` |
39
+ | **Create venv** | `python -m venv venv` | `uv venv` |
40
+ | **Freeze dependencies** | `pip freeze > requirements.txt` | `uv pip freeze` or `uv.lock` |
41
+ | **Update lock file** | Manual via pip freeze | `uv sync` (automatic) |
42
+ | **Specify Python version** | N/A | `uv venv -p 3.11` |
43
+ | **Install dev deps** | `pip install -r requirements-dev.txt` | `uv sync --all-extras` |
44
+
45
+ ### Adding New Dependencies
46
+
47
+ ```bash
48
+ # Add to production dependencies
49
+ uv pip install package-name
50
+
51
+ # Add to dev dependencies
52
+ uv pip install --group dev package-name
53
+
54
+ # Update lock file and sync
55
+ uv sync
56
+ ```
57
+
58
+ Then update `pyproject.toml` to include the new dependency with its pinned version (run `uv pip freeze` to get the exact version).
59
+
60
+ ## Build and Test Commands
61
+
62
+ ```bash
63
+ make install-dev # Install with dev tools
64
+ make build # Run lint + type-check + test
65
+ make lint # Code linting with ruff
66
+ make format # Auto-format code
67
+ make type-check # Type checking with mypy
68
+ make test # Run tests with pytest
69
+ make test-cov # Run tests with coverage report
70
+ make clean # Remove build artifacts
71
+ ```
72
+
73
+ ## Version Management and Changelog
74
+
75
+ This project uses a dual-tool approach for versioning and releases:
76
+
77
+ - **[setuptools-scm](https://setuptools-scm.readthedocs.io/)** - Automatic versioning based on git tags (dynamic at build time)
78
+ - **[commitizen](https://commitizen-tools.github.io/commitizen/)** - Version bumping and tagging with semantic versioning
79
+ - **[git-cliff](https://git-cliff.org/)** - Automatic changelog generation from conventional commits
80
+
81
+ ### Release Workflow
82
+
83
+ 1. **Create a commit** using [Conventional Commits](https://www.conventionalcommits.org/) format (e.g., `feat: add feature`, `fix: resolve bug`)
84
+ - Optionally use `make commit` for interactive conventional commit creation with `commitizen`
85
+ 2. **git-cliff** automatically generates changelog from commits since last tag
86
+ 3. **commitizen** bumps version and creates git tag
87
+ 4. **New version is committed** alongside updated CHANGELOG
88
+ 5. **Git tag** triggers PyPI publishing and GitHub Release
89
+
90
+ **No manual version or changelog updates are needed** — all are generated automatically.
91
+
92
+ ### Commit Convention
93
+
94
+ Use [Conventional Commits](https://www.conventionalcommits.org/) format:
95
+
96
+ ```
97
+ <type>(<scope>): <subject>
98
+
99
+ <body>
100
+
101
+ <footer>
102
+ ```
103
+
104
+ **Type:** `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`
105
+
106
+ **Examples:**
107
+ - `feat: add support for cosmos-db roles`
108
+ - `fix: correct azure identity authentication`
109
+ - `docs: update ACA deployment example`
110
+ - `chore: upgrade dependencies`
111
+
112
+ ### Making a Release
113
+
114
+ ```bash
115
+ # Ensure all changes are committed
116
+ git status
117
+
118
+ # Create a conventional commit
119
+ make commit
120
+
121
+ # Commitizen will:
122
+ # - Bump version (major/minor/patch)
123
+ # - Create git tag
124
+ # - Update CHANGELOG
125
+ # - Commit changes
126
+
127
+ # Push changes and tag
128
+ git push origin main --tags
129
+ ```
130
+
131
+ The CI/CD pipeline will automatically:
132
+ - Build the package
133
+ - Run tests
134
+ - Publish to PyPI
135
+ - Create a GitHub Release
136
+
137
+ ## Pre-commit Hooks
138
+
139
+ Pre-commit hooks are automatically installed during development setup and enforce code quality standards:
140
+
141
+ ```bash
142
+ # Manually run pre-commit on all files
143
+ pre-commit run --all-files
144
+
145
+ # Run specific hook
146
+ pre-commit run ruff --all-files
147
+ ```
148
+
149
+ ## Scripting and Output Handling
150
+
151
+ This CLI is designed for both interactive use and automated scripting. To support this, it separates output streams:
152
+
153
+ - **`stderr`**: All human-readable logs, progress indicators, and error messages
154
+ - **`stdout`**: All machine-readable output (e.g., revision names, IDs)
155
+
156
+ When developing features that produce output:
157
+ - Use `sys.stderr` for logging and user-facing messages
158
+ - Use `sys.stdout` for machine-readable output only
159
+ - This allows scripts to cleanly capture output while still seeing logs
160
+
161
+ ## License
162
+
163
+ Mozilla Public License 2.0 - See LICENSE file for details
@@ -18,34 +18,33 @@ help:
18
18
  @echo " build Run linting, type checking, and tests"
19
19
 
20
20
  setup-hooks:
21
- pre-commit install
22
- pre-commit install --hook-type commit-msg
21
+ uv run pre-commit install
22
+ uv run pre-commit install --hook-type commit-msg
23
23
 
24
24
  install:
25
- pip install .
26
- $(MAKE) setup-hooks
25
+ uv sync
27
26
 
28
27
  install-dev:
29
- pip install -e ".[dev]"
28
+ uv sync --all-extras
30
29
  $(MAKE) setup-hooks
31
30
 
32
31
  commit:
33
- cz commit
32
+ uv run cz commit
34
33
 
35
34
  lint:
36
- ruff check src/ tests/ 2>/dev/null || echo "No issues found"
35
+ uv run ruff check src/ tests/ 2>/dev/null || echo "No issues found"
37
36
 
38
37
  format:
39
- ruff format src/ tests/
38
+ uv run ruff format src/ tests/
40
39
 
41
40
  type-check:
42
- mypy src/azure_deploy_cli
41
+ uv run mypy src/azure_deploy_cli
43
42
 
44
43
  test:
45
- pytest tests/ -v
44
+ uv run pytest tests/ -v
46
45
 
47
46
  test-cov:
48
- pytest tests/ -v --cov=src/azure_deploy_cli --cov-report=html --cov-report=term-missing
47
+ uv run pytest tests/ -v --cov=src/azure_deploy_cli --cov-report=html --cov-report=term-missing
49
48
 
50
49
  clean:
51
50
  find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azure-deploy-cli
3
- Version: 0.1.12
3
+ Version: 1.0.1
4
4
  Summary: Python CLI for Azure deployment automation - identity, roles, and container apps management
5
5
  Author-email: decewei <celinew1221@gmail.com>
6
6
  License: Mozilla Public License Version 2.0
@@ -386,84 +386,68 @@ Classifier: Intended Audience :: Developers
386
386
  Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
387
387
  Classifier: Natural Language :: English
388
388
  Classifier: Programming Language :: Python :: 3
389
- Classifier: Programming Language :: Python :: 3.10
390
389
  Classifier: Programming Language :: Python :: 3.11
391
390
  Classifier: Programming Language :: Python :: 3.12
392
- Requires-Python: >=3.10
391
+ Requires-Python: >=3.11
393
392
  Description-Content-Type: text/markdown
394
393
  License-File: LICENSE
395
- Requires-Dist: azure-identity>=1.14.0
396
- Requires-Dist: azure-mgmt-appcontainers
397
- Requires-Dist: azure-mgmt-authorization
398
- Requires-Dist: azure-mgmt-keyvault
399
- Requires-Dist: azure-mgmt-msi
400
- Requires-Dist: python-dotenv>=1.0.0
401
- Requires-Dist: pydantic>=2.0.0
394
+ Requires-Dist: azure-identity==1.25.1
395
+ Requires-Dist: azure-mgmt-appcontainers==4.0.0
396
+ Requires-Dist: azure-mgmt-authorization==4.0.0
397
+ Requires-Dist: azure-mgmt-keyvault==13.0.0
398
+ Requires-Dist: azure-mgmt-msi==7.1.0
399
+ Requires-Dist: python-dotenv==1.2.1
400
+ Requires-Dist: pydantic==2.12.5
401
+ Requires-Dist: PyYAML==6.0.3
402
402
  Provides-Extra: dev
403
- Requires-Dist: ruff>=0.1.0; extra == "dev"
404
- Requires-Dist: mypy>=1.7.0; extra == "dev"
405
- Requires-Dist: pytest>=7.0; extra == "dev"
406
- Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
407
- Requires-Dist: coverage>=7.3.0; extra == "dev"
408
- Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
409
- Requires-Dist: commitizen>=3.0.0; extra == "dev"
410
- Requires-Dist: pre-commit>=3.0.0; extra == "dev"
411
- Requires-Dist: types-setuptools; extra == "dev"
403
+ Requires-Dist: ruff==0.14.10; extra == "dev"
404
+ Requires-Dist: mypy==1.19.1; extra == "dev"
405
+ Requires-Dist: pytest==9.0.2; extra == "dev"
406
+ Requires-Dist: pytest-asyncio==1.3.0; extra == "dev"
407
+ Requires-Dist: coverage==7.13.1; extra == "dev"
408
+ Requires-Dist: pytest-cov==7.0.0; extra == "dev"
409
+ Requires-Dist: commitizen==4.11.0; extra == "dev"
410
+ Requires-Dist: pre-commit==4.1.0; extra == "dev"
411
+ Requires-Dist: types-setuptools==80.9.0.20251223; extra == "dev"
412
+ Requires-Dist: types-PyYAML==6.0.12.20250915; extra == "dev"
412
413
  Dynamic: license-file
413
414
 
414
415
  # Azure Deploy CLI
415
416
 
416
417
  Python CLI for Azure deployment automation - manage identities, roles, and Container Apps deployments.
417
418
 
418
- ## Version Management and Changelog
419
-
420
- This project uses a dual-tool approach:
421
-
422
- - **[setuptools-scm](https://setuptools-scm.readthedocs.io/)** - Automatic versioning based on git tags (dynamic at build time)
423
- - **[commitizen](https://commitizen-tools.github.io/commitizen/)** - Version bumping and tagging with semantic versioning
424
- - **[git-cliff](https://git-cliff.org/)** - Automatic changelog generation from conventional commits
425
-
426
- **Release workflow:**
427
- 1. git-cliff generates changelog from commits since last tag
428
- 2. commitizen bumps version and creates git tag
429
- 3. New version is committed alongside updated changelog
430
- 4. Tag triggers PyPI publishing and GitHub Release
431
-
432
- No manual version or changelog updates are needed.
433
-
434
419
  ## Quick Start
435
420
 
436
421
  **Install for development:**
437
422
 
438
423
  ```bash
439
424
  cd /path/to/azure-deploy-cli
440
- pip install -e ".[dev]"
425
+ source setup.sh -i
441
426
  azd --help
442
427
  ```
443
428
 
444
429
  **Use in another project:**
445
430
 
446
431
  ```bash
447
- pip install -e /path/to/scripts
432
+ pip install azure-deploy-cli
448
433
  ```
449
434
 
450
435
  ## Installation
451
436
 
452
- | Method | Command |
453
- |--------|----------|
454
- | Local development | `pip install -e ".[dev]"` |
455
- | Local changes | `pip install -e /path/to/azure-deploy-cli` |
456
- | From PyPI | `pip install azure-deploy-cli` |
437
+ | Method | Command |
438
+ | ------------------- | ----------------------------- |
439
+ | Local development | `source setup.sh -i` |
440
+ | From PyPI | `pip install azure-deploy-cli`|
457
441
 
458
442
  ## CLI Commands
459
443
 
460
444
  ### Azure Container Apps (ACA) Deployment
461
445
 
462
- The ACA deployment process is split into two stages for better control:
446
+ The ACA deployment process uses YAML configuration for containers and is split into two stages for better control:
463
447
 
464
448
  #### Stage 1: Deploy Revision
465
449
 
466
- Deploy a new container revision without affecting traffic:
450
+ Deploy a new container revision from YAML configuration without affecting traffic:
467
451
 
468
452
  ```bash
469
453
  azd azaca deploy \
@@ -474,25 +458,76 @@ azd azaca deploy \
474
458
  --user-assigned-identity-name my-identity \
475
459
  --container-app my-app \
476
460
  --registry-server myregistry.azurecr.io \
477
- --image-name my-image \
478
461
  --stage prod \
479
- --target-port 8000 \
480
- --cpu 0.5 \
481
- --memory 1.0 \
462
+ --target-port 8080 \
482
463
  --min-replicas 1 \
483
464
  --max-replicas 10 \
484
465
  --keyvault-name my-keyvault \
485
- --dockerfile ./Dockerfile \
486
- --env-vars ENV_VAR1 ENV_VAR2 \
466
+ --container-config ./container-config.yaml \
487
467
  --env-var-secrets SECRET1 SECRET2
488
468
  ```
489
469
 
490
470
  This command:
491
471
 
472
+ - Loads container configurations from YAML file
473
+ - Builds/pushes container images for all containers
492
474
  - Creates or updates a new revision with 0% traffic
475
+ - Supports multiple containers with independent configurations
493
476
  - Verifies the revision is healthy and active
494
477
  - Outputs the revision name for use in traffic management
495
478
 
479
+ **Container Configuration YAML:**
480
+
481
+ The `--container-config` file specifies container settings including images, resources, environment variables, and health probes:
482
+
483
+ ```yaml
484
+ containers:
485
+ - name: my-app
486
+ image_name: my-image
487
+ cpu: 0.5
488
+ memory: "1.0Gi"
489
+ env_vars:
490
+ - ENV_VAR1
491
+ - ENV_VAR2
492
+ # relative to the directory which command will run fromm
493
+ dockerfile: ./Dockerfile
494
+ probes:
495
+ - type: Liveness
496
+ http_get:
497
+ path: /health
498
+ port: 8080
499
+ initial_delay_seconds: 10
500
+ period_seconds: 30
501
+ - type: Readiness
502
+ http_get:
503
+ path: /ready
504
+ port: 8080
505
+ initial_delay_seconds: 5
506
+ period_seconds: 10
507
+
508
+ - name: sidecar
509
+ image_name: sidecar-image
510
+ cpu: 0.25
511
+ memory: "0.5Gi"
512
+ env_vars:
513
+ - SIDECAR_CONFIG
514
+ existing_image_tag: v1.0.0 # Optional: retag from existing image
515
+ ```
516
+
517
+ **Configuration Fields:**
518
+
519
+ - `containers` (required): List of container configurations
520
+ - `name`: Container name (required)
521
+ - `image_name`: Image name without registry/tag (required)
522
+ - `cpu`: CPU allocation (required, e.g., 0.5)
523
+ - `memory`: Memory allocation (required, e.g., "1.0Gi")
524
+ - `env_vars`: List of environment variable names to load (optional)
525
+ - `dockerfile`: Path to Dockerfile for building (required if existing_image_tag not provided)
526
+ - `existing_image_tag`: Tag to retag from instead of building (required if dockerfile not provided)
527
+ - `probes`: List of health probes (optional)
528
+
529
+ **Note:** Ingress configuration (target port) and scaling parameters (min/max replicas) are specified via CLI arguments, not in the YAML file.
530
+
496
531
  #### Stage 2: Update Traffic Weights
497
532
 
498
533
  Update traffic distribution and deactivate old revisions:
@@ -603,20 +638,6 @@ azd create-and-assign \
603
638
  --print
604
639
  ```
605
640
 
606
- ## Development
607
-
608
- ```bash
609
- make install-dev # Install with dev tools
610
- make build # Run lint + type-check + test
611
- make lint # Code linting with ruff
612
- make format # Auto-format code
613
- make type-check # Type checking with mypy
614
- make test # Run tests with pytest
615
- make clean # Remove build artifacts
616
- ```
617
-
618
- Commit using [Conventional Commits](https://www.conventionalcommits.org/) format (e.g., `feat: add feature`, `fix: resolve bug`)
619
-
620
641
  ## Scripting and Output Handling
621
642
 
622
643
  This CLI is designed for both interactive use and automated scripting. To support this, it follows the standard practice of separating output streams:
@@ -2,55 +2,38 @@
2
2
 
3
3
  Python CLI for Azure deployment automation - manage identities, roles, and Container Apps deployments.
4
4
 
5
- ## Version Management and Changelog
6
-
7
- This project uses a dual-tool approach:
8
-
9
- - **[setuptools-scm](https://setuptools-scm.readthedocs.io/)** - Automatic versioning based on git tags (dynamic at build time)
10
- - **[commitizen](https://commitizen-tools.github.io/commitizen/)** - Version bumping and tagging with semantic versioning
11
- - **[git-cliff](https://git-cliff.org/)** - Automatic changelog generation from conventional commits
12
-
13
- **Release workflow:**
14
- 1. git-cliff generates changelog from commits since last tag
15
- 2. commitizen bumps version and creates git tag
16
- 3. New version is committed alongside updated changelog
17
- 4. Tag triggers PyPI publishing and GitHub Release
18
-
19
- No manual version or changelog updates are needed.
20
-
21
5
  ## Quick Start
22
6
 
23
7
  **Install for development:**
24
8
 
25
9
  ```bash
26
10
  cd /path/to/azure-deploy-cli
27
- pip install -e ".[dev]"
11
+ source setup.sh -i
28
12
  azd --help
29
13
  ```
30
14
 
31
15
  **Use in another project:**
32
16
 
33
17
  ```bash
34
- pip install -e /path/to/scripts
18
+ pip install azure-deploy-cli
35
19
  ```
36
20
 
37
21
  ## Installation
38
22
 
39
- | Method | Command |
40
- |--------|----------|
41
- | Local development | `pip install -e ".[dev]"` |
42
- | Local changes | `pip install -e /path/to/azure-deploy-cli` |
43
- | From PyPI | `pip install azure-deploy-cli` |
23
+ | Method | Command |
24
+ | ------------------- | ----------------------------- |
25
+ | Local development | `source setup.sh -i` |
26
+ | From PyPI | `pip install azure-deploy-cli`|
44
27
 
45
28
  ## CLI Commands
46
29
 
47
30
  ### Azure Container Apps (ACA) Deployment
48
31
 
49
- The ACA deployment process is split into two stages for better control:
32
+ The ACA deployment process uses YAML configuration for containers and is split into two stages for better control:
50
33
 
51
34
  #### Stage 1: Deploy Revision
52
35
 
53
- Deploy a new container revision without affecting traffic:
36
+ Deploy a new container revision from YAML configuration without affecting traffic:
54
37
 
55
38
  ```bash
56
39
  azd azaca deploy \
@@ -61,25 +44,76 @@ azd azaca deploy \
61
44
  --user-assigned-identity-name my-identity \
62
45
  --container-app my-app \
63
46
  --registry-server myregistry.azurecr.io \
64
- --image-name my-image \
65
47
  --stage prod \
66
- --target-port 8000 \
67
- --cpu 0.5 \
68
- --memory 1.0 \
48
+ --target-port 8080 \
69
49
  --min-replicas 1 \
70
50
  --max-replicas 10 \
71
51
  --keyvault-name my-keyvault \
72
- --dockerfile ./Dockerfile \
73
- --env-vars ENV_VAR1 ENV_VAR2 \
52
+ --container-config ./container-config.yaml \
74
53
  --env-var-secrets SECRET1 SECRET2
75
54
  ```
76
55
 
77
56
  This command:
78
57
 
58
+ - Loads container configurations from YAML file
59
+ - Builds/pushes container images for all containers
79
60
  - Creates or updates a new revision with 0% traffic
61
+ - Supports multiple containers with independent configurations
80
62
  - Verifies the revision is healthy and active
81
63
  - Outputs the revision name for use in traffic management
82
64
 
65
+ **Container Configuration YAML:**
66
+
67
+ The `--container-config` file specifies container settings including images, resources, environment variables, and health probes:
68
+
69
+ ```yaml
70
+ containers:
71
+ - name: my-app
72
+ image_name: my-image
73
+ cpu: 0.5
74
+ memory: "1.0Gi"
75
+ env_vars:
76
+ - ENV_VAR1
77
+ - ENV_VAR2
78
+ # relative to the directory which command will run fromm
79
+ dockerfile: ./Dockerfile
80
+ probes:
81
+ - type: Liveness
82
+ http_get:
83
+ path: /health
84
+ port: 8080
85
+ initial_delay_seconds: 10
86
+ period_seconds: 30
87
+ - type: Readiness
88
+ http_get:
89
+ path: /ready
90
+ port: 8080
91
+ initial_delay_seconds: 5
92
+ period_seconds: 10
93
+
94
+ - name: sidecar
95
+ image_name: sidecar-image
96
+ cpu: 0.25
97
+ memory: "0.5Gi"
98
+ env_vars:
99
+ - SIDECAR_CONFIG
100
+ existing_image_tag: v1.0.0 # Optional: retag from existing image
101
+ ```
102
+
103
+ **Configuration Fields:**
104
+
105
+ - `containers` (required): List of container configurations
106
+ - `name`: Container name (required)
107
+ - `image_name`: Image name without registry/tag (required)
108
+ - `cpu`: CPU allocation (required, e.g., 0.5)
109
+ - `memory`: Memory allocation (required, e.g., "1.0Gi")
110
+ - `env_vars`: List of environment variable names to load (optional)
111
+ - `dockerfile`: Path to Dockerfile for building (required if existing_image_tag not provided)
112
+ - `existing_image_tag`: Tag to retag from instead of building (required if dockerfile not provided)
113
+ - `probes`: List of health probes (optional)
114
+
115
+ **Note:** Ingress configuration (target port) and scaling parameters (min/max replicas) are specified via CLI arguments, not in the YAML file.
116
+
83
117
  #### Stage 2: Update Traffic Weights
84
118
 
85
119
  Update traffic distribution and deactivate old revisions:
@@ -190,20 +224,6 @@ azd create-and-assign \
190
224
  --print
191
225
  ```
192
226
 
193
- ## Development
194
-
195
- ```bash
196
- make install-dev # Install with dev tools
197
- make build # Run lint + type-check + test
198
- make lint # Code linting with ruff
199
- make format # Auto-format code
200
- make type-check # Type checking with mypy
201
- make test # Run tests with pytest
202
- make clean # Remove build artifacts
203
- ```
204
-
205
- Commit using [Conventional Commits](https://www.conventionalcommits.org/) format (e.g., `feat: add feature`, `fix: resolve bug`)
206
-
207
227
  ## Scripting and Output Handling
208
228
 
209
229
  This CLI is designed for both interactive use and automated scripting. To support this, it follows the standard practice of separating output streams: