Overview
In this project I built a small internal business application environment in Azure. I deployed an Ubuntu Server 24.04 virtual machine without a public IP address. I configured the application subnet and its security rules, gave the subnet outbound internet access through an Azure NAT Gateway and used Azure Bastion to open the server desktop safely from the portal. On the server I installed Docker and Docker Compose, ran PostgreSQL 16 as the database and deployed my Enterprise Management Portal, a Flask application served by Gunicorn.
What I set out to do
- Host an internal application on a server that has no public IP address.
- Give the server controlled outbound access and safe admin access.
- Run the database in containers and connect a Python web application to it.
What I did
- I created the application subnet and its network security group.
- I deployed the Ubuntu Server 24.04 virtual machine and checked the operating system.
- I created a static public IP and a NAT Gateway for the subnet's outbound traffic.
- I opened the Ubuntu desktop through Azure Bastion.
- I deployed PostgreSQL 16 with Docker Compose and created the enterprise_portal database with its own application account.
- I deployed the Flask portal behind Gunicorn.
Screenshots
They are in the same order as in my repository. Click one to see it full size.
I painted over my Azure subscription ID in red. Everything else is as I captured it.
1. Application Subnet and Network Security GroupShows the application subnet and its associated network security group configuration. 2. Initial Application NSG Inbound RulesShows the initial custom inbound security rules configured for the enterprise application environment. 3. Enterprise Application Virtual MachineShows the deployed enterprise application virtual machine and its Azure configuration. 4. Ubuntu System VerificationShows the Ubuntu Server environment and the verification of its operating system and system configuration. 5. NAT Gateway Public IPShows the Standard static public IP address allocated for the application's outbound connectivity through the NAT Gateway. 6. Ubuntu Graphical Desktop Through Azure BastionShows the Ubuntu graphical desktop accessed securely through Azure Bastion without assigning a public IP address to the virtual machine. 7. NAT Gateway DeploymentShows the deployed NAT Gateway and its configuration for the enterprise application subnet. 8. Virtual Machine Disk ConfigurationShows the operating system disk configuration, including its storage type and capacity. 9. PostgreSQL Container DeploymentShows the deployment of PostgreSQL 16 using Docker Compose as the database service for the enterprise application environment. 10. Enterprise Portal DatabaseShows the creation and verification of the dedicated enterprise_portal database and its application database account. 11. Enterprise Portal Deployment and VerificationShows the deployed Flask application and the verification of its health endpoint, PostgreSQL connectivity and Gunicorn application server. 12. Enterprise Management Portal DashboardShows the Enterprise Management Portal dashboard running in Firefox inside the Ubuntu virtual machine. The application is accessed locally through 127.0.0.1:8080. 13. Final Enterprise Application NSG Inbound RulesShows the custom and default inbound security rules configured on nsg-enterprise-app-01, including SSH access, internal HTTPS, Azure Bastion RDP access and the additional inbound traffic restriction.
How I tested it
- I checked the application health endpoint, the database connection and the Gunicorn service.
- I opened the portal dashboard in Firefox on the server at 127.0.0.1:8080.
- I reviewed the final inbound security rules for SSH, internal HTTPS and Bastion access.
Repository
My full notes and the original screenshots are on GitHub: azure-administrator-labs/06-azure-compute-and-app-infra