Giter Site home page Giter Site logo

dmc5179 / oc-mirror Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openshift/oc-mirror

0.0 0.0 0.0 10.5 MB

Lifecycle manager for internet-disconnected OpenShift environments

License: Apache License 2.0

Go 90.58% Makefile 0.21% Shell 8.22% Dockerfile 0.98%

oc-mirror's Introduction

oc-mirror

This repo is under active development. CLI and APIs are unstable

oc-mirror is an OpenShift Client (oc) plugin that manages OpenShift release, operator catalog, helm charts, and associated container images.

Usage

asciicast

The mirror registry reg.mirror.com is used in this example. Replace this value with a real registry host, or create a docker.io/library/registry:2 container locally.

Environment Prep

  1. Download pull secret and place at ~/.docker/config.json1.
    • Your mirror registry secret must have both push and pull scopes.
  2. Build:
    make build

Content Discovery

Updates

  • List updates since the last oc-mirror run
    ./bin/oc-mirror list updates --config imageset-config.yaml --dir test-create

Releases

  1. List all available release payloads for a version of OpenShift (defaults to stable)
    ./bin/oc-mirror list releases --version=4.9
  2. List all available channels to query for a version of OpenShift
    ./bin/oc-mirror list releases --channels --version=4.8
  3. List all available release payloads for a version of OpenShift in a specified channel
    ./bin/oc-mirror list releases --channel=fast-4.9

Operators

  1. List all available catalogs for a version of OpenShift
    ./bin/oc-mirror list operators --catalogs --version=4.9
  2. List all available packages in a catalog
    ./bin/oc-mirror list operators --catalog=catalog-name
  3. List all available channels in a package
    ./bin/oc-mirror list operators --catalog=catalog-name --package=package-name
  4. List all available versions in a channel
    ./bin/oc-mirror list operators --catalog=catalog-name --package=package-name --channel=channel-name

Mirroring

Fully Disconnected

  • Create then publish to your mirror registry:
    ./bin/oc-mirror --config imageset-config.yaml --dir test-create file://archives
    ./bin/oc-mirror --from /path/to/archives --dir test-publish docker://reg.mirror.com

Partially Disconnected

  • Publish mirror to mirror
    ./bin/oc-mirror --config imageset-config.yaml --dir test docker://localhost:5000

Additional Features

  • Get information on your imageset using describe
    ./bin/oc-mirror describe /path/to/archives
  • List updates since last run for releases and operators
    ./bin/oc-mirror list updates --config imageset-config.yaml --dir test-create

For configuration and options, see the expanded overview and usage docs.

1 For this example, the create and publish steps are run on the same machine. Therefore your ~/.docker/config.json should contain auth config for both release/catalog source images and your mirror registry.

oc-mirror Spec

See the config spec for an in-depth description of fields.

Note: The imageset-config.yaml is only used during bundle creation.

Development

Requirements

  • All top-level requirements
  • go version 1.16+

Build

make
./bin/oc-mirror -h

Test

Unit:

make test-unit

E2E:

make test-e2e

oc-mirror's People

Contributors

afflom avatar david-rh avatar dmesser avatar estroz avatar jharmison-redhat avatar jpower432 avatar openshift-merge-robot avatar redhatdan avatar sfxworks avatar usrbinkat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.