Share
## https://sploitus.com/exploit?id=254159E9-7A66-5CAD-91F8-E0B9C3E5CAD6
# Randstad Azure Linux Architect โ POC
**GitHub:** https://github.com/saikirangvariganti/randstad-linux-azure-architect-poc
A proof-of-concept demonstrating the full Linux workload migration and operations stack for the Randstad Azure Linux Architect role. This repository covers Azure Migrate wave planning, Terraform Landing Zone, Ansible OS configuration, Chef idempotent cookbooks, Apache/Varnish/HAProxy web stack with TLS termination, and comprehensive HLD/LLD documentation.
---
## Architecture Overview
```
Internet โ Azure Load Balancer (Public, Zone-Redundant)
โ HAProxy (TLS termination, port 443)
โ Varnish Cache (HTTP cache, port 6081)
โ Apache (origin, port 8080)
โ Internal LB โ App Tier (RHEL 8 / Ubuntu 22.04)
โ PostgreSQL Cluster (Data Tier)
Hub VNet: Azure Firewall, Bastion, Log Analytics
Spoke VNet: Web subnet, App subnet, Data subnet (hub-spoke peering)
```
---
## Repository Structure
```
randstad-linux-azure-architect-poc/
โโโ terraform/ # Infrastructure as Code
โ โโโ main.tf # Root module
โ โโโ variables.tf
โ โโโ modules/
โ โโโ landing_zone/ # Management groups, hub-spoke VNets, Azure Policy
โ โโโ linux_vms/ # RHEL 8 + Ubuntu 22.04 IaaS VMs
โ โโโ key_vault/ # Azure Key Vault with access policies
โ โโโ networking/ # NSGs, load balancers, route tables
โโโ ansible/ # Ansible playbooks
โ โโโ inventory.yml # Inventory (web_tier, app_tier, data_tier groups)
โ โโโ kernel_tuning.yml # sysctl, hugepages, ulimits, tcp_bbr
โ โโโ lvm_setup.yml # LVM PV/VG/LV creation and mounting
โ โโโ web_stack.yml # Apache + Varnish + HAProxy deployment
โ โโโ os_hardening.yml # CIS Level 2 hardening (SSH, auditd, firewalld)
โ โโโ azure_iam.yml # Azure AD integration, OMS agent
โโโ chef/ # Chef cookbooks
โ โโโ cookbooks/
โ โโโ linux_baseline/ # Baseline OS config, packages, chrony, rsyslog
โ โโโ web_stack/ # Apache + Varnish + HAProxy cookbook
โ โโโ kernel_tuning/ # Kernel performance tuning cookbook
โโโ web_stack/ # Web stack configuration files
โ โโโ httpd.conf # Apache config (origin on port 8080)
โ โโโ default.vcl # Varnish VCL (cache rules, backend health)
โ โโโ haproxy.cfg # HAProxy config (TLS termination, LB rules)
โโโ migration/ # Azure Migrate documentation
โ โโโ assessment_plan.md # Discovery methodology, dependency mapping
โ โโโ wave_plan.md # 7-wave migration plan with TCO details
โ โโโ tco_model.py # Python TCO calculator (3-year comparison)
โ โโโ cutover_runbook.md # Step-by-step cutover procedure
โโโ hld_lld/ # Architecture documentation
โ โโโ HLD.md # High-Level Design (architecture principles, overview)
โ โโโ LLD.md # Low-Level Design (NSG rules, VM specs, cipher suites)
โ โโโ bill_of_materials.md # Full Azure resource and software BOM
โโโ scripts/ # Utility scripts
โ โโโ azure_migrate_prep.sh # Pre-migration VM preparation
โ โโโ kernel_benchmark.sh # Post-migration kernel performance validation
โ โโโ tls_verify.sh # TLS/SSL stack verification
โโโ .github/workflows/
โ โโโ lint_and_test.yml # pytest + Terraform fmt/validate + ShellCheck
โ โโโ ansible_lint.yml # ansible-lint + Chef Cookstyle
โโโ tests/
โโโ test_poc.py # 85+ pytest tests (file existence, content validation)
```
---
## Key Technologies Demonstrated
| Technology | Usage |
|-----------|-------|
| **Terraform** (azurerm ~3.80) | Landing zone, hub-spoke topology, management groups, Azure Policy |
| **Ansible** (>= 2.15) | Kernel tuning (sysctl/hugepages/ulimits), LVM setup, OS hardening (CIS L2), web stack |
| **Chef** (>= 17.0) | Idempotent linux_baseline, web_stack, kernel_tuning cookbooks |
| **Azure Migrate** | Discovery, dependency mapping, wave-based migration |
| **HAProxy 2.8** | TLS 1.2/1.3 termination, HSTS, modern cipher suites (ECDHE/AES-GCM/ChaCha20) |
| **Varnish 7.x** | HTTP caching (VCL 4.1), TTL rules, PURGE ACLs |
| **Apache 2.4** | Origin server (port 8080), security headers, gzip, mod_proxy |
| **Hub-Spoke VNet** | Azure Firewall, Bastion, NSGs, load balancers, route tables |
---
## Running the TCO Model
```bash
python migration/tco_model.py
```
Outputs a 3-year TCO comparison across:
- On-premises (current state)
- Azure IaaS Pay-As-You-Go
- Azure IaaS 1-year Reserved Instances
- Azure IaaS 3-year Reserved Instances (best case)
---
## Running the Tests
```bash
# Install dependencies
pip install pytest pyyaml
# Run all 85+ tests
pytest tests/test_poc.py -v
```
---
## Deploying the Infrastructure
```bash
# Prerequisites: Azure CLI authenticated, subscription configured
cd terraform
# Initialise (replace with your backend config)
terraform init \
-backend-config="resource_group_name=rg-tfstate-poc" \
-backend-config="storage_account_name=strandstadtfstate" \
-backend-config="container_name=tfstate"
# Plan
terraform plan -var="environment=nonprod" -out=tfplan
# Apply
terraform apply tfplan
```
---
## Applying Ansible Configuration
```bash
# From the Ansible control node (hub management subnet)
cd ansible
# OS hardening (all hosts)
ansible-playbook -i inventory.yml os_hardening.yml
# Kernel tuning (all hosts)
ansible-playbook -i inventory.yml kernel_tuning.yml
# Web stack (web tier only)
ansible-playbook -i inventory.yml web_stack.yml --limit web_tier
```
---
## Migration Wave Execution
1. Deploy Azure Landing Zone (Terraform)
2. Run Azure Migrate discovery (minimum 24 hours)
3. Review dependency maps and wave plan (`migration/wave_plan.md`)
4. Execute waves 0โ7 per `migration/cutover_runbook.md`
5. Post-migration: apply Ansible config, validate with `scripts/kernel_benchmark.sh`
---
## TLS Verification
```bash
# After web stack deployment
./scripts/tls_verify.sh app.randstad.com 443
# Tests: certificate validity, TLS 1.0/1.1 rejection, cipher suites, HSTS
```
---
## Author
**Sai Kiran Goud Variganti**
GitHub: [saikirangvariganti](https://github.com/saikirangvariganti)
Role target: Azure Linux Architect โ Randstad