Skip to content

Commit

Permalink
(etcd) Add new package maintainer
Browse files Browse the repository at this point in the history
Add new package maintainer and update to reflect current contribution
guidelines and package details.  Specific changes made:

* Update package details to reflect migration from CoreOS to etcd-io
* Refresh README to reflect current product description
* Include copyright handling for Nuspec updates
* Powershell script formatting and style changes
* Ensured correct handling of checksum type updates
* Added a version for the nssm dependency
  • Loading branch information
dgalbraith committed Jun 3, 2021
1 parent 09219fc commit 8dada30
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 53 deletions.
31 changes: 18 additions & 13 deletions automatic/etcd/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
# <img src="https://cdn.jsdelivr.net/gh/chocolatey-community/chocolatey-coreteampackages@c681fe2d8274d648911c90a5cfa63b43e4663013/icons/etcd.png" width="48" height="48"/> [etcd](https://chocolatey.org/packages/etcd)

etcd is a distributed reliable key-value store for the most critical data of a distributed system, with a focus on being:
* _Simple_: well-defined, user-facing API (gRPC)
* _Secure_: automatic TLS with optional client cert authentication
* _Fast_: benchmarked 10,000 writes/sec
* _Reliable_: properly distributed using Raft
**etcd** is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to
be accessed by a distributed system or cluster of machines. It gracefully handles leader elections during network
partitions and can tolerate machine failure, even in the leader node.

etcd is written in Go and uses the Raft consensus algorithm to manage a highly-available replicated log.
## Features

etcd is used in production by many companies, and the development team stands behind it in critical deployment scenarios, where etcd is frequently teamed with applications such as Kubernetes, locksmith, vulcand, Doorman, and many others. Reliability is further ensured by rigorous testing.
* **Simple interface** Read and write values using standard HTTP tools, such as curl
* **Key-value storage** Store data in hierarchically organized directories, as in a standard filesystem
* **Watch for changes** Watch specific keys or directories for changes and react to changes in values
* Optional SSL client certificate authentication
* Benchmarked at 1000s of writes/s per instance
* Optional TTLs for keys expiration
* Properly distributed via Raft protocol

This package installs **etcd** as a service, and makes **etcdctl** (the command line client) available in the path.
## Package Parameters

The package will pass package parameters to the etcd service.
* The package will pass package parameters to the etcd service
Example: `choco install etcd -y --params="-discovery https://discovery.etcd.io/tokengoeshere"`

The service is managed with NSSM, you can change the service parameters easily by running `nssm edit etcd`
## Notes

