A devfile refers to various resources, such as container images and starter projects. The current devfile registry currently does not store those supporting resources. Therefore, you must have access to those resources when using those devfiles.
To support the air gap installation of the devfile registry, the air gap scenario divides into two stages:
Build a devfile registry based on one or more source repositories so that the registry contains all the resources available for offline installation.
Install the devfile registry to a cluster to make it available for users to access the registry.
Stage 1: Build and Package a Devfile Registry
The main goal of this stage is:
Pull in resources into the registry as part of the registry build.
Modify the devfile to update references to those offline resources as part of the registry build.
Golang 1.18.x or higher
Docker 17.05 or higher or Podman 4.0.x or higher
Create Offline Registry
Download / clone the devfile/registry repository.
Clone through HTTPS
$ git clone https://github.com/devfile/registry.git /path/to/registry
Clone through SSH
$ git clone firstname.lastname@example.org:devfile/registry.git /path/to/registry
Install Stack Images
You will first need to collect all the image tags used in the stacks needed for offline access. The image tags collected are to each be pulled, re-tagged, and installed into the image repository accessible by the offline cluster. Procedure here will require you to change the devfile.
docker pullor the
podman pullto pull down an image for a stack component:
$ podman pull registry.access.redhat.com/ubi8/nodejs-16:latest
docker tagor the
podman tagto re-tag the image that uses the form
$ podman tag registry.access.redhat.com/ubi8/nodejs-16:latest \ <registry_host>:<port>/<project>/nodejs-16:latest
podman pushto push the re-tagged image to the image repository at
$ podman push <registry_host>:<port>/<project>/nodejs-16:latest
Change the devfile so you can update references to those offline resources as part of the registry build. For all the items pulled into the registry, update the corresponding devfile entries to reference the resources within the offline version in the registry.
- Stack component image references will change to use the offline accessible image repository.
If not already at the root of the registry, change to the root of the registry.
$ cd /path/to/registry
Build the offline registry image.
$ bash .ci/build.sh offline
To create your own registry Git repository, see Building a custom devfile registry
For more on interacting with the OpenShift Image Registry, see Accessing the registry
To learn more about starter projects in devfiles, see Adding projects to a devfile
For more information about building your own registry image, see Building a custom devfile registry
Stage 2: Install a Devfile Registry to a cluster
In this stage, you will push the container images to a registry available to the offline cluster.
- Docker 17.05 or higher or Podman 4.0.x or higher
Install Image into Cluster Image Registry
The process of installing the built images into an offline image registry depends on which image registry has deployed and which image registry you have access to.
docker tagor the
podman tagto re-tag the image using the form
$ podman tag devfile-index <registry_host>:<port>/<project>/devfile-index
podman pushto push the re-tagged image to the cluster image registry at
$ podman push <registry_host>:<port>/<project>/devfile-index
- For more on interacting with the OpenShift Image Registry, see Accessing the registry
Update strategy for refreshing registry contents
Steps to update an already deployed registry in the air gap scenario:
Follow offline registry instructions in the above sections and rerun the registry build script to rebuild the devfile registry.
Update the existing offline devfile registry deployment with a newly built and updated offline devfile registry image.