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.
- Azure VNet Module: Handles Virtual Network (VNet) creation and management..
- Azure VM Module: Manages Virtual Machine (VM) deployment and configuration.
- Azure NSG Module: Facilitates Network Security Group (NSG) creation and rules management.
- Azure Subnet Module: Supports subnet creation and configuration within VNets.
- Azure Virtual Network Gateway (VNG) Module: Provides functionality for managing virtual network gateways for secure network connections.
- Azure Route Table Module: Manages route tables and associations with subnets for network traffic routing.
- Azure Scale Set Module: Facilitates creation and management of Virtual Machine Scale Sets for scalable VM deployment.
-
Code Organization: Each module encapsulates logic specific to its Azure resource, enhancing code organization and readability.
-
Reusability: Modules can be reused across projects or within the same project for different infrastructure components, promoting code reusability.
-
Scalability: Easily add new modules for additional Azure resources or modify existing ones without impacting other parts
Before building, ensure:
- Python 3.9+ is installed on your system.
- Azure credentials are configured:
- Either through environment variables (AZURE_CLIENT_ID, AZURE_SECRET, and AZURE_SUBSCRIPTION_ID),
- Or using Azure CLI configuration (az login).
python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install -r requirements.txt
python3 modules/main.py
python3 pip install pytest
pytest test/
docker build -t azure-image .
docker run -p 4000:80 azure-image
docker build -t azure-test-image .
docker run azure-test-image
curl -sSL https://install.python-poetry.org | python3 -
poetry init
poetry install
poetry run python modules/main.py
poetry add --dev pytest
poetry run pytest