Skip to content

openshift/mirror-gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

346 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mirror-GUI Application

A modern web-based interface for managing OpenShift Container Platform mirroring operations using oc-mirror v2. Create, manage, and execute mirror configurations without command-line expertise.

Overview


Quick Start

Prerequisites

  • Podman (required)
  • Pull secret from console.redhat.com (optional at startup — can be saved to pull-secret/pull-secret.json beforehand, or provided later via Settings > Pull Secret in the UI)

Clone the repository

git clone https://github.com/openshift/mirror-gui.git
cd mirror-gui

Option 1: Pre-built image (recommended)

chmod +x mirror-gui.sh
./mirror-gui.sh

The script auto-detects your architecture (AMD64/ARM64), pulls the image, and starts the app. It will warn if pull-secret/pull-secret.json is missing but will still start. You can provide the pull secret later via Settings > Pull Secret in the UI.

To use a specific image (e.g. a CI-built image), pass it via IMAGE_NAME:

IMAGE_NAME=registry.ci.openshift.org/ocp/5.0:mirror-gui ./mirror-gui.sh

You can also override the host port or the oc-mirror cache directory:

WEB_PORT=3002 ./mirror-gui.sh
CACHE_DIR=/tmp/mirror-cache ./mirror-gui.sh

When CACHE_DIR is set, the host directory is mounted into the container and used by oc-mirror for catalog metadata and layer data. The current cache location is shown in Settings > Cache.

Open the URL printed by the script in your browser. By default it uses http://localhost:3000, but it automatically selects another free host port if 3000 is already in use. If a different port is chosen, use the Web UI: line printed by the script output.

Manage with: ./mirror-gui.sh --stop, ./mirror-gui.sh --restart, ./mirror-gui.sh --status, ./mirror-gui.sh --logs.

Option 2: Build locally

chmod +x local-build.sh

# Build and run locally (fetches catalogs, builds image, starts container)
./local-build.sh

# Build only, without starting the container
./local-build.sh --build-only

# Run a previously built image without rebuilding or fetching catalogs
./local-build.sh --run-only

Every build path runs sync-catalogs.sh to pull the latest Red Hat, Certified, and Community operator catalogs (OCP 4.16-4.21) before building the image. Use --run-only to skip fetching and building when you already have a local image.

Manage with: ./local-build.sh --stop, ./local-build.sh --logs, ./local-build.sh --status.


Features

Dashboard

Environment overview (oc-mirror version, environment status, pull secret status), operation statistics, recent operations, and quick action buttons. Shows a warning banner when no pull secret is detected.

Dashboard

Dark theme -- Toggle between Light, Dark, and System (auto) themes from the masthead.

Dashboard Dark Theme

When no pull secret is detected, a warning banner is displayed with a link to the Settings page where one can be uploaded.

Dashboard without pull secret

Mirror Configuration

Visual configuration builder with tabs for Platform Channels, Operators, Additional Images, YAML Preview, and file upload.

Adding operators -- Select from pre-fetched catalogs (OCP 4.16-4.21) with Red Hat, Certified, and Community operator indexes. Automatic dependency detection with one-click add.

Add Operator

YAML preview and editing -- Preview the generated ImageSetConfiguration YAML, copy to clipboard, or edit directly. Set an optional archive size limit (in GiB) to control the maximum size of each archive file.

Edit Preview

Upload existing YAML -- Import an existing ImageSetConfiguration YAML file, review and edit it, then save it or load it into the form editor for further modification.

Upload YAML

Mirror Operations

Execute mirror operations with real-time monitoring. Select a saved configuration file, optionally specify a destination subdirectory, and start the operation. View operation history with logs, location info, and delete actions.

Mirror Operations

History

Filter and review all past operations. Export to CSV.

History

Settings

Configure environment preferences across three tabs:

Pull Secret -- View, upload, edit, or remove your pull secret directly from the browser.

Settings - Pull Secret

Registry -- Auto-detected registries from your pull secret with authentication verification.

Settings - Registry

Cache -- View cache location and size, clean up cache data.

Settings - Cache

Environment variable Description
IMAGE_NAME Override the container image
WEB_PORT Override the host port (default: 3000)
CACHE_DIR Override the oc-mirror cache directory (absolute host path)

Compatibility

oc-mirror v2
OpenShift 4.16, 4.17, 4.18, 4.19, 4.20, 4.21
Container runtime Podman 5.0+
Architecture AMD64 (x86_64), ARM64 (aarch64)

Troubleshooting

Invalid GPG signature for operator index images -- See Red Hat KB article.


API

Full RESTful API documentation is available in API.md.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes and test
  4. Submit a pull request

License

Apache License 2.0 -- see LICENSE for details.

About

Graphical User Interface for oc-mirror v2

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors