Upgrade the Docker Image


Overview

A Docker image upgrade is not required with every release. If a version requires the CloudCenter-supported Docker image to be upgraded, use the procedure provided in this page. 

When using External Services, the CloudCenter platform launches a Docker container to run the scripts. You may also need to customize this container using the applicable packages.

The Docker image can reside in one of two places:

  • In the CCO VM (default, co-located)
  • In a Standalone Docker VM

Versions Requiring a Docker Image Upgrade

CloudCenter 4.4.x and later includes the following Docker image enhancements:

See External Service > Error Handling for additional context.

Prerequisites

For each CloudCenter deployment that needs to be upgraded, verify the following prerequisites:

  • Backup your database and applications before you begin this process.
  • Verify that the Docker version is ≤ Docker 1.11. Issue the following command on your Docker server: docker version
    You only need to upgrade your Docker image if your Docker image is not at Docker 1.11.

  • Review the information provided in the Upgrade Overview section and validate the following requirements for the release to which you are upgrading:

    • Is an upgrade path available?
    • Is the core_upgrade.bin file required?
  • Ensure that a version file (/usr/local/osmosix/etc/version) exists in both CCOs that need to be upgraded.

  • Verify that the version file contains the correct version number (for example, if your current CloudCenter release version is 4.7.2, ensure that the corresponding version value is 4.7.2).

  • See the corresponding release notes for release-specific information on the CloudCenter version to which you are upgrading. For example, the CloudCenter 4.8.0 Release Notes.

Backup Database

Backup the exploded war files to a backup folder (the following example uses /mnt, you can change this directory as applicable).

NOW=$(date +"%Y%m%d")
bakdir="/mnt/bak/$NOW"
mkdir -p $bakdir
cd $bakdir

Download Packages

Download package files:

See Virtual Appliance Overview to understand the required components.

See Phase 4 Overview  to understand the various types of software download files.

  1. SSH into the VM instance designated for this component by using the key pair that you used to launch the VM.

    Along with the key pair, you may need to use your login credentials for sudo or root access based on your environment.

  2. Download the following required files for this component from software.cisco.com:

    • cco-installer.jar 
    • docker.tar
    • Dockerfile

Select and Execute Your Upgrade Scenario

Your upgrade process differs depending on your instance setup. Ascertain the following considerations before you begin the CCO upgrade.

ScenarioInstance SetupRelated Section
1
  • Instance 1 = CCO + Docker
CCO and Docker on the Same Instance
2
  • Instance 1 = CCO
  • Instance 2 = Docker
CCO and Docker on Separate Instances

Scenario1: CCO and Docker on the same Instance

 CCO and Docker are Co-Located
  1. Run the following commands on the CCO-Docker Instance:

    sudo –i
    cd /tmp
    chmod 755 core_upgrade.bin
    ./core_upgrade.bin <ostype> <cloudtype> cco
    
  2. Run the following commands from your download folder.

    tar xvf docker.tar
    
  3. Run the following commands to update the Docker image file.

    cd cliqr-container-worker
    
    # Optional - To customize docker image, add the commands under RUN in Dockerfile 
    vi Dockerfile
     
    #Remove the existing image and create a new image
    docker rmi -f cliqr/worker
    docker build -t 'cliqr/worker:latest' .

 

Scenario 2: CCO and Docker on Separate Instances

 CCO and Docker are not Co-Located
  1. Upgrade your CCO instance. See CCO Upgrade for additional context.
  2. Run the following commands on the Docker Instance:

    sudo –i
    cd /tmp
    chmod 755 core_upgrade.bin
    ./core_upgrade.bin <ostype> <cloudtype> docker
    
  3. Run the following commands from your download folder.

    tar xvf docker.tar
    
  4. Run the following commands to update the Docker image file.

    cd cliqr-container-worker
    
    # Optional - To customize docker image, add the commands under RUN in Dockerfile 
    vi Dockerfile
     
    #Remove the existing image and create a new image
    docker rmi -f cliqr/worker
    docker build -t 'cliqr/worker:latest' .

Post Upgrade Tasks

  1. Verify Your Upgrade – Verify that the Docker version is ≤ Docker 1.11. Issue the following command on your Docker server:

    # docker version
    Client:
     Version:      1.11.1
     API version:  1.23
     Go version:   go1.5.4
     Git commit:   5604cbe
     Built:        Wed Apr 27 00:34:42 2016
     OS/Arch:      linux/amd64
    Server:
     Version:      1.11.1
     API version:  1.23
     Go version:   go1.5.4
     Git commit:   5604cbe
     Built:        Wed Apr 27 00:34:42 2016
     OS/Arch:      linux/amd64
  2. Issue the following command and verify that the output is as follows:

    # docker images
    REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
    <none>              <none>              d54feac3ed0d        39 seconds ago      196.7 MB
    centos              7                   980e0e4c79ec        10 days ago         196.7 MB

 

  • No labels