-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Changes from all commits
d406d25
aeb5aaf
6571f21
e622f11
f394807
6a36ead
dd472c8
b3bc425
aba20b5
741ad36
2dce880
28bc0fa
385cc2e
0834913
58c70ac
8c8a83a
7eb32a8
e559f5e
678f9bd
f7d0b44
e7b8d0d
db0fc5f
0ed45fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
API_KEY_ENCODED=$1 | ||
API_ENDPOINT=$2 | ||
|
||
updateStepProgress() { | ||
echo " GET $API_ENDPOINT/step/$1?status=$2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" |
There was a problem hiding this comment.
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.