Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Options or setting up a test environment in Azure

I have an app service running on Azure with an associated SQL server DB.

I would like to create a test environment for the project.

I looked at a few Azure Dev/Test tutorials but they are for setting up VMs and I couldn't see anything indicating it can be used for a app service.

Is my only option to duplicate the appservice, db, ssl certs, custom domains and effectively double my azure bill?

like image 584
Toby Holland Avatar asked May 02 '18 03:05

Toby Holland


People also ask

What is an Azure environment?

What is Azure? At its core, Azure is a public cloud computing platform—with solutions including Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS) that can be used for services such as analytics, virtual computing, storage, networking, and much more.

How do you create a dev and prod environment in Azure?

Sign in to your organization: https://dev.azure.com/{yourorganization} and select your project. Select Pipelines > Environments > Create environment. Enter information for the environment, and then select Create. Resources can be added to an existing environment later.

How do I set up my Azure Dev/test environment?

There are three major phases to setting up this dev/test environment: Set up the virtual network and domain controller (adVM). Add the Exchange server (exVM). Configure Exchange. If you don't already have an Azure subscription, you can sign up for an Azure Free Trial.

What is the best way to create an environment in azure?

I would advise to create Azure Resource Manager templates for your complete environment. This way, you can script the creation of your environment and create environments at will. Azure DevOps supports deploying ARM templates and by parameterizing things like resource names you can easily create multiple environments from your pipelines.

What is the Office 365 DEV/TEST environment in azure?

With the Office 365 dev/test environment in Azure, you can follow step-by-step instructions to configure a simplified intranet in Azure infrastructure services, an Office 365 Enterprise E5 subscription, and directory synchronization for Azure Active Directory (AD). With this new dev/test environment, you can:

What is Azure Active Directory test environment?

Dedicated test tenant or production Azure AD tenant? To help move your app through the development, test, and production lifecycle, set up an Azure Active Directory (Azure AD) test environment. You can use your Azure AD test environment during the early stages of app development and long-term as a permanent test environment.


2 Answers

Bruno gave good advice, but here's a few more things to consider.

If you use deployment slots, you are sharing your Web App CPU and memory between all slots. If something goes horribly wrong with a test build that's deployed to a slot on your production machine, your production environment can end up resource starved. I personally don't recommend using slots for testing for this reason. Slots are more for smoke testing/warming up a build that you're about to swap into your production slot.

If you want to save money yet still have the benefit of separate environments, consider looking into ARM templates. ARM templates let you script the provisioning of Azure resources. You can create ARM templates based on your production environment, including scripting the App Settings section of your Web App to hold test configuration settings. You can then deploy your ARM template that spins up a test environment right from a Visual Studio project. If you put all of your test resources into the same resource group, tearing down your test environment is a few mouse clicks to delete the test resource group.

like image 120
Rob Reagan Avatar answered Oct 18 '22 12:10

Rob Reagan


For the App Service, you have something called Slots. This allows you to have multiple environments on the same App Service. You can also have multiple Web Apps under the same App Service Plan as well instead of using Slots, so in this case, you only pay for 1 backend. App Service has a Free Tier, but with limitations such as not supporting custom domains.

Set up staging environments in Azure App Service

For SQL Databases you have to pay for each DB or use Elastic Pools (1 backend for multiple DBs) but that's only worth when you're using at least 100DTUs DBs. The minimum database you can have is the Basic one, but that's $6/month.

like image 42
Bruno Faria Avatar answered Oct 18 '22 14:10

Bruno Faria