From 57db773b35933b7d0ea0a2744083ca6c4d560e2b Mon Sep 17 00:00:00 2001 From: Blake Rouse Date: Thu, 8 Oct 2020 14:38:10 -0400 Subject: [PATCH 1/2] Remove the service installer scripts from packaging. --- dev-tools/packaging/packages.yml | 6 ------ .../install-service-elastic-agent.ps1.tmpl | 19 ------------------- 2 files changed, 25 deletions(-) delete mode 100644 dev-tools/packaging/templates/windows/install-service-elastic-agent.ps1.tmpl diff --git a/dev-tools/packaging/packages.yml b/dev-tools/packaging/packages.yml index dbfbc9f4b7a..aedcd81eb7f 100644 --- a/dev-tools/packaging/packages.yml +++ b/dev-tools/packaging/packages.yml @@ -284,12 +284,6 @@ shared: <<: *common files: <<: *agent_binary_files - install-service-{{.BeatName}}.ps1: - template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/windows/install-service-elastic-agent.ps1.tmpl' - mode: 0755 - uninstall-service-{{.BeatName}}.ps1: - template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/windows/uninstall-service.ps1.tmpl' - mode: 0755 'data/{{.BeatName}}-{{ commit_short }}/downloads/filebeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip': source: '{{.AgentDropPath}}/filebeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip' mode: 0644 diff --git a/dev-tools/packaging/templates/windows/install-service-elastic-agent.ps1.tmpl b/dev-tools/packaging/templates/windows/install-service-elastic-agent.ps1.tmpl deleted file mode 100644 index fe037e3b425..00000000000 --- a/dev-tools/packaging/templates/windows/install-service-elastic-agent.ps1.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -$ErrorActionPreference = "Stop" - -# Delete and stop the service if it already exists. -if (Get-Service {{.BeatName}} -ErrorAction SilentlyContinue) { - $service = Get-WmiObject -Class Win32_Service -Filter "name='{{.BeatName}}'" - $service.StopService() - Start-Sleep -s 1 - $service.delete() -} - -$workdir = Split-Path $MyInvocation.MyCommand.Path - -# Create the new service. -New-Service -name {{.BeatName}} ` - -displayName {{.BeatName | title}} ` - -binaryPathName "`"$workdir\{{.BeatName}}.exe`" --path.home `"$workdir`" --path.data `"$workdir\data`" run" - -# Start the new service. -Start-Service -name {{.BeatName}} From 4e9ad92b6406faaba44efc73781c48a020e03ce4 Mon Sep 17 00:00:00 2001 From: Blake Rouse Date: Thu, 8 Oct 2020 14:41:08 -0400 Subject: [PATCH 2/2] Add changelog. --- x-pack/elastic-agent/CHANGELOG.next.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/elastic-agent/CHANGELOG.next.asciidoc b/x-pack/elastic-agent/CHANGELOG.next.asciidoc index 73dfe8ff9a4..0a38b625f63 100644 --- a/x-pack/elastic-agent/CHANGELOG.next.asciidoc +++ b/x-pack/elastic-agent/CHANGELOG.next.asciidoc @@ -34,3 +34,4 @@ - Add `elastic.agent.id` and `elastic.agent.version` to published events from filebeat and metricbeat {pull}21543[21543] - Add `upgrade` subcommand to perform upgrade of installed Elastic Agent {pull}21425[21425] - Update `fleet.yml` and Kibana hosts when a policy change updates the Kibana hosts {pull}21599[21599] +- Removed `install-service.ps1` and `uninstall-service.ps1` from Windows .zip packaging {pull}21694[21694]