-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Fleet] Link to download page of current stack version on Agent install instructions #104494
Changes from all commits
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 |
---|---|---|
|
@@ -9,15 +9,24 @@ import React, { useCallback, useMemo } from 'react'; | |
import { EuiText, EuiButton, EuiSpacer } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import semver from 'semver'; | ||
|
||
import type { AgentPolicy, PackagePolicy } from '../../types'; | ||
import { sendGetOneAgentPolicy } from '../../hooks'; | ||
import { sendGetOneAgentPolicy, useKibanaVersion } from '../../hooks'; | ||
import { FLEET_SERVER_PACKAGE } from '../../constants'; | ||
|
||
import { EnrollmentStepAgentPolicy } from './agent_policy_selection'; | ||
import { AdvancedAgentAuthenticationSettings } from './advanced_agent_authentication_settings'; | ||
|
||
export const DownloadStep = () => { | ||
const kibanaVersion = useKibanaVersion(); | ||
const kibanaVersionURLString = useMemo( | ||
() => | ||
`${semver.major(kibanaVersion)}-${semver.minor(kibanaVersion)}-${semver.patch( | ||
kibanaVersion | ||
)}`, | ||
[kibanaVersion] | ||
); | ||
return { | ||
title: i18n.translate('xpack.fleet.agentEnrollment.stepDownloadAgentTitle', { | ||
defaultMessage: 'Download the Elastic Agent to your host', | ||
|
@@ -30,9 +39,16 @@ export const DownloadStep = () => { | |
defaultMessage="Fleet Server runs on an Elastic Agent. You can download the Elastic Agent binaries and verification signatures from Elastic’s download page." | ||
/> | ||
</EuiText> | ||
<EuiSpacer size="s" /> | ||
<EuiText size="s"> | ||
<FormattedMessage | ||
id="xpack.fleet.agentEnrollment.downloadUseLinuxInstaller" | ||
defaultMessage="Linux users: We recommend using the installers over (RPM/DEB) because they provide the ability to upgrade your agent within Fleet." | ||
/> | ||
</EuiText> | ||
<EuiSpacer size="l" /> | ||
<EuiButton | ||
href="https://ela.st/download-elastic-agent" | ||
href={`https://www.elastic.co/downloads/past-releases/elastic-agent-${kibanaVersionURLString}`} | ||
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. one thing that will be annoying, is that this link will be broken for releases which are not published yet (i.e. local development from master/8.0.0, build candidates like the upcoming 7.14.0) but I'm not sure what we can do about that. @mostlyjason WDYT? 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. I was concerned about that too, but there doesn't seem to be an easy way to determine in the code whether or not a version is released yet. This might just have to be a thing we deal with in development. 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. sgtm 👍🏻 |
||
target="_blank" | ||
iconSide="right" | ||
iconType="popout" | ||
|
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.
It's not a blocker for me, but in the main branch this will go to https://www.elastic.co/downloads/past-releases/elastic-agent-8-0-0 which 404's.
I don't know if it's better to leave the existing https://ela.st/download-elastic-agent for snapshot builds or use this invalid URL
One optional enhancement for another time/PR is to use the results from https://artifacts-api.elastic.co/v1/search/8.0-SNAPSHOT/elastic-agent to make a list of links like below (in the flyout?)
None of these are requirements to ship, IMO; just pointing out what I noticed