-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add files for Chocolatey package for #370.
- Loading branch information
Donald Morton
authored
Mar 3, 2021
1 parent
ffee4cb
commit a7323b7
Showing
8 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
# gensha.sh - Generate sha256 file for Chocolatey package and update chocolateyinstall.ps1 with the correct version and checksum. | ||
|
||
COLLECTOR_VERSION=$1 | ||
COLLECTOR_REVISION=$2 | ||
COLLECTOR_VERSION_SUFFIX=$3 | ||
|
||
if [[ ${COLLECTOR_VERSION_SUFFIX} == "-SNAPSHOT" ]]; then | ||
COLLECTOR_CHECKSUM=$(sha256sum dist/pkg/graylog_sidecar_installer_${COLLECTOR_VERSION}-${COLLECTOR_REVISION}.SNAPSHOT.exe | cut -d" " -f1) | ||
else | ||
COLLECTOR_CHECKSUM=$(sha256sum dist/pkg/graylog_sidecar_installer_${COLLECTOR_VERSION}-${COLLECTOR_REVISION}.exe | cut -d" " -f1) | ||
fi | ||
|
||
sed -i "s/checksum = '.*'/checksum = '$COLLECTOR_CHECKSUM'/" dist/chocolatey/tools/chocolateyinstall.ps1 | ||
sed -i "s/url = '.*'/url = 'https:\/\/downloads.graylog.org\/releases\/graylog-collector-sidecar\/${COLLECTOR_VERSION}\/graylog_sidecar_installer_${COLLECTOR_VERSION}-${COLLECTOR_REVISION}.exe'/" dist/chocolatey/tools/chocolateyinstall.ps1 | ||
|
||
find dist/pkg -name "graylog_sidecar_installer*.exe" -exec /bin/bash -c "sha256sum {} | cut -d' ' -f1 > {}.sha256.txt" \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | ||
<metadata> | ||
<id>graylog-sidecar</id> | ||
<version>$version$</version> | ||
<packageSourceUrl>https://github.com/Graylog2/collector-sidecar</packageSourceUrl> | ||
<title>Graylog Sidecar</title> | ||
<authors>Donald Morton</authors> | ||
<projectUrl>https://github.com/Graylog2/collector-sidecar</projectUrl> | ||
<iconUrl>http://cdn.rawgit.com/collector-sidecar/master/images/graylog-icon.svg</iconUrl> | ||
<licenseUrl>https://github.com/Graylog2/collector-sidecar/blob/master/LICENSE</licenseUrl> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<projectSourceUrl>https://github.com/Graylog2/collector-sidecar</projectSourceUrl> | ||
<docsUrl>https://docs.graylog.org/en/latest/pages/sidecar.html</docsUrl> | ||
<bugTrackerUrl>https://github.com/Graylog2/collector-sidecar/issues</bugTrackerUrl> | ||
<tags>graylog graylog-sidecar log</tags> | ||
<summary>Manage log collectors through Graylog</summary> | ||
<description>The Graylog Sidecar is a supervisor process for 3rd party log collectors like NXLog and filebeat. The Sidecar program is able to fetch and validate configuration files from a Graylog server for various log collectors. You can think of it like a centralized configuration and process management system for your log collectors. | ||
## Install Arguments | ||
To properly configure the sidecar, you'll need to pass in your **server url** and your **api token**. | ||
|
||
choco install graylog-sidecar --install-arguments="'-SERVERURL=http://10.0.2.2:9000/api -APITOKEN=yourapitoken'" | ||
</description> | ||
<releaseNotes></releaseNotes> | ||
</metadata> | ||
<files> | ||
<file src="tools/**" target="tools" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
VERIFICATION | ||
Verification is intended to assist the Chocolatey moderators and community | ||
in verifying that this package's contents are trustworthy. | ||
|
||
This package is published by Graylog, Inc. | ||
|
||
The sha256 checksum for any release can be found at the url below. Simply replace "VERSION" and "REVISION" with the appropriate parameters: | ||
https://downloads.graylog.org/releases/graylog-collector-sidecar/VERSION/graylog_sidecar_installer_VERSION-REVISION.exe.sha256.txt | ||
|
||
Example: | ||
https://downloads.graylog.org/releases/graylog-collector-sidecar/1.0.3/graylog_sidecar_installer_1.0.3-1.exe.sha256.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
$ErrorActionPreference = 'Stop'; | ||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
|
||
$packageArgs = @{ | ||
packageName = $env:ChocolateyPackageName | ||
unzipLocation = $toolsDir | ||
fileType = 'EXE' | ||
url = 'https://downloads.graylog.org/releases/graylog-collector-sidecar/1.0.2/graylog_sidecar_installer_1.0.2-1.exe' | ||
softwareName = 'graylog-sidecar*' | ||
|
||
# Checksums are now required as of 0.10.0. | ||
# To determine checksums, you can get that from the original site if provided. | ||
# You can also use checksum.exe (choco install checksum) and use it | ||
# e.g. checksum -t sha256 -f path\to\file | ||
checksum = 'e6eac94e512599ffb5860d29782d619c8a78fd5fd3b39f8023049cace0f7868a' | ||
checksumType = 'sha256' | ||
silentArgs = '/S' | ||
} | ||
|
||
Install-ChocolateyPackage @packageArgs |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
COLLECTOR_VERSION = 1.1.0 | ||
COLLECTOR_VERSION_SUFFIX = -SNAPSHOT | ||
COLLECTOR_REVISION = 0 | ||
COLLECTOR_REVISION = 1 |