Product tutorials, how-tos, and fully-documented APIs.

Rolling Upgrades

    Riak nodes now negotiate with each other to determine supported operating modes. This allows clusters containing mixed-versions of Riak to properly interoperate without special configuration, and simplifies rolling upgrades.

    In previous Riak versions, users were required to disable new features during the rolling upgrade process, and then enable them after all nodes were upgraded. This is now handled automatically by Riak.

    Note on upgrading from Riak Search

    If you are upgrading from Riak Search, please read Upgrading from Riak Search before performing a rolling upgrade.

    Debian/Ubuntu

    The following example demonstrates upgrading a Riak node that has been installed with the Debian packages provided by Basho.

    1. Stop Riak

    riak stop
    

    2. Backup Riak etc and data directories

    sudo tar -czf riak_backup.tar.gz /var/lib/riak /etc/riak
    

    3. Upgrade Riak

    sudo dpkg -i <riak_package_name>.deb
    

    4. Restart Riak

    riak start
    

    5. Verify Riak is running the new version

    riak-admin status
    

    6. Wait for the riak_kv service to start

    riak-admin wait-for-service riak_kv <target_node>
    

    7. Wait for any hinted handoff transfers to complete

    riak-admin transfers
    

    8. Repeat the process for the remaining nodes in the cluster

    RHEL/CentOS

    The following example demonstrates upgrading a Riak node that has been installed with the RHEL/CentOS packages provided by Basho.

    1. Stop Riak

    riak stop
    

    2. Backup Riak etc and data directories

    sudo tar -czf riak_backup.tar.gz /var/lib/riak /etc/riak
    

    3. Upgrade Riak

    sudo rpm -Uvh <riak_package_name>.rpm
    

    4. Restart Riak

    riak start
    

    5. Verify Riak is running the new version

    riak-admin status
    

    6. Wait for the riak_kv service to start

    riak-admin wait-for-service riak_kv <target_node>
    

    7. Wait for any hinted handoff transfers to complete

    riak-admin transfers
    

    8. Repeat the process for the remaining nodes in the cluster

    Solaris/OpenSolaris

    The following example demonstrates upgrading a Riak node that has been installed with the Solaris/OpenSolaris packages provided by Basho.

    1. Stop Riak

    riak stop
    
    If you are using the service management facility (SMF) to manage Riak you will have to stop Riak via “svcadm” instead of using “riak stop”:

    “bash sudo svcadm disable riak ”

    2. Backup Riak etc and data directories

    sudo gtar -czf riak_backup.tar.gz /opt/riak/data /opt/riak/etc
    

    3. Uninstall Riak

    sudo pkgrm BASHOriak
    

    4. Install the new version of Riak

    sudo pkgadd -d <riak_package_name>.pkg
    

    4. Restart Riak

    riak start
    
    If you are using the SMF you should start Riak via “svcadm”:

    “bash sudo svcadm enable riak ”

    5. Verify Riak is running the new version

    riak-admin status
    

    6. Wait for the riak_kv service to start

    riak-admin wait-for-service riak_kv <target_node>
    

    7. Wait for any hinted handoff transfers to complete

    riak-admin transfers
    

    8. Repeat the process for the remaining nodes in the cluster

    Basho 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 table 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

    FreeBSD

    /usr/local/lib/riak/lib/basho-patches

    SmartOS

    /opt/local/lib/riak/lib/basho-patches

    Solaris 10

    /opt/riak/lib/basho-patches