From a0df5b01473177f135aa26fb5dfa2bea74923d38 Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Sun, 24 Jan 2021 11:05:31 +0200 Subject: [PATCH 01/18] Add notification before deploying to Docker --- .../Buttons/InstallContainerButton.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallContainerButton.cs b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallContainerButton.cs index c4d0d1b6..26849b42 100644 --- a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallContainerButton.cs +++ b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallContainerButton.cs @@ -56,6 +56,25 @@ public void OnClick(Window mainWindow, Instance instance) return; } + if (ApplicationManager.IsIisRunning) + { + string urlToWikiPage = "https://github.com/Sitecore/Sitecore-Instance-Manager/wiki/Troubleshooting"; + + string message = $@"The IIS is running now. +It may prevent 'docker-compose' from spinning up Sitecore in Docker, due to the HTTPS(443) port usage conflict. +Please visit the '{urlToWikiPage}' for details. + +Please stop the IIS and continue the installation. + +Do you want to proceed with the installation process?"; + + if (MessageBox.Show(message, "", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No) + { + return; + } + } + + if (EnvironmentHelper.CheckSqlServer()) { WizardPipelineManager.Start("installContainer", mainWindow, null, null, (args) => From 91511dc1f0a89cb19af75c89ed619630779d6bc1 Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Sun, 24 Jan 2021 21:19:01 +0200 Subject: [PATCH 02/18] Add notifications to InstallInstanceButton and Install9InstanceButton --- .../Buttons/Install9InstanceButton.cs | 27 +++++++++++++++++++ .../Buttons/InstallInstanceButton.cs | 9 +++++++ 2 files changed, 36 insertions(+) diff --git a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/Install9InstanceButton.cs b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/Install9InstanceButton.cs index 013e878c..4c920515 100644 --- a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/Install9InstanceButton.cs +++ b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/Install9InstanceButton.cs @@ -11,6 +11,33 @@ public class Install9InstanceButton : WindowOnlyButton protected override void OnClick([NotNull] Window mainWindow) { + if (!ApplicationManager.IsIisRunning) + { + string message = "The 'IIS' application is not running. Please start the app and re-run the Sitecore installation."; + + MessageBox.Show(message, "", MessageBoxButton.OK, MessageBoxImage.Information); + + return; + } + + if (ApplicationManager.IsDockerRunning) + { + string urlToWikiPage = "https://github.com/Sitecore/Sitecore-Instance-Manager/wiki/Troubleshooting"; + + string message = $@"The 'Docker Desktop' is running now. +It may prevent the Sitecore installation process, due to the HTTPS(443) port usage conflict. +Please visit the '{urlToWikiPage}' for details. + +Please stop the 'Docker Desktop' and continue the installation. + +Do you want to proceed with the installation process?"; + + if (MessageBox.Show(message, "", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No) + { + return; + } + } + WizardPipelineManager.Start("install9", mainWindow, null, null, (args) => { if (args == null) diff --git a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallInstanceButton.cs b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallInstanceButton.cs index 9662366b..38861494 100644 --- a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallInstanceButton.cs +++ b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallInstanceButton.cs @@ -30,6 +30,15 @@ protected override void OnClick(Window mainWindow) * put the files into the current local repository folder: {ProfileManager.Profile.LocalRepository}"); + if (!ApplicationManager.IsIisRunning) + { + string message = "The 'IIS' application is not running. Please start the app and re-run the Sitecore installation."; + + MessageBox.Show(message, "", MessageBoxButton.OK, MessageBoxImage.Information); + + return; + } + if (EnvironmentHelper.CheckSqlServer()) { WizardPipelineManager.Start("install", mainWindow, null, null, (args) => From e8a215a10863393ad6f31b1e46e2fa764701c297 Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Tue, 26 Jan 2021 13:16:24 +0200 Subject: [PATCH 03/18] Update the the notification text --- .../MainWindowComponents/Buttons/Install9InstanceButton.cs | 2 +- .../MainWindowComponents/Buttons/InstallContainerButton.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/Install9InstanceButton.cs b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/Install9InstanceButton.cs index 4c920515..8348f648 100644 --- a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/Install9InstanceButton.cs +++ b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/Install9InstanceButton.cs @@ -25,7 +25,7 @@ protected override void OnClick([NotNull] Window mainWindow) string urlToWikiPage = "https://github.com/Sitecore/Sitecore-Instance-Manager/wiki/Troubleshooting"; string message = $@"The 'Docker Desktop' is running now. -It may prevent the Sitecore installation process, due to the HTTPS(443) port usage conflict. +It may prevent the Sitecore installation process, due to the HTTPS port 443 usage conflict. Please visit the '{urlToWikiPage}' for details. Please stop the 'Docker Desktop' and continue the installation. diff --git a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallContainerButton.cs b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallContainerButton.cs index 26849b42..0a7aa188 100644 --- a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallContainerButton.cs +++ b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/InstallContainerButton.cs @@ -61,7 +61,7 @@ public void OnClick(Window mainWindow, Instance instance) string urlToWikiPage = "https://github.com/Sitecore/Sitecore-Instance-Manager/wiki/Troubleshooting"; string message = $@"The IIS is running now. -It may prevent 'docker-compose' from spinning up Sitecore in Docker, due to the HTTPS(443) port usage conflict. +It may prevent 'docker-compose' from spinning up Sitecore in Docker, due to the HTTPS port 443 usage conflict. Please visit the '{urlToWikiPage}' for details. Please stop the IIS and continue the installation. From 723857182d3d37de0ddc2c886a74e7b138781082 Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Tue, 26 Jan 2021 20:27:51 +0200 Subject: [PATCH 04/18] Fix: CD instance is not displayed in the list closes #543 --- src/SIM.Pipelines/Install/Containers/GenerateEnvironmentData.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SIM.Pipelines/Install/Containers/GenerateEnvironmentData.cs b/src/SIM.Pipelines/Install/Containers/GenerateEnvironmentData.cs index f836cd3b..d0458549 100644 --- a/src/SIM.Pipelines/Install/Containers/GenerateEnvironmentData.cs +++ b/src/SIM.Pipelines/Install/Containers/GenerateEnvironmentData.cs @@ -19,6 +19,7 @@ public class GenerateEnvironmentData : Processor { "id", "cm", + "cd", "xconnect", "prc", "rep", From b809b59200190c23cc8fc09fbe4db9be935bcbed Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Sat, 30 Jan 2021 20:08:30 +0200 Subject: [PATCH 05/18] Fix: Unable to reinstall or delete Sitecore XP 8 closes #541 --- src/SIM.Tool.Base/Windows/Wizard.xaml.cs | 6 +++++- .../MainWindowComponents/Buttons/ReinstallInstanceButton.cs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/SIM.Tool.Base/Windows/Wizard.xaml.cs b/src/SIM.Tool.Base/Windows/Wizard.xaml.cs index 2e7b6fbe..c880b5b4 100644 --- a/src/SIM.Tool.Base/Windows/Wizard.xaml.cs +++ b/src/SIM.Tool.Base/Windows/Wizard.xaml.cs @@ -31,6 +31,7 @@ public partial class Wizard : IPipelineController { #region Fields + [CanBeNull] public WizardArgs WizardArgs { get; } private ProcessorArgs Args { get; } @@ -678,7 +679,10 @@ private void InitializeStep(int? i = null) } // In case we run a pipeline we have to refresh the instances list disregard the results of the installation. - this.WizardArgs.ShouldRefreshInstancesList = true; + if (this.WizardArgs != null) + { + this.WizardArgs.ShouldRefreshInstancesList = true; + } PipelineManager.StartPipeline(pipelineName, _ProcessorArgs, this); backButton.Visibility = Visibility.Hidden; diff --git a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/ReinstallInstanceButton.cs b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/ReinstallInstanceButton.cs index dbb02ce1..4c0b7da5 100644 --- a/src/SIM.Tool.Windows/MainWindowComponents/Buttons/ReinstallInstanceButton.cs +++ b/src/SIM.Tool.Windows/MainWindowComponents/Buttons/ReinstallInstanceButton.cs @@ -21,7 +21,7 @@ public class ReinstallInstanceButton : InstanceOnlyButton public override void OnClick(Window mainWindow, Instance instance) { if (instance?.Name != null && - SitecoreEnvironmentHelper.GetExistingSitecoreEnvironment(instance.Name).EnvType == + SitecoreEnvironmentHelper.GetExistingSitecoreEnvironment(instance.Name)?.EnvType == SitecoreEnvironment.EnvironmentType.Container ) { From baecb906ea5cc229c03e3ed492dd877d729af25e Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Tue, 2 Feb 2021 18:14:20 +0200 Subject: [PATCH 06/18] Make the SQL_SA_PASSWORD more complex closes #548 --- .../{IKeyGenerator.cs => IGenerator.cs} | 2 +- .../ReportingApiKeyGenerator.cs | 2 +- .../SIM.ContainerInstaller.csproj | 3 ++- .../SqlAdminPasswordGenerator.cs | 24 +++++++++++++++++++ .../TelerikKeyGenerator.cs | 2 +- .../GenerateReportingApiKeyProcessor.cs | 2 +- .../GenerateSqlAdminPasswordProcessor.cs | 24 +++++++++++++++++++ .../Containers/GenerateTelerikKeyProcessor.cs | 2 +- src/SIM.Pipelines/PipelinesConfig.cs | 1 + src/SIM.Pipelines/SIM.Pipelines.csproj | 1 + .../Install/Containers/SelectTag.xaml.cs | 4 ---- .../Scripts/SqlAdminPasswordGenerator.ps1 | 5 ++++ src/SIM.Tool/SIM.Tool.csproj | 3 +++ 13 files changed, 65 insertions(+), 10 deletions(-) rename src/SIM.ContainerInstaller/{IKeyGenerator.cs => IGenerator.cs} (67%) create mode 100644 src/SIM.ContainerInstaller/SqlAdminPasswordGenerator.cs create mode 100644 src/SIM.Pipelines/Install/Containers/GenerateSqlAdminPasswordProcessor.cs create mode 100644 src/SIM.Tool/ContainerFiles/Scripts/SqlAdminPasswordGenerator.ps1 diff --git a/src/SIM.ContainerInstaller/IKeyGenerator.cs b/src/SIM.ContainerInstaller/IGenerator.cs similarity index 67% rename from src/SIM.ContainerInstaller/IKeyGenerator.cs rename to src/SIM.ContainerInstaller/IGenerator.cs index 476a4e5d..4b69a8c8 100644 --- a/src/SIM.ContainerInstaller/IKeyGenerator.cs +++ b/src/SIM.ContainerInstaller/IGenerator.cs @@ -1,6 +1,6 @@ namespace SIM.ContainerInstaller { - public interface IKeyGenerator + public interface IGenerator { string Generate(); } diff --git a/src/SIM.ContainerInstaller/ReportingApiKeyGenerator.cs b/src/SIM.ContainerInstaller/ReportingApiKeyGenerator.cs index 709b40bc..54f53216 100644 --- a/src/SIM.ContainerInstaller/ReportingApiKeyGenerator.cs +++ b/src/SIM.ContainerInstaller/ReportingApiKeyGenerator.cs @@ -7,7 +7,7 @@ namespace SIM.ContainerInstaller { [UsedImplicitly] - public class ReportingApiKeyGenerator : IKeyGenerator + public class ReportingApiKeyGenerator : IGenerator { public string Generate() { diff --git a/src/SIM.ContainerInstaller/SIM.ContainerInstaller.csproj b/src/SIM.ContainerInstaller/SIM.ContainerInstaller.csproj index 74dfc740..7becbd1c 100644 --- a/src/SIM.ContainerInstaller/SIM.ContainerInstaller.csproj +++ b/src/SIM.ContainerInstaller/SIM.ContainerInstaller.csproj @@ -68,7 +68,7 @@ - + @@ -82,6 +82,7 @@ + diff --git a/src/SIM.ContainerInstaller/SqlAdminPasswordGenerator.cs b/src/SIM.ContainerInstaller/SqlAdminPasswordGenerator.cs new file mode 100644 index 00000000..320b29e9 --- /dev/null +++ b/src/SIM.ContainerInstaller/SqlAdminPasswordGenerator.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.ObjectModel; +using System.IO; +using System.Management.Automation; + +namespace SIM.ContainerInstaller +{ + public class SqlAdminPasswordGenerator: IGenerator + { + public string Generate() + { + string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/SqlAdminPasswordGenerator.ps1"); + PSFileExecutor ps = new PSFileExecutor(scriptFile, Directory.GetCurrentDirectory()); + Collection results = ps.Execute(); + + if (results.Count < 1) + { + throw new InvalidOperationException("Error in: SqlAdminPasswordGenerator. PS script has returned less than 1 result."); + } + + return results[0].ToString(); + } + } +} \ No newline at end of file diff --git a/src/SIM.ContainerInstaller/TelerikKeyGenerator.cs b/src/SIM.ContainerInstaller/TelerikKeyGenerator.cs index 60798f49..6ee2a14a 100644 --- a/src/SIM.ContainerInstaller/TelerikKeyGenerator.cs +++ b/src/SIM.ContainerInstaller/TelerikKeyGenerator.cs @@ -7,7 +7,7 @@ namespace SIM.ContainerInstaller { [UsedImplicitly] - public class TelerikKeyGenerator : IKeyGenerator + public class TelerikKeyGenerator : IGenerator { public string Generate() { diff --git a/src/SIM.Pipelines/Install/Containers/GenerateReportingApiKeyProcessor.cs b/src/SIM.Pipelines/Install/Containers/GenerateReportingApiKeyProcessor.cs index 229d2d2c..c340f2a6 100644 --- a/src/SIM.Pipelines/Install/Containers/GenerateReportingApiKeyProcessor.cs +++ b/src/SIM.Pipelines/Install/Containers/GenerateReportingApiKeyProcessor.cs @@ -10,7 +10,7 @@ public class GenerateReportingApiKeyProcessor : Processor { private const string Key = "REPORTING_API_KEY"; - private readonly IKeyGenerator _generator = new ReportingApiKeyGenerator(); + private readonly IGenerator _generator = new ReportingApiKeyGenerator(); protected override void Process([NotNull] ProcessorArgs arguments) { Assert.ArgumentNotNull(arguments, "arguments"); diff --git a/src/SIM.Pipelines/Install/Containers/GenerateSqlAdminPasswordProcessor.cs b/src/SIM.Pipelines/Install/Containers/GenerateSqlAdminPasswordProcessor.cs new file mode 100644 index 00000000..e02de3c7 --- /dev/null +++ b/src/SIM.Pipelines/Install/Containers/GenerateSqlAdminPasswordProcessor.cs @@ -0,0 +1,24 @@ +using JetBrains.Annotations; +using SIM.ContainerInstaller; +using SIM.Pipelines.Processors; +using Sitecore.Diagnostics.Base; + +namespace SIM.Pipelines.Install.Containers +{ + [UsedImplicitly] + public class GenerateSqlAdminPasswordProcessor : Processor + { + private readonly IGenerator _generator = new SqlAdminPasswordGenerator(); + protected override void Process([NotNull] ProcessorArgs arguments) + { + Assert.ArgumentNotNull(arguments, "arguments"); + + InstallContainerArgs args = (InstallContainerArgs)arguments; + + if (string.IsNullOrEmpty(args.EnvModel.SqlAdminPassword)) + { + args.EnvModel.SqlAdminPassword = this._generator.Generate(); + } + } + } +} diff --git a/src/SIM.Pipelines/Install/Containers/GenerateTelerikKeyProcessor.cs b/src/SIM.Pipelines/Install/Containers/GenerateTelerikKeyProcessor.cs index f6207539..10952846 100644 --- a/src/SIM.Pipelines/Install/Containers/GenerateTelerikKeyProcessor.cs +++ b/src/SIM.Pipelines/Install/Containers/GenerateTelerikKeyProcessor.cs @@ -8,7 +8,7 @@ namespace SIM.Pipelines.Install.Containers [UsedImplicitly] public class GenerateTelerikKeyProcessor : Processor { - private readonly IKeyGenerator _generator = new TelerikKeyGenerator(); + private readonly IGenerator _generator = new TelerikKeyGenerator(); protected override void Process([NotNull] ProcessorArgs arguments) { Assert.ArgumentNotNull(arguments, "arguments"); diff --git a/src/SIM.Pipelines/PipelinesConfig.cs b/src/SIM.Pipelines/PipelinesConfig.cs index 284066bd..002ef12d 100644 --- a/src/SIM.Pipelines/PipelinesConfig.cs +++ b/src/SIM.Pipelines/PipelinesConfig.cs @@ -28,6 +28,7 @@ public static class PipelinesConfig + diff --git a/src/SIM.Pipelines/SIM.Pipelines.csproj b/src/SIM.Pipelines/SIM.Pipelines.csproj index 638aa939..1212db0b 100644 --- a/src/SIM.Pipelines/SIM.Pipelines.csproj +++ b/src/SIM.Pipelines/SIM.Pipelines.csproj @@ -113,6 +113,7 @@ + diff --git a/src/SIM.Tool.Windows/UserControls/Install/Containers/SelectTag.xaml.cs b/src/SIM.Tool.Windows/UserControls/Install/Containers/SelectTag.xaml.cs index d332cf30..b1418b15 100644 --- a/src/SIM.Tool.Windows/UserControls/Install/Containers/SelectTag.xaml.cs +++ b/src/SIM.Tool.Windows/UserControls/Install/Containers/SelectTag.xaml.cs @@ -115,10 +115,6 @@ private void Topologies_SelectionChanged(object sender, System.Windows.Controls. private EnvModel CreateModel(string envPath) { EnvModel model = EnvModel.LoadFromFile(envPath); - if (string.IsNullOrWhiteSpace(model.SqlAdminPassword)) - { - model.SqlAdminPassword = ProfileManager.Profile.SqlPassword; - } if (string.IsNullOrWhiteSpace(model.SitecoreAdminPassword)) { diff --git a/src/SIM.Tool/ContainerFiles/Scripts/SqlAdminPasswordGenerator.ps1 b/src/SIM.Tool/ContainerFiles/Scripts/SqlAdminPasswordGenerator.ps1 new file mode 100644 index 00000000..c846a368 --- /dev/null +++ b/src/SIM.Tool/ContainerFiles/Scripts/SqlAdminPasswordGenerator.ps1 @@ -0,0 +1,5 @@ +Import-Module SitecoreDockerTools + +$SqlAdminPassword = Get-SitecoreRandomString -Length 20 -DisAllowSpecial -EnforceComplexity + +return $SqlAdminPassword \ No newline at end of file diff --git a/src/SIM.Tool/SIM.Tool.csproj b/src/SIM.Tool/SIM.Tool.csproj index 17d73164..3d983f44 100644 --- a/src/SIM.Tool/SIM.Tool.csproj +++ b/src/SIM.Tool/SIM.Tool.csproj @@ -520,6 +520,9 @@ Always + + Always + Always From 72ab818b5d19ab36f644794b0df5062e2b7ede82 Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Tue, 2 Feb 2021 22:56:24 +0200 Subject: [PATCH 07/18] Replace ps1 file extension to txt to allow click once support --- src/SIM.ContainerInstaller/SqlAdminPasswordGenerator.cs | 2 +- ...AdminPasswordGenerator.ps1 => SqlAdminPasswordGenerator.txt} | 0 src/SIM.Tool/SIM.Tool.csproj | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/SIM.Tool/ContainerFiles/Scripts/{SqlAdminPasswordGenerator.ps1 => SqlAdminPasswordGenerator.txt} (100%) diff --git a/src/SIM.ContainerInstaller/SqlAdminPasswordGenerator.cs b/src/SIM.ContainerInstaller/SqlAdminPasswordGenerator.cs index 320b29e9..036e3002 100644 --- a/src/SIM.ContainerInstaller/SqlAdminPasswordGenerator.cs +++ b/src/SIM.ContainerInstaller/SqlAdminPasswordGenerator.cs @@ -9,7 +9,7 @@ public class SqlAdminPasswordGenerator: IGenerator { public string Generate() { - string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/SqlAdminPasswordGenerator.ps1"); + string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/SqlAdminPasswordGenerator.txt"); PSFileExecutor ps = new PSFileExecutor(scriptFile, Directory.GetCurrentDirectory()); Collection results = ps.Execute(); diff --git a/src/SIM.Tool/ContainerFiles/Scripts/SqlAdminPasswordGenerator.ps1 b/src/SIM.Tool/ContainerFiles/Scripts/SqlAdminPasswordGenerator.txt similarity index 100% rename from src/SIM.Tool/ContainerFiles/Scripts/SqlAdminPasswordGenerator.ps1 rename to src/SIM.Tool/ContainerFiles/Scripts/SqlAdminPasswordGenerator.txt diff --git a/src/SIM.Tool/SIM.Tool.csproj b/src/SIM.Tool/SIM.Tool.csproj index 3d983f44..3028d671 100644 --- a/src/SIM.Tool/SIM.Tool.csproj +++ b/src/SIM.Tool/SIM.Tool.csproj @@ -520,7 +520,7 @@ Always - + Always From 91810125e9f8d5eaa37320503f36c9c4d7916559 Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Tue, 2 Feb 2021 23:04:32 +0200 Subject: [PATCH 08/18] Replace ps1 file extension to txt to allow click once support --- .../IdentityServerValuesGenerator.cs | 2 +- src/SIM.ContainerInstaller/ReportingApiKeyGenerator.cs | 2 +- src/SIM.ContainerInstaller/TelerikKeyGenerator.cs | 2 +- .../Install/Containers/InstallDockerToolsProcessor.cs | 2 +- ...{IdentityServerScript.ps1 => IdentityServerScript.txt} | 0 ...oduleScript.ps1 => InstallDockerToolsModuleScript.txt} | 0 ...ngApiKeyGenerator.ps1 => ReportingApiKeyGenerator.txt} | 0 ...yGeneratorScript.ps1 => TelerikKeyGeneratorScript.txt} | 0 src/SIM.Tool/SIM.Tool.csproj | 8 ++++---- 9 files changed, 8 insertions(+), 8 deletions(-) rename src/SIM.Tool/ContainerFiles/Scripts/{IdentityServerScript.ps1 => IdentityServerScript.txt} (100%) rename src/SIM.Tool/ContainerFiles/Scripts/{InstallDockerToolsModuleScript.ps1 => InstallDockerToolsModuleScript.txt} (100%) rename src/SIM.Tool/ContainerFiles/Scripts/{ReportingApiKeyGenerator.ps1 => ReportingApiKeyGenerator.txt} (100%) rename src/SIM.Tool/ContainerFiles/Scripts/{TelerikKeyGeneratorScript.ps1 => TelerikKeyGeneratorScript.txt} (100%) diff --git a/src/SIM.ContainerInstaller/IdentityServerValuesGenerator.cs b/src/SIM.ContainerInstaller/IdentityServerValuesGenerator.cs index 88d1a366..e6f47ee3 100644 --- a/src/SIM.ContainerInstaller/IdentityServerValuesGenerator.cs +++ b/src/SIM.ContainerInstaller/IdentityServerValuesGenerator.cs @@ -18,7 +18,7 @@ out string idCertificatePassword { Assert.ArgumentNotNull(targetFolder, "targetFolder"); - string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/IdentityServerScript.ps1"); + string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/IdentityServerScript.txt"); PSFileExecutor ps = new PSFileExecutor(scriptFile, Path.GetDirectoryName(targetFolder)); Collection results = ps.Execute(); diff --git a/src/SIM.ContainerInstaller/ReportingApiKeyGenerator.cs b/src/SIM.ContainerInstaller/ReportingApiKeyGenerator.cs index 709b40bc..82c9de01 100644 --- a/src/SIM.ContainerInstaller/ReportingApiKeyGenerator.cs +++ b/src/SIM.ContainerInstaller/ReportingApiKeyGenerator.cs @@ -11,7 +11,7 @@ public class ReportingApiKeyGenerator : IKeyGenerator { public string Generate() { - string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/ReportingApiKeyGenerator.ps1"); + string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/ReportingApiKeyGenerator.txt"); PSFileExecutor ps = new PSFileExecutor(scriptFile, Directory.GetCurrentDirectory()); Collection results = ps.Execute(); diff --git a/src/SIM.ContainerInstaller/TelerikKeyGenerator.cs b/src/SIM.ContainerInstaller/TelerikKeyGenerator.cs index 60798f49..b1ffdd62 100644 --- a/src/SIM.ContainerInstaller/TelerikKeyGenerator.cs +++ b/src/SIM.ContainerInstaller/TelerikKeyGenerator.cs @@ -11,7 +11,7 @@ public class TelerikKeyGenerator : IKeyGenerator { public string Generate() { - string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/TelerikKeyGeneratorScript.ps1"); + string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/TelerikKeyGeneratorScript.txt"); PSFileExecutor ps = new PSFileExecutor(scriptFile, Directory.GetCurrentDirectory()); Collection results = ps.Execute(); diff --git a/src/SIM.Pipelines/Install/Containers/InstallDockerToolsProcessor.cs b/src/SIM.Pipelines/Install/Containers/InstallDockerToolsProcessor.cs index 6cca102c..806b5636 100644 --- a/src/SIM.Pipelines/Install/Containers/InstallDockerToolsProcessor.cs +++ b/src/SIM.Pipelines/Install/Containers/InstallDockerToolsProcessor.cs @@ -10,7 +10,7 @@ public class InstallDockerToolsProcessor : Processor { protected override void Process(ProcessorArgs args) { - string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/InstallDockerToolsModuleScript.ps1"); + string scriptFile = Path.Combine(Directory.GetCurrentDirectory(), "ContainerFiles/scripts/InstallDockerToolsModuleScript.txt"); PSFileExecutor ps = new PSFileExecutor(scriptFile, Directory.GetCurrentDirectory()); ps.Execute(); diff --git a/src/SIM.Tool/ContainerFiles/Scripts/IdentityServerScript.ps1 b/src/SIM.Tool/ContainerFiles/Scripts/IdentityServerScript.txt similarity index 100% rename from src/SIM.Tool/ContainerFiles/Scripts/IdentityServerScript.ps1 rename to src/SIM.Tool/ContainerFiles/Scripts/IdentityServerScript.txt diff --git a/src/SIM.Tool/ContainerFiles/Scripts/InstallDockerToolsModuleScript.ps1 b/src/SIM.Tool/ContainerFiles/Scripts/InstallDockerToolsModuleScript.txt similarity index 100% rename from src/SIM.Tool/ContainerFiles/Scripts/InstallDockerToolsModuleScript.ps1 rename to src/SIM.Tool/ContainerFiles/Scripts/InstallDockerToolsModuleScript.txt diff --git a/src/SIM.Tool/ContainerFiles/Scripts/ReportingApiKeyGenerator.ps1 b/src/SIM.Tool/ContainerFiles/Scripts/ReportingApiKeyGenerator.txt similarity index 100% rename from src/SIM.Tool/ContainerFiles/Scripts/ReportingApiKeyGenerator.ps1 rename to src/SIM.Tool/ContainerFiles/Scripts/ReportingApiKeyGenerator.txt diff --git a/src/SIM.Tool/ContainerFiles/Scripts/TelerikKeyGeneratorScript.ps1 b/src/SIM.Tool/ContainerFiles/Scripts/TelerikKeyGeneratorScript.txt similarity index 100% rename from src/SIM.Tool/ContainerFiles/Scripts/TelerikKeyGeneratorScript.ps1 rename to src/SIM.Tool/ContainerFiles/Scripts/TelerikKeyGeneratorScript.txt diff --git a/src/SIM.Tool/SIM.Tool.csproj b/src/SIM.Tool/SIM.Tool.csproj index 17d73164..67b66607 100644 --- a/src/SIM.Tool/SIM.Tool.csproj +++ b/src/SIM.Tool/SIM.Tool.csproj @@ -226,7 +226,7 @@ Always - + Always @@ -508,16 +508,16 @@ Always - + Always - + Always Always - + Always From ebe10c39fc91dd0261e0c8d1582fa3793d6ac456 Mon Sep 17 00:00:00 2001 From: Viacheslav Afanasyev <9393016+ViacheslavAfanasyev@users.noreply.github.com> Date: Tue, 9 Feb 2021 17:15:05 -0500 Subject: [PATCH 09/18] #Add removing files directories if they exist --- src/SIM.Pipelines/Delete/CleanUp.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/SIM.Pipelines/Delete/CleanUp.cs b/src/SIM.Pipelines/Delete/CleanUp.cs index 8f36f98b..bd855608 100644 --- a/src/SIM.Pipelines/Delete/CleanUp.cs +++ b/src/SIM.Pipelines/Delete/CleanUp.cs @@ -30,6 +30,29 @@ protected override void Process([NotNull] ProcessorArgs args) { Directory.Delete(param.Value, true); } + else if (param != null) + { + this.DeleteDirectoryWithFiles(param.Value); + } + + } + + private void DeleteDirectoryWithFiles(string target) + { + string[] files = Directory.GetFiles(target); + string[] dirs = Directory.GetDirectories(target); + + foreach (string file in files) + { + File.Delete(file); + } + + foreach (string dir in dirs) + { + DeleteDirectoryWithFiles(dir); + } + + Directory.Delete(target, false); } } } From 1276b6f53c3124316c7da7bbf1164b4f029cec3e Mon Sep 17 00:00:00 2001 From: Viacheslav Afanasyev <9393016+ViacheslavAfanasyev@users.noreply.github.com> Date: Fri, 12 Feb 2021 13:00:31 -0500 Subject: [PATCH 10/18] #Add checking of JAVE_HOME variable --- .../UserControls/Solr/SolrDetails.xaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs b/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs index 0ec550db..c76ca114 100644 --- a/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs +++ b/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs @@ -71,7 +71,14 @@ public bool OnMovingNext(WizardArgs wizardArgs) tasker.GlobalParams.First(p => p.Name == "SolrInstallRoot").Value = this.solrFolderSelector.Text; } - tasker.GlobalParams.First(p => p.Name == "JavaHome").Value = Environment.GetEnvironmentVariable("JAVA_HOME"); + string javaHomeVariable = Environment.GetEnvironmentVariable("JAVA_HOME"); + if (string.IsNullOrEmpty(javaHomeVariable)) + { + MessageBox.Show("Required JAVA_HOME system variable was not found.\nIt seems Java Runtime Environment (JRE) has not been installed.", "Warning"); + return false; + } + + tasker.GlobalParams.First(p => p.Name == "JavaHome").Value = javaHomeVariable; Install9WizardArgs args = (Install9WizardArgs)wizardArgs; args.Tasker = this.tasker; return true; From d20f084fa743d336c7aed93da4f45de72aa3770a Mon Sep 17 00:00:00 2001 From: Viacheslav Afanasyev <9393016+ViacheslavAfanasyev@users.noreply.github.com> Date: Wed, 24 Feb 2021 16:37:42 -0500 Subject: [PATCH 11/18] #Add retryer --- src/SIM.Pipelines/Delete/CleanUp.cs | 34 +++++++++++------------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/src/SIM.Pipelines/Delete/CleanUp.cs b/src/SIM.Pipelines/Delete/CleanUp.cs index bd855608..baed06b5 100644 --- a/src/SIM.Pipelines/Delete/CleanUp.cs +++ b/src/SIM.Pipelines/Delete/CleanUp.cs @@ -26,33 +26,25 @@ protected override void Process([NotNull] ProcessorArgs args) Directory.Delete(arguments.Tasker.UnInstallParamsPath, true); InstallParam param = arguments.Tasker.GlobalParams.FirstOrDefault(p => p.Name == "DeployRoot"); - if (param!=null&&!Directory.GetFileSystemEntries(param.Value).Any()) + if (param!=null) { - Directory.Delete(param.Value, true); + RetryAction(() => + { + if (Directory.Exists(param.Value)) + { + Directory.Delete(param.Value, true); + } + }, 3, 10000); + } - else if (param != null) - { - this.DeleteDirectoryWithFiles(param.Value); - } - } - - private void DeleteDirectoryWithFiles(string target) + async void RetryAction(Action action, int retrisNumber, int delayMs) { - string[] files = Directory.GetFiles(target); - string[] dirs = Directory.GetDirectories(target); - - foreach (string file in files) + for (int i = 0; i < retrisNumber; i++) { - File.Delete(file); + action(); + await Task.Delay(delayMs); } - - foreach (string dir in dirs) - { - DeleteDirectoryWithFiles(dir); - } - - Directory.Delete(target, false); } } } From eed4bcdb6cc792be7c51282377da484ff599e8c7 Mon Sep 17 00:00:00 2001 From: Viacheslav Afanasyev <9393016+ViacheslavAfanasyev@users.noreply.github.com> Date: Wed, 24 Feb 2021 17:01:12 -0500 Subject: [PATCH 12/18] #Add checking jave.exe file in the variable path --- src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs b/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs index c76ca114..e2f5c4f6 100644 --- a/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs +++ b/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs @@ -77,6 +77,11 @@ public bool OnMovingNext(WizardArgs wizardArgs) MessageBox.Show("Required JAVA_HOME system variable was not found.\nIt seems Java Runtime Environment (JRE) has not been installed.", "Warning"); return false; } + else if(!Directory.Exists(Path.Combine(javaHomeVariable, "bin")) || Directory.GetFiles(Path.Combine(javaHomeVariable, "bin"),"java.exe").Length==0) + { + MessageBox.Show($"Java Runtime Environment (JRE) was not found.\nMissing file: {Path.Combine(javaHomeVariable, "bin", "java.exe")}", "Warning"); + return false; + } tasker.GlobalParams.First(p => p.Name == "JavaHome").Value = javaHomeVariable; Install9WizardArgs args = (Install9WizardArgs)wizardArgs; From ed1b00ef2785e46ff82ba9f855eb2634b13a4a7a Mon Sep 17 00:00:00 2001 From: Viacheslav Afanasyev <9393016+ViacheslavAfanasyev@users.noreply.github.com> Date: Fri, 26 Feb 2021 14:35:34 -0500 Subject: [PATCH 13/18] #Change warn message --- src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs b/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs index e2f5c4f6..3500128b 100644 --- a/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs +++ b/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs @@ -77,9 +77,9 @@ public bool OnMovingNext(WizardArgs wizardArgs) MessageBox.Show("Required JAVA_HOME system variable was not found.\nIt seems Java Runtime Environment (JRE) has not been installed.", "Warning"); return false; } - else if(!Directory.Exists(Path.Combine(javaHomeVariable, "bin")) || Directory.GetFiles(Path.Combine(javaHomeVariable, "bin"),"java.exe").Length==0) + else if(!Directory.Exists(Path.Combine(javaHomeVariable, "bin1")) || Directory.GetFiles(Path.Combine(javaHomeVariable, "bin"),"java.exe").Length==0) { - MessageBox.Show($"Java Runtime Environment (JRE) was not found.\nMissing file: {Path.Combine(javaHomeVariable, "bin", "java.exe")}", "Warning"); + MessageBox.Show($"The 'JAVA_HOME' system variable does not point to the proper JRE folder: {javaHomeVariable}", "Warning"); return false; } From 38f913d511e3dabdf94b84f0e55c2e7d634e95a3 Mon Sep 17 00:00:00 2001 From: Viacheslav Afanasyev <9393016+ViacheslavAfanasyev@users.noreply.github.com> Date: Fri, 26 Feb 2021 15:52:30 -0500 Subject: [PATCH 14/18] #Remove async code. Add throwing the exception --- src/SIM.Pipelines/Delete/CleanUp.cs | 37 +++++++++++++++++++---------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/SIM.Pipelines/Delete/CleanUp.cs b/src/SIM.Pipelines/Delete/CleanUp.cs index baed06b5..5ce7bf32 100644 --- a/src/SIM.Pipelines/Delete/CleanUp.cs +++ b/src/SIM.Pipelines/Delete/CleanUp.cs @@ -9,6 +9,8 @@ using System.Text; using System.Threading.Tasks; using SIM.Sitecore9Installer; +using System.Threading; +using Sitecore.Diagnostics.Logging; namespace SIM.Pipelines.Delete { @@ -28,22 +30,33 @@ protected override void Process([NotNull] ProcessorArgs args) InstallParam param = arguments.Tasker.GlobalParams.FirstOrDefault(p => p.Name == "DeployRoot"); if (param!=null) { - RetryAction(() => + int retrisNumber = 3; + for (int i=0;i<= retrisNumber; i++) { if (Directory.Exists(param.Value)) { - Directory.Delete(param.Value, true); + try + { + Directory.Delete(param.Value, true); + } + catch(System.IO.IOException ex) + { + Log.Warn($"Can't remove directory: {param.Value}. {ex.Message}"); + } + if (Directory.Exists(param.Value)) + { + if (retrisNumber==i) + { + throw new Exception($"Can't remove directory: {param.Value}"); + } + Thread.Sleep(10000); + } + else + { + break; + } } - }, 3, 10000); - - } - } - async void RetryAction(Action action, int retrisNumber, int delayMs) - { - for (int i = 0; i < retrisNumber; i++) - { - action(); - await Task.Delay(delayMs); + } } } } From e49572817339c5db17369b0498839a4c2afefb4c Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Mon, 1 Mar 2021 09:37:32 +0200 Subject: [PATCH 15/18] Add support SC10.1 closes #556 --- .../GlobalParamsConfig/GlobalSettings.json | 4 + .../XP/GlobalParams_10.0_XP0.json | 1 - .../XP/GlobalParams_10.0_XP0_SXA.json | 1 - .../XP/GlobalParams_10.1_XP1.json | 218 ++++++++++++++++++ src/SIM.Tool/SIM.Tool.csproj | 3 + 5 files changed, 225 insertions(+), 2 deletions(-) create mode 100644 src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.1_XP1.json diff --git a/src/SIM.Tool/GlobalParamsConfig/GlobalSettings.json b/src/SIM.Tool/GlobalParamsConfig/GlobalSettings.json index 76e55c6a..9aafb163 100644 --- a/src/SIM.Tool/GlobalParamsConfig/GlobalSettings.json +++ b/src/SIM.Tool/GlobalParamsConfig/GlobalSettings.json @@ -1,5 +1,6 @@ { "GlobalFilesMap": { + "10.1.\\d.* XM1": "GlobalParams_10.0_XM1.json", "10.0.\\d.* XM1": "GlobalParams_10.0_XM1.json", "9.3.\\d.* XM1": "GlobalParams_9.3_XM1.json", "9.2.\\d.* XM1": "GlobalParams_9.2_XM1.json", @@ -7,8 +8,11 @@ "9.1.\\d.* XM1": "GlobalParams_9.1_XM1.json", "9.0.\\d.* XM1": "GlobalParams_9.0_XM1.json", + "10.1.\\d.* XP0 Developer": "GlobalParams_10.0_XP0_SXA.json", "10.0.\\d.* XP0 Developer": "GlobalParams_10.0_XP0_SXA.json", + "10.1.\\d.* XP0": "GlobalParams_10.0_XP0.json", "10.0.\\d.* XP0": "GlobalParams_10.0_XP0.json", + "10.1.\\d.* XP1": "GlobalParams_10.1_XP1.json", "10.0.\\d.* XP1": "GlobalParams_10.0_XP1.json", "9.3.\\d.* XP1": "GlobalParams_9.3_XP1.json", "9.3.\\d.* XP0 Developer": "GlobalParams_9.3_XP0_SXA.json", diff --git a/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.0_XP0.json b/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.0_XP0.json index 806cec69..7259c510 100644 --- a/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.0_XP0.json +++ b/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.0_XP0.json @@ -70,7 +70,6 @@ "TelerikEncryptionKey": "", "SqlMessagingUser": "", - //"CertificateName": "$GlobalParams.SqlDbPrefix+\"xconnect_client\"", "XConnectCert": "$GlobalParams.SqlDbPrefix+\"xconnect_client\"", "XConnectCollectionSearchService": "https://\"+$GlobalParams.SqlDbPrefix+\"XConnect.local", "XConnectCollectionService": "https://\"+$GlobalParams.SqlDbPrefix+\"XConnect.local", diff --git a/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.0_XP0_SXA.json b/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.0_XP0_SXA.json index 59cc33f7..d25ea38f 100644 --- a/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.0_XP0_SXA.json +++ b/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.0_XP0_SXA.json @@ -70,7 +70,6 @@ "TelerikEncryptionKey": "", "SqlMessagingUser": "", - //"CertificateName": "$GlobalParams.SqlDbPrefix+\"xconnect_client\"", "XConnectCert": "$GlobalParams.SqlDbPrefix+\"xconnect_client\"", "XConnectCollectionSearchService": "https://\"+$GlobalParams.SqlDbPrefix+\"XConnect.local", "XConnectCollectionService": "https://\"+$GlobalParams.SqlDbPrefix+\"XConnect.local", diff --git a/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.1_XP1.json b/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.1_XP1.json new file mode 100644 index 00000000..7bdb9fd0 --- /dev/null +++ b/src/SIM.Tool/GlobalParamsConfig/XP/GlobalParams_10.1_XP1.json @@ -0,0 +1,218 @@ +{ + "Parameters": { + //global + "SIFVersion": "2.3.0", + "SqlServer": "", + "SqlAdminUser": "", + "SqlAdminPassword": "", + "SqlDbPrefix": "", + "LicenseFile": "", + "DnsName": "$installParams.SiteName", + //solr + "SolrUrl": "", + "SolrRoot": "", + "SolrService": "", + "CorePrefix": "$GlobalParams.SqlDbPrefix", + "BaseConfig": "", + //cert + "CertPath": "c:/certificates", + "RootCertFileName": "SIM_SIF230Root", + //xConnect + "XConnectCert": "$GlobalParams.SqlDbPrefix+\"xconnect_client\"", + "SqlMarketingAutomationUser": "", + "SqlMarketingAutomationPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "SqlReferenceDataUser": "", + "SqlReferenceDataPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "SqlProcessingPoolsUser": "", + "SqlProcessingPoolsPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "SqlCollectionUser": "$GlobalParams.SqlDbPrefix+\"collectionuser\"", + "SqlCollectionPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "XConnectEnvironment": "", + "XConnectLogLevel": "", + //cortex + "XConnectSearchService": "$GlobalParams.XConnectCollectionSearchService", + "CortexReportingService": "https://\"+$GlobalParams.SqlDbPrefix+\"CortexRep.local", + "SqlProcessingEngineUser": "", + "SqlProcessingEnginePassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + //identity + "ClientSecret": "SIF-Default", + "AllowedCorsOrigins": "https://\"+$GlobalParams.SqlDbPrefix+\"CM.local", + "PasswordRecoveryUrl": "https://\"+$GlobalParams.SqlDbPrefix+\"CM.local", + "SqlCoreDbName": "", + "SitecoreIdentityCert": "$GlobalParams.SqlDbPrefix+\"Id.local\"", + "SitecoreIdentityAuthority": "https://\"+$GlobalParams.SqlDbPrefix+\"Id.local", + //Sitecore + "SitecoreIdentitySecret": "$GlobalParams.ClientSecret", + "EXMInternalApiKey": "", + "SqlSecurityPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "SqlSecurityUser": "", + "SitecoreAdminPassword": "b", + "SolrCorePrefix": "$GlobalParams.SqlDbPrefix", + "SqlCoreUser": "", + "SqlCorePassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "SqlWebUser": "", + "SqlWebPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "SqlFormsUser": "", + "SqlFormsPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "SqlMasterUser": "", + "SqlMasterPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "SqlReportingUser": "", + "SqlReportingPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "SqlProcessingTasksUser": "", + "SqlProcessingTasksPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "SqlExmMasterUser": "", + "SqlExmMasterPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]", + "ExmEdsProvider": "", + "EXMCryptographicKey": "", + "EXMAuthenticationKey": "", + "SolrZookeeperUrl": "", + "XConnectCollectionService": "https://\"+$GlobalParams.SqlDbPrefix+\"XColl.local", + "XConnectCollectionSearchService": "https://\"+$GlobalParams.SqlDbPrefix+\"XSear.local", + "XConnectReferenceDataService": "https://\"+$GlobalParams.SqlDbPrefix+\"Xref.local", + "MarketingAutomationOperationsService": "https://\"+$GlobalParams.SqlDbPrefix+\"XMA.local", + "MarketingAutomationReportingService": "https://\"+$GlobalParams.SqlDbPrefix+\"XMAR.local", + "ProcessingService": "https://\"+$GlobalParams.SqlDbPrefix+\"PRC.local", + "ReportingServiceApiKey": "abcde111112222233333444445555566", + "TelerikEncryptionKey": "", + "SqlMessagingUser": "", + "SqlMessagingPassword": "[Invoke-RandomStringConfigFunction -Length 20 -DisAllowSpecial -EnforceComplexity]" + }, + "PackageMapping": { + "sitecore-XP1-cd": "* (OnPrem)_cd.scwdp.zip", + "sitecore-XP1-cm": "* (OnPrem)_cm.scwdp.zip", + "sitecore-XP1-prc": "* (OnPrem)_prc.scwdp.zip", + "xconnect-XP1-collection": "* (onPrem)_xp1collection.scwdp.zip", + "xconnect-xp1-collectionsearch": "* (onPrem)_xp1collectionsearch.scwdp.zip", + "xconnect-xp1-MarketingAutomation": "* (onPrem)_xp1marketingautomation.scwdp.zip", + "xconnect-xp1-MarketingAutomationReporting": "* (onPrem)_xp1marketingautomationreporting.scwdp.zip", + "xconnect-xp1-ReferenceData": "* (onPrem)_xp1referencedata.scwdp.zip", + "sitecore-xp1-dds": "* (OnPrem)_dds.scwdp.zip", + "xconnect-xp1-CortexProcessing": "* (OnPrem)_xp1cortexprocessing.scwdp.zip", + "xconnect-xp1-CortexReporting": "* (OnPrem)_xp1cortexreporting.scwdp.zip", + "IdentityServer": "* (OnPrem)_identityserver.scwdp.zip", + "sitecore-XP1-cm-dds-patch": "Sitecore.Patch.EXM (OnPrem)_CM.zip" + }, + + "Validators": [ + "list|Basic", + "list|DDS", + "list|DDS_Patch", + "list|Sitecore_10.0" + ], + + "ExecSequense": { + "InstallSIF": { + "Type": "SIM.Sitecore9Installer.Tasks.InstallSIFTask, SIM.Sitecore9Installer", + "TaskOptions": { + "InstallVersion": "2.3.0", + "Repository": "https://sitecore.myget.org/F/sc-powershell/api/v2", + "ExecutionOrder": "-100" + } + }, + "Prerequisites": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer" + }, + "IdentityServerCertificates": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "RealName": "createcert", + "CertificateName": "$SitecoreIdentityCert" + } + }, + "IdentityServer": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"Id.local\"" + } + }, + "XConnectCertificates": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "RealName": "createcert", + "CertificateName": "$XConnectCert" + } + }, + "xconnect-solr": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer" + }, + "xconnect-xp1-collection": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"XColl.local\"" + } + }, + "xconnect-xp1-collectionsearch": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"XSear.local\"" + } + }, + "xconnect-xp1-referencedata": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"XRef.local\"" + } + }, + "xconnect-xp1-marketingautomation": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"XMA.local\"" + } + }, + "xconnect-xp1-marketingautomationreporting": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"XMar.local\"" + } + }, + "xconnect-xp1-cortexprocessing": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"CorPrc.local\"" + } + }, + "xconnect-xp1-cortexreporting": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"CorRep.local\"" + } + }, + "Sitecore-solr": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer" + }, + "Sitecore-xp1-cd": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"CD.local\"" + } + }, + "Sitecore-xp1-prc": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"Prc.local\"" + } + }, + "Sitecore-xp1-cm": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"CM.local\"" + } + }, + "sitecore-xp1-dds": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"DDS.local\"" + } + }, + "sitecore-XP1-cm-dds-patch": { + "Type": "SIM.Sitecore9Installer.Tasks.SitecoreTask, SIM.Sitecore9Installer", + "Parameters": { + "SiteName": "$SqlDbPrefix+\"CM.local\"", + "DedicatedServerHostName": "https://\"+$SqlDbPrefix+\"DDS.local" + }, + "TaskOptions": { + "SupportsUninstall": "false" + } + } + } +} diff --git a/src/SIM.Tool/SIM.Tool.csproj b/src/SIM.Tool/SIM.Tool.csproj index 25a27fd5..4a542ca6 100644 --- a/src/SIM.Tool/SIM.Tool.csproj +++ b/src/SIM.Tool/SIM.Tool.csproj @@ -526,6 +526,9 @@ Always + + Always + Always From 5d65751175ba14dc0bc14c658bca7687a84a6576 Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Wed, 10 Mar 2021 08:15:36 +0200 Subject: [PATCH 16/18] Fix 'JAVE_HOME' checker closes #560 --- src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs b/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs index 3500128b..2553af2f 100644 --- a/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs +++ b/src/SIM.Tool.Windows/UserControls/Solr/SolrDetails.xaml.cs @@ -77,7 +77,7 @@ public bool OnMovingNext(WizardArgs wizardArgs) MessageBox.Show("Required JAVA_HOME system variable was not found.\nIt seems Java Runtime Environment (JRE) has not been installed.", "Warning"); return false; } - else if(!Directory.Exists(Path.Combine(javaHomeVariable, "bin1")) || Directory.GetFiles(Path.Combine(javaHomeVariable, "bin"),"java.exe").Length==0) + else if(!Directory.Exists(Path.Combine(javaHomeVariable, "bin")) || Directory.GetFiles(Path.Combine(javaHomeVariable, "bin"),"java.exe").Length==0) { MessageBox.Show($"The 'JAVA_HOME' system variable does not point to the proper JRE folder: {javaHomeVariable}", "Warning"); return false; From 60cb1d560aa48de1b7efc6f6c3eefb01bf6cf89d Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Wed, 10 Mar 2021 08:47:36 +0200 Subject: [PATCH 17/18] Fix execution order in 'delete9' PipelinesConfig closes #563 --- src/SIM.Pipelines/PipelinesConfig.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SIM.Pipelines/PipelinesConfig.cs b/src/SIM.Pipelines/PipelinesConfig.cs index 002ef12d..763543bb 100644 --- a/src/SIM.Pipelines/PipelinesConfig.cs +++ b/src/SIM.Pipelines/PipelinesConfig.cs @@ -83,6 +83,8 @@ public static class PipelinesConfig + + From 9e47c62c9223e4e458b35c3de09e84c8dac4a1c7 Mon Sep 17 00:00:00 2001 From: Andrey Filchenkov <22079019+AndreyFilchenkov@users.noreply.github.com> Date: Wed, 10 Mar 2021 11:56:48 +0200 Subject: [PATCH 18/18] Fix 563 closes #563 --- src/SIM.Pipelines/Delete/CleanUp.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/SIM.Pipelines/Delete/CleanUp.cs b/src/SIM.Pipelines/Delete/CleanUp.cs index 5ce7bf32..8cfa7d3d 100644 --- a/src/SIM.Pipelines/Delete/CleanUp.cs +++ b/src/SIM.Pipelines/Delete/CleanUp.cs @@ -26,12 +26,11 @@ protected override void Process([NotNull] ProcessorArgs args) return; } - Directory.Delete(arguments.Tasker.UnInstallParamsPath, true); InstallParam param = arguments.Tasker.GlobalParams.FirstOrDefault(p => p.Name == "DeployRoot"); if (param!=null) { - int retrisNumber = 3; - for (int i=0;i<= retrisNumber; i++) + int retriesNumber = 3; + for (int i=0;i<= retriesNumber; i++) { if (Directory.Exists(param.Value)) { @@ -45,7 +44,7 @@ protected override void Process([NotNull] ProcessorArgs args) } if (Directory.Exists(param.Value)) { - if (retrisNumber==i) + if (retriesNumber == i) { throw new Exception($"Can't remove directory: {param.Value}"); } @@ -58,6 +57,8 @@ protected override void Process([NotNull] ProcessorArgs args) } } } + + Directory.Delete(arguments.Tasker.UnInstallParamsPath, true); } } }