This project provides a complete solution for deploying .NET applications to IIS servers using Azure DevOps. It automates build, test, and deployment processes, and includes infrastructure configuration and database integration.
- Source Control: GitHub repository for code and workflow management.
- CI/CD: Azure DevOps pipelines automate build, test, and deployment.
- Deployment Target: IIS server (Azure VM or self-hosted agent).
- Automation: PowerShell scripts for remote deployment, Ansible for server configuration.
- Database: Azure SQL Server for persistent data storage.
This diagram shows the high-level architecture, including source control, CI/CD, deployment targets, and supporting infrastructure.
This diagram illustrates the end-to-end CI/CD pipeline, from code commit to deployment and database update.
- Automated build and deployment pipeline
- Remote IIS deployment via PowerShell
- Infrastructure configuration with Ansible
- Integration with Azure SQL Server
- GitHub Actions for repository triggers
- Azure DevOps account and project
- Azure subscription (for VM and SQL Server)
- IIS server (Azure VM or on-premises)
- Service connection between Azure DevOps and Azure
- GitHub repository access
- [Optional] Ansible installed for configuration management
git clone https://github.com/your-username/your-repo.git
cd your-repo- Import the provided YAML pipeline into your Azure DevOps project.
- Set up required pipeline variables (e.g., server IP, credentials, etc.).
- Create service connections for Azure and GitHub.
- Ensure IIS is installed and configured on your target VM.
- Open necessary firewall ports (e.g., 80, 443).
- [Optional] Use the provided Ansible playbooks to automate server setup.
- Provision an Azure SQL Server instance.
- Update connection strings in your application configuration.
- Review and customize the PowerShell script for your environment.
- Ensure the script has permissions to deploy to the IIS server.
- Code Commit: Push code to GitHub.
- Trigger: GitHub Workflow triggers Azure DevOps pipeline.
- Build: Azure DevOps builds the .NET application.
- Test: Automated tests are executed.
- Deploy: PowerShell script deploys the app to IIS server.
- Configure: Ansible playbooks apply additional server configuration.
- Database: Migrations/scripts update Azure SQL Server as needed.
ado-iis-dotnet-deploy/
β
βββ .github/workflows/ # GitHub Actions workflows
βββ azure-pipelines.yml # Azure DevOps pipeline definition
βββ scripts/
β βββ deploy.ps1 # PowerShell deployment script
βββ ansible/
β βββ playbook.yml # Ansible playbook for server config
βββ src/ # .NET application source code
βββ docs/
β βββ architecture.png # Architecture diagram
β βββ pipeline-flow.png # Pipeline flow diagram
βββ README.md # Project documentation
βββ ...
- Push your code to the repository.
- The pipeline will automatically build, test, and deploy your application.
- Monitor pipeline status in Azure DevOps.
- Access your application via the IIS server's public IP or DNS.
- Pipeline Variables: Adjust variables in the pipeline for your environment.
- PowerShell Script: Modify deployment logic as needed.
- Ansible Playbooks: Extend for additional server roles or configuration.
- Store secrets (e.g., credentials, connection strings) in Azure DevOps secure variables or Azure Key Vault.
- Restrict access to deployment scripts and sensitive files.
Contributions are welcome! Please open issues or submit pull requests for improvements.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or support, please open an issue or contact premkumarpalanichamy.

