Description
This article shows how to update Runtime when a new GenRocket Runtime Jar is released. Updated jars are shown in the release notes (see image below). If a new Runtime Jar is not released, follow the instructions here.
Runtime Update Steps
- Step 1 - Remove (or rename) the current genrocket Folder
- Step 2 - Download GenRocket Runtime
- Step 3 - (Remote Server Only) - Copy the Zip File to the Remote Server
- Step 4 - Unzip, Rename, and Move the GenRocket Runtime File
- Step 5 - Run the "genrocket" Command
- Step 6 - Download the Helper Libraries
- Step 7 - Add Database Connector Jars
Step 1 - Remove (or rename) the current genrocket Folder
Remove the existing genrocket folder to prevent old jars from being left in the directory, which can cause runtime errors.
Alternatively, you can rename the existing folder (e.g., add the version number or another value) and then complete the steps below. This method ensures the currently working version of Runtime is available to revert back to if any issues are experienced after updating to the latest version.
Step 2 - Download GenRocket Runtime
Three methods are available for downloading GenRocket Runtime. The version number may differ from the one shown in this article. You can view the most recent version number in the GenRocket web platform (as shown in Option 1 below).
Method 1- Download from the GenRocket Web Platform
- Log into the GenRocket web platform.
- Select the Options menu.
- Select Download GenRocket Runtime.
Method 2 - CURL or Wget Command
You can also do so with a CURL or Wget command when supported by your operating system. To do so, you will need your URL, Organization ID, and Runtime Version Number. The Organization ID and Version Number can be obtained from the GenRocket web platform.
To use a Wget command, replace 'curl' with 'wget' in the command. Everything else is the same. For more information, please see: Using CURL Commands to Download Runtime, Jars, Docker Image, and Server/User.
Step 3 - (Remote Server Only) - Copy the Zip File to the Remote Server
If your remote server lacks internet connectivity and you downloaded a zip file to your local machine, you'll need to transfer it to the remote machine using a method such as SSH before continuing. The SSH command is shown below:
scp ssh '/path/to/your/download/genrocket-#.#.##.zip' user@remoteip:/home/directory
Step 4 - Unzip, Rename, and Move the GenRocket Runtime File
Extract or unzip the GenRocket Runtime zip file and then rename it to 'genrocket'. You can extract it in the download location or directly into your home directory. If you extract it in the download location, you will need to move it to your home directory.
Option 1 - Windows File Explorer Steps
- Navigate to the location where the file was downloaded (e.g., C:\Users\<Username>\Downloads).
- Select the GenRocket Runtime zip file (genrocket-#.#.##) and select Extract All...
- Click Browse... to select your Home Directory/Folder (usually C:\Users\<Username>).
- Once selected, click on Select Folder.
- You can also edit the path in the pop-up window.
- Click Extract at the bottom of the pop-up window.
- You will see the genrocket-#.#.## folder in your home directory.
- Rename the folder to genrocket.
Option 2 - Windows PowerShell Commands
You can use Windows PowerShell to extract the file to a specific location and rename the folder to 'genrocket'. Please note that the user must have Admin permissions for this method. Locate the PowerShell application and right-click to run it as an administrator.
Command 1 - Extract File
This command can be used to extract a file to a specified location.
Expand-Archive -LiteralPath 'zip file path' -DestinationPath 'destination file path'
Example: The command below will unzip the file to the user's HOME directory.
Expand-Archive -LiteralPath 'C:\Users\Username\Downloads\genrocket-3.5.42.zip' -DestinationPath 'C:\Users\Username'
Command 2 - Rename Folder
The rename command can be used to rename a folder or file.
Rename-Item -Path 'filepath' -NewName 'new file name'
Example:
Rename-Item -Path 'C:\Users\username\genrocket-3.5.42' -NewName 'genrocket'
Option 3 - Linux/Mac OS User Interface Steps
The images below show how to perform these steps for Mac OS.
- Open Finder and navigate to the directory where the file was downloaded (e.g., Downloads folder).
- Right-click on the file and select Open to extract it automatically.
- When extracted, the folder name will appear like genrocket-#.#.## (the #'s are digits).
- Rename the folder to 'genrocket'.
- Right-click on the genrocket folder and select Copy "genrocket".
- Navigate to your home directory using this shortcut key combination: CMD+SHIFT+H.
- Right-click and select Paste Item to paste the folder into your home directory.
Option 4 - Linux Commands
- Open a terminal window and ensure it is pointing to your home directory.
- Enter the following command to unzip the file.
unzip genrocket-3.4.52.zip
- Then, enter this command to rename the file to 'genrocket'.
mv genrocket-3.4.52 genrocket
If the file is extracted in the download location, you can also use the mv command to move the genrocket folder to your home directory:
mv ~/Downloads/genrocket ~/users/username
Step 5 - Run the "genrocket" Command
You can enter the following command in a Command Prompt or Terminal Window to ensure everything is set up correctly. If you do not receive any errors, you are ready to continue to the next step.
genrocket
Step 6 - Download the Helper Libraries
You must download the helper libraries. In a Command Prompt or Terminal window, use the following command:
genrocket -lib
If you are updating Runtime on a machine or server without internet connectivity, you will need to download these libraries from the GenRocket web platform to your local computer and then use SSH or another method to copy them to the .genrocket folder in the machine or server's home directory.
Step 7 - Add Database Connector Jars
You will also need to add any database connector jars to the .genrocket/lib directory that were in the removed genrocket folder (Step 1).
For example, you must add a connector jar if connecting to a MySQL database.