Commit a4557c1b authored by Botond Botyanszki's avatar Botond Botyanszki

Merge branch 'add-msi-conf-cert-addon' into 'master'

Add msi-conf-cert add-on

See merge request !2
parents e076fb88 9dd4cd99
:addon-name: msi-conf-cert
include::../../_asciidoctor/attributes.adoc[]
[desc="Build an MSI to bootstrap an NXLog agent"]
[id="addon-{addon-name}"]
= MSI for NXLog Agent Setup
include::../../_asciidoctor/public.adoc[]
This add-on provides an example for building an MSI package which can be used
to bootstrap an NXLog agent on a Windows system. Normally this would be used
to set up the agent for management by NXLog Manager—it installs a
configuration and a CA certificate.
This diff is collapsed.
No preview for this file type
# Please set the following values to suit your environment and make
# sure agent-ca.pem is copied to %CERTDIR% with the proper ownership
define NXLOG_MANAGER_ADDRESS 192.168.1.1
define NXLOG_MANAGER_PORT 4041
LogLevel INFO
LogFile %MYLOGFILE%
<Extension agent_managment>
Module xm_soapadmin
Connect %NXLOG_MANAGER_ADDRESS%
Port %NXLOG_MANAGER_PORT%
SocketType SSL
CAFile %CERTDIR%\agent-ca.pem
# CertFile %CERTDIR%\agent-cert.pem
# CertKeyFile %CERTDIR%\agent-key.pem
AllowUntrusted TRUE
RequireCert FALSE
<ACL conf>
Directory %CONFDIR%
AllowRead TRUE
AllowWrite TRUE
</ACL>
<ACL cert>
Directory %CERTDIR%
AllowRead TRUE
AllowWrite TRUE
</ACL>
</Extension>
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='NXLog Configuration'
Id='*' UpgradeCode='673be9fe-acc9-4b4a-9af6-7445ef4644e6'
Language='1033'
Codepage='1252'
Version='1.0.0'
Manufacturer='NXLog Ltd'>
<?if $(var.ProcessorArchitecture)=x64 ?>
<Package Id='*'
Keywords='Installer'
Platform="x64"
Description="NXLog Configuration Installer"
Manufacturer='NXLog Ltd'
InstallerVersion='200'
Languages='1033'
Compressed='yes'
SummaryCodepage='1252' />
<?else ?>
<Package Id='*'
Keywords='Installer'
Description="NXLog Configuration Installer (64bit)"
Manufacturer='NXLog Ltd'
InstallerVersion='100'
Languages='1033'
Compressed='yes'
SummaryCodepage='1252' />
<?endif ?>
<Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
<Icon Id="INSTALLER_ICON" SourceFile="./nx_logo.ico"/>
<Property Id="ARPPRODUCTICON" Value="INSTALLER_ICON" />
<Property Id='DiskPrompt' Value="NXLog Installation [1]" />
<Upgrade Id="673be9fe-acc9-4b4a-9af6-7445ef4644e6">
<UpgradeVersion OnlyDetect="yes" Minimum="1.0.0" Property="NEWERVERSIONDETECTED" IncludeMinimum="no" />
<UpgradeVersion OnlyDetect="no" Maximum="1.0.0" Property="OLDERVERSIONBEINGUPGRADED" IncludeMaximum="no" />
</Upgrade>
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallFinalize"/>
</InstallExecuteSequence>
<?if $(var.ProcessorArchitecture)=x64 ?>
<Property Id="PREVIOUSINSTALLDIR">
<RegistrySearch Id="FindRegistryInstallDir"
Root="HKLM"
Key="SOFTWARE\nxlog"
Name="installdir"
Type="raw"
Win64='yes' />
</Property>
<?else ?>
<Property Id="PREVIOUSINSTALLDIR">
<RegistrySearch Id="FindRegistryInstallDir"
Root="HKLM"
Key="SOFTWARE\nxlog"
Name="installdir"
Type="raw"
Win64='no' />
</Property>
<?endif ?>
<Condition Message="Setup could not detect an existing installation of NXLog. Please install NXLog first.">
Installed Or PREVIOUSINSTALLDIR</Condition>
<SetProperty Id="INSTALLDIR"
After="LaunchConditions"
Value="[PREVIOUSINSTALLDIR]">Not INSTALLDIR</SetProperty>
<SetProperty Id="ARPINSTALLLOCATION"
After="CostFinalize"
Value="[INSTALLDIR]" />
<?if $(var.ProcessorArchitecture)=x64 ?>
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFiles64Folder' Name='PFiles'>
<Directory Id='INSTALLDIR' Name='nxlog'>
<Component Id='Service' Guid='79D51AEA-5984-11E0-B4E3-20CF305ACE5E'
SharedDllRefCount='no' NeverOverwrite='no' Permanent='no' Transitive='no'
Win64='yes' Location='either' KeyPath='yes'>
<ServiceControl Id='nxlogServiceControl' Name='nxlog' Stop='both' Start='both' Wait='no'/>
</Component>
<Directory Id='cert' Name='cert'>
<Component Id='CertDir' Guid='13a12755-a46f-4b75-9d83-d53d5627fca6'
SharedDllRefCount='no' KeyPath='no' NeverOverwrite='no' Permanent='yes' Transitive='no'
Win64='yes' Location='either'>
<RemoveFile Id="RemoveAgentCa" Name="agent-ca.pem" On="install" />
<File Id='agentCa' Name='agent-ca.pem' Source='agent-ca.pem'/>
</Component>
</Directory>
<Directory Id='conf' Name='conf'>
<Component Id='ConfDir' Guid='51762e62-618b-474a-a118-4cdd45a47906'
KeyPath='no' NeverOverwrite='no' Permanent='yes' Transitive='no'
Win64='yes' Location='either'>
<RemoveFile Id="Removelog4ensicsConf" Name="log4ensics.conf" On="install" />
<File Id='log4ensicsConf' Name='log4ensics.conf' Source='log4ensics.conf'/>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<?else ?>
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='INSTALLDIR' Name='nxlog'>
<Component Id='Service' Guid='79D51AEA-5984-11E0-B4E3-20CF305ACE5E'
SharedDllRefCount='no' NeverOverwrite='no' Permanent='no' Transitive='no'
Win64='no' Location='either' KeyPath='yes'>
<ServiceControl Id='nxlogServiceControl' Name='nxlog' Stop='both' Start='both' Wait='no'/>
</Component>
<Directory Id='cert' Name='cert'>
<Component Id='CertDir' Guid='13a12755-a46f-4b75-9d83-d53d5627fca6'
SharedDllRefCount='no' KeyPath='no' NeverOverwrite='no' Permanent='yes' Transitive='no'
Win64='no' Location='either'>
<RemoveFile Id="RemoveAgentCa" Name="agent-ca.pem" On="install" />
<File Id='agentCa' Name='agent-ca.pem' Source='agent-ca.pem'/>
</Component>
</Directory>
<Directory Id='conf' Name='conf'>
<Component Id='ConfDir' Guid='51762e62-618b-474a-a118-4cdd45a47906'
KeyPath='no' NeverOverwrite='no' Permanent='yes' Transitive='no'
Win64='no' Location='either'>
<RemoveFile Id="Removelog4ensicsConf" Name="log4ensics.conf" On="install" />
<File Id='log4ensicsConf' Name='log4ensics.conf' Source='log4ensics.conf'/>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<?endif ?>
<Feature Id='Complete' Title='NXLog Configuration' Description='NXLog Configuration and CA Certificate' Display='expand' Level='1'>
<ComponentRef Id='Service' />
<ComponentRef Id='CertDir' />
<ComponentRef Id='ConfDir' />
</Feature>
<WixVariable Id='WixUILicenseRtf' Value='license_en.rtf' />
<WixVariable Id='WixUIDialogBmp' Value='dlgbmp.bmp' />
<WixVariable Id='WixUIBannerBmp' Value='bannrbmp.bmp' />
<UI>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<UIRef Id="WixUI_InstallDir" />
</UI>
</Product>
</Wix>
\ No newline at end of file
@echo off
REM Set the path for WiX
SET ProgramFilesPath=%ProgramFiles(x86)%
SET WIX_BUILD_LOCATION=%ProgramFilesPath%\WiX Toolset v3.11\bin
REM Set the architecture to either x86 or x64
SET PROCARCH=x86
REM Cleanup leftover intermediate files
del /f /q "*.wixobj" "*.wixpdb"
echo Building nxlog-conf_%PROCARCH%.msi
echo.
"%WIX_BUILD_LOCATION%\candle.exe" -dProcessorArchitecture=%PROCARCH% nxlog-conf.wxs
"%WIX_BUILD_LOCATION%\light.exe" -ext WixUIExtension nxlog-conf.wixobj -o "nxlog-conf_%PROCARCH%.msi"
REM Cleanup leftover intermediate files
del /f /q "*.wixobj" "*.wixpdb"
\ No newline at end of file
@echo off
REM Set the path for WiX
SET ProgramFilesPath=%ProgramFiles(x86)%
SET WIX_BUILD_LOCATION=%ProgramFilesPath%\WiX Toolset v3.11\bin
REM Set the architecture to either x86 or x64
SET PROCARCH=x64
REM Cleanup leftover intermediate files
del /f /q "*.wixobj" "*.wixpdb"
echo Building nxlog-conf_%PROCARCH%.msi
echo.
"%WIX_BUILD_LOCATION%\candle.exe" -dProcessorArchitecture=%PROCARCH% nxlog-conf.wxs
"%WIX_BUILD_LOCATION%\light.exe" -ext WixUIExtension nxlog-conf.wixobj -o "nxlog-conf_%PROCARCH%.msi"
REM Cleanup leftover intermediate files
del /f /q "*.wixobj" "*.wixpdb"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment