In the case of a Manual upgrade (where the upgrade via the UI has failed), this document describes the appropriate steps to perform an upgrade to the service manually.
Please note, that the article documents the appliance upgrade from version 4.6.2226 (Old) to 4.6.2839; your version number may differ. As you upgrade the services to different versions, you must change the versions in the example commands accordingly.
Understanding Service versions deployed in an appliance
The current versions of services currently deployed within the appliance are visible by looking at the Settings > Appliance > Update function. This will display a list of services and the current version and update state. Any that are tagged with the icon can be updated to a newer image version.
In order to understand the upgrade process, it is useful to understand that each Service described above corresponds to an image that can be uploaded to the appliance.
# |
UI Service Name |
Version |
Image |
Tag |
1 |
Appliance UI |
1.0.113 |
registry.iq1.cloudsphere.com/iqcloud-discovery/ui-appliance |
1.0.113 |
2 |
Rabbit MQ |
3.6.15-management-alpine |
harbor.ad.cloudsphere.com/iqcloud-discovery/rabbitmq |
3.6.15-management-alpine |
3 |
Dry Dock |
2.2.183 |
harbor.ad.cloudsphere.com/iqcloud-discovery/dry-dock |
2.2.183 |
4 |
Websocket Client |
2.0.140 |
harbor.ad.cloudsphere.com/saas/appliance-communication-bridge |
2.0.140 |
5 |
Metric Collector |
1.1.18 |
harbor.ad.cloudsphere.com/iqcloud-discovery/metrics-collector |
1.1.18 |
6 |
Scan Engine |
4.6.3571 |
harbor.ad.cloudsphere.com/iqcloud-discovery/appliance-server |
4.6.3571 |
Each image can be manually pulled (downloaded) to the appliance and pushed into service (this is what happens when an automatic upgrade is performed from the UI).
The list of images that are currently deployed on the Appliance can be generated by logging into the appliance (over SSH) and issuing a single command:
% sudo docker images
The most important information to know prior to performing the manual upgrade process is the new version number that is to be used for a service. This can be identified from the CAM UI upgrade screen by selecting a service and clicking on 'Select Version” to generate a pull-down menu of the versions that are available.
In the above example, the latest version of the Metric Collector is: 1.1.30
Steps to upgrade manually
the upgrade process involves:
-
Step 1: Downloading new images
-
Step 2: Confirm the Image-ID for the new downloads
-
Step 3: Restart the Appliance stack
Step 1: Download new images
The command to pull down new versions of the images are identified below; <new version> is the version number of the new image to be downloaded.
# |
UI Service Name |
Command |
1 |
Appliance UI |
% sudo docker pull registry.iq1.cloudsphere.com/iqcloud-discovery/ui-appliance:<new version> |
2 |
Rabbit MQ |
% sudo docker pull harbor.ad.cloudsphere.com/iqcloud-discovery/rabbitmq:<new version> |
3 |
Dry Dock |
% sudo docker pull harbor.ad.cloudsphere.com/iqcloud-discovery/dry-dock :<new version> |
4 |
Websocket Client |
% sudo docker pull harbor.ad.cloudsphere.com/saas/appliance-communication-bridge:<new version> |
5 |
Metric Collector |
% sudo docker pull harbor.ad.cloudsphere.com/iqcloud-discovery/metrics-collector:<new version> |
6 |
Scan Engine |
% sudo docker pull harbor.ad.cloudsphere.com/iqcloud-discovery/appliance-server:<new version> |
The example appliance has 4 services that are currently out of date. In this example, we will show how to upgrade three (3) of them
-
Metric Collector (Old version is 1.1.18, new version is 1.1.30)
-
Appliance UI (Old version is 1.1.113, new version is 1.0.118)
-
Dry Dock (Old version is 2.2.183, new version is 2.2.255)
Connect to the appliance using SSH and log in as the appliance admin user (“cloudsphere”)
Metrics Collector (Pull down upgrade to version 1.1.30)
-
Pull down a new version of the appliance server image using the following command
# This retrieves the metrics-collector version 1.1.30 (the new version)
sudo docker pull registry.iq1.cloudsphere.com/iqcloud-discovery/metrics-collector:1.1.30
-
The command will then display the download operation
Appliance UI (Pull down upgrade to version 1.0.118)
-
Pull down a new version of the appliance server image using the following command
# This retrieves the appliance UI version 1.0.118 (the new version)
sudo docker pull registry.iq1.cloudsphere.com/iqcloud-discovery/ui-appliance:1.0.118
-
The command will then display the download operation
Dry Dock (Pull down upgrade to version 2.2.25)
-
Pull down a new version of the dry dock image using the following command
# This retrieves the appliance Dry Dock version 2.2.225 (the new version)
sudo docker pull registry.iq1.cloudsphere.com/iqcloud-discovery/dry-dock:2.2.225
-
The command will then display the download operation
Step 2: Confirm the Image-ID for the new downloads
Following the download operations, the new images are saved to the appliance. The ID for each new image can be identified using the following command.
% docker images
This command lists all the docker images available on the appliance. Using the metrics collector as an example, the Green and Yellow images represent the two different versions of the metrics collector. Green is 1.1.18 and Yellow is newer 1.1.30. The image ID for the new metrics collector can be noted: aa23f92618fb.
The same can be done for the other new images for ui-appliance and dry-dock.
Step 3: Restart the Appliance stack
-
Now we just need to stop the appliance processes
% sudo /opt/docker/stop-appliance-stack.sh true
-
Start the appliance processes
% sudo /opt/docker/start-appliance-stack.sh
The appliance should now be visible in the UI, updated, and enabled.