[Ingest Manager] Update Fleet enroll instructions to use install command (#79525)

This commit is contained in:
Nicolas Chaulet 2020-10-05 18:01:04 -04:00 committed by GitHub
parent 7c4bdb0248
commit 06d8040fa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 47 deletions

View file

@ -6,7 +6,7 @@
import React from 'react';
import styled from 'styled-components';
import { EuiText, EuiSpacer, EuiCode, EuiTitle, EuiCodeBlock } from '@elastic/eui';
import { EuiText, EuiSpacer, EuiLink, EuiTitle, EuiCodeBlock } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { EnrollmentAPIKey } from '../../../types';
@ -29,25 +29,33 @@ export const ManualInstructions: React.FunctionComponent<Props> = ({
const enrollArgs = `${kibanaUrl} ${apiKey.api_key}${
kibanaCASha256 ? ` --ca_sha256=${kibanaCASha256}` : ''
}`;
const macOsLinuxTarCommand = `./elastic-agent enroll ${enrollArgs}
./elastic-agent run`;
const linuxDebRpmCommand = `elastic-agent enroll ${enrollArgs}
systemctl enable elastic-agent
systemctl start elastic-agent`;
const linuxMacCommand = `./elastic-agent install -f ${enrollArgs}`;
const windowsCommand = `.\\elastic-agent enroll ${enrollArgs}
.\\install-service-elastic-agent.ps1`;
const windowsCommand = `.\\elastic-agent.exe install -f ${enrollArgs}`;
return (
<>
<EuiText>
<FormattedMessage
id="xpack.ingestManager.enrollmentInstructions.descriptionText"
defaultMessage="From the agent directory, run these commands to enroll and start an Elastic Agent. You can reuse these commands to set up agents on more than one host. Requires administrator privileges."
defaultMessage="From the agent directory, run the appropriate command to install, enroll, and start an Elastic Agent. You can reuse these commands to set up agents on more than one host. Requires administrator privileges."
/>
</EuiText>
<EuiSpacer size="l" />
<EuiTitle size="xs">
<h4>
<FormattedMessage
id="xpack.ingestManager.enrollmentInstructions.linuxMacOSTitle"
defaultMessage="Linux, macOS"
/>
</h4>
</EuiTitle>
<EuiSpacer size="s" />
<EuiCodeBlock fontSize="m" isCopyable={true} paddingSize="m">
<CommandCode>{linuxMacCommand}</CommandCode>
</EuiCodeBlock>
<EuiSpacer size="l" />
<EuiTitle size="xs">
<h4>
<FormattedMessage
@ -61,38 +69,23 @@ systemctl start elastic-agent`;
<CommandCode>{windowsCommand}</CommandCode>
</EuiCodeBlock>
<EuiSpacer size="l" />
<EuiTitle size="xs">
<h4>
<FormattedMessage
id="xpack.ingestManager.enrollmentInstructions.linuxDebRpmTitle"
defaultMessage="Linux (.deb and .rpm)"
/>
</h4>
</EuiTitle>
<EuiSpacer size="s" />
<EuiCodeBlock fontSize="m" isCopyable={true} paddingSize="m">
<CommandCode>{linuxDebRpmCommand}</CommandCode>
</EuiCodeBlock>
<EuiSpacer size="l" />
<EuiTitle size="xs">
<h4>
<FormattedMessage
id="xpack.ingestManager.enrollmentInstructions.macLinuxTarTitle"
defaultMessage="macOS / Linux (.tar.gz)"
/>
</h4>
</EuiTitle>
<EuiSpacer size="s" />
<EuiCodeBlock fontSize="m" isCopyable={true} paddingSize="m">
<CommandCode>{macOsLinuxTarCommand}</CommandCode>
</EuiCodeBlock>
<EuiSpacer size="s" />
<EuiText color="subdued" size="s">
<EuiText>
<FormattedMessage
id="xpack.ingestManager.enrollmentInstructions.macLinuxTarInstructions"
defaultMessage="The {command} command runs the agent in the foreground. If the agent's host reboots, you'll need to run the command again."
id="xpack.ingestManager.enrollmentInstructions.moreInstructionsText"
defaultMessage="See the {link} for more instructions and options."
values={{
command: <EuiCode>./elastic-agent run</EuiCode>,
link: (
<EuiLink
target="_blank"
external
href="https://www.elastic.co/guide/en/ingest-management/current/elastic-agent-installation-configuration.html"
>
<FormattedMessage
id="xpack.ingestManager.enrollmentInstructions.moreInstructionsLink"
defaultMessage="Elastic Agent docs"
/>
</EuiLink>
),
}}
/>
</EuiText>

View file

@ -29,7 +29,7 @@ interface Props {
agentPolicies?: AgentPolicy[];
}
const RUN_INSTRUCTIONS = './elastic-agent run';
const RUN_INSTRUCTIONS = './elastic-agent install';
export const StandaloneInstructions = React.memo<Props>(({ agentPolicies }) => {
const { getHref } = useLink();
@ -131,7 +131,7 @@ export const StandaloneInstructions = React.memo<Props>(({ agentPolicies }) => {
<EuiText>
<FormattedMessage
id="xpack.ingestManager.agentEnrollment.stepRunAgentDescription"
defaultMessage="From the agent directory, run these commands to enroll and start an Elastic Agent. You can reuse these commands to set up agents on more than one host. Requires administrator privileges."
defaultMessage="From the agent directory, run this command to install, enroll and start an Elastic Agent. You can reuse this command to set up agents on more than one host. Requires administrator privileges."
/>
<EuiSpacer size="m" />
<EuiCodeBlock fontSize="m">{RUN_INSTRUCTIONS}</EuiCodeBlock>

View file

@ -9094,9 +9094,6 @@
"xpack.ingestManager.enrollemntAPIKeyList.emptyMessage": "登録トークンが見つかりません。",
"xpack.ingestManager.enrollemntAPIKeyList.loadingTokensMessage": "登録トークンを読み込んでいます...",
"xpack.ingestManager.enrollmentInstructions.descriptionText": "エージェントのディレクトリから、該当するコマンドを実行し、Elasticエージェントを登録して起動します。再度これらのコマンドを実行すれば、複数のコンピューターでエージェントを設定できます。登録ステップは必ずシステムで管理者権限をもつユーザーとして実行してください。",
"xpack.ingestManager.enrollmentInstructions.linuxDebRpmTitle": "Linux.debおよび.rpm",
"xpack.ingestManager.enrollmentInstructions.macLinuxTarInstructions": "エージェントのシステムが再起動する場合は、{command}を実行する必要があります。",
"xpack.ingestManager.enrollmentInstructions.macLinuxTarTitle": "macOS / Linux (.tar.gz)",
"xpack.ingestManager.enrollmentInstructions.windowsTitle": "Windows",
"xpack.ingestManager.enrollmentTokenDeleteModal.cancelButton": "キャンセル",
"xpack.ingestManager.enrollmentTokenDeleteModal.deleteButton": "削除",

View file

@ -9100,9 +9100,6 @@
"xpack.ingestManager.enrollemntAPIKeyList.emptyMessage": "未找到任何注册令牌。",
"xpack.ingestManager.enrollemntAPIKeyList.loadingTokensMessage": "正在加载注册令牌......",
"xpack.ingestManager.enrollmentInstructions.descriptionText": "从代理的目录,运行相应命令以注册并启动 Elastic 代理。您可以重复使用这些命令在多台机器上设置代理。请务必以具有系统“管理员”权限的用户身份执行注册步骤。",
"xpack.ingestManager.enrollmentInstructions.linuxDebRpmTitle": "Linux.deb 和 .rpm",
"xpack.ingestManager.enrollmentInstructions.macLinuxTarInstructions": "如果代理的系统重新启动,您需要运行 {command}。",
"xpack.ingestManager.enrollmentInstructions.macLinuxTarTitle": "macOS/Linux (.tar.gz)",
"xpack.ingestManager.enrollmentInstructions.windowsTitle": "Windows",
"xpack.ingestManager.enrollmentTokenDeleteModal.cancelButton": "取消",
"xpack.ingestManager.enrollmentTokenDeleteModal.deleteButton": "删除",