コード例 #1
0
        public Task Run()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            string sqlQuery = $@"
USE {scaleUnit.AxDbName};
EXEC sys.sp_set_session_context @key = N'ActiveScaleUnitId', @value = '';

DELETE FROM SysFeatureStateV0;
DELETE FROM FeatureManagementState;
DELETE FROM FeatureManagementMetadata;
DELETE FROM SysFlighting;

TRUNCATE TABLE NumberSequenceScope;

EXEC sys.sp_set_session_context @key = N'ActiveScaleUnitId', @value = '@A';
";

            string cmd = "Invoke-Sqlcmd -Query " + CommandExecutor.Quotes + sqlQuery + CommandExecutor.Quotes + " -QueryTimeout 65535";

            CommandExecutor ce = new CommandExecutor();

            ce.RunCommand(cmd);

            return(Task.CompletedTask);
        }
コード例 #2
0
        public Task Run()
        {
            CheckForAdminAccess.ValidateCurrentUserIsProcessAdmin();

            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            string cmd = $@"
                if (Get-Service '{scaleUnit.BatchServiceName()}' -ErrorAction SilentlyContinue) {{
                    Stop-Service -Name {scaleUnit.BatchServiceName()};
                }}

                .$env:systemroot\System32\inetsrv\appcmd.exe stop apppool /apppool.name:{scaleUnit.AppPoolName()};
                .$env:systemroot\System32\inetsrv\appcmd.exe stop site /site.name:{scaleUnit.SiteName()}; 
            ";

            var ce = new CommandExecutor();

            try
            {
                ce.RunCommand(cmd);
            }
            catch (Exception)
            {
                if (!Config.UseSingleOneBox())
                {
                    throw;
                }
            }

            return(Task.CompletedTask);
        }
コード例 #3
0
        public Task Run()
        {
            const string ScaleUnitManagementUserName = "******";

            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            string sqlQuery = $@"
USE {scaleUnit.AxDbName};

IF NOT EXISTS (SELECT TOP 1 1 FROM SysAADClientTable WHERE AADClientId = '{scaleUnit.AuthConfiguration.AppId}')
BEGIN
    IF EXISTS (SELECT TOP 1 1 FROM USERINFO WHERE ID = '{ScaleUnitManagementUserName}')
        INSERT INTO SysAADClientTable (AADClientId, UserId, Name) VALUES ('{scaleUnit.AuthConfiguration.AppId}', '{ScaleUnitManagementUserName}', 'Scale Unit Management Tool');
    ELSE
        INSERT INTO SysAADClientTable (AADClientId, UserId, Name) VALUES ('{scaleUnit.AuthConfiguration.AppId}', 'Admin', 'Scale Unit Management Tool');
END
";

            string cmd = "Invoke-SqlCmd -Query " + CommandExecutor.Quotes + sqlQuery + CommandExecutor.Quotes + " -QueryTimeout 65535";

            CommandExecutor ce = new CommandExecutor();

            ce.RunCommand(cmd);

            return(Task.CompletedTask);
        }
コード例 #4
0
        public void Run()
        {
            CheckForAdminAccess.ValidateCurrentUserIsProcessAdmin();

            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            string cmd = $@"
                Stop-Service -Name {scaleUnit.BatchServiceName()};
                .$env:systemroot\System32\inetsrv\appcmd.exe stop apppool /apppool.name:{scaleUnit.AppPoolName()};
                .$env:systemroot\System32\inetsrv\appcmd.exe stop site /site.name:{scaleUnit.SiteName()}; 
            ";

            CommandExecutor ce = new CommandExecutor();

            try
            {
                ce.RunCommand(cmd);
            }
            catch (Exception)
            {
                if (!Config.UseSingleOneBox())
                {
                    throw;
                }
            }
        }
