From e38d417446bd595fb199a52dd81f1fad1134925d Mon Sep 17 00:00:00 2001 From: Blake Rouse Date: Wed, 14 Oct 2020 11:09:21 -0400 Subject: [PATCH] [Elastic Agent] Remove the service installer scripts from packaging (#21694) * Remove the service installer scripts from packaging. * Add changelog. --- dev-tools/packaging/packages.yml | 6 ------ .../install-service-elastic-agent.ps1.tmpl | 19 ------------------- x-pack/elastic-agent/CHANGELOG.next.asciidoc | 1 + 3 files changed, 1 insertion(+), 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}} diff --git a/x-pack/elastic-agent/CHANGELOG.next.asciidoc b/x-pack/elastic-agent/CHANGELOG.next.asciidoc index 96f036dd15d..c2a723d552a 100644 --- a/x-pack/elastic-agent/CHANGELOG.next.asciidoc +++ b/x-pack/elastic-agent/CHANGELOG.next.asciidoc @@ -36,3 +36,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]