Upgrading Riak TS
At the moment, there is no downgrade path between Riak TS 1.5.0 and Riak TS 1.4.0. Any data written to TS 1.5.0 will not be readable by TS 1.4.0. Please perform backups before you upgrade and be very sure you are ready to upgrade entirely before doing so.
This page walks you through the process of upgrading to Riak TS 1.5.0 from Riak TS 1.4.0. Find your operating system below:
Riak TS nodes negotiate with each other to determine supported operating modes. This allows clusters containing mixed-versions of Riak TS to properly interoperate without special configuration, and simplifies rolling upgrades.
Debian/Ubuntu
The following example demonstrates upgrading a Riak TS node that has been installed with the Debian/Ubuntu packages provided by Riak.
1. Stop Riak TS:
riak stop
2. Back up your Riak TS node’s /etc and /data directories:
sudo tar -czf riak_backup.tar.gz /var/lib/riak /etc/riak
3. Upgrade Riak TS:
sudo dpkg -i »riakts_package_name«.deb
4. Restart Riak TS:
Before restarting Riak TS, check your riak.conf file and verify that your settings are configured as expected.
riak start
5. Verify Riak TS is running the new version:
riak version
6. Wait for the riak_kv
service to start:
riak-admin wait-for-service riak_kv »target node«
»target node«
is the node which you have just upgraded (e.g.riak@192.168.1.11
)
7. Wait for any hinted handoff transfers to complete:
riak-admin transfers
While the node was offline, other nodes may have accepted writes on its behalf. This data is transferred to the node when it becomes available.
8. Repeat the process for the remaining nodes in the cluster.
RHEL/CentOS
The following example demonstrates upgrading a Riak TS node that has been installed with the RHEL/CentOS packages provided by Riak.
1. Stop Riak TS:
riak stop
2. Back up your Riak TS node’s /etc and /data directories:
sudo tar -czf riak_backup.tar.gz /var/lib/riak /etc/riak
3. Upgrade Riak TS:
sudo rpm -Uvh »riakts_package_name«.rpm
4. Restart Riak TS:
Before restarting Riak TS, check your riak.conf file and verify that your settings are configured as expected.
riak start
5. Verify that Riak TS is running the new version:
riak version
6. Wait for the riak_kv
service to start:
riak-admin wait-for-service riak_kv »target node«
»target node«
is the node which you have just upgraded (e.g. riak@192.168.1.11)
7. Wait for any hinted handoff transfers to complete:
riak-admin transfers
While the node was offline, other nodes may have accepted writes on its behalf. This data is transferred to the node when it becomes available.
8. Repeat the process for the remaining nodes in the cluster.
Rolling Upgrade to Enterprise
If you would like to upgrade an existing Riak TS cluster to a commercially supported Riak TS Enterprise cluster with multi-datacenter replication, undertake the following steps:
- Back up your /etc (riak.conf and vm.args) and /data directories.
- Shut down the node you are going to upgrade.
- Uninstall your Riak TS package.
- Install the
riak-ts-ee
package. - A standard package uninstall should not have removed your data directories. If it did, move your backup to where the data directory should be.
- Copy any customizations from your backed-up vm.args file to the
riak-ts-ee
installed vm.args file, these files may be identical. - The riak.conf file from
riak-ts-ee
will be significantly different from your backed-up file. While it will contain all of the same sections as your original, it will have many new ones. Copy the customizations from your original riak.conf file into the appropriate sections in the new one. Ensure that the following sections are present in riak.conf:riak_core
— thecluster_mgr
setting must be present. See MDC v3 Configuration for more information.riak_repl
— See MDC v3 Configuration for more information.riak_jmx
— See JMX Monitoring for more information.snmp
— See SNMP for more information.
- Start Riak TS on the upgraded node.
Riak Patches
After upgrading, you should ensure that any custom patches contained in
the basho-patches
directory are examined to determine their
application to the upgraded version. If you find that patches no longer
apply to the upgraded version, you should remove them from the
basho-patches
directory prior to operating the node in production.
The following lists locations of the basho-patches
directory for
each supported operating system:
- CentOS & RHEL Linux:
/usr/lib64/riak/lib/basho-patches
- Debian & Ubuntu Linux:
/usr/lib/riak/lib/basho-patches