Skip to main content

A Python CLI library for automated cloud deployment to Azure (ACI + ACR)

Project description

☁️ cloud_auto_deployor

PyPI version

cloud_auto_deployor is a Python package that simplifies end-to-end deployment of test automation projects to Azure using Docker and Azure Container Instances (ACI).
Ideal for local developers, QA teams, and CI/CD use cases.


Features

  • Auto-builds Docker image from your automation project
  • Pushes the image to Azure Container Registry (ACR)
  • Deploys the container to Azure Container Instance (ACI)
  • Automatically runs your test suite (e.g. Pytest) in the container
  • No manual Azure Portal steps required

Installation

pip install cloud-auto-deployor

Make sure you have Docker and Azure CLI installed and logged in (az login).


Setup

Your test automation project should include:

demo_project/
├── Dockerfile
├── requirements.txt
├── tests/
│   └── test_example.py
├── run_tests.py           # Triggers pytest
└── config.json            # Azure details (see below)

Example config.json

{
  "resource_group": "<your_resource_group>",
  "acr_name": "<your_acr_name>",
  "image_name": "<your_image_name>",
  "image_tag": "v1",
  "container_name": "<your_container_name>",
  "location": "<your_region>"
}

Usage

From your test project root (where config.json lives), run:

python -m cloud_auto_deployor.main

What happens:

  1. Reads config.json
  2. Builds Docker image using your Dockerfile
  3. Pushes to ACR (auto-creates if needed)
  4. Deploys container instance (ACI)
  5. Automatically triggers run_tests.py to run your tests
  6. ✅ Results appear in Azure Portal Logs

Sample run_tests.py

import pytest
import os
import sys

def run_tests():
    sys.path.insert(0, os.getcwd())
    exit_code = pytest.main(["-vv", "tests/"])
    return exit_code

if __name__ == "__main__":
    run_tests()

Uninstall / Clean Up

To remove the container:

az container delete --name demo-container --resource-group demo-deploy-group --yes

To remove the image from ACR:

az acr repository delete --name myacrdeploymentdemo --image demo_project:v1 --yes

Author

Developed by Raja Periyasamy – Automation Lead | Azure DevOps Follower
📧 cloudautodeployer@gmail.com


License

MIT License


Release Notes

v1.0.3

  • Initial open-source release
  • Supports end-to-end Docker → ACR → ACI automation
  • Auto-triggers test execution from run_tests.py
  • Removed tracked config.json, now properly gitignored
  • Minor cleanup and security best practices applied
  • read me file changes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloud_auto_deployor-1.0.3.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloud_auto_deployor-1.0.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file cloud_auto_deployor-1.0.3.tar.gz.

File metadata

  • Download URL: cloud_auto_deployor-1.0.3.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.1

File hashes

Hashes for cloud_auto_deployor-1.0.3.tar.gz
Algorithm Hash digest
SHA256 b7e2795f86befbaf16323349670bbac21006dd2444fa31577a50ed0eaf443439
MD5 b382a726d109662d6ec07fd019360351
BLAKE2b-256 b0d728055c3a0f2c923901d689a2d65b6b204004fd2c7e4925361c5c90f1cc0b

See more details on using hashes here.

File details

Details for the file cloud_auto_deployor-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for cloud_auto_deployor-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 60e5702435ba76956319784ef5a0b5c6485d47236709caddab19c8e4ea28d9fe
MD5 daadce0b83e037841f794af742b8d34d
BLAKE2b-256 944d4a0058edf17f9f49abf5f447cbe87821dfaed17fa669bf7b1e2bdd1efa15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page