So we have a scenario where we are currently using Cloud Services to serve two websites, along with some worker roles (worker roles out of scope of this question). We have quite a few environments (5 cloud services env) in the same region, as our users are from a single country.
We are moving towards app services, and we would also like to keep the downtime to minimum. The strategy that we have devised is to configure two app services (one for each website) on every environment and use two trafficmanagers (one for each website) to with two endpoints (priority 1: existing cloud services, priority 2: new app service).
The existing DNS/CNAME configuration is something like following
dev-env.example.com points to website 1 dev-envapi.example.com points to website 2
and the now with the new config I have added two traffic managers, with one as follows dev-env.trafficmanager.net endpoint1 points to cloud service dev-env.trafficmanager.net endpoint2 points to app service (website)
but how do I configure the second website with trafficmanager?
Please find below our existing cloud service webrole and websites config
<WebRole name="App.WebRole" vmsize="Medium" enableNativeCodeExecution="true">
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="dev-env.example.com" />
<Binding name="Endpoint2" endpointName="Endpoint2" hostHeader="dev-env.example.com" />
</Bindings>
</Site>
<Site name="WebApi" physicalDirectory="WebRole.Api\azure.publish">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="dev-envapi.example.com" />
<Binding name="Endpoint2" endpointName="Endpoint2" hostHeader="dev-envapi.example.com" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
<InputEndpoint name="Endpoint2" protocol="https" port="443" certificate="https" />
</Endpoints>
<ConfigurationSettings>
<Setting name="AzureSubscriptionId" />
<Setting name="AzureWebSchedulerCloudServiceName" />
<Setting name="AzureWebSchedulerJobCollectionMaxQuota" />
<Setting name="AzureWebSchedulerCertNameConvention" />
<Setting name="ExternalUrl" />
</ConfigurationSettings>
<LocalResources>
</LocalResources>
<Certificates>
<Certificate name="Windows Azure Tools" storeLocation="LocalMachine" storeName="My" />
<Certificate name="https" storeLocation="LocalMachine" storeName="My" />
</Certificates>
<Imports>
</Imports>
<Startup>
<Task commandLine="Role_Start\Bootstrap.bat" executionContext="elevated" taskType="simple">
<Environment>
<Variable name="EMULATED">
<RoleInstanceValue xpath="/RoleEnvironment/Deployment/@emulated" />
</Variable>
</Environment>
</Task>
</Startup>