Skip to content

Commit 8da090e

Browse files
authored
Merge pull request #52 from newrelic/feature/windows-build
Feature/windows build
2 parents 7dc3e03 + 1abffbd commit 8da090e

10 files changed

+525
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## 4.1.0 - 2019-06-19
9+
### Added
10+
- Windows build
11+
812
## 4.0.2 - 2019-06-19
913
### Fixed
1014
- Misspelling "Dcoument" and "Aueue"

elasticsearch-win-definition.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: com.newrelic.elasticsearch
2+
description: Reports status and metrics for elasticsearch service
3+
protocol_version: 2
4+
os: windows
5+
6+
commands:
7+
all:
8+
command:
9+
- .\bin\nr-elasticsearch.exe
10+
prefix: config/elasticsearch
11+
interval: 15
12+
inventory:
13+
command:
14+
- .\bin\nr-elasticsearch.exe
15+
- --inventory
16+
prefix: config/elasticsearch
17+
interval: 15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3+
<?define Version = "{IntegrationVersion}" ?>
4+
<?define ProductId = "*" ?>
5+
<?define UpgradeCode = "{f42aa489-e590-429d-a1c2-4ebd97cf8c3e}" ?>
6+
7+
<Product Id="$(var.ProductId)"
8+
Name="New Relic Infrastructure Integration, nri-{IntegrationName}"
9+
Language="1033"
10+
Version="$(var.Version)"
11+
Manufacturer="New Relic, Inc."
12+
UpgradeCode="$(var.UpgradeCode)">
13+
<Package Id="*"
14+
InstallerVersion="200"
15+
Compressed="yes"
16+
InstallScope="perMachine"
17+
Platform="x86"
18+
Manufacturer="New Relic, Inc."
19+
Comments="(c) {Year} New Relic, Inc."
20+
Keywords="infrastructure,MSI,on-host,{IntegrationName}"/>
21+
22+
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
23+
<MediaTemplate EmbedCab="yes"/>
24+
25+
<Feature Id="ProductFeature" Title="New Relic Infrastructure Integration, nri-{IntegrationName}" Level="1">
26+
<ComponentRef Id="CMP_V1_PLUGIN_CONFIGS"/>
27+
<ComponentRef Id="CMP_V1_CUSTOM_PLUGINS"/>
28+
<ComponentRef Id="CMP_V1_CUSTOM_PLUGINS_BIN"/>
29+
<ComponentGroupRef Id="CustomPluginsBinComponent"/>
30+
<ComponentGroupRef Id="CustomPluginsComponent"/>
31+
<ComponentGroupRef Id="PluginConfigsComponent"/>
32+
</Feature>
33+
</Product>
34+
35+
<Fragment>
36+
<Directory Id="TARGETDIR" Name="SourceDir">
37+
<Directory Id="ProgramFilesFolder">
38+
<Directory Id="CompanyFolder" Name="New Relic">
39+
<Directory Id="AgentBinaryFolder" Name="newrelic-infra">
40+
<Directory Id="PluginConfigsFolder" Name="integrations.d"/>
41+
<Directory Id="CustomPluginsFolder" Name="newrelic-integrations">
42+
<Directory Id="CustomPluginsBinFolder" Name="bin"/>
43+
</Directory>
44+
</Directory>
45+
</Directory>
46+
</Directory>
47+
</Directory>
48+
</Fragment>
49+
50+
<Fragment>
51+
<DirectoryRef Id="PluginConfigsFolder">
52+
<Component Id="CMP_V1_PLUGIN_CONFIGS" Guid="803C978C-B2A1-47C7-BB17-A2DE9E6D3145" KeyPath="yes">
53+
<CreateFolder/>
54+
</Component>
55+
</DirectoryRef>
56+
<DirectoryRef Id="CustomPluginsFolder">
57+
<Component Id="CMP_V1_CUSTOM_PLUGINS" Guid="0EE4AAF4-9923-499C-A1D0-FF55B205A76C" KeyPath="yes">
58+
<CreateFolder/>
59+
</Component>
60+
</DirectoryRef>
61+
<DirectoryRef Id="CustomPluginsBinFolder">
62+
<Component Id="CMP_V1_CUSTOM_PLUGINS_BIN" Guid="e4509a7a-409e-4a38-8705-37de9cf0d72d" KeyPath="yes">
63+
<CreateFolder/>
64+
</Component>
65+
</DirectoryRef>
66+
</Fragment>
67+
68+
<Fragment>
69+
<ComponentGroup Id="CustomPluginsBinComponent" Directory="CustomPluginsBinFolder">
70+
<Component Id="CMP_NRI_{IntegrationName}_EXE" Guid="c57aeed1-f045-4202-8daa-d806db2e29e4" Win64="no">
71+
<File Id="FILE_NRI_{IntegrationName}_EXE"
72+
Source="$(var.BinariesPath){IntegrationExe}"
73+
KeyPath="yes"/>
74+
</Component>
75+
</ComponentGroup>
76+
<ComponentGroup Id="CustomPluginsComponent" Directory="CustomPluginsFolder">
77+
<Component Id="CMP_NRI_{IntegrationName}_DEFINITION_YML" Guid="35c84fd9-7b1a-4871-a706-390ea19252b1" Win64="no"
78+
NeverOverwrite="yes" Permanent="yes">
79+
<File Id="FILE_NRI_{IntegrationName}_DEFINITION_YML"
80+
Name="{IntegrationName}-definition.yml"
81+
Source="$(var.ProjectRootPath){IntegrationName}-win-definition.yml"
82+
KeyPath="yes"/>
83+
</Component>
84+
</ComponentGroup>
85+
<ComponentGroup Id="PluginConfigsComponent" Directory="PluginConfigsFolder">
86+
<Component Id="CMP_NRI_{IntegrationName}_CONFIG_YML" Guid="ae131e4c-7ec5-42c5-b21b-b454979f28ee" Win64="no"
87+
NeverOverwrite="yes" Permanent="yes">
88+
<File Id="FILE_NRI_{IntegrationName}_CONFIG_YML"
89+
Name="{IntegrationName}-config.yml.sample"
90+
Source="$(var.ProjectRootPath){IntegrationName}-config.yml.sample"
91+
KeyPath="yes"/>
92+
</Component>
93+
</ComponentGroup>
94+
</Fragment>
95+
96+
</Wix>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6+
<ProductVersion>3.10</ProductVersion>
7+
<ProjectGuid>89a5d3bd-73d7-4ebb-8f3c-75a7c09e67a4</ProjectGuid>
8+
<SchemaVersion>2.0</SchemaVersion>
9+
<OutputName>$(integration)-386</OutputName>
10+
<OutputType>Package</OutputType>
11+
<SignToolPath>C:\Program Files (x86)\Windows Kits\10\bin\x64\</SignToolPath>
12+
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
13+
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
14+
<Name>newrelic-$(integration)-installer</Name>
15+
<DefineSolutionProperties>false</DefineSolutionProperties>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
18+
<OutputPath>bin\$(Configuration)\</OutputPath>
19+
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
20+
<DefineConstants>Debug;ProjectRootPath=..\..\..\;BinariesPath=..\..\..\target\bin\windows_386\</DefineConstants>
21+
<SuppressAllWarnings>True</SuppressAllWarnings>
22+
<Pedantic>False</Pedantic>
23+
<CompilerAdditionalOptions>-arch x86</CompilerAdditionalOptions>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
26+
<OutputPath>bin\$(Configuration)\</OutputPath>
27+
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
28+
<DefineConstants>Debug;ProjectRootPath=..\..\..\;BinariesPath=..\..\..\target\bin\windows_386\</DefineConstants>
29+
<CompilerAdditionalOptions>-arch x86</CompilerAdditionalOptions>
30+
</PropertyGroup>
31+
<ItemGroup>
32+
<Compile Include="Product.wxs"/>
33+
</ItemGroup>
34+
<Import Project="$(WixTargetsPath)"/>
35+
<Target Name="SignInstaller">
36+
<Exec Command="&quot;$(SignToolPath)signtool.exe&quot; sign /d &quot;New Relic Infrastructure Integration, $(integration)&quot; /a &quot;$(OutputPath)$(OutputName).msi&quot;"/>
37+
<Copy SourceFiles="$(OutputPath)$(OutputName).msi" DestinationFiles="$(OutputPath)$(OutputName).x.y.z.msi"/>
38+
<!-- <Delete Files="$(OutputPath)$(OutputName).msi" /> -->
39+
</Target>
40+
<Target Name="AfterBuild" DependsOnTargets="SignInstaller"/>
41+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3+
<?define Version = "{IntegrationVersion}" ?>
4+
<?define ProductId = "*" ?>
5+
<?define UpgradeCode = "{f42aa489-e590-429d-a1c2-4ebd97cf8c3e}" ?>
6+
7+
<Product Id="$(var.ProductId)"
8+
Name="New Relic Infrastructure Integration, nri-{IntegrationName}"
9+
Language="1033"
10+
Version="$(var.Version)"
11+
Manufacturer="New Relic, Inc."
12+
UpgradeCode="$(var.UpgradeCode)">
13+
<Package Id="*"
14+
InstallerVersion="200"
15+
Compressed="yes"
16+
InstallScope="perMachine"
17+
Platform="x64"
18+
Manufacturer="New Relic, Inc."
19+
Comments="(c) {Year} New Relic, Inc."
20+
Keywords="infrastructure,MSI,on-host,{IntegrationName}"/>
21+
22+
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
23+
<MediaTemplate EmbedCab="yes"/>
24+
25+
<Feature Id="ProductFeature" Title="New Relic Infrastructure Integration, nri-{IntegrationName}" Level="1">
26+
<ComponentRef Id="CMP_V1_PLUGIN_CONFIGS"/>
27+
<ComponentRef Id="CMP_V1_CUSTOM_PLUGINS"/>
28+
<ComponentRef Id="CMP_V1_CUSTOM_PLUGINS_BIN"/>
29+
<ComponentGroupRef Id="CustomPluginsBinComponent"/>
30+
<ComponentGroupRef Id="CustomPluginsComponent"/>
31+
<ComponentGroupRef Id="PluginConfigsComponent"/>
32+
</Feature>
33+
</Product>
34+
35+
<Fragment>
36+
<Directory Id="TARGETDIR" Name="SourceDir">
37+
<Directory Id="ProgramFiles64Folder">
38+
<Directory Id="CompanyFolder" Name="New Relic">
39+
<Directory Id="AgentBinaryFolder" Name="newrelic-infra">
40+
<Directory Id="PluginConfigsFolder" Name="integrations.d"/>
41+
<Directory Id="CustomPluginsFolder" Name="newrelic-integrations">
42+
<Directory Id="CustomPluginsBinFolder" Name="bin"/>
43+
</Directory>
44+
</Directory>
45+
</Directory>
46+
</Directory>
47+
</Directory>
48+
</Fragment>
49+
50+
<Fragment>
51+
<DirectoryRef Id="PluginConfigsFolder">
52+
<Component Id="CMP_V1_PLUGIN_CONFIGS" Guid="803C978C-B2A1-47C7-BB17-A2DE9E6D3145" KeyPath="yes">
53+
<CreateFolder/>
54+
</Component>
55+
</DirectoryRef>
56+
<DirectoryRef Id="CustomPluginsFolder">
57+
<Component Id="CMP_V1_CUSTOM_PLUGINS" Guid="0EE4AAF4-9923-499C-A1D0-FF55B205A76C" KeyPath="yes">
58+
<CreateFolder/>
59+
</Component>
60+
</DirectoryRef>
61+
<DirectoryRef Id="CustomPluginsBinFolder">
62+
<Component Id="CMP_V1_CUSTOM_PLUGINS_BIN" Guid="e4509a7a-409e-4a38-8705-37de9cf0d72d" KeyPath="yes">
63+
<CreateFolder/>
64+
</Component>
65+
</DirectoryRef>
66+
</Fragment>
67+
68+
<Fragment>
69+
<ComponentGroup Id="CustomPluginsBinComponent" Directory="CustomPluginsBinFolder">
70+
<Component Id="CMP_NRI_{IntegrationName}_EXE" Guid="eea30c6e-7a14-4cc5-97c5-88a742041643" Win64="yes">
71+
<File Id="FILE_NRI_{IntegrationName}_EXE"
72+
Source="$(var.BinariesPath){IntegrationExe}"
73+
KeyPath="yes"/>
74+
</Component>
75+
</ComponentGroup>
76+
<ComponentGroup Id="CustomPluginsComponent" Directory="CustomPluginsFolder">
77+
<Component Id="CMP_NRI_{IntegrationName}_DEFINITION_YML" Guid="35c84fd9-7b1a-4871-a706-390ea19252b1" Win64="yes"
78+
NeverOverwrite="yes" Permanent="yes">
79+
<File Id="FILE_NRI_{IntegrationName}_DEFINITION_YML"
80+
Name="{IntegrationName}-definition.yml"
81+
Source="$(var.ProjectRootPath){IntegrationName}-win-definition.yml"
82+
KeyPath="yes"/>
83+
</Component>
84+
</ComponentGroup>
85+
<ComponentGroup Id="PluginConfigsComponent" Directory="PluginConfigsFolder">
86+
<Component Id="CMP_NRI_{IntegrationName}_CONFIG_YML" Guid="ae131e4c-7ec5-42c5-b21b-b454979f28ee" Win64="yes"
87+
NeverOverwrite="yes" Permanent="yes">
88+
<File Id="FILE_NRI_{IntegrationName}_CONFIG_YML"
89+
Name="{IntegrationName}-config.yml.sample"
90+
Source="$(var.ProjectRootPath){IntegrationName}-config.yml.sample"
91+
KeyPath="yes"/>
92+
</Component>
93+
</ComponentGroup>
94+
</Fragment>
95+
96+
</Wix>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6+
<ProductVersion>3.10</ProductVersion>
7+
<ProjectGuid>89a5d3bd-73d7-4ebb-8f3c-75a7c09e67a4</ProjectGuid>
8+
<SchemaVersion>2.0</SchemaVersion>
9+
<OutputName>$(integration)-amd64</OutputName>
10+
<OutputType>Package</OutputType>
11+
<SignToolPath>C:\Program Files (x86)\Windows Kits\10\bin\x64\</SignToolPath>
12+
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
13+
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
14+
<Name>newrelic-$(integration)-installer</Name>
15+
<DefineSolutionProperties>false</DefineSolutionProperties>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
18+
<OutputPath>bin\$(Configuration)\</OutputPath>
19+
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
20+
<DefineConstants>Debug;ProjectRootPath=..\..\..\;BinariesPath=..\..\..\target\bin\windows_amd64\</DefineConstants>
21+
<SuppressAllWarnings>True</SuppressAllWarnings>
22+
<Pedantic>False</Pedantic>
23+
<CompilerAdditionalOptions>-arch x64</CompilerAdditionalOptions>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
26+
<OutputPath>bin\$(Configuration)\</OutputPath>
27+
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
28+
<DefineConstants>Debug;ProjectRootPath=..\..\..\;BinariesPath=..\..\..\target\bin\windows_amd64\</DefineConstants>
29+
<CompilerAdditionalOptions>-arch x64</CompilerAdditionalOptions>
30+
</PropertyGroup>
31+
<ItemGroup>
32+
<Compile Include="Product.wxs"/>
33+
</ItemGroup>
34+
<Import Project="$(WixTargetsPath)"/>
35+
<Target Name="SignInstaller">
36+
<Exec Command="&quot;$(SignToolPath)signtool.exe&quot; sign /d &quot;New Relic Infrastructure Integration, $(integration)&quot; /a &quot;$(OutputPath)$(OutputName).msi&quot;"/>
37+
<Copy SourceFiles="$(OutputPath)$(OutputName).msi" DestinationFiles="$(OutputPath)$(OutputName).x.y.z.msi"/>
38+
<!-- <Delete Files="$(OutputPath)$(OutputName).msi" /> -->
39+
</Target>
40+
<Target Name="AfterBuild" DependsOnTargets="SignInstaller"/>
41+
</Project>

