Skip to content

Commit

Permalink
[UII] Update install snippets to include all platforms (#210249)
Browse files Browse the repository at this point in the history
## Summary

Resolves [#167592](#167592).
This PR expands Fleet's enrollment/install snippets so that all
platforms & architectures are available:

**Fleet server instructions**

![image](https://github.com/user-attachments/assets/85db0e78-4100-42e7-9298-5645e1100145)

**Managed agent instructions**

![image](https://github.com/user-attachments/assets/82a41273-331c-4655-9984-f48c01a82d82)

**Standalone agent instructions** (with policy that includes K8, so K8
yml and platform is selected by default)

![image](https://github.com/user-attachments/assets/5e7ddfb1-9f34-418a-9077-addee703ed71)

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
  • Loading branch information
jen-huang authored Feb 9, 2025
1 parent 81a1423 commit 73c7f87
Show file tree
Hide file tree
Showing 14 changed files with 1,075 additions and 414 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18383,14 +18383,12 @@
"xpack.fleet.enrollmentInstructions.k8sInstallationMessage": "Le manifeste ci-dessous a été généré automatiquement. Il inclut les informations d'identification de cette instance de l'agent Elastic qui doivent être gérées de façon centrale avec Fleet dès son exécution dans votre cluster Kubernetes.",
"xpack.fleet.enrollmentInstructions.macCallout": "Nous déconseillons de déployer cette intégration sous Mac, car elle est incompatible pour l’instant.",
"xpack.fleet.enrollmentInstructions.placeHolderCallout": "Nous déconseillons fortement de déployer CSPM au sein d’un cluster Kubernetes. Cela peut entraîner une redondance dans la récupération des données, ce qui peut augmenter les coûts de consommation au sein de votre compte Elastic et potentiellement déclencher une restriction du taux d’API dans votre ou vos comptes cloud.",
"xpack.fleet.enrollmentInstructions.platformButtons.googleCloudShell": "Script Google Cloud Shell",
"xpack.fleet.enrollmentInstructions.platformButtons.kubernetes": "Kubernetes",
"xpack.fleet.enrollmentInstructions.platformButtons.linux": "Linux Tar",
"xpack.fleet.enrollmentInstructions.platformButtons.linux.deb": "DEB",
"xpack.fleet.enrollmentInstructions.platformButtons.linux.rpm": "RPM",
"xpack.fleet.enrollmentInstructions.platformButtons.mac": "Mac",
"xpack.fleet.enrollmentInstructions.platformButtons.windows": "Windows",
"xpack.fleet.enrollmentInstructions.platformSelectAriaLabel": "Plateforme",
"xpack.fleet.enrollmentInstructions.troubleshootingLink": "guide de résolution des problèmes",
"xpack.fleet.enrollmentInstructions.troubleshootingText": "Si vous rencontrez des difficultés pour vous connecter, consultez notre {link}.",
"xpack.fleet.enrollmentStepAgentPolicy.addPolicyButton": "Créer une stratégie d'agent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18243,14 +18243,12 @@
"xpack.fleet.enrollmentInstructions.k8sInstallationMessage": "次のマニフェストは自動的に生成されました。また、マニフェストには、このElasticエージェントのインスタンスが、Kubernetesで実行された後に、Fleetを使用して一元的に管理するための資格情報が含まれています。",
"xpack.fleet.enrollmentInstructions.macCallout": "この統合は現在サポートされていないため、Macにデプロイしないことをお勧めします。",
"xpack.fleet.enrollmentInstructions.placeHolderCallout": "Kubernetesクラスター内にCSPMをデプロイしないことを強くお勧めします。そのようにすると、冗長なデータ取得が発生し、Elasticアカウントの消費コストが増加したり、クラウドアカウントのAPIレート制限を引き起こしたりする可能性があります。",
"xpack.fleet.enrollmentInstructions.platformButtons.googleCloudShell": "Google Cloud Shell Script",
"xpack.fleet.enrollmentInstructions.platformButtons.kubernetes": "Kubernetes",
"xpack.fleet.enrollmentInstructions.platformButtons.linux": "Linux Tar",
"xpack.fleet.enrollmentInstructions.platformButtons.linux.deb": "DEB",
"xpack.fleet.enrollmentInstructions.platformButtons.linux.rpm": "1分あたりリクエスト数",
"xpack.fleet.enrollmentInstructions.platformButtons.mac": "Mac",
"xpack.fleet.enrollmentInstructions.platformButtons.windows": "Windows",
"xpack.fleet.enrollmentInstructions.platformSelectAriaLabel": "プラットフォーム",
"xpack.fleet.enrollmentInstructions.troubleshootingLink": "トラブルシューティングガイド",
"xpack.fleet.enrollmentInstructions.troubleshootingText": "接続の問題が発生している場合は、{link}を参照してください。",
"xpack.fleet.enrollmentStepAgentPolicy.addPolicyButton": "新しいエージェントポリシーの作成",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17951,14 +17951,12 @@
"xpack.fleet.enrollmentInstructions.k8sInstallationMessage": "已自动生成以下清单,并在其中包括此 Elastic 代理实例的凭据,一旦该实例在您的 Kubernetes 集群中运行,将使用 Fleet 对其进行集中管理。",
"xpack.fleet.enrollmentInstructions.macCallout": "我们建议不要在 Mac 中部署此集成,因为当前尚不支持该集成。",
"xpack.fleet.enrollmentInstructions.placeHolderCallout": "我们强烈建议不要在 Kubernetes 集群中部署 CSPM。那样做可能导致冗余数据提取,这会造成 Elastic 帐户内的消耗成本增加,并有可能在您的云帐户中触发 API 速率限制。",
"xpack.fleet.enrollmentInstructions.platformButtons.googleCloudShell": "Google Cloud Shell 脚本",
"xpack.fleet.enrollmentInstructions.platformButtons.kubernetes": "Kubernetes",
"xpack.fleet.enrollmentInstructions.platformButtons.linux": "Linux Tar",
"xpack.fleet.enrollmentInstructions.platformButtons.linux.deb": "DEB",
"xpack.fleet.enrollmentInstructions.platformButtons.linux.rpm": "RPM",
"xpack.fleet.enrollmentInstructions.platformButtons.mac": "Mac",
"xpack.fleet.enrollmentInstructions.platformButtons.windows": "Windows",
"xpack.fleet.enrollmentInstructions.platformSelectAriaLabel": "平台",
"xpack.fleet.enrollmentInstructions.troubleshootingLink": "故障排除指南",
"xpack.fleet.enrollmentInstructions.troubleshootingText": "如果有连接问题,请参阅我们的{link}。",
"xpack.fleet.enrollmentStepAgentPolicy.addPolicyButton": "创建新代理策略",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ describe('Edit agent policy', () => {
visit('/app/fleet/policies/policy-1');

cy.getBySel(AGENT_POLICY_DETAILS_PAGE.ADD_AGENT_LINK).click();
cy.getBySel(AGENT_FLYOUT.PLATFORM_SELECTOR_EXTENDED).click();
cy.getBySel(AGENT_FLYOUT.KUBERNETES_PLATFORM_TYPE).click();
cy.contains('https://xxx.yyy.zzz:443');
cy.contains('this-is-the-api-key');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const AGENT_FLYOUT = {
MANAGED_TAB: 'managedTab',
CONFIRM_AGENT_ENROLLMENT_BUTTON: 'ConfirmAgentEnrollmentButton',
INCOMING_DATA_CONFIRMED_CALL_OUT: 'IncomingDataConfirmedCallOut',
PLATFORM_SELECTOR_EXTENDED: 'platformSelectorExtended',
KUBERNETES_PLATFORM_TYPE: 'platformTypeKubernetes',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,26 +71,35 @@ const InstallFleetServerStepContent: React.FunctionComponent<{
: null
);

const installCommands = (['linux', 'mac', 'windows', 'deb', 'rpm'] as PLATFORM_TYPE[]).reduce(
(acc, platform) => {
acc[platform] = getInstallCommandForPlatform({
platform,
esOutputHost: esOutput?.hosts?.[0] ?? '<ELASTICSEARCH_HOST>',
esOutputProxy,
serviceToken: serviceToken ?? '',
policyId: fleetServerPolicyId,
fleetServerHost,
isProductionDeployment: deploymentMode === 'production',
sslCATrustedFingerprint: esOutput?.ca_trusted_fingerprint ?? undefined,
kibanaVersion,
downloadSource,
downloadSourceProxy,
});
const installCommands = (
[
'linux_aarch64',
'linux_x86_64',
'mac_aarch64',
'mac_x86_64',
'windows',
'rpm_aarch64',
'rpm_x86_64',
'deb_aarch64',
'deb_x86_64',
] as PLATFORM_TYPE[]
).reduce((acc, platform) => {
acc[platform] = getInstallCommandForPlatform({
platform,
esOutputHost: esOutput?.hosts?.[0] ?? '<ELASTICSEARCH_HOST>',
esOutputProxy,
serviceToken: serviceToken ?? '',
policyId: fleetServerPolicyId,
fleetServerHost,
isProductionDeployment: deploymentMode === 'production',
sslCATrustedFingerprint: esOutput?.ca_trusted_fingerprint ?? undefined,
kibanaVersion,
downloadSource,
downloadSourceProxy,
});

return acc;
},
{} as Record<PLATFORM_TYPE, string>
);
return acc;
}, {} as Record<PLATFORM_TYPE, string>);

return (
<>
Expand All @@ -114,12 +123,7 @@ const InstallFleetServerStepContent: React.FunctionComponent<{
<EuiSpacer size="l" />

<PlatformSelector
linuxCommand={installCommands.linux}
macCommand={installCommands.mac}
windowsCommand={installCommands.windows}
linuxDebCommand={installCommands.deb}
linuxRpmCommand={installCommands.rpm}
k8sCommand={installCommands.kubernetes}
installCommand={installCommands}
hasK8sIntegration={false}
hasK8sIntegrationMultiPage={false}
hasFleetServer={true}
Expand Down
Loading

0 comments on commit 73c7f87

Please sign in to comment.