Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Logs Onboarding] Adds install shipper step for custom logs #157802

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d406d25
[Logs Onboarding] Adds install shipper step for custom logs (#154937)…
ogupte May 15, 2023
aeb5aaf
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine May 15, 2023
6571f21
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine May 15, 2023
e622f11
Adds new saved object type `observability-onboarding-state`
ogupte May 16, 2023
f394807
Generating yaml configuration in server
yngrdyn May 18, 2023
6a36ead
Cleans up script and fixes progress updates to be saved in saved objects
ogupte May 18, 2023
dd472c8
set saved objects ids based on apikeyId
ogupte May 18, 2023
b3bc425
- fixed premature API call from wizard when rendered for transition
ogupte May 18, 2023
aba20b5
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine May 18, 2023
741ad36
Merge remote-tracking branch 'origin/logs-onboarding-standalone-elast…
yngrdyn May 22, 2023
2dce880
Using internal savedObjects client
yngrdyn May 22, 2023
28bc0fa
Merge pull request #7 from ogupte/logs-onboaring-yaml-generator
yngrdyn May 22, 2023
385cc2e
Merge remote-tracking branch 'origin/master' into logs-onboarding-sta…
yngrdyn May 22, 2023
0834913
Merge remote-tracking branch 'origin/master' into logs-onboarding-sta…
yngrdyn May 22, 2023
58c70ac
Fixing build
yngrdyn May 22, 2023
8c8a83a
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine May 22, 2023
7eb32a8
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine May 22, 2023
e559f5e
remove apiKeyId mapping and move progess up one level in saved object…
ogupte May 22, 2023
678f9bd
updated saved object mapping for observability-onboarding-state
ogupte May 22, 2023
f7d0b44
uses the static asset path provided for plugins for the downloaded se…
ogupte May 22, 2023
e7b8d0d
- adds API that checks for existence of log events for given dataset
ogupte May 22, 2023
db0fc5f
Fixing build
yngrdyn May 23, 2023
0ed45fe
Merge branch 'main' into logs-onboarding-standalone-elastic-agent-154937
yngrdyn May 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/kbn-check-mappings-update-cli/current_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,18 @@
}
}
},
"observability-onboarding-state": {
"properties": {
"state": {
"type": "object",
"dynamic": false
},
"progress": {
"type": "object",
"dynamic": false
}
}
},
"ml-job": {
"properties": {
"job_id": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"ml-module": "c88b6a012cfb7b7adb7629b1edeab6b83f1fd048",
"ml-trained-model": "49a1685d79990ad05ea1d1d30e28456fe002f3b9",
"monitoring-telemetry": "24f7393dfacb6c7b0f7ad7d242171a1c29feaa48",
"observability-onboarding-state": "9a55f01199158a68ea8a0123e99ff092cdcdb71c",
"osquery-manager-usage-metric": "23a8f08a98dd0f58ab4e559daa35b06edc40ed4f",
"osquery-pack": "edd84b2c59ef36214ece0676706da8f22175c660",
"osquery-pack-asset": "18e08979d46ee7e5538f54c080aec4d8c58516ca",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ describe('split .kibana index into multiple system indices', () => {
"ml-module",
"ml-trained-model",
"monitoring-telemetry",
"observability-onboarding-state",
"osquery-manager-usage-metric",
"osquery-pack",
"osquery-pack-asset",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const previouslyRegisteredTypes = [
'ml-module',
'ml-telemetry',
'monitoring-telemetry',
'observability-onboarding-state',
'osquery-pack',
'osquery-pack-asset',
'osquery-saved-query',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

API_KEY_ENCODED=$1
API_ENDPOINT=$2

updateStepProgress() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the simplicity of it. It means we can add / remove steps when needed.

echo " GET $API_ENDPOINT/step/$1?status=$2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means Kibana has to be accessible for this to work. This is ok but we should mention it in our docs or when users hit erros, make sure we provide good error messages that Kibana is not reachable for example.

curl --request GET \
--url "$API_ENDPOINT/step/$1?status=$2" \
--header "Authorization: ApiKey $API_KEY_ENCODED" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true"
echo ""
}

echo "Downloading Elastic Agent"
# https://www.elastic.co/guide/en/fleet/8.7/install-standalone-elastic-agent.html
curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.7.1-linux-x86_64.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally the agent version becomes an input param so users always get the version compatible with their Stack version.

updateStepProgress "ea-download" "success"
echo "Extracting Elastic Agent"
tar xzvf elastic-agent-8.7.1-linux-x86_64.tar.gz
updateStepProgress "ea-extract" "success"
echo "Installing Elastic Agent"
cd elastic-agent-8.7.1-linux-x86_64
./elastic-agent install -f
updateStepProgress "ea-install" "success"
echo "Sending status to Kibana..."
updateStepProgress "ea-status" "active"
Loading