コード例 #5
0
        public Task Run()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            using (var webConfig = new WebConfig())
            {
                SharedWebConfig.Configure(webConfig);

                if (scaleUnit.EnvironmentType == EnvironmentType.VHD || Config.UseSingleOneBox())
                {
                    webConfig.UpdateXElement("Infrastructure.StartStorageEmulator", "false");

                    webConfig.AddValidAudiences(scaleUnit);
                }
            }

            if (Config.UseSingleOneBox())
            {
                // Update hosts file
                using (var hosts = new Hosts())
                {
                    hosts.AddMapping(scaleUnit.IpAddress, scaleUnit.DomainSafe());
                }

                // Update IIS binding
                IISAdministrationHelper.CreateSite(
                    siteName: scaleUnit.SiteName(),
                    siteRoot: scaleUnit.SiteRoot(),
                    bindingInformation: scaleUnit.IpAddress + ":443:" + scaleUnit.DomainSafe(),
                    certSubject: scaleUnit.DomainSafe(),
                    appPoolName: scaleUnit.AppPoolName());
            }

            return(Task.CompletedTask);
        }
コード例 #6
0
        public void Run()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            if (scaleUnit.EnvironmentType == EnvironmentType.VHD || Config.UseSingleOneBox())
            {
                // Update hosts file
                using (var hosts = new Hosts())
                {
                    hosts.AddMapping(scaleUnit.IpAddress, scaleUnit.DomainSafe());
                    hosts.AddMapping(Config.HubScaleUnit().IpAddress, Config.HubScaleUnit().DomainSafe());
                }

                IISAdministrationHelper.CreateSite(
                    siteName: scaleUnit.SiteName(),
                    siteRoot: scaleUnit.SiteRoot(),
                    bindingInformation: scaleUnit.IpAddress + ":443:" + scaleUnit.DomainSafe(),
                    certSubject: scaleUnit.DomainSafe(),
                    appPoolName: scaleUnit.AppPoolName());
            }

            using (var webConfig = new WebConfig())
            {
                if (scaleUnit.EnvironmentType == EnvironmentType.VHD || Config.UseSingleOneBox())
                {
                    if (!String.IsNullOrEmpty(Config.AADTenantId()))
                    {
                        webConfig.UpdateXElement("Aad.AADTenantId", Config.AADTenantId());
                    }

                    if (!String.IsNullOrEmpty(scaleUnit.AzureStorageConnectionString))
                    {
                        webConfig.UpdateXElement("AzureStorage.StorageConnectionString", scaleUnit.AzureStorageConnectionString);
                    }

                    webConfig.UpdateXElement("Infrastructure.FullyQualifiedDomainName", scaleUnit.DomainSafe());
                    webConfig.UpdateXElement("Infrastructure.HostName", scaleUnit.DomainSafe());
                    webConfig.UpdateXElement("Infrastructure.HostedServiceName", scaleUnit.ScaleUnitUrlName());

                    string scaleUnitUrl = scaleUnit.Endpoint() + "/";
                    webConfig.UpdateXElement("Infrastructure.HostUrl", scaleUnitUrl);
                    webConfig.UpdateXElement("Infrastructure.SoapServicesUrl", scaleUnitUrl);

                    webConfig.UpdateXElement("DataAccess.Database", scaleUnit.AxDbName);
                }

                webConfig.AddKey("ScaleUnit.InstanceID", scaleUnit.ScaleUnitId);
                webConfig.AddKey("ScaleUnit.Enabled", "true");
                webConfig.AddKey("DbSync.TriggersEnabled", "true");
            }

            WifServiceConfig.Update();

            if (Config.UseSingleOneBox())
            {
                CreateScaleUnitBatchService(scaleUnit);
            }
        }
コード例 #7
0
        public void Run()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            string sqlQuery = $"USE master; IF NOT EXISTS (SELECT * FROM sys.change_tracking_databases WHERE database_id=DB_ID('{scaleUnit.AxDbName}')) ALTER DATABASE {scaleUnit.AxDbName} SET CHANGE_TRACKING = ON(CHANGE_RETENTION = 2 DAYS, AUTO_CLEANUP = ON)";
            string cmd      = "Invoke-Sqlcmd -Query " + CommandExecutor.Quotes + sqlQuery + CommandExecutor.Quotes + " -QueryTimeout 65535";

            CommandExecutor ce = new CommandExecutor();

            ce.RunCommand(cmd);
        }
