grafana/scripts/build/ci-msi-build/oss/templates/common/grafana-service.wxs.j2
Brian Gann 31ea0122a0
Add Windows MSI generation to build process (#16502)
- add MSI generation to build process
2019-05-02 10:47:58 -05:00

60 lines
2.5 KiB
Django/Jinja

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<ComponentGroup Id="GrafanaServiceX64">
<Component Id="nssm_component" Guid="*" Directory="INSTALLDIR">
<File Id="nssm" KeyPath="yes" Source="SourceDir\nssm-{{ nssm_version }}\win64\nssm.exe" />
<ServiceInstall Id="ServiceInstall"
Account="LocalSystem"
ErrorControl="normal"
Name="Grafana"
Start="auto"
Type="ownProcess"
Vital="yes"
Description="Grafana by Grafana Labs"
DisplayName="Grafana">
<ServiceConfig OnInstall="yes" OnReinstall="yes" DelayedAutoStart="no" />
</ServiceInstall>
<ServiceControl Id="ControlService"
Name="Grafana"
Wait="yes"
Start="install"
Stop="both"
Remove="uninstall"
/>
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\Grafana">
<RegistryKey Key="Parameters">
<RegistryValue Name="AppDirectory" Value="[INSTALLDIR]grafana" Type="expandable" />
<RegistryValue Name="Application" Value="[INSTALLDIR]grafana\bin\grafana-server.exe" Type="expandable" />
<RegistryValue Name="AppParameters" Value='' Type="expandable" />
<RegistryValue Name="AppEnvironmentExtra" Type="multiString">
<MultiStringValue>LOG_LEVEL=DEBUG</MultiStringValue>
</RegistryValue>
<RegistryValue Name="AppStdout" Value="[LOGDIR]grafana-service.log" Type="expandable" />
<RegistryValue Name="AppStderr" Value="[LOGDIR]grafana-service.log" Type="expandable" />
<RegistryValue Name="AppRotateFiles" Value="1" Type="integer" />
<RegistryValue Name="AppRotateOnline" Value="1" Type="integer" />
<!-- Rotate after 100 MB -->
<RegistryValue Name="AppRotateBytes" Value="104857600" Type="integer" />
<RegistryValue Name="AppStdoutCopyAndTruncate" Value="1" Type="integer" />
<RegistryValue Name="AppStderrCopyAndTruncate" Value="1" Type="integer" />
<RegistryValue Name="AppRotateDelay" Value="1000" Type="integer" />
<RegistryKey Key="AppExit">
<RegistryValue Type="string" Value="Restart" />
</RegistryKey>
</RegistryKey>
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
</Wix>