From 6f9d026f11bfef07724c4966cead78e0144e4b16 Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 14:16:18 -0400 Subject: [PATCH 01/12] WIP - update scripts to install plugin package. --- .circleci/config.yml | 21 +++++++++++ scripts/unix-install.sh | 70 ++++++++++++++++++++----------------- scripts/windows-install.ps1 | 40 ++++++++++++--------- 3 files changed, 83 insertions(+), 48 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ce6a986e4..0697de40c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,6 +34,20 @@ jobs: paths: - "*" + fetch-plugins: + executor: golang + steps: + - run: + name: Download Plugins Tarball + command: curl -fL https://github.com/observiq/carbon-plugins/releases/latest/download/carbon-plugins.tar.gz -o ./artifacts/plugins.tar.gz + - run: + name: Download Plugins Zip + command: curl -fL https://github.com/observiq/carbon-plugins/releases/latest/download/carbon-plugins.zip -o ./artifacts/plugins.zip + - persist_to_workspace: + root: ./artifacts + paths: + - "*" + publish-github-release: docker: - image: cibuilds/github:0.10 @@ -362,9 +376,16 @@ workflows: - test-linux - test-macos - test-windows + - fetch-plugins: + filters: + branches: + ignore: /.*/ + tags: + only: /^v\d+\.\d+\.\d+.*/ - publish-github-release: requires: - build + - fetch-plugins filters: branches: ignore: /.*/ diff --git a/scripts/unix-install.sh b/scripts/unix-install.sh index 147f64e9a..f4c4a281a 100755 --- a/scripts/unix-install.sh +++ b/scripts/unix-install.sh @@ -7,7 +7,8 @@ set -e # Agent Constants SERVICE_NAME="carbon" BINARY_NAME="carbon" -DOWNLOAD_BASE="https://github.com/observiq/carbon/releases/latest/download" +DOWNLOAD_BASE="https://github.com/observiq/carbon/releases" +PLUGINS_PACKAGE="carbon-plugins.tar.gz" # Script Constants PREREQS="curl hostname printf ps sed uname cut tar" @@ -131,9 +132,9 @@ usage() increase_indent USAGE=$(cat < ' '' "$script:binary_location" DarkCyan + Show-ColorText "$INDENT_WIDTH$script:agent_download_url" DarkCyan ' -> ' '' "$script:binary_location" DarkCyan try { $WebClient = New-Object System.Net.WebClient - $WebClient.DownloadFile($script:download_url, $script:binary_location) + $WebClient.DownloadFile($script:agent_download_url, $script:binary_location) Complete } catch { @@ -496,7 +504,7 @@ new-module -name LogAgentInstall -scriptblock { $service_params = @{ Name = "$SERVICE_NAME" DisplayName = "$SERVICE_NAME" - BinaryPathName = "$script:binary_location --config $script:agent_home\config.yaml --log_file $script:agent_home\$SERVICE_NAME.log --database $script:agent_home\$SERVICE_NAME.db --plugin_dir $script:plugin_dir" + BinaryPathName = "$script:binary_location --config $script:agent_home\config.yaml --log_file $script:agent_home\$SERVICE_NAME.log --database $script:agent_home\$SERVICE_NAME.db" Description = "Monitors and processes logs." StartupType = "Automatic" } @@ -566,8 +574,8 @@ new-module -name LogAgentInstall -scriptblock { [Alias('y', 'accept_defaults')] [string]$script:accept_defaults, - [Alias('d', 'download_url')] - [string]$script:download_url, + [Alias('v', 'version')] + [string]$script:version, [Alias('i', 'install_dir')] [string]$script:install_dir = '', From 37e74cc35d62379526b64408e83425d00d53af4f Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 15:23:38 -0400 Subject: [PATCH 02/12] WIP - windows install downloads, extracts, and cleans up. Docker build includes plugins --- .circleci/config.yml | 1 + Dockerfile | 3 +- scripts/windows-install.ps1 | 96 +++++++++++++++++++++---------------- 3 files changed, 58 insertions(+), 42 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1dfc614f0..65547f760 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -412,6 +412,7 @@ workflows: - publish-docker-release: requires: - build + - fetch-plugins filters: branches: ignore: /.*/ diff --git a/Dockerfile b/Dockerfile index 3eb2c7af5..4948e25ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,12 @@ FROM ubuntu:bionic -RUN mkdir -p /carbon_home/plugins +RUN mkdir -p /carbon_home ENV CARBON_HOME=/carbon_home RUN echo "pipeline:\n" >> /carbon_home/config.yaml RUN apt-get update && apt-get install -y systemd ca-certificates COPY ./artifacts/carbon_linux_amd64 /carbon_home/carbon +RUN tar -zxvf ./artifacts/carbon-plugins.tar.gz -C /carbon_home/ ENTRYPOINT /carbon_home/carbon \ --config /carbon_home/config.yaml \ --database /carbon_home/carbon.db \ diff --git a/scripts/windows-install.ps1 b/scripts/windows-install.ps1 index 1e78d236e..832499b7f 100644 --- a/scripts/windows-install.ps1 +++ b/scripts/windows-install.ps1 @@ -4,7 +4,7 @@ new-module -name LogAgentInstall -scriptblock { $DEFAULT_WINDOW_TITLE = $host.ui.rawui.WindowTitle $DEFAULT_INSTALL_PATH = 'C:\' $DOWNLOAD_BASE = "https://github.com/observiq/carbon/releases" - PLUGINS_PACKAGE="carbon-plugins.zip" + $PLUGINS_ZIP="carbon-plugins.zip" $SERVICE_NAME = 'carbon' $INDENT_WIDTH = ' ' $MIN_DOT_NET_VERSION = '4.5' @@ -285,7 +285,7 @@ new-module -name LogAgentInstall -scriptblock { # This will set the urls to use when downloading the agent and its plugins. # These urls are constructed based on the --version flag. # If not specified, the version defaults to "latest". - function Set-DownloadURL { + function Set-DownloadURLs { Show-ColorText 'Configuring download urls...' Add-Indent if ( !$script:version ) { @@ -294,7 +294,7 @@ new-module -name LogAgentInstall -scriptblock { } else { $script:agent_download_url = "$DOWNLOAD_BASE/download/$script:version/carbon_windows_amd64" - $script:plugins_download_url = "$DOWNLOAD_BASE/download/$script:version/carbon-plugins.zip" + $script:plugins_download_url = "$DOWNLOAD_BASE/download/$script:version/$PLUGINS_ZIP" } Show-ColorText "Using agent download url: " '' "$script:agent_download_url" DarkCyan Show-ColorText "Using plugins download url: " '' "$script:plugins_download_url" DarkCyan @@ -425,6 +425,46 @@ new-module -name LogAgentInstall -scriptblock { Remove-Indent } + # This will download and extract plugins to the plugins directory. + function Get-CarbonPlugins { + Show-Header "Downloading Carbon Plugins" + Add-Indent + Show-ColorText 'Downloading plugins. Please wait...' + Show-ColorText "$INDENT_WIDTH$script:plugins_download_url" DarkCyan ' -> ' '' "$script:agent_home" DarkCyan + try { + $WebClient = New-Object System.Net.WebClient + $WebClient.DownloadFile($script:plugins_download_url, $script:agent_home) + Complete + } + catch { + Failed + $error_message = $_.Exception.Message -replace 'Exception calling.*?: ', '' + Exit-Error $MyInvocation.ScriptLineNumber "Failed to download plugins: $error_message" + } + + try { + Expand-Archive -Path $script:agent_home\$PLUGINS_ZIP -DestinationPath $script:agent_home + Complete + } + catch { + Failed + $error_message = $_.Exception.Message -replace 'Exception calling.*?: ', '' + Exit-Error $MyInvocation.ScriptLineNumber "Failed to expand plugins archive: $error_message" + } + + try { + Remove-Item -Path $script:agent_home\$PLUGINS_ZIP + Complete + } + catch { + Failed + $error_message = $_.Exception.Message -replace 'Exception calling.*?: ', '' + Exit-Error $MyInvocation.ScriptLineNumber "Failed to clean up plugins archive: $error_message" + } + + Remove-Indent + } + # This will remove the agent service. function Remove-AgentService { $service = Get-Service $SERVICE_NAME -ErrorAction SilentlyContinue @@ -474,43 +514,16 @@ new-module -name LogAgentInstall -scriptblock { if (Test-Path $args) { return } @" -pipeline: -# An example input that generates a single log entry when Carbon starts up. - - id: example_input - type: generate_input - count: 1 - entry: - record: This is a sample log generated by Carbon - output: example_output - - # An example input that monitors the contents of a file. - # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/file_input.md - # - # - id: example_input - # type: file_input - # include: - # - /sample/file/path - # output: example_output - - # An example output that sends captured logs to stdout. - - id: example_output - type: stdout - - # An example output that sends captured logs to google cloud logging. - # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/google_cloud_output.md - # - # - id: example_output - # type: google_cloud_output - # credentials_file: /my/credentials/file - - # An example output that sends captured logs to elasticsearch. - # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/elastic_output.md - # - # - id: example_output - # type: elastic_output - # addresses: - # - http://my_node_address:9200 - # api_key: my_api_key +# pipeline: +# - id: example_input +# type: generate_input +# count: 1 +# entry: +# record: example log +# output: example_stdout +# +# - id: example_stdout +# type: stdout "@ > $args } @@ -531,7 +544,7 @@ pipeline: $service_params = @{ Name = "$SERVICE_NAME" DisplayName = "$SERVICE_NAME" - BinaryPathName = "$script:binary_location --config $script:agent_home\config.yaml --log_file $script:agent_home\$SERVICE_NAME.log --database $script:agent_home\$SERVICE_NAME.db" + BinaryPathName = "$script:binary_location --config $script:agent_home\config.yaml --log_file $script:agent_home\$SERVICE_NAME.log --database $script:agent_home\$SERVICE_NAME.db --plugin_dir $script:plugin_dir" Description = "Monitors and processes logs." StartupType = "Automatic" } @@ -632,6 +645,7 @@ pipeline: Set-Permissions Remove-AgentService Get-CarbonBinary + Get-CarbonPlugins New-AgentConfig New-AgentService Complete-Install From eb031ff4e600559dbdd8427af628a94f262c0e73 Mon Sep 17 00:00:00 2001 From: Camden Cheek Date: Mon, 20 Jul 2020 15:39:22 -0400 Subject: [PATCH 03/12] Copy plugins into docker container --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4948e25ec..957733fcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ RUN echo "pipeline:\n" >> /carbon_home/config.yaml RUN apt-get update && apt-get install -y systemd ca-certificates COPY ./artifacts/carbon_linux_amd64 /carbon_home/carbon -RUN tar -zxvf ./artifacts/carbon-plugins.tar.gz -C /carbon_home/ +COPY ./artifacts/carbon-plugins.tar.gz /tmp/carbon-plugins.tar.gz +RUN tar -zxvf /tmp/carbon-plugins.tar.gz -C /carbon_home/ ENTRYPOINT /carbon_home/carbon \ --config /carbon_home/config.yaml \ --database /carbon_home/carbon.db \ From 144879ccde7b10465a6bd8c1b0f152eb5f22297c Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 16:07:08 -0400 Subject: [PATCH 04/12] Mostly working --- scripts/windows-install.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/windows-install.ps1 b/scripts/windows-install.ps1 index 832499b7f..b5cc36bd5 100644 --- a/scripts/windows-install.ps1 +++ b/scripts/windows-install.ps1 @@ -4,7 +4,6 @@ new-module -name LogAgentInstall -scriptblock { $DEFAULT_WINDOW_TITLE = $host.ui.rawui.WindowTitle $DEFAULT_INSTALL_PATH = 'C:\' $DOWNLOAD_BASE = "https://github.com/observiq/carbon/releases" - $PLUGINS_ZIP="carbon-plugins.zip" $SERVICE_NAME = 'carbon' $INDENT_WIDTH = ' ' $MIN_DOT_NET_VERSION = '4.5' @@ -294,7 +293,7 @@ new-module -name LogAgentInstall -scriptblock { } else { $script:agent_download_url = "$DOWNLOAD_BASE/download/$script:version/carbon_windows_amd64" - $script:plugins_download_url = "$DOWNLOAD_BASE/download/$script:version/$PLUGINS_ZIP" + $script:plugins_download_url = "$DOWNLOAD_BASE/download/$script:version/carbon-plugins.zip" } Show-ColorText "Using agent download url: " '' "$script:agent_download_url" DarkCyan Show-ColorText "Using plugins download url: " '' "$script:plugins_download_url" DarkCyan @@ -430,10 +429,10 @@ new-module -name LogAgentInstall -scriptblock { Show-Header "Downloading Carbon Plugins" Add-Indent Show-ColorText 'Downloading plugins. Please wait...' - Show-ColorText "$INDENT_WIDTH$script:plugins_download_url" DarkCyan ' -> ' '' "$script:agent_home" DarkCyan + Show-ColorText "$INDENT_WIDTH$script:plugins_download_url" DarkCyan ' -> ' '' "$script:agent_home\plugins.zip" DarkCyan try { $WebClient = New-Object System.Net.WebClient - $WebClient.DownloadFile($script:plugins_download_url, $script:agent_home) + $WebClient.DownloadFile($script:plugins_download_url, "$script:agent_home\plugins.zip") Complete } catch { @@ -443,7 +442,8 @@ new-module -name LogAgentInstall -scriptblock { } try { - Expand-Archive -Path $script:agent_home\$PLUGINS_ZIP -DestinationPath $script:agent_home + [System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null + [System.IO.Compression.ZipFile]::ExtractToDirectory("$script:agent_home\plugins.zip", $script:agent_home\tmp) Complete } catch { @@ -453,7 +453,7 @@ new-module -name LogAgentInstall -scriptblock { } try { - Remove-Item -Path $script:agent_home\$PLUGINS_ZIP + Remove-Item -Path "$script:agent_home\plugins.zip" Complete } catch { From a184417d39a121e9d0aa6676d3920a95997af4ae Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 16:07:43 -0400 Subject: [PATCH 05/12] remove tmp directory --- scripts/windows-install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/windows-install.ps1 b/scripts/windows-install.ps1 index b5cc36bd5..e9f9a8218 100644 --- a/scripts/windows-install.ps1 +++ b/scripts/windows-install.ps1 @@ -443,7 +443,7 @@ new-module -name LogAgentInstall -scriptblock { try { [System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null - [System.IO.Compression.ZipFile]::ExtractToDirectory("$script:agent_home\plugins.zip", $script:agent_home\tmp) + [System.IO.Compression.ZipFile]::ExtractToDirectory("$script:agent_home\plugins.zip", $script:agent_home) Complete } catch { From ded31d2f13de99fb3edbd2469f175c066e0e5ce7 Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 16:19:18 -0400 Subject: [PATCH 06/12] All install scripts now install plugins as well --- scripts/windows-install.ps1 | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/scripts/windows-install.ps1 b/scripts/windows-install.ps1 index e9f9a8218..7b60bf9fd 100644 --- a/scripts/windows-install.ps1 +++ b/scripts/windows-install.ps1 @@ -430,9 +430,20 @@ new-module -name LogAgentInstall -scriptblock { Add-Indent Show-ColorText 'Downloading plugins. Please wait...' Show-ColorText "$INDENT_WIDTH$script:plugins_download_url" DarkCyan ' -> ' '' "$script:agent_home\plugins.zip" DarkCyan + + try { + New-Item -Path "$script:agent_home\download\tmp" -ItemType "directory" + Complete + } + catch { + Failed + $error_message = $_.Exception.Message -replace 'Exception calling.*?: ', '' + Exit-Error $MyInvocation.ScriptLineNumber "Failed to create tmp directory plugins: $error_message" + } + try { $WebClient = New-Object System.Net.WebClient - $WebClient.DownloadFile($script:plugins_download_url, "$script:agent_home\plugins.zip") + $WebClient.DownloadFile($script:plugins_download_url, "$script:agent_home\download\plugins.zip") Complete } catch { @@ -443,7 +454,7 @@ new-module -name LogAgentInstall -scriptblock { try { [System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null - [System.IO.Compression.ZipFile]::ExtractToDirectory("$script:agent_home\plugins.zip", $script:agent_home) + [System.IO.Compression.ZipFile]::ExtractToDirectory("$script:agent_home\download\plugins.zip", "$script:agent_home\download") Complete } catch { @@ -453,13 +464,23 @@ new-module -name LogAgentInstall -scriptblock { } try { - Remove-Item -Path "$script:agent_home\plugins.zip" + Copy-Item -Path "$script:agent_home\download\plugins\*.yaml" -Destination "$script:agent_home\plugins" + Complete + } + catch { + Failed + $error_message = $_.Exception.Message -replace 'Exception calling.*?: ', '' + Exit-Error $MyInvocation.ScriptLineNumber "Failed to relocate plugins: $error_message" + } + + try { + Remove-Item -Path "$script:agent_home\download" -Recurse Complete } catch { Failed $error_message = $_.Exception.Message -replace 'Exception calling.*?: ', '' - Exit-Error $MyInvocation.ScriptLineNumber "Failed to clean up plugins archive: $error_message" + Exit-Error $MyInvocation.ScriptLineNumber "Failed to clean up download: $error_message" } Remove-Indent From a933ca7f84bc7be925a562889f077d33a7beaa58 Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 16:25:25 -0400 Subject: [PATCH 07/12] Fix merge issue --- scripts/windows-install.ps1 | 44 ++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/scripts/windows-install.ps1 b/scripts/windows-install.ps1 index 7b60bf9fd..12b3600b4 100644 --- a/scripts/windows-install.ps1 +++ b/scripts/windows-install.ps1 @@ -535,16 +535,40 @@ new-module -name LogAgentInstall -scriptblock { if (Test-Path $args) { return } @" -# pipeline: -# - id: example_input -# type: generate_input -# count: 1 -# entry: -# record: example log -# output: example_stdout -# -# - id: example_stdout -# type: stdout +pipeline: # pipeline: +# An example input that generates a single log entry when Carbon starts up. + - id: example_input + type: generate_input + count: 1 + entry: + record: This is a sample log generated by Carbon + output: example_output + + # An example input that monitors the contents of a file. + # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/file_input.md + # + # - id: example_input + # type: file_input + # include: + # - /sample/file/path + # output: example_output + # An example output that sends captured logs to stdout. + - id: example_output + type: stdout + # An example output that sends captured logs to google cloud logging. + # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/google_cloud_output.md + # + # - id: example_output + # type: google_cloud_output + # credentials_file: /my/credentials/file + # An example output that sends captured logs to elasticsearch. + # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/elastic_output.md + # + # - id: example_output + # type: elastic_output + # addresses: + # - http://my_node_address:9200 + # api_key: my_api_key "@ > $args } From 1844e743edfc9ed19cd36ac18b27487da8c8743c Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 16:29:44 -0400 Subject: [PATCH 08/12] Fix more merge conflicts --- scripts/windows-install.ps1 | 52 +++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/scripts/windows-install.ps1 b/scripts/windows-install.ps1 index 12b3600b4..d8046280e 100644 --- a/scripts/windows-install.ps1 +++ b/scripts/windows-install.ps1 @@ -535,7 +535,7 @@ new-module -name LogAgentInstall -scriptblock { if (Test-Path $args) { return } @" -pipeline: # pipeline: +pipeline: # An example input that generates a single log entry when Carbon starts up. - id: example_input type: generate_input @@ -545,30 +545,32 @@ pipeline: # pipeline: output: example_output # An example input that monitors the contents of a file. - # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/file_input.md - # - # - id: example_input - # type: file_input - # include: - # - /sample/file/path - # output: example_output - # An example output that sends captured logs to stdout. - - id: example_output - type: stdout - # An example output that sends captured logs to google cloud logging. - # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/google_cloud_output.md - # - # - id: example_output - # type: google_cloud_output - # credentials_file: /my/credentials/file - # An example output that sends captured logs to elasticsearch. - # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/elastic_output.md - # - # - id: example_output - # type: elastic_output - # addresses: - # - http://my_node_address:9200 - # api_key: my_api_key + # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/file_input.md + # + # - id: example_input + # type: file_input + # include: + # - /sample/file/path + # output: example_output + + # An example output that sends captured logs to stdout. + - id: example_output + type: stdout + + # An example output that sends captured logs to google cloud logging. + # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/google_cloud_output.md + # + # - id: example_output + # type: google_cloud_output + # credentials_file: /my/credentials/file + + # An example output that sends captured logs to elasticsearch. + # For more info: https://github.com/observIQ/carbon/blob/master/docs/plugins/elastic_output.md + # + # - id: example_output + # type: elastic_output + # addresses: + # - http://my_node_address:9200 "@ > $args } From 43a8dd913e9b1f61257162e2333463415b01197c Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 16:31:23 -0400 Subject: [PATCH 09/12] One more merge issue fixed --- scripts/windows-install.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/windows-install.ps1 b/scripts/windows-install.ps1 index d8046280e..de6fe4a8e 100644 --- a/scripts/windows-install.ps1 +++ b/scripts/windows-install.ps1 @@ -571,6 +571,7 @@ pipeline: # type: elastic_output # addresses: # - http://my_node_address:9200 + # api_key: my_api_key "@ > $args } From c8239fa5d832fe76d720474faa90ccebe11f0a65 Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 16:41:54 -0400 Subject: [PATCH 10/12] Attach workspace before using it --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 65547f760..f96bcd88a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,6 +37,8 @@ jobs: fetch-plugins: executor: golang steps: + - attach_workspace: + at: ./artifacts - run: name: Download Plugins Tarball command: curl -fL https://github.com/observiq/carbon-plugins/releases/latest/download/carbon-plugins.tar.gz -o ./artifacts/plugins.tar.gz From d32d5fff59d68189f20cad80c36cd6f66e4744df Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 16:55:07 -0400 Subject: [PATCH 11/12] Download plugins dir to tmp directory --- scripts/unix-install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/unix-install.sh b/scripts/unix-install.sh index 9d259606f..7acba8575 100755 --- a/scripts/unix-install.sh +++ b/scripts/unix-install.sh @@ -422,11 +422,13 @@ install_package() succeeded info "Downloading plugins..." - curl -L "$plugins_download_url" -o plugins.tar.gz --progress-bar --fail || error_exit "$LINENO" "Failed to download plugins" + mkdir -p ./tmp + curl -L "$plugins_download_url" -o ./tmp/plugins.tar.gz --progress-bar --fail || error_exit "$LINENO" "Failed to download plugins" succeeded info "Extracting plugins..." - tar -zxvf plugins.tar.gz -C "$agent_home" + tar -zxvf ./tmp/plugins.tar.gz -C "$agent_home" + rm -fr ./tmp success "Carbon installation complete!" decrease_indent From 7db240f97635bd28f7f98e5851f7010e6b28b0f7 Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 20 Jul 2020 17:07:48 -0400 Subject: [PATCH 12/12] Add note to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 395f68c79..459b58263 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased - Add support for multiple encodings in the file input plugin +- Install scripts and docker image now include plugins from `carbon-plugins` repository ## [0.9.2] - 2020-07-13 ### Added