Whether you are upgrading only clients or performing a full upgrade, you must follow these steps before starting the upgrade process.
Step 1: Backup your current volumes
Just in case an unexpected error occurs during the upgrade process, it is convenient that you back up all your volumes before proceeding.
You should copy all files under these directories and keep the copy in a safe place:
- [VOLUMES_DIR]/config-shared
- [VOLUMES_DIR]/data-local
- [VOLUMES_DIR]/data-shared
Step 2: Check clients upgrade bypass configuration
To make sure that your current configuration is not ignoring new available clients, you should check if "kiuwan.clients.update" is set in the following file:
- [VOLUMES_DIR]/config-shared/globalConfig/globalConfig.properties
Locate the key "kiuwan.clients.update" at the end of the file and make sure it is set to true:
kiuwan.clients.update=true
When the flag is set to true, all Kiuwan clients will be updated as long as a new version is available.
Step 3: Check the status of Kiuwan On-Premises infrastructure
To upgrade Kiuwan On-Premises it is mandatory that at least these elements of the provided (or externalized if you chose to use your own) infrastructure are up and running:
- MySQL
- Redis cluster
If you have run any of the provided scripts that stop these infrastructure elements (or your instances are stopped if externalized), please make sure you start them before proceeding to upgrade.
Upgrade: Clients-only mode
Note that it is safe to update Kiuwan On-Premises clients WITHOUT stopping any of the provided services or containers, but make sure you have checked Step 3 of the common steps before proceeding.
Step 1: Run the clients upgrade
Open a terminal to your Kiuwan On-Premises host and locate the kiuwan-cluster tool you used to install Kiuwan On-Premises.
Change the directory to where the tool was untared (this directory is referred to as [INSTALLER_DIR] in the Kiuwan On-Premises Distributed Installation Guide).
Once the current directory is [INSTALLER_DIR], execute this command:
sudo ./update-clients.sh
Upgrade: full mode
Note that a full upgrade will update your Kiuwan On-Premises clients as well, so there is no need to run the clients' upgrade when performing a full upgrade.
This process will stop all Kiuwan services. This means that during the upgrade process:
- Users will not be able to access Kiuwan On-Premises web application.
- No analysis can be run while performing the upgrade process. Make sure you pause any automated task running analyses in your Kiuwan On-Premises installation.
Once the upgrade is finished, all services will be automatically restarted and you will be able to access Kiuwan On-Premises after a while.
Step 1: Keep your old kiuwan-cluster installer
Your current installer may be needed to perform some maintenance tasks. It is usually a better idea to keep your current kiuwan-cluster version just in case you need to access it.
It is enough just to keep the already existing folder where you untared your current kiuwan-cluster as new versions will always be untared to a different folder.
If the old version of kiuwan-cluster is needed through the upgrade process, its path will be refererred to as [INSTALLER_DIR_OLD].
For example, if you are upgrading from Kiuwan On-Premises 2.8.1910.1, your folders will look like this:
- [INSTALLER_DIR_OLD]: /home/user/kiuwan-cluster_master.265-2.8.1910.1
- [INSTALLER_DIR]: /home/user/kiuwan-cluster_master.XXX-2.8.YYMM.Y (you will create this folder in the next steps).
Step 2: Download Kiuwan-cluster latest version
To upgrade to the latest versions of Kiuwan On-Premises images you need to download the latest version of the installation tool. Run this in your Kiuwan On-Premises host:
wget https://static.kiuwan.com/download/onpremise/kiuwan-cluster.tar.gz
This will download the latest available installation tool to the current directory.
Step 3: untar kiuwan-cluster
Once downloaded, you should untar the provided gz file:
tar xvzpf kiuwan-cluster.tar.gz
This will untar the installation tool to a folder with extended version information of the tool. For example:
/home/user/kiuwan-cluster_master.XXXX-2.8.YYMM.V
This folder will be referred to as [INSTALLER_DIR] throughout the following steps.
Step 4: Update kiuwan-cluster volumes and user-content configuration
Copy the volume configuration from the old to the new kiuwan-cluster folders:
cp [INSTALLER_DIR_OLD]/config/volumes.properties [INSTALLER_DIR]/config/volumes.properties
This will configure the volume location in the new kiuwan-cluster.
Then copy the old user-content folder to the new kiuwan-cluster user-content folder:
cp -r [INSTALLER_DIR_OLD]/user-content [INSTALLER_DIR]
This will keep track of the latest license and certificates you configured with the previous kiuwan-cluster:
Step 5: Check if your available commands meet the needed prerequisites
This step is needed just in case you installed your old Kiuwan On-Premises version not meeting the needed minimum requirements for the needed tools (check Installation requirements section for a complete list of required tools).
For the upgrade process to work, the minimum tool version requirements must be met.
Run the following script and check the "Checking commands" section:
cd [INSTALLER_DIR]
sudo ./check-prerequisites.sh
You can run the check-prerequisites tool as many times as needed.
Do not continue to the next step until all TOOL VERSIONS requirements are met or your Kiuwan On-Premises installation stability could be compromised.
Step 6: Check specific upgrade steps
First, identify which Kiuwan On-Premises version you have currently installed. Refer to Checking for new versions section for details on how to check it.
The Specific version upgrade notes page shows which versions need special upgrade steps.
If your current Kiuwan On-Premises core version needs a special upgrade process, follow the specific upgrade steps for your current Kiuwan On-Premises core version shown on the Specific version upgrade notes page.
Step 7: Run infrastructure services
Before proceeding with Step 8, ensure the required infrastructure services are running:
From [install_new_dir]/docker, start redis and mysqlkiuwan by running sudo ./start-infrastructure.sh redis and sudo ./start-infrastructure.sh mysqlkiuwan. Once both services are up, continue with Step 8.
Step 8: Run the upgrade process
If your current Kiuwan On-Premises core version is not listed in the Specific version upgrade notes page, change the directory to [INSTALLER_DIR] and execute this command:
sudo ./update-full.sh
This will run the upgrade process in full mode.
Step 9: Load balancer manual configuration (optional)
Kiuwan On-Premises installation tool will not update your load balancer configuration automatically, so changes in this file must be made manually. Refer to the Specific version upgrade notes page for information on what changes have been made in this element if you want to keep your installation up to date with the latest features added in the load balancer configuration.
In case you are running the default configuration, you can safely overwrite your configuration, but REMEMBER TO UPDATE "kiuwanDomain" variable to point to your specific Kiuwan On-Premises domain:
cp ./volumes/config-shared/ApacheLoadBalancer/conf/httpd.conf [VOLUMES_DIR]/config-shared/ApacheLoadBalancer/conf/httpd.conf
Once the file has been overwritten, edit it and change this line in [VOLUMES_DIR]/config-shared/ApacheLoadBalancer/conf/httpd.conf:
Define kiuwanDomain kiuwan.onpremise.local
It should point to your specific domain.
Once the configuration changes have been made, you should restart the apacheloadbalancer container:
cd [INSTALLER_DIR]/docker
sudo ./stop-infrastructure.sh apacheloadbalancer
sudo ./start-infrastructure.sh apacheloadbalancer
In case you have externalized the Apache load balancer service, remember to restart it after modifying its configuration.
Checking your Kiuwan On-Premises clients installations after upgrading
Once the update process is finished, all the published clients in your Kiuwan On-Premises installation will be ready to be downloaded. Check the specific client guide to see how to upgrade each client installation:
- Kiuwan Local Analyzer: upgrades automatically when started whenever your Kiuwan On-Premises servers provide a new version to download.
- Kiuwan Engine: upgrades automatically from Kiuwan Local Analyzer, as long as your Kiuwan On-Premises servers provide a new version and your engine is not frozen (see Engine documentation for more information on this topic).
- Kiuwan for developers:
- Eclipse: check Kiuwan for Developers for Eclipse-based IDEs user guide.
- JetBrains: check Kiuwan for Developers for JetBrains user guide.
- Microsoft Visual Studio: check Kiuwan for Developers for Microsoft Visual Studio user guide.
- Microsoft Visual Studio Code: check Kiuwan for Developers for Microsoft Visual Studio Code user guide.
- Kiuwan Jenkins plugin: check Jenkins plugin user guide.
- Kiuwan TFS extension: check Microsoft TFS-Azure DevOps Extension user guide.