Migrating from Elasticsearch to OpenSearch

Starting with HPE Morpheus Software 8.1.0, the embedded search service changed from Elasticsearch to OpenSearch. This migration only affects appliances upgrading from earlier versions — fresh installations and HVM deployments already use OpenSearch.

During upgrade, the reconfigure process will:

  • Automatically disable the old Elasticsearch service

  • Start OpenSearch in its place

  • Migrate the Elasticsearch PKCS12 CA to PEM format if secure_mode is enabled

No changes to /etc/morpheus/morpheus.rb are required. Existing elasticsearch[...] settings are bridged to the opensearch namespace automatically.

Important

Data (indices) must be migrated separately using morpheus-ctl migrate-elasticsearch. Run morpheus-ctl migrate-elasticsearch help on an appliance after upgrade for full usage information.

Single Node — Upgrading from Elasticsearch

Step 1 — Upgrade the Morpheus package

Install the new HPE Morpheus Software package. Do NOT run reconfigure yet.

Step 2 — Run the migration script

For single-node appliances, the migration script handles everything automatically:

sudo morpheus-ctl migrate-elasticsearch

This script does the following:

  1. Starts a temporary Elasticsearch instance using the preserved ES installation

  2. Resets voting configuration if needed (for nodes which were previously part of a cluster)

  3. Sets replicas to 0 for single-node operation

  4. Exports all indices to JSON files

  5. Imports into OpenSearch

  6. Stops the temporary ES cluster

Step 3 — Reconfigure

morpheus-ctl reconfigure

The old Elasticsearch service is disabled automatically and OpenSearch starts in its place. If secure_mode was enabled, the Elasticsearch PKCS12 CA is automatically migrated to PEM format.

3-Node Cluster — Upgrading from Elasticsearch

Step 1 — Upgrade the Morpheus package

Install the new HPE Morpheus Software package on all 3 nodes. Do not run reconfigure yet. The preinstall script preserves the Elasticsearch installation at /var/opt/morpheus/elasticsearch-8.15.5/home/. The ES data and binaries are preserved across package install, reconfigure, and normal operation — the migration export can be run at any time until the ES data is removed.

Step 2 — Check the ES cluster configuration

Run the following and note the discovery.seed_hosts and cluster.initial_master_nodes:

cat /var/opt/morpheus/elasticsearch-8.15.5/home/config/elasticsearch.yml

Step 3 — Start Elasticsearch on all nodes

Start ES on each node within 30 seconds of each other (order does not matter):

su -s /bin/bash es-morpheus -c 'ES_JAVA_HOME=/var/opt/morpheus/elasticsearch-8.15.5/home/jdk /var/opt/morpheus/elasticsearch-8.15.5/home/bin/elasticsearch -d'

Step 4 — Verify cluster health

From any node:

curl http://127.0.0.1:9200/_cluster/health?pretty

You should see: "status": "green", "number_of_nodes": 3, "unassigned_shards": 0

Step 5 — Run the migration export

From any node:

sudo morpheus-ctl migrate-elasticsearch

The script will detect the running ES cluster and export from it.

Step 6 — Stop Elasticsearch on all nodes

After the migration completes, on each node:

pkill -f 'elasticsearch-8.15.5'

Step 7 — Reconfigure all nodes

morpheus-ctl reconfigure

External Cluster — Upgrading

If the existing HPE Morpheus Software installation was already configured to use an external Elasticsearch or OpenSearch cluster, the upgrade is straightforward — no data migration is needed on the appliance side since the data lives on the external cluster. The external cluster does not need to be migrated to OpenSearch; HPE Morpheus Software supports both.

Step 1 — Upgrade the Morpheus package

Install the new HPE Morpheus Software package on each appliance node.

Step 2 — Reconfigure

No morpheus.rb changes are needed. The existing elasticsearch[...] settings are bridged automatically.

morpheus-ctl reconfigure