Automating deployment
Use these instructions to automate deployment of the LeanSentry monitoring service to a cloud environment.
IMPORTANT: We provide streamlined deployment to Windows Azure Compute Services (Web roles and Worker roles). Please use the Azure environment deployment wizard in the dashboard, and the provided Visual Studio Nuget package to deploy to that environment. Use the instructions below to deploy to Windows Azure VMs, Amazon EC2, or other custom or third party cloud environments.
NOTE: This deployment describes the Local deployment option (each monitored server has a monitoring service and a diagnostic agent on it).
Overview
The automated deployment consists of two steps:
1. Copying a set of files necessary to install the LeanSentry Monitoring service, and the LeanSentry Diagnostic Agent service, on the server being monitored.
2. Running the installation commands to install each service.
Downloading the command-line deployment package (SAAS and OnPremise)
You can now download a ZIP file containing all the the installation files and the installation script that you need to install LeanSentry on each server.
NOTE: The install script in the ZIP file is meant for a specific LeanSentry environment. Do not use it to install LeanSentry on servers that belong to a different environment.
You can download the cmdline installation package from the new environment creation wizard (when using the Simple deployment option):
If you are looking to deploy LeanSentry for an existing environment, you can also download the package from the Environment settings page.
Note: By default, the resulting installation script will configure LeanSentry to create local service accounts for its services (this is the default behavior when installing LeanSentry). If you would like to provide your own domain account credentials for the service, please uncheck the "Create local service account" checkbox when downloading the package. You must then also provide the service credentials as arguments to the installation batch file.
Instructions:
1. Copy the contents of the ZIP file to each server
2. Run the included install.bat file (elevated) to install LeanSentry.
If you are supplying the domain account service credentials, provide the username and password as arguments to the batch file. You can also incorporate the commands in the batch file into your custom deployment/preparation automation.
Advanced installation instructions (SAAS only)
We recommend that you use the default command-line deployment package you download from the environment settings page (or the new environment wizard) to deploy LeanSentry. However, if you must, you can also use the instructions below to manually build the installation package.
Required files
InstallProduct.exe |
Installer |
InstallProduct.exe.config |
Installer configuration file (needed to run in both .NET .2 and .NET v4 environments) |
LeanServer.AutoUpdater.Shared.Util.dll |
A required utility dll file. |
NOTE: Additional files are required if using LeanSentry OnPremise. |
|
Downloads:
1. You can download InstallProduct.exe from here.
Deployment commands
Add these commands to your deployment automation:
REM Install Monitoring service
InstallProduct.exe 11533B52-131F-4E0A-A565-EB6468EF6FE7 /nowindow /writeerrors /cleanlogs "/p:ClientKey=<ACCESSKEY>;Name=[SERVERNAME];GenerateServiceAccount=true;AddSelf=true"
REM Install Agent
InstallProduct.exe B1B43386-B455-4A34-8637-1D4FF695A697 /nowindow /writeerrors "/p:ClientKey=<ACCESSKEY>;GenerateServiceAccount=true"
Be sure to replace the bolded <required_parameter> and [optional_parameter] tags with the required parameter values.
Parameters:
AccessKey <REQUIRED> |
The environment-specific access key given during installation. |
ServerName [OPTIONAL] |
The friendly server name to assign to the server, instead of the machine name. Must be unique in domain/environment. |
Offline |
To install the server in Offline mode by default (Business tier plans only). For more, see Offline mode. |
AccountName |
Make the Monitoring service/Agent service run with the specified account, |
AccountPassword |
Set when specifying an AccountName. Must specify an AccountName and set GenerateServiceAccount=false. |
NOTE: These commands require Administrative privileges on the server where LeanSentry is installed, and must be run in an elevated/Run As Administrator context.
Deploying Windows Debugging tools (STRONGLY RECOMMENDED)
The Windows Debugging tools support LeanSentry's diagnostic capabilities, and are necessary in order to enable most of the diagnostic and optimization features.
NOTE: We strongly recommend deploying the Windows Debugging tools on all or at least some of the servers to insure diagnostic insight is available.
Acquiring the Windows Debugging tools
The Windows Debugging tools is a free Microsoft toolset. You can download it once, and then set up automatic deployment per the options below.
For download instructions, see: https://leansentry.zendesk.com/entries/79075079-Installing-Windows-Debugging-tools.
Deploying the Windows Debugging tools automatically
NOTE: LeanSentry now supports automatically deploying Windows Debuggers from a publicly accessible url (a file URL from your website). You can configure this in your environment settings after deploying LeanSentry.
Steps:
1. Download the debugger MSIs from Microsoft (see article).
2. Place the MSIs on a publicly available url (we recommend keeping the url secret, do not use file sharing websites).
3. Configure the debugger urls in your environment settings/Other tab.
Deploying the Windows Debugging tools manually
You can deploy Windows Debugging Tools as part of your custom automation.
To deploy Windows Debugging tools:
1. Install the Windows Debugging Tools on your dev machine:
https://leansentry.zendesk.com/entries/79075079-Installing-Windows-Debugging-tools
2. Grab the redistributable installers and add them to your deployment, e.g. from:
C:\Program Files (x86)\Windows Kits\8.1\Debuggers\Redist
3. Add this to your startup tasks:
msiexec /i "<YOURPATH>\X64 Debuggers And Tools-x64_en-us.msi" /quiet /passive /norestart
msiexec /i "<YOURPATH>\X86 Debuggers And Tools-x86_en-us.msi" /quiet /passive /norestart
This will install the Windows Debugging tools on your instance/VM. The LeanSentry Agent will automatically detect their presence and use them for diagnostics.
Troubleshooting automatic deployment
Review the installation logs located in %systemdrive%\leanserver\InstallProduct.log and %programdata%\leanserver\updater\log\ if the installation fails. Forward these logs to support AT leanserver DOT com for additional help.
Comments
0 comments
Please sign in to leave a comment.