EmAchieng / azure-networking-management

0 stars 0 forks source link

Azure Networking Management

Overview

Using Python to provide a modularized management of Azure network. It simplifies tasks such as creating Virtual Networks (VNets), deploying Virtual Machines (VMs), managing Network Security Groups (NSGs), and more.

Modularity

Architecture

Benefits of Modularity

  1. Code Organization: Each module encapsulates logic specific to its Azure resource, enhancing code organization and readability.

  2. Reusability: Modules can be reused across projects or within the same project for different infrastructure components, promoting code reusability.

  3. Scalability: Easily add new modules for additional Azure resources or modify existing ones without impacting other parts

Prerequisites

Before building, ensure:

Pip

Installation Guide

   python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install -r requirements.txt

Running the module files

   python3 modules/main.py

Testing

   python3 pip install pytest
   pytest test/

Docker

Installation Guide

docker build -t azure-image .

Running

   docker run -p 4000:80 azure-image

Testing

   docker build -t azure-test-image .
   docker run azure-test-image

Poetry

Installation Guide

   curl -sSL https://install.python-poetry.org | python3 -
poetry init
poetry install

Running

   poetry run python modules/main.py

Testing

   poetry add --dev pytest
   poetry run pytest