Upgrade Microservices

About this task

Microservice images are tar.gz files. Each tar.gz file contains a manifest.json file with the service name and version number.

Before you begin

  • Microservice upgrade must be performed in the maintenance window.
  • Ensure that there is no change in the configuration during the upgrade procedure.

Procedure

  1. Copy the microservice image to the device using SCP, SFTP, HTTP, or HTTPS.
  2. Update the required microservice using the appropriate command.
    # system service update flash://ms-images/filename
    
    # system service update usb://filename
    
    # system service update scp://username:password@host[:port]/filepath
    
    # system service update sftp://username:password@host[:port]/filepath
    
    # system service update http://[username:password@]host[:port]/filepath
    
    # system service update https://[username:password@]host[:port]/filepath
    Both IPv4 and IPv6 addresses are supported.
  3. Activate the new version.
    • All previous microservice images are saved at flash://ms-images/<service-name> directories.

      There is no limit to the number of files saved on the disk other than disk space. However, the files are removed if the firmware is upgraded.

    • The current service stops and the new service starts.
    • Service shutdown handler is invoked as part of the kubectl set image command.
    • The microservice handles graceful shutdown or recovery and sets the restart reason ( MSSR_UPGRADE). When the new version of the microservice comes up, it checks the restart reason and takes necessary steps to be operational again.
  4. Optional: If the new microservice version is not required, roll back to the previous running version.
    # system service rollback service-name
  5. Optional: Activate any of the previous versions of the microservice.
    # system service update flash://ms-images/<service-name> directories
    After rollback, if any of the services do not come up, the Status property for chassis-0 component is set to Degraded state.