Skip to content

Patching the download server

Gábor Boros edited this page Nov 1, 2021 · 1 revision

How to patch the download server

Prerequisites

  • SSH key for the download server

Consequences

RethinkDB has only one download server. If that goes down, nobody can download the artifacts. To make sure you are causing less impact, announce the patching some days prior.

Steps

[Step 1] Find the latest nexus version available

To find the latest version, check the Nexus website and note the version number.

[Step 2] Patch the OS

SSH into the download server (download.rethinkdb.com) using the root user and execute the following commands:

$ apt update
$ apt upgrade -y

[Step 3] Patch Nexus server

After the OS is patched, run the following commands in order:

# Export the Nexus version you noted in Step 1
$ export NEXUS_VERSION="3.36.0-01"
# Create a backup from the currently running version
$ cp -R /opt/nexus /root/nexus.bkp
# Download and "update" Nexus
$ wget https://sonatype-download.global.ssl.fastly.net/repository/downloads-prod-group/3/nexus-${NEXUS_VERSION}-unix.tar.gz
$ tar -xvf nexus-${NEXUS_VERSION}-unix.tar.gz
$ rsync -a nexus-${NEXUS_VERSION}/ /opt/nexus/
$ chown -R nexus:nexus /opt/nexus
# Reboot the server
$ reboot

[Step 4] Monitor the Nexus process

After the reboot, in some seconds, the server will be up and running, but Nexus not. SSH back into the server and do the following:

$ su - nexus
$ /etc/init.d/nexus status

If the output of /etc/init.d/nexus status is nexus is running., get a coffee and wait some minutes. Otherwise, run /etc/init.d/nexus start to start the Nexus server.

It takes about 2-5 minutes for the server to be ready to serve requests.