Giter Club home page Giter Club logo

ocp4-operatorhub-mirroring's Introduction

ocp4-operatorhub-mirroring

These scripts simplify the process of OperatorHub Image mirroring for OpenShif 4.X environment.

For OpenShift 4.X, If you want to use OperatorHub in the restricted network environment. You must download the Operator images and bring them to your OpenShift environment, then push them to your private registry. These scripts will simplify the steps of this mirroring process.

How to Use

  1. Make sure you already dump the OperatorHub catalog manifest (called mapping.txt). Filter the list to remain the Images you want to mirror.
$ cat mapping.txt | egrep '(logging|elastic|proxy|...)' >> origin.txt
  1. Edit the convert.sh script. Modify the Private Registry URL.
$ vim convert.sh
#!/bin/bash
PRIVATE_REGISTRY="private-registry.example.com"
#------------------------
...
  1. Execute convert.sh. It will create two files:
  • auto_redhat_to_file.txt: The mapping file for mirror image from external registry to local.
  • auto_file_to_private.txt: The mapping for mirror image from local to private registry.
$ bash convert.sh
  1. Optional: If your private registry will not create the project automatically. You need to create them before mirroring them.

Modify get-project-name.sh.

$ vim get-project-name.sh
PRIVATE_REGISTRY="private-registry.example.com"

Get the project list of Image.

$ bash get-project-name.sh
  1. Mirror the Image.

From external registry to local:

$ oc image mirror -a ${REG_CREDS} -f auto_redhat_to_file.txt --filter-by-os=".*"

From local to private registry:

$ oc image mirror -a ${REG_CREDS} -f auto_file_to_private.txt --filter-by-os=".*"

Reference

ocp4-operatorhub-mirroring's People

Contributors

pohsien324 avatar

Watchers

 avatar  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.