private void ProcessDeployOptions(DeployOption deployOption)
 {
     _appInstanceCount = deployOption.WebappCount;
     if (_appInstanceCount > 1)
     {
         var i = MAX_SCALE_OUT;
         for (; i > 1; i--)
         {
             if (deployOption.WebappCount % i == 0)
             {
                 _appPlanCount = deployOption.WebappCount / i;
                 _scaleOut     = i;
                 break;
             }
         }
         if (i == 1)
         {
             throw new InvalidDataException("The web app instance count should be 1 or divided by 2 or 3 or 5 or 7");
         }
     }
     else if (_appInstanceCount == 1)
     {
         _appPlanCount = _scaleOut = 1;
     }
     else
     {
         throw new InvalidDataException("The web app instance count should be 1 or divided by 2 or 3 or 5 or 7");
     }
 }
Exemplo n.º 2
0
 private static async Task RunDeploy(DeployOption deploy)
 {
     var webappMgt = new WebAppManagement(deploy);
     await webappMgt.Deploy();
 }