Recommended Process for upgrade of rpm install

I have 3 linux boxes running OpenS 2.3 installed with RPM (running as a Linux service). I want to upgrade to OpenS 2.5.

Is there a process recommended for updating an rpm installed OpenSearch from? For Docker it is clear. For an RPM should the service be uninstalled then the updated version installed, joined to the cluster?

@jeff - I thought I’d heard you were working on something related - do you have any insight to share with @ssablan ? thanks

Yes, there is a recommended process for upgrading OpenSearch from an RPM installation. Please, also rely on this documentation: RPM - OpenSearch documentation

  1. Before upgrading, take a backup of your data and configuration files.
  2. Stop the OpenSearch service on all the nodes using the following command:
sudo systemctl stop opensearch
  1. Uninstall the existing OpenSearch RPM package using the following command:
sudo rpm -e opensearch
  1. Download the latest OpenSearch RPM package from the official website.

  2. Install the new OpenSearch RPM package using the following command:

sudo rpm -ivh opensearch-2.4.1-linux-x64.rpm
  1. After installation, start the OpenSearch service on all the nodes using the following command:
sudo systemctl start opensearch
  1. Verify that the new version of OpenSearch is running and that all nodes have successfully joined the cluster.

It is important to note that upgrading from version 2.3 to 2.5 may require some additional steps, such as updating configuration files, plugins, and scripts.

2 Likes

Hi ssablan! That’s a great question.

You might find the upgrade even easier when using RPM versus Docker because you don’t have to spin up a new environment, having to worry about mappings and such.

You can take either of two approaches:

This is the “cluster restart” method:

  1. Shut down the service on all nodes in the cluster:
sudo systemctl stop opensearch

2).For each node, download the new package and install it. It will use your old configuration. I would still recommend that you back up the config files remotely just to be safe.

sudo rpm -ivh opensearch-2.5.0-linux-x64.rpm
  1. Then start up the service and the cluster should bootstrap to 2.5.0
sudo systemctl start opensearch

This is the “rolling upgrade” method:

  1. Pick a node you want to upgrade first. Save a master-eligible node to upgrade last, because it will continue to be the cluster manager until you take it offline, then the cluster bootstraps to the new version.
  2. Shut down OpenSearch on only the node you want to upgrade first:
sudo systemctl stop opensearch
  1. Upgrade it using the new package:
sudo rpm -ivh opensearch-2.5.0-linux-x64.rpm
  1. Then start the service:
sudo systemctl start opensearch
  1. Repeat those steps for each of the other 2 nodes. As they come back online they’ll join the cluster again, and if you run the following query you can see how the leader hat gets passed as versions get moved:
curl -s "https://localhost:9201/_cat/nodes?v&h=name,version,node.role,master" \
   -ku admin:admin | column -t

Something I like to do when I upgrade nodes in a cluster is open a few terminal windows with tmux so I can run looping queries in windows to give me an idea of what’s happening with the cluster while I work. I like to use variations of this:

while true; do echo 'os-node-01 _cat/nodes'; \
  curl -s "https://localhost:9201/_cat/nodes?v&h=name,version,node.role,master" -ku admin:admin | column -t; echo ''; \
  echo 'os-node-01 _cat/shards'; curl -s "https://localhost:9201/_cat/shards" -ku admin:admin; echo ''; \
  echo 'os-node-01 _cluster/health'; curl -s "https://localhost:9201/_cluster/health?pretty" -ku admin:admin; \
  sleep 5; clear; done

Let us know if you have any questions about the upgrade!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.