diff --git a/graylog2-web-interface/src/components/datanode/hooks/useDataNodes.ts b/graylog2-web-interface/src/components/datanode/hooks/useDataNodes.ts index a195ef68a090..099950c15763 100644 --- a/graylog2-web-interface/src/components/datanode/hooks/useDataNodes.ts +++ b/graylog2-web-interface/src/components/datanode/hooks/useDataNodes.ts @@ -82,7 +82,7 @@ const fetchDataNodes = async (params?: Partial) => { return fetch('GET', qualifyUrl(url)); }; -type DataNodeResponse = { +export type DataNodeResponse = { elements: DataNodes, pagination: PaginatedResponseType, attributes: Array diff --git a/graylog2-web-interface/src/components/datanode/migrations/MigrationDatanodeList.tsx b/graylog2-web-interface/src/components/datanode/migrations/MigrationDatanodeList.tsx new file mode 100644 index 000000000000..ffbc94b66ee2 --- /dev/null +++ b/graylog2-web-interface/src/components/datanode/migrations/MigrationDatanodeList.tsx @@ -0,0 +1,53 @@ +import * as React from 'react'; +import styled from 'styled-components'; + +import type { DataNodeResponse } from 'components/datanode/hooks/useDataNodes'; +import { Icon, Spinner } from 'components/common'; +import { Alert, Table } from 'components/bootstrap'; +import { DocumentationLink } from 'components/support'; + +type Props = { + dataNodes: DataNodeResponse, +} +const StyledIcon = styled(Icon)` + margin-right: 0.5em; +`; + +const MigrationDatanodeList = ({ dataNodes } : Props) => ( +
+ {(!dataNodes || dataNodes?.elements.length === 0) ? ( + <> +

There are no data nodes found.

+ + Please start at least a datanode to continue the migration process. You can find more information on how to start a data nodes in our . + +

+ + ) : ( + <> +

Datanodes found:

+
+ + + + + + + + + + {dataNodes.elements.map((datanode) => ( + + + + + + ))} + +
HostnameTransport addressstatus
{datanode.hostname}{datanode.transport_address}{datanode.status}
+ + )} +
+); + +export default MigrationDatanodeList; diff --git a/graylog2-web-interface/src/components/datanode/migrations/MigrationHelpStep.tsx b/graylog2-web-interface/src/components/datanode/migrations/MigrationHelpStep.tsx index 38a0027cd3d7..b8292e59531f 100644 --- a/graylog2-web-interface/src/components/datanode/migrations/MigrationHelpStep.tsx +++ b/graylog2-web-interface/src/components/datanode/migrations/MigrationHelpStep.tsx @@ -17,12 +17,15 @@ import React from 'react'; import styled, { css } from 'styled-components'; -import { Button, Panel } from 'components/bootstrap'; +import { Button, Col, Row, Panel, ButtonToolbar } from 'components/bootstrap'; import { Icon } from 'components/common'; import { DocumentationLink } from 'components/support'; +import MigrationDatanodeList from 'components/datanode/migrations/MigrationDatanodeList'; +import useDataNodes from 'components/datanode/hooks/useDataNodes'; type Props = { - onStepComplete: () => void, + onStepComplete: () => void, + onSkipCompatibilityCheck: () => void, }; const Headline = styled.h2` margin-top: 5px; @@ -40,39 +43,51 @@ const StyledHelpPanel = styled(StyledPanel)` margin-top: 30px; `; -const MigrationHelpStep = ({ onStepComplete }: Props) => ( - <> - Migration to Datanode ! -

- It looks like you updated Graylog and want to configure a data node.
- Data nodes allow you to index and search through all the messages in your Graylog message database.
-

-

- Using this migration tool you can check the compatibility and follow the steps to migrate your exsisting Opensearch data to a Datanode.
-

-

Migrating to datanode require some step the are performed using the UI in this wizard, but it also require some additional step that should be performed on the OS, you current OS/ES cluster and you config files

-

You can get more information on the Data node migration documentation

- - - Migrating Elasticsearch 7.10 - - +const MigrationHelpStep = ({ onStepComplete, onSkipCompatibilityCheck }: Props) => { + const { data: dataNodes } = useDataNodes(); + + return ( + + + Migration to Datanode ! + +

+ It looks like you updated Graylog and want to configure a data node. Data nodes allow you to index and search through all the messages in your Graylog message database. +

-

Migration from Elasticsearch 7.10 needs an additional step. ES 7.10 does not understand JWT - authentication. - So you have to first migrate to OpenSearch before running the update of the security information. Look at - the supplied es710-docker-compose.yml as an example. -

-

Please note that except for the servicename, I changed the cluster name and hostnames etc. to opensearch. - In a regular setting, it would be the other way around and you would have to pull the elasticsearch names - through the whole process into the DataNode. -

+ Using this migration tool you can check the compatibility and follow the steps to migrate your exsisting Opensearch data to a Datanode.

-
-
-

- -

- -); +

Migrating to datanode require some step the are performed using the UI in this wizard, but it also require some additional step that should be performed on the OS, you current OS/ES cluster and you config files

+

You can get more information on the Data node migration

+
+ + + + + + + + + + Migrating Elasticsearch 7.10 + + +

+

Migration from Elasticsearch 7.10 needs an additional step. ES 7.10 does not understand JWT + authentication. + So you have to first migrate to OpenSearch before running the update of the security information. Look at + the supplied es710-docker-compose.yml as an example. +

+

Please note that except for the servicename, I changed the cluster name and hostnames etc. to opensearch. + In a regular setting, it would be the other way around and you would have to pull the elasticsearch names + through the whole process into the DataNode. +

+

+
+
+ + + ); +}; + export default MigrationHelpStep; diff --git a/graylog2-web-interface/src/components/datanode/migrations/MigrationWizard.tsx b/graylog2-web-interface/src/components/datanode/migrations/MigrationWizard.tsx index 1443ba933421..ffef5220ba20 100644 --- a/graylog2-web-interface/src/components/datanode/migrations/MigrationWizard.tsx +++ b/graylog2-web-interface/src/components/datanode/migrations/MigrationWizard.tsx @@ -39,7 +39,8 @@ const MigrationWizard = () => { { key: 'welcome', title: (<>Welcome), - component: onWizardStepChange(STEP_KEYS[1])} />, + component: onWizardStepChange(STEP_KEYS[1])} + onSkipCompatibilityCheck={() => onWizardStepChange(STEP_KEYS[2])} />, }, { key: 'compatibility-check',