kubevirt / hyperconverged-cluster-operator

Operator pattern for managing multi-operator products
Apache License 2.0
155 stars 153 forks source link

Support needed kubevirt-hyperconverged-operator to install opernshift virtualization in airgap environment #3081

Closed sivassrr closed 2 months ago

sivassrr commented 2 months ago

Is your feature request related to a problem? Please describe: A clear and concise description of what the problem is. Needed support / procedure to get kubevirt-hyperconverged-operator install in airgap environment. Which in turns uses to install open shift virtualization in airgap environment. Pls refer this https://docs.openshift.com/container-platform/4.16/virt/install/installing-virt.html

Describe the solution you'd like: A clear and concise description of what you want to happen. If support already there , Pls pass the url. Otherwise need support for the same.

Need to list of what are all images need to be mirrored.

tiraboschi commented 2 months ago

This operator is also published as community-kubevirt-hyperconverged in the Community Operators catalog for OKD/OCP.

The bundle is designed to properly support mirroring for air-gapped environments, all the metadata are correctly set.

You can create an ImageSetConfiguration for oc-mirror as:

apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
mirror:
  operators:
    - catalog: registry.redhat.io/redhat/community-operator-index:v4.16
      packages:
        - name:  community-kubevirt-hyperconverged
          channels:
            - name: stable
              minVersion: '1.12.0'
              maxVersion: '1.12.0'

And then mirror it with something like:

$ oc-mirror --config=./imageset-config.yaml file://community-kubevirt-hyperconverged
Creating directory: community-kubevirt-hyperconverged/oc-mirror-workspace/src/publish
Creating directory: community-kubevirt-hyperconverged/oc-mirror-workspace/src/v2
Creating directory: community-kubevirt-hyperconverged/oc-mirror-workspace/src/charts
Creating directory: community-kubevirt-hyperconverged/oc-mirror-workspace/src/release-signatures
backend is not configured in ./imageset-config.yaml, using stateless mode
backend is not configured in ./imageset-config.yaml, using stateless mode
No metadata detected, creating new workspace
wrote mirroring manifests to community-kubevirt-hyperconverged/oc-mirror-workspace/operators.1725001560/manifests-community-operator-index

To upload local images to a registry, run:

    oc adm catalog mirror file://redhat/community-operator-index:v4.16 REGISTRY/REPOSITORY
<dir>
  community-operator-pipeline-prod/community-kubevirt-hyperconverged
    blobs:
      quay.io/community-operator-pipeline-prod/community-kubevirt-hyperconverged sha256:cbf1920172bab457cee20d21d439fa58f98558f6146710beb8402fbd7dc05f79 3.37KiB
      quay.io/community-operator-pipeline-prod/community-kubevirt-hyperconverged sha256:4d9653ee24d96341417e2eb67572e36541616688109b54b69c7fc7ab5c1d9c85 207.9KiB
    manifests:
      sha256:efd5be7f19c82254acf332ec69dbcdcac1099ebebddc1b4d9e8b474794d3cea3 -> 2fadea15
  coredns/coredns
    blobs:
      registry.k8s.io/coredns/coredns sha256:4446555033413c4ff08b998a3d51747e9d0d693c1544ded00059e0d20a16b327 1.016KiB
      registry.k8s.io/coredns/coredns sha256:97e04611ad43405a2e5863ae17c6f1bc9181bdefdaa78627c432ef754a4eb108 1.016KiB
      registry.k8s.io/coredns/coredns sha256:ead0a4a53df89fd173874b46093b6e62d8c72967bbf606d672c9e8c9b601a4fc 1.016KiB
      registry.k8s.io/coredns/coredns sha256:ebc620dc0a734a2e0f7e04ae9ecaf45e7088ab82ec0d3fd4f3855fcdd8a445b4 1.018KiB
      registry.k8s.io/coredns/coredns sha256:ef86158e16c28cb3ea6c4cbc8f619c2eafb5ad7fefd5f22da629198af5507f1f 1.019KiB
...

Please refer to https://docs.openshift.com/container-platform/4.16/installing/disconnected_install/installing-mirroring-disconnected.html for the various options of the oc-mirror plugin.

sivassrr commented 2 months ago

Thank you @tiraboschi - will look into it.