Originally packaged by Robert Labrie (https://github.com/tnwinc/chocolatey-etcd)

#### Note: Windows support is limited to 64bit systems.
* This package installs **etcd** as a service, and makes **etcdctl** (the command line client) available in the path
* The service is managed with NSSM, you can change the service parameters easily by running `nssm edit etcd`
* Windows support is limited to 64-bit systems
* Originally packaged by Robert Labrie (https://github.com/robertlabrie)
54 changes: 30 additions & 24 deletions automatic/etcd/etcd.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,49 @@
<id>etcd</id>
<version>3.5.0-beta4</version>
<packageSourceUrl>https://github.com/chocolatey-community/chocolatey-coreteampackages/tree/master/automatic/etcd</packageSourceUrl>
<owners>chocolatey-community,Andrei Bejenaru,Robert Labrie</owners>
<owners>chocolatey-community,dgalbraith,Andrei Bejenaru,Robert Labrie</owners>
<title>etcd (Install)</title>
<authors>CoreOS</authors>
<projectUrl>https://github.com/coreos/etcd</projectUrl>
<authors>etcd Authors</authors>
<projectUrl>https://etcd.io</projectUrl>
<iconUrl>https://cdn.jsdelivr.net/gh/chocolatey-community/chocolatey-coreteampackages@c681fe2d8274d648911c90a5cfa63b43e4663013/icons/etcd.png</iconUrl>
<copyright>(c) 2017 CoreOS, Inc</copyright>
<licenseUrl>https://github.com/coreos/etcd/blob/master/LICENSE</licenseUrl>
<copyright>(c) 2013-2021 etcd Authors</copyright>
<licenseUrl>https://github.com/etcd-io/etcd/blob/main/LICENSE</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<projectSourceUrl>https://github.com/coreos/etcd</projectSourceUrl>
<docsUrl>https://coreos.com/etcd/docs/latest</docsUrl>
<bugTrackerUrl>https://github.com/coreos/etcd/issues</bugTrackerUrl>
<tags>etcd configuration admin cli foss</tags>
<projectSourceUrl>https://github.com/etcd-io/etcd</projectSourceUrl>
<docsUrl>https://etcd.io/docs/latest</docsUrl>
<mailingListUrl>https://etcd.io/community</mailingListUrl>
<bugTrackerUrl>https://github.com/etcd-io/etcd/issues</bugTrackerUrl>
<tags>etcd configuration cli cross-platform foss</tags>
<summary>etcd is a distributed, consistent key-value store for shared configuration and service discovery</summary>
<description><![CDATA[etcd is a distributed reliable key-value store for the most critical data of a distributed system, with a focus on being:
* _Simple_: well-defined, user-facing API (gRPC)
* _Secure_: automatic TLS with optional client cert authentication
* _Fast_: benchmarked 10,000 writes/sec
* _Reliable_: properly distributed using Raft
<description><![CDATA[**etcd** is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to
be accessed by a distributed system or cluster of machines. It gracefully handles leader elections during network
partitions and can tolerate machine failure, even in the leader node.
etcd is written in Go and uses the Raft consensus algorithm to manage a highly-available replicated log.
## Features
etcd is used in production by many companies, and the development team stands behind it in critical deployment scenarios, where etcd is frequently teamed with applications such as Kubernetes, locksmith, vulcand, Doorman, and many others. Reliability is further ensured by rigorous testing.
* **Simple interface** Read and write values using standard HTTP tools, such as curl
* **Key-value storage** Store data in hierarchically organized directories, as in a standard filesystem
* **Watch for changes** Watch specific keys or directories for changes and react to changes in values
* Optional SSL client certificate authentication
* Benchmarked at 1000s of writes/s per instance
* Optional TTLs for keys expiration
* Properly distributed via Raft protocol
This package installs **etcd** as a service, and makes **etcdctl** (the command line client) available in the path.
## Package Parameters
The package will pass package parameters to the etcd service.
* The package will pass package parameters to the etcd service
Example: `choco install etcd -y --params="-discovery https://discovery.etcd.io/tokengoeshere"`
The service is managed with NSSM, you can change the service parameters easily by running `nssm edit etcd`
## Notes
Originally packaged by Robert Labrie (https://github.com/tnwinc/chocolatey-etcd)
#### Note: Windows support is limited to 64bit systems.
* This package installs **etcd** as a service, and makes **etcdctl** (the command line client) available in the path
* The service is managed with NSSM, you can change the service parameters easily by running `nssm edit etcd`
* Windows support is limited to 64-bit systems
* Originally packaged by Robert Labrie (https://github.com/robertlabrie)
]]></description>
<releaseNotes>https://github.com/coreos/etcd/releases/tag/v3.5.0-beta.4</releaseNotes>
<releaseNotes>https://github.com/etcd-io/etcd/releases/tag/v3.5.0-beta.4</releaseNotes>
<dependencies>
<dependency id="nssm" />
<dependency id="nssm" version="2.24.101" />
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions automatic/etcd/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ and can be verified by doing the following:

3. The checksums should match the following:

checksum type:
checksum type: sha256
checksum: DC7556283E2C815FFBAE5BF745A6470465C226A9AA33E847DF78920B5DB412D9

The file 'LICENSE.txt' has been obtained from <https://github.com/coreos/etcd/blob/3381177341c11aa9d89b6172699d64ddc2146a11/LICENSE>
The file 'LICENSE.txt' has been obtained from <https://github.com/etcd-io/etcd/commit/3381177341c11aa9d89b6172699d64ddc2146a11/LICENSE>
3 changes: 2 additions & 1 deletion automatic/etcd/tools/chocolateyBeforeModify.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

$ErrorActionPreference = 'Stop'

# remove the service if it exists
if ((Get-Service | Where-Object { $_.Name -eq "etcd" }).length) {
Get-Service etcd | Stop-Service
Expand Down
1 change: 0 additions & 1 deletion automatic/etcd/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Get-ChocolateyUnzip @packageArgs

Copy-Item "$installLocation\etcd-*-windows-amd64\*" $installLocation -Recurse -Force
Remove-Item "$installLocation\etcd-*-windows-amd64" -Recurse -Force
# Install-ChocolateyPath "$installLocation"

# older versions of etcd didn't put .exe on the binary
if (Test-Path "$installLocation\etcd") {
Expand Down
27 changes: 15 additions & 12 deletions automatic/etcd/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ param($IncludeStream, [switch] $Force)
Import-Module AU

$domain = 'https://github.com'
$releases = "$domain/coreos/etcd/releases"
$releases = "$domain/etcd-io/etcd/releases"

function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix }

Expand All @@ -13,38 +13,41 @@ function global:au_SearchReplace {
".\legal\VERIFICATION.txt" = @{
"(?i)(^\s*location on\:?\s*)\<.*\>" = "`${1}<$($Latest.ReleaseURL)>"
"(?i)(^\s*software.*)\<.*\>" = "`${1}<$($Latest.URL64)>"
"(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType32)"
"(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType64)"
"(?i)(^\s*checksum\:).*" = "`${1} $($Latest.Checksum64)"
}

"$($Latest.PackageName).nuspec" = @{
"(\<releaseNotes\>).*?(\</releaseNotes\>)" = "`${1}$($Latest.ReleaseURL)`${2}"
"(\<copyright\>.*?-)\d{4}(.*?\</copyright\>)" = "`${1}$($Latest.ReleaseYear)`${2}"
"(\<releaseNotes\>).*?(\</releaseNotes\>)" = "`${1}$($Latest.ReleaseURL)`${2}"
}
}
}

function global:au_GetLatest {
$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing

$re = '-windows-amd64\.zip$'
$urls = $download_page.links | ? href -match $re | % href
$re = '-windows-amd64\.zip$'
$urls = $download_page.links | where-object href -match $re | foreach-object href

$streams = @{}

$urls | % {
$version = $_ -split '\/v?' | select -last 1 -skip 1
$urls | foreach-object {
$version = $_ -split '\/v?' | select-object -last 1 -skip 1
$majorVersion = $version -replace '^(\d+\.\d+).*', "`$1"

if (!$streams.ContainsKey($majorVersion)) {
$streams.Add($majorVersion, @{
Version = Get-Version $version
URL64 = $domain + $_
ReleaseURL = "$domain/coreos/etcd/releases/tag/v${version}"
})
Version = Get-Version $version
URL64 = $domain + $_
ReleaseURL = "$domain/etcd-io/etcd/releases/tag/v${version}"
ReleaseYear = (Get-Date).ToString('yyyy')
}
)
}
}

return @{ Streams = $streams }
}

update -ChecksumFor none -IncludeStream $IncludeStream -Force:$Force
update -ChecksumFor none -IncludeStream $IncludeStream -Force:$Force -NoCheckChocoVersion -NoCheckUrl

0 comments on commit 8dada30

Please sign in to comment.