Skip to main content
Skip table of contents

AWS Air-gapped GPU: Create an Image

To create an Image using Konvoy Image Builder (KIB) for use in an air-gapped cluster, follow these instructions. AMI images contain configuration information and software to create a specific, pre-configured, operating environment. For example, you can create an AMI image of your current computer system settings and software. The AMI image can then be replicated and distributed, creating your computer system for other users. You can use overrides files to customize some of the components installed on your machine image. For example, you could tell KIB to install the FIPS versions of the Kubernetes components.

Prerequisites

In previous DKP releases, AMI images provided by the upstream CAPA project would be used if you did not specify an AMI. However, the upstream images are not recommended for production and may not always be available.  Therefore, DKP now requires you to specify an AMI when creating a cluster. To create an AMI, use Konvoy Image Builder.

Explore the Customize your Image topic for more options.

Using KIB, you can build an AMI without requiring access to the internet by providing an additional --override flag.

In previous DKP releases, the distro package bundles were included in the downloaded air-gapped bundle. Currently, that air-gapped bundle contains the following artifacts with the exception of the distro packages:

  • DKP Kubernetes packages

  • Python packages (provided by upstream)

  • Containerd tarball

  1. Download dkp-air-gapped-bundle_v2.8.1_linux_amd64.tar.gz , and extract the tarball to a local directory:

    CODE
    tar -xzvf dkp-air-gapped-bundle_v2.8.1_linux_amd64.tar.gz && cd dkp-v2.8.1/kib
  2. You will need to fetch the distro packages as well as other artifacts. By fetching the distro packages from distro repositories, you get the latest security fixes available at machine image build time.

  3. In your download location, In your download location with internet access, you need to create an OS package bundle for the Target OS you use for the nodes in your DKP cluster. To create it, run the new DKP command create-package-bundle. This builds an OS bundle using the Kubernetes version defined in ansible/group_vars/all/defaults.yaml. Example command:

    CODE
    ./konvoy-image create-package-bundle --os redhat-8.4 --output-directory=artifacts

    Other supported air-gapped Operating Systems (OSs) can be specified in place of --os redhat-8.4 using the flag and corresponding OS name:

    • centos-7.9

    • redhat-7.9

    • redhat-8.6

    • redhat-8.8

    • rocky-9.1

    • ubuntu-20.04

    NOTE: For FIPS, pass the flag: --fips
    NOTE: For RHEL OS, pass your RedHat subscription/licensing manager credentials: Example command:

    CODE
    export RHSM_ACTIVATION_KEY="-ci"
    export RHSM_ORG_ID="1232131"

    OR

    CODE
    export RHSM_USER=""
    export RHSM_PASS=""
  4. Follow the instructions below to build an AMI.

Build the GPU Image

Using the Konvoy Image Builder, you can build an image that has support to use NVIDIA GPU hardware to support GPU workloads.

NOTE: The NVIDIA driver requires a specific Linux kernel version. Make sure that the base image for the OS version has the required kernel version.

See Supported Infrastructure Operating Systems for a list of OS versions and the corresponding kernel versions known to work with the NVIDIA driver.

If the NVIDIA runfile installer has not been downloaded, then retrieve and install the download first by running the following command. The first line in the command below downloads and installs the runfile and the second line places it in the artifacts directory (you must create an artifacts directory if you don’t already have one).

CODE
curl -O https://download.nvidia.com/XFree86/Linux-x86_64/470.82.01/NVIDIA-Linux-x86_64-470.82.01.run
mv NVIDIA-Linux-x86_64-470.82.01.run artifacts

DKP supported NVIDIA driver version is 470.x.

To build an image for use on GPU enabled hardware, perform the following steps.

  1. In your override file, add the following to enable GPU builds. Otherwise, you can access and use the overrides in our repo or in the documentation under Nvidia GPU Override File or Offline Nvidia Override file.

    1. Non-air-gapped GPU override overrides/nvidia.yaml:

      CODE
      gpu:
        types:
          - nvidia
      build_name_extra: "-nvidia"
    2. Air-gapped GPU override overrides/offline-nvidia.yaml:

      CODE
      # Use this file when building a machine image, not as a override secret for preprovisioned environments
      nvidia_runfile_local_file: "{{ playbook_dir}}/../artifacts/{{ nvidia_runfile_installer }}"
      gpu:
        types:
          - nvidia
      
      build_name_extra: "-nvidia"

      NOTE: For RHEL Pre-provisioned Override Files used with KIB, see specific note for GPU.

  2. Build your image using the build Konvoy Image Builder command, making sure to include the flag --instance-type that specifies an AWS instance that has an available GPU:
    AWS Example:

    CODE
    konvoy-image build --region us-east-1 --instance-type=p2.xlarge --source-ami=ami-12345abcdef images/ami/centos-7.yaml --overrides overrides/nvidia.yaml

    In this example, we chose an instance type with an NVIDIA GPU using the --instance-type flag, and we provided the NVIDIA overrides using the --overrides flag. See Using KIB with AWS for more information on creating an AMI.

  3. When the Konvoy Image Builder image is complete, the custom ami id is printed and written to ./.. To use the built ami with Konvoy, specify it with the --ami flag when calling cluster create.

Additional helpful information can be found in the NVIDIA Device Plug-in for Kubernetes instructions and the Installation Guide of Supported Platforms.

See also: NVIDIA documentation

Next Steps:

AWS Air-gapped GPU: Load the Registry

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.