src/elasticsearch.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:generate goversioninfo
12
package main
23

34
import (
@@ -28,7 +29,7 @@ type argumentList struct {
2829

2930
const (
3031
integrationName = "com.newrelic.elasticsearch"
31-
integrationVersion = "4.0.2"
32+
integrationVersion = "4.1.0"
3233
)
3334

3435
var (

src/versioninfo.json.template

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"FixedFileInfo":
3+
{
4+
"FileVersion": {
5+
"Major": {MajorVersion},
6+
"Minor": {MinorVersion},
7+
"Patch": {PatchVersion},
8+
"Build": {BuildVersion}
9+
},
10+
"ProductVersion": {
11+
"Major": {MajorVersion},
12+
"Minor": {MinorVersion},
13+
"Patch": {PatchVersion},
14+
"Build": {BuildVersion}
15+
},
16+
"FileFlagsMask": "3f",
17+
"FileFlags ": "00",
18+
"FileOS": "040004",
19+
"FileType": "01",
20+
"FileSubType": "00"
21+
},
22+
"StringFileInfo":
23+
{
24+
"Comments": "(c) {Year} New Relic, Inc.",
25+
"CompanyName": "New Relic, Inc.",
26+
"FileDescription": "",
27+
"FileVersion": "{MajorVersion}.{MinorVersion}.{PatchVersion}.{BuildVersion}",
28+
"InternalName": "{Integration}",
29+
"LegalCopyright": "(c) {Year} New Relic, Inc.",
30+
"LegalTrademarks": "",
31+
"OriginalFilename": "{IntegrationExe}",
32+
"PrivateBuild": "",
33+
"ProductName": "New Relic Infrastructure Integration, {Integration}",
34+
"ProductVersion": "{MajorVersion}.{MinorVersion}.{PatchVersion}.{BuildVersion}",
35+
"SpecialBuild": ""
36+
},
37+
"VarFileInfo":
38+
{
39+
"Translation": {
40+
"LangID": "0409",
41+
"CharsetID": "04B0"
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)