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 4 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
5 changes: 5 additions & 0 deletions packages/core/apps/core-apps-server-internal/src/core_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,10 @@ export class CoreAppsService {
'/node_modules/@kbn/ui-framework/dist/{path*}',
fromRoot('node_modules/@kbn/ui-framework/dist')
);

core.http.registerStaticDir(
'/observabilityOnboarding/{path*}',
fromRoot('x-pack/plugins/observability_onboarding/public/assets')
);
}
}
yngrdyn marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash

# Arguments
# ELASTIC_HOST=$1
# ELASTIC_TOKEN=$2

# download and extract Elastic Agent
# curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.7.0-linux-x86_64.tar.gz
# tar xzvf elastic-agent-8.7.0-linux-x86_64.tar.gz
# cd elastic-agent-8.7.0-linux-x86_64

# install Elastic Agent
# sudo ./elastic-agent install --url=$ELASTIC_HOST --enrollment-token=$ELASTIC_TOKEN

## ➜ elastic-agent-8.7.1-linux-x86_64 sudo ./elastic-agent install
## [sudo] password for oliver:
## Elastic Agent will be installed at /opt/Elastic/Agent and will run as a service. Do you want to continue? [Y/n]:Y
## Do you want to enroll this Agent into Fleet? [Y/n]:n
## Elastic Agent has been successfully installed.

# INSTALL_EXIT_CODE=$?

# check the exit code to determine whether the installation was successful or not
# if [ $INSTALL_EXIT_CODE -eq 0 ]; then
# INSTALL_RESULT="success"
# else
# INSTALL_RESULT="failure"
# fi

# call the API with the installation result
# curl -X POST "$KIBANA_HOST/api/observabilityOnboarding/agent-installation-status?host=$ELASTIC_HOST&token=$ELASTIC_TOKEN&result=$INSTALL_RESULT"

########################

API_KEY_ENCODED=$1
STATUS_API_ENDPOINT=$2

pingKibana () {
echo " GET $STATUS_API_ENDPOINT?ping=$1"
curl --request GET \
--url "$STATUS_API_ENDPOINT?ping=$1" \
--header "Authorization: ApiKey $API_KEY_ENCODED" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true"
echo ""
}

echo "Downloading Elastic Agent"
curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.7.1-linux-x86_64.tar.gz
pingKibana "ea-download-success"
echo "Extracting Elastic Agent"
tar xzvf elastic-agent-8.7.1-linux-x86_64.tar.gz
pingKibana "ea-extract-success"
echo "Installing Elastic Agent"
cd elastic-agent-8.7.1-linux-x86_64
./elastic-agent install -f
pingKibana "ea-install-success"
echo "Sending status to Kibana..."
pingKibana "ea-status-active"
Loading