Reputation: 4264
We are looking to move/create 3 websites with Azure Web Apps, and would like to determine the best design for Resource Groups to use with this.
These 3 websites (website1, website2, and website3) would all point to the same database.
We would like to have a deployment cycle like this:
Azure Web App (AWA1) – website1-dev (DB: CompanyDb-dev; File Storage: CompanyFiles-dev) (Service Plan F1 (Free))
AWA2 – website1-qa (DB: CompanyDb-dev; File Storage: CompanyFiles-dev) (Service Plan F1 (Free))
AWA3 – website1 & website1-staging (slot) (DB: CompanyDb; File Storage: CompanyFiles) (Service Plan S1, S2, or S3)
So, for website1 we could Publish to –dev, -qa, or –staging, and –dev and –qa would use the –dev database and file storage, while –staging and prod would use the prod database and file storage.
So, my question(s), would it make sense to have the 3 Azure Web Apps, the 2 databases, and the 2 file stores in the same Resource group?
If our other two websites will also make use of CompanyDb, should they (and their related development Azure Web Apps) be in the same resource group? Or their own resource group?
Upvotes: 2
Views: 438
Reputation: 12228
According to the Azure Resource Manager overview documentation page.
All of the resources in your group should share the same lifecycle. You will deploy, update and delete them together. If one resource, such as a database server, needs to exist on a different deployment cycle it should be in another resource group.
From that you should consider which pieces can be grouped together as a lifecycle. What group could you safely delete and recreate without affecting the other groups.
From that, it probably safest to have a DB resource group, and each Website in its own group. That way you could probably just have two templates (a db and a website) and deploy those as much as you need.
Upvotes: 2
Reputation: 24636
This is more of a personal preference question. Resource Groups are just for logical grouping of your resources, it doesn't actually affect much implementation wise.
So go with whatever you think is most convenient.
As a side note: instead of creating three different web sites, have you guys considered using Site Slots?
Upvotes: 1