Set Up Container Registry

This module describes how to set up a container registry.

Set Up a Container Registry

The steps to set up a container registry for both XRd vRouter and XRd Control Plane are the same, except the image download path, and the naming of respective repositories. You can name the control-plane repository as "xrd-control-plane" to avoid confusion.

The container image is saved inside this tarball, and you must extract and verify it before use.

To set up a container registry, perform the following steps:

  1. Go to the directory where the tarball has been downloaded, extract the tarball using the following command:

    tar zxvf xrd-vrouter-container-x86.7.8.1.tgz
  2. To ensure that the image isn't corrupted, run the following python script and verify the signature.

    cd xrd-vrouter-container-x86.7.8.1
    python3 cisco_x509_verify_release.py3 \
      -e IOS-XR-SW-XRd.crt \
      -i xrd-vrouter-container-x64.dockerv1.tgz \
      -s xrd-vrouter-container-x64.dockerv1.tgz.signature \
      -v smime --container xr --sig_type DER

    The following is a sample output:

    Retrieving CA certificate from http://www.cisco.com/security/pki/certs/crrca.cer ...
    Successfully retrieved and verified crrca.cer.
    Retrieving SubCA certificate from http://www.cisco.com/security/pki/certs/xrcrrsca.cer ...
    Successfully retrieved and verified xrcrrsca.cer.
    Successfully verified root, subca and end-entity certificate chain.
    Successfully verified the signature of xrd-vrouter-container-x64.dockerv1.tgz using IOS-XR-SW-XRd.crt
  3. Create an ECR repository to host the image.

    aws ecr create-repository --repository-name xrd-vrouter
  4. Log into the repository using a container image tool. This example uses skopeo, but you can also use docker or podman.

    aws ecr get-login-password --region <region> | skopeo login --username AWS --password-stdin <repository-uri>
  5. Copy the image using skopeo, or load, tag, and push the image using docker or podman. For example,

     skopeo copy \
      "docker-archive:xrd-vrouter-container-x64.dockerv1.tgz" \
      "docker://<repository-uri>:7.8.1"

    Or,

    docker load -i xrd-vrouter-container-x64.dockerv1.tgz
    
    docker tag <image-tag> <repository-uri>:7.8.1
    docker push <repository-uri>:7.8.1