コード例 #8
0
        public WebConfig()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            webConfigPath          = scaleUnit.WebConfigPath();
            configEncryptorExePath = scaleUnit.ConfigEncryptorExePath();

            doc = XDocument.Load(webConfigPath);

            appSettingsElement = doc.Descendants()
                                 .Where(x => (string)x.Name.LocalName == "appSettings")
                                 .FirstOrDefault();
        }
コード例 #9
0
        public HubConfigurationManager()
        {
            scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            hubConfig = new ScaleUnitEnvironmentConfiguration()
            {
                AppId                 = Config.InterAOSAppId(),
                AppTenant             = Config.InterAOSAuthority(),
                HubResourceId         = Config.InterAOSAppResourceId(scaleUnit),
                HubUrl                = scaleUnit.Endpoint(),
                HubS2SEncryptedSecret = Config.InterAOSAppSecret(),
                ScaleUnitType         = "0",
            };
        }
コード例 #10
0
        public Task Run()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            if (scaleUnit.EnvironmentType == EnvironmentType.VHD || Config.UseSingleOneBox())
            {
                // Update hosts file
                using (var hosts = new Hosts())
                {
                    hosts.AddMapping(scaleUnit.IpAddress, scaleUnit.DomainSafe());
                    hosts.AddMapping(Config.HubScaleUnit().IpAddress, Config.HubScaleUnit().DomainSafe());
                }

                IISAdministrationHelper.CreateSite(
                    siteName: scaleUnit.SiteName(),
                    siteRoot: scaleUnit.SiteRoot(),
                    bindingInformation: scaleUnit.IpAddress + ":443:" + scaleUnit.DomainSafe(),
                    certSubject: scaleUnit.DomainSafe(),
                    appPoolName: scaleUnit.AppPoolName());
            }

            using (var webConfig = new WebConfig())
            {
                SharedWebConfig.Configure(webConfig);

                if (scaleUnit.EnvironmentType == EnvironmentType.VHD || Config.UseSingleOneBox())
                {
                    webConfig.UpdateXElement("Infrastructure.FullyQualifiedDomainName", scaleUnit.DomainSafe());
                    webConfig.UpdateXElement("Infrastructure.HostName", scaleUnit.DomainSafe());
                    webConfig.UpdateXElement("Infrastructure.HostedServiceName", scaleUnit.ScaleUnitUrlName());

                    string scaleUnitUrl = scaleUnit.Endpoint() + "/";
                    webConfig.UpdateXElement("Infrastructure.HostUrl", scaleUnitUrl);
                    webConfig.UpdateXElement("Infrastructure.SoapServicesUrl", scaleUnitUrl);

                    webConfig.UpdateXElement("DataAccess.Database", scaleUnit.AxDbName);

                    webConfig.AddValidAudiences(scaleUnit);
                }
            }

            WifServiceConfig.Update();

            if (Config.UseSingleOneBox())
            {
                CreateScaleUnitBatchService(scaleUnit);
            }

            return(Task.CompletedTask);
        }
コード例 #11
0
        public static void Configure(WebConfig webConfig)
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            if (scaleUnit.EnvironmentType == EnvironmentType.VHD || Config.UseSingleOneBox())
            {
                if (!String.IsNullOrEmpty(scaleUnit.AzureStorageConnectionString))
                {
                    webConfig.UpdateXElement("AzureStorage.StorageConnectionString", scaleUnit.AzureStorageConnectionString);
                }
            }

            webConfig.AddKey("ScaleUnit.InstanceID", scaleUnit.ScaleUnitId);
            webConfig.AddKey("ScaleUnit.Enabled", "true");
            webConfig.AddKey("DbSync.TriggersEnabled", "true");
        }
