Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
With the planning complete, the next phase is to build and configure the solution in a development environment, adhering to best practices and ensuring quality through testing. A cloud-native solution uses scalable, resilient, and observable architecture patterns to maximize the benefits of Azure services. Building in a nonproduction environment with strong testing and automation practices ensures quality and readiness for production deployment.
Develop new cloud-native solutions
Cloud-native development requires a structured approach that integrates quality practices from the start. This guidance helps you build reliable, secure, and scalable solutions through proven development practices.
Apply Well-Architected Framework principles during development
A cloud-native solution benefits from consistent application of the Well-Architected Framework (WAF) principles Well-Architected Framework (WAF) provides essential principles that guide effective cloud-native development. Integrate these five pillars into your development process to create robust applications that perform well in production.
Develop solutions in a nonproduction environment
Create development environments that mirror production configurations. Set up nonproduction environments (development, test, QA) that closely mirror the production configuration. The closer your test environments are to prod, the more confidence you have that things work upon release. This approach is especially important when adding new features to an existing workload.
Use realistic datasets that represent production data volumes. Test with data that matches the size and complexity of production workloads. Large datasets expose performance bottlenecks and scaling issues that small test datasets miss. Anonymize production data or generate synthetic data that preserves the statistical properties of real data.
Implement cost controls for nonproduction environments. Use Azure DevTest Labs or resource scheduling to automatically start and stop resources when not in use. Apply appropriate service tiers for development workloads and implement spending limits to prevent unexpected costs while maintaining testing effectiveness.
For more information, see Configure test environment in WAF.
Implement changes using source control and CI/CD
Store all code and configuration in a Git repository. Track application code, infrastructure templates, deployment scripts, and configuration files in version control. This practice provides a complete history of changes and enables collaboration among team members.
Break development work into small, frequent commits. Complete feature development in small increments that can be merged and tested independently. This approach reduces integration conflicts and makes it easier to identify the source of issues when they occur.
Automate builds and tests on every code change. Configure CI/CD pipelines that automatically compile code, run tests, and deploy to nonproduction environments when changes are committed. Fast feedback loops help developers catch and fix issues quickly.
Use feature flags to control the release of new functionality. Implement feature toggles that allow you to deploy code to production while keeping new features disabled until they're ready for users. This strategy separates deployment from release and enables safer, more controlled rollouts.
Implement monitoring during development
Integrate Azure Monitor and Application Insights into your application code. Add monitoring data collection to track key performance metrics, user interactions, and system health indicators. Configure these tools during development to ensure they work correctly before production deployment.
Implement structured logging throughout your application. Use consistent log formats and include contextual information like user IDs, request IDs, and business process identifiers. Structure your logs as JSON objects to enable powerful querying and analysis capabilities.
Configure alerts for key metrics and failure conditions. Set up proactive monitoring that notifies you when error rates increase, response times degrade, or business metrics fall outside expected ranges. Define alert thresholds based on your service level objectives and business requirements.
Create dashboards that provide visibility into system performance. Build monitoring dashboards that show the health of your application, infrastructure, and business processes. Include metrics that matter to both technical teams and business stakeholders to enable data-driven decisions.
For more information, see Design a monitoring system and Instrument an application in WAF.
Validate cloud-native solutions with testing
Comprehensive testing validates that your solution meets business requirements and performs reliably under real-world conditions. Each type of testing serves a specific purpose in ensuring solution quality.
Execute end-to-end functional testing to verify business workflows. Test complete user scenarios from authentication through transaction completion using realistic data and interactions. Validate that new features work correctly and that existing functionality remains intact after changes. Run regression tests to catch unintended side effects of new development.
Conduct user acceptance testing with business stakeholders. Engage actual users or business representatives to validate that the solution meets their needs and expectations. Have them test key scenarios in a UAT environment and provide feedback on usability and functionality. Obtain formal approval from stakeholders before proceeding to production deployment.
Perform load testing under realistic conditions to validate performance. Use Azure Load Testing to simulate expected user volumes and data throughput. Test at peak load levels and beyond to identify performance bottlenecks and scaling limits. Measure response times, throughput, and resource utilization to ensure your solution meets performance requirements.
Execute security and compliance testing to identify vulnerabilities. Run automated security scans on application code, container images, and infrastructure configurations. Use Microsoft Defender for Cloud to check for security misconfigurations and compliance violations. Address high-risk vulnerabilities before deployment and implement compensating controls for accepted risks.
Resolve critical issues before production deployment. Treat testing phases as quality gates that must be passed before proceeding. Fix performance issues that prevent meeting service level agreements, resolve security vulnerabilities that pose significant risk. Address functional defects that affect core business processes. Document known low-priority issues with plans for future resolution.
Maintain automated unit and integration test suites. Create comprehensive automated tests that validate individual components and their interactions with external dependencies. Run these tests as part of your CI/CD pipeline and after every bug fix to prevent regressions. A robust automated test suite enables confident continuous delivery in cloud-native environments.
Create reusable infrastructure
Once your modernized solution passes all tests in the nonproduction environment, you should capture the infrastructure setup and configurations as code, so it can be easily replicated in production and future environments. Reusable infrastructure means using infrastructure-as-code (IaC) templates and automation for consistency and speed.
Create IaC templates for proven configurations. Take the final architecture of your test environment (which mirrors what you want in prod) and codify it. Use Bicep, Terraform, or Azure Resource Manager templates to define your infrastructure. Parameterize these templates so they can be reused for different stages, like dev, test,prod with small tweaks like names or sizes. This setup ensures that the production environment you create matches what you tested. It avoids the human error in manually clicking around Azure portal to create resources. It also means if you ever need to recreate the environment, like for disaster recovery or deploying to new regions, you have the infrastructure deployment ready. For more information, see CAF Manage - Manage code-based deployments.
Store templates in version control. Check your infrastructure code into a Git repository (alongside the application code or in a separate repo). Use GitHub or Azure DevOps to manage IaC assets with proper version control. Version control enables code reviews, supports team collaboration, and encourages template reuse across projects. This approach provides complete traceability for infrastructure changes and supports rollback capabilities when issues occur.
Automate dependency installation and configuration. Create scripts or pipeline tasks to deploy these templates and also handle any required configuration or seeding tasks. Use Azure Pipelines, GitHub Actionsto run deployment jobs that take the IaC template and deploy to a target subscription/resource group. Automate installing app dependencies, configuring settings, and secrets management. The goal is one-click (or one-command) environment setup: from nothing to a fully running environment that matches what you tested.
Test the IaC and automation end-to-end. Use a separate Azure subscription or resource group as a sandbox and practice deploying your entire environment from scratch using your templates and scripts. Test that your IaC templates, pipelines, and scripts can create the complete infrastructure stack from nothing. Test different deployment scenarios including initial deployment, configuration updates, and rollback procedures to confirm the automation works correctly.
For more information, see Design a workload development supply change and Infrastructure as code in WAF.
Create deployment documentation
Even with automation, having good documentation around deployments is crucial for audit, for onboarding new team members, and for future maintenance. Deployment documentation should cover configurations, procedures, and rollback steps in human-readable form.
Document configuration settings and steps. Record all environment-specific settings, connection strings, service endpoints, and security configurations in accessible documentation. Include step-by-step deployment instructions, prerequisite requirements, and post-deployment validation steps. This documentation enables consistent deployments and supports troubleshooting when issues occur. If a new engineer had to deploy, they could read this document and follow along or understand the pipeline’s output.
Update rollback and recovery procedures. After you complete your tests, formalize steps to revert changes when deployment issues occur. Include rollback triggers, data backup and restoration procedures, and recovery validation steps. Test rollback and recovery procedures regularly to ensure they work correctly when needed. This preparation reduces downtime.
Collect all this documentation in a central location. Use SharePoint, GitHub, or a wiki to store this information. Ensure the team and support personnel know where to find it. In a high-stress incident, having clear docs at hand is a lifesaver.