Version: v26.03

Offline Incremental Component Installation

Background

In an offline environment using openFuyao community's Cluster-API method to install a service cluster, there is a subsequent need to install new extension components in the existing cluster, achieving incremental installation without having to re-prepare the offline artifact package and reinstall the cluster.

Environment Preparation

  • Prepare a bare metal machine (the bare metal machine needs to be in a public network environment for building component incremental installation packages in online scenarios).
  • Install tar, pigz, bkeadm, and Docker (use Docker version 20.10.13 or 18.09.0).
    • For tar tool installation version, please refer to https://mirrors.aliyun.com/gnu/tar/.

    • For pigz tool installation version, please refer to https://zlib.net/pigz/.

    • bkeadm can be downloaded and installed by executing the following commands.

      bash
      # Method 1: Quick download
      curl -sfL https://openfuyao.obs.cn-north-4.myhuaweicloud.com/openFuyao/bkeadm/releases/download/1.2.2/download.sh | bash
      bash
      # Method 2: Download with integrity verification
      ## Download download.sh script file
      curl -LO https://openfuyao.obs.cn-north-4.myhuaweicloud.com/openFuyao/bkeadm/releases/download/1.2.2/download.sh
      ## Download the checksum file for download.sh and verify (optional). Successful verification will output -: OK. If verification fails, contact openFuyao community maintainers to locate the cause
      curl -LO https://openfuyao.obs.cn-north-4.myhuaweicloud.com/openFuyao/bkeadm/releases/download/1.2.2/download.sh.sha256
      sha256sum -c <(cat download.sh.sha256) < download.sh
      ## Run download.sh to download the bke installation tool, which will verify sha256sum during execution
      chmod +x download.sh && ./download.sh

Installation Steps

Follow these steps for incremental installation of components:

  1. Image incremental installation package preparation.

    1.1 After completing Docker installation, add the following configuration to the Docker configuration file. Edit the /etc/docker/daemon.json file (create one if it doesn't exist).

    json
     {
     "insecure-registries": [     
       "0.0.0.0/0"
     ]    
     }

    1.2 Execute the following command to restart Docker.

    bash
    systemctl restart docker

    1.3 Prepare the yaml file for component dependency images. Below is an example of the image download configuration yaml file for the openFuyao community's logging-packages component.

    yaml
    registry:
      imageAddress: cr.openfuyao.cn/openfuyao/registry:2.8.1
      architecture:
        - amd64
        - arm64
    repos:
      - architecture: # openfuyao logging extension component
          - amd64
          - arm64
        needDownload: true # Switch for whether to download images required by logging extension component, false-off do not download, true-on download
        subImages:
          - sourceRepo: cr.openfuyao.cn/openfuyao
            targetRepo: openfuyao
            images:
              - name: logging-operator
                tag:
                  - latest
              - name: logging-website
                tag:
                  - latest
              - name: oauth-proxy
                tag:
                  - latest
          - sourceRepo: docker.io
            targetRepo: /
            images:
              - name: grafana/loki
                tag:
                  - 2.9.1
              - name: grafana/promtail
                tag:
                  - 2.9.3
              - name: bats/bats
                tag:
                  - 1.8.2
    rpms:
    debs: []
    files: []
    charts: []

    1.4 Prepare image incremental installation package. After completion, you will get the image incremental installation package patch-log.tar.gz compressed file.

    bash
    bke build patch -f offline.yaml -t patch-log.tar.gz
  2. Copy the offline image incremental installation package to the offline bootstrap node.

  3. Download Chart package files from the repository. Log in to the openFuyao management plane, select "Application Marketplace > Repository Configuration > Package Management > Add Package" from the left navigation bar, and upload it to the local repository of the offline service cluster.

  4. Perform component installation.

    4.1 Offline bootstrap node image synchronization.

    bash
    # Extract installation package
    tar -xzvf patch-log.tar.gz
    # Image synchronization
    bke registry patch --source ./patch-log --target 0.0.0.0:40443

    4.2 Install components through application management on the openFuyao management plane of the service cluster.

    Log in to the openFuyao management plane, select "Application Marketplace > Application List" from the left navigation bar, click the application card according to installation needs, and enter the installation guidance process.