コード例 #12
0
        public void Run()
        {
            CheckForAdminAccess.ValidateCurrentUserIsProcessAdmin();

            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            string cmd = $@"
                 Start-Service -Name {scaleUnit.BatchServiceName()};
                 .$env:systemroot\System32\inetsrv\appcmd.exe start apppool /apppool.name:{scaleUnit.AppPoolName()};
                 .$env:systemroot\System32\inetsrv\appcmd.exe start site /site.name:{scaleUnit.SiteName()}; 
            ";

            CommandExecutor ce = new CommandExecutor();

            ce.RunCommand(cmd);
        }
コード例 #13
0
        public void Run()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());
            string            sqlQuery  = $@"
USE {scaleUnit.AxDbName};

IF NOT EXISTS (SELECT TOP 1 1 FROM SysAADClientTable WHERE AADClientId = '{Config.AppId()}')
    INSERT INTO SysAADClientTable (AADClientId, UserId, Name) VALUES ('{Config.AppId()}', 'Admin', 'Scale Unit Management Tool');
";

            string cmd = "Invoke-SqlCmd -Query " + CommandExecutor.Quotes + sqlQuery + CommandExecutor.Quotes + " -QueryTimeout 65535";

            CommandExecutor ce = new CommandExecutor();

            ce.RunCommand(cmd);
        }
コード例 #14
0
        public static void Update()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            XmlDocument wifDoc = new XmlDocument();

            wifDoc.Load(scaleUnit.WifServicesConfigPath());

            // Update urls in wif.services.config
            var cookieHandlerNode           = wifDoc.SelectSingleNode("/system.identityModel.services/federationConfiguration/cookieHandler");
            XmlAttributeCollection attrColl = cookieHandlerNode.Attributes;
            XmlAttribute           attr     = (XmlAttribute)attrColl.GetNamedItem("domain");

            attr.Value = scaleUnit.DomainSafe();

            wifDoc.Save(scaleUnit.WifServicesConfigPath());
        }
コード例 #15
0
        private static async Task InstallWorkloadsForScaleUnit(int input, string selectionHistory)
        {
            List <ScaleUnitInstance> scaleUnitInstances = Config.ScaleUnitInstances();

            scaleUnitInstances.Sort();

            using (var context = ScaleUnitContext.CreateContext(scaleUnitInstances[input - 1].ScaleUnitId))
            {
                if (ScaleUnitContext.GetScaleUnitId() == "@@")
                {
                    await new HubWorkloadInstaller().Install();
                }
                else
                {
                    await new ScaleUnitWorkloadInstaller().Install();
                }
            }
        }
コード例 #16
0
        private static async Task PrintAvailableStepsForScaleUnit(int input, string selectionHistory)
        {
            List <ScaleUnitInstance> scaleUnitInstances = Config.ScaleUnitInstances();

            scaleUnitInstances.Sort();

            using (var context = ScaleUnitContext.CreateContext(scaleUnitInstances[input - 1].ScaleUnitId))
            {
                if (scaleUnitInstances[input - 1].ScaleUnitId == "@@")
                {
                    await new EnableScaleUnitFeatureOnHub().PrintAvailableSteps(input, selectionHistory);
                }
                else
                {
                    await new EnableScaleUnitFeatureOnScaleUnit().PrintAvailableSteps(input, selectionHistory);
                }
            }
        }
コード例 #17
0
        public Task Run()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            string sqlQuery = $@"
USE {scaleUnit.AxDbName};
IF NOT EXISTS (SELECT TOP 1 1 FROM SysFlighting WHERE FlightName = '{MESFlightName}')
    INSERT INTO SysFlighting (FlightName, Enabled, FlightServiceId) VALUES ('{MESFlightName}', 1, 12719367);
";

            string cmd = "Invoke-SqlCmd -Query " + CommandExecutor.Quotes + sqlQuery + CommandExecutor.Quotes + " -QueryTimeout 65535";

            CommandExecutor ce = new CommandExecutor();

            ce.RunCommand(cmd);

            return(Task.CompletedTask);
        }
コード例 #18
0
        private static async Task ConfigureScaleUnit(int input, string selectionHistory)
        {
            List <ScaleUnitInstance> scaleUnitInstances = Config.ScaleUnitInstances();

            scaleUnitInstances.Sort();

            using (var context = ScaleUnitContext.CreateContext(scaleUnitInstances[input - 1].ScaleUnitId))
            {
                if (ScaleUnitContext.GetScaleUnitId() == "@@")
                {
                    await new HubConfigurationManager().Configure();
                }
                else
                {
                    await new ScaleUnitConfigurationManager().Configure();
                }
            }
        }
コード例 #19
0
        protected async Task PrintAvailableSteps(int input, string selectionHistory)
        {
            var options = new List <CLIOption>();

            AvailableSteps = GetAvailableSteps();
            AvailableSteps.Sort((x, y) => x.Priority().CompareTo(y.Priority()));

            foreach (IStep s in AvailableSteps)
            {
                options.Add(new CLIOption()
                {
                    Name = s.Label(), Command = RunStepsFromTask
                });
            }

            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());
            CLIScreen         screen    = new CLIScreen(options, selectionHistory, $"Task sequence to run for {scaleUnit.PrintableName()}\n", "\nSelect task to start from: ");
            await CLIMenu.ShowScreen(screen);
        }
コード例 #20
0
        public void Run()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            using (var webConfig = new WebConfig())
            {
                if (scaleUnit.EnvironmentType == EnvironmentType.VHD)
                {
                    if (!String.IsNullOrEmpty(Config.AADTenantId()))
                    {
                        webConfig.UpdateXElement("Aad.AADTenantId", Config.AADTenantId());
                    }

                    if (!String.IsNullOrEmpty(scaleUnit.AzureStorageConnectionString))
                    {
                        webConfig.UpdateXElement("AzureStorage.StorageConnectionString", scaleUnit.AzureStorageConnectionString);
                    }

                    webConfig.UpdateXElement("Infrastructure.StartStorageEmulator", "false");
                }

                webConfig.AddKey("ScaleUnit.InstanceID", scaleUnit.ScaleUnitId);
                webConfig.AddKey("ScaleUnit.Enabled", "true");
                webConfig.AddKey("DbSync.TriggersEnabled", "true");
            }

            if (Config.UseSingleOneBox())
            {
                // Update hosts file
                using (var hosts = new Hosts())
                {
                    hosts.AddMapping(scaleUnit.IpAddress, scaleUnit.DomainSafe());
                }

                // Update IIS binding
                IISAdministrationHelper.CreateSite(
                    siteName: scaleUnit.SiteName(),
                    siteRoot: scaleUnit.SiteRoot(),
                    bindingInformation: scaleUnit.IpAddress + ":443:" + scaleUnit.DomainSafe(),
                    certSubject: scaleUnit.DomainSafe(),
                    appPoolName: scaleUnit.AppPoolName());
            }
        }
コード例 #21
0
        public void Run()
        {
            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            string sqlQuery = $@"
USE {scaleUnit.AxDbName};

-- insert row under Hub scale unit id to avoid merge conflicts later, as the table is synced Hub->Scale Unit
EXEC sys.sp_set_session_context @key = N'ActiveScaleUnitId', @value = '@@';

IF NOT EXISTS (SELECT TOP 1 1 FROM SysFlighting WHERE FlightName = '{MESFlightName}')
    INSERT INTO SysFlighting (FlightName, Enabled, FlightServiceId) VALUES ('{MESFlightName}', 1, 12719367);
";

            string cmd = "Invoke-SqlCmd -Query " + CommandExecutor.Quotes + sqlQuery + CommandExecutor.Quotes + " -QueryTimeout 65535";

            CommandExecutor ce = new CommandExecutor();

            ce.RunCommand(cmd);
        }
コード例 #22
0
        internal static void CreateSite(string siteName, string siteRoot,
                                        string bindingInformation, string certSubject, string appPoolName)
        {
            if (String.IsNullOrEmpty(siteName) ||
                String.IsNullOrEmpty(siteRoot) ||
                String.IsNullOrEmpty(bindingInformation) ||
                String.IsNullOrEmpty(certSubject) ||
                String.IsNullOrEmpty(appPoolName))
            {
                throw new ArgumentNullException();
            }

            ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

            if (!scaleUnit.IsHub() && Config.UseSingleOneBox())
            {
                CreateAppPoolForScaleUnit(scaleUnit, appPoolName);
            }

            using (ServerManager manager = new ServerManager())
            {
                Site site = manager.Sites.FirstOrDefault((s) => s.Name.Equals(siteName));

                if (site != null)
                {
                    manager.Sites.Remove(site);
                }

                site = manager.Sites.Add(siteName, siteRoot, 443);
                site.Applications[0].ApplicationPoolName = appPoolName;

                site.Bindings.Clear();
                site.Bindings.Add(bindingInformation,
                                  CertificateStoreHelper.GetCertificateHashFromLocalMachineStore(certSubject),
                                  CertificateStoreHelper.PersonalCertificateStoreName);

                manager.CommitChanges();
            }
        }
コード例 #23
0
        public void Run()
        {
            Console.WriteLine("2. Executing DbSync");

            try
            {
                ScaleUnitInstance scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());

                string dbSyncTool       = Path.Combine(scaleUnit.ServiceVolume, @"AOSService\PackagesLocalDirectory\bin\syncengine.exe");
                string metaBinariesPath = Path.Combine(scaleUnit.ServiceVolume, @"AOSService\PackagesLocalDirectory");

                string cmd =
                    dbSyncTool
                    + " -syncmode=" + CommandExecutor.Quotes + "fullall" + CommandExecutor.Quotes
                    + " -metadatabinaries=" + CommandExecutor.Quotes + metaBinariesPath + CommandExecutor.Quotes
                    + " -connect=" + CommandExecutor.Quotes + $"Data Source=localhost;Initial Catalog={scaleUnit.AxDbName};Integrated Security=True;Enlist=True;Application Name=AXVSSDK" + CommandExecutor.Quotes
                    + " -verbosity=" + CommandExecutor.Quotes + "Diagnostic" + CommandExecutor.Quotes
                    + " -scaleUnitOptionsAsJson=" + CommandExecutor.Quotes + "{" + CommandExecutor.Quotes + "IsScaleUnitFeatureEnabled" + CommandExecutor.Quotes + ": true, " + CommandExecutor.Quotes + "scaleUnitMnemonics" + CommandExecutor.Quotes + ":" + $"'{scaleUnit.ScaleUnitId}'" + " }" + CommandExecutor.Quotes
                    + " -triggerOptionsAsJson=" + CommandExecutor.Quotes + "{" + CommandExecutor.Quotes + "IsEnabled" + CommandExecutor.Quotes + ": true}" + CommandExecutor.Quotes
                    + $" > {scaleUnit.AxDbName}_DbSync.log";

                Console.WriteLine(cmd);

                Console.WriteLine("\nDBSync started at: " + DateTime.UtcNow + ", this will take approximately 30 minutes.\n");

                CommandExecutor ce = new CommandExecutor();
                ce.RunCommand(cmd);

                Console.WriteLine("\nDBSync finished \n");
            }

            catch (Exception)
            {
                Console.WriteLine("\nDBSync failed \n");
                throw;
            }
        }
コード例 #24
0
 public ScaleUnitWorkloadInstaller()
 {
     scaleUnit = Config.FindScaleUnitWithId(ScaleUnitContext.GetScaleUnitId());
 }