Created
January 31, 2020 21:51
-
-
Save sjenning/26ce57dc71216d541ac215963c9b1f93 to your computer and use it in GitHub Desktop.
disconnected-catalog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -eux | |
| version=2.0.0 | |
| operators=( | |
| https://quay.io/cnr/api/v1/packages/redhat-operators/servicemeshoperator | |
| https://quay.io/cnr/api/v1/packages/redhat-operators/jaeger-product | |
| https://quay.io/cnr/api/v1/packages/redhat-operators/kiali-ossm | |
| ) | |
| rm -rf manifests | |
| mkdir -p manifests | |
| for operator in ${operators[@]}; do | |
| digest=$(curl -s $operator/$version | jq -r '.[] | .content.digest') | |
| name=${operator##*/} | |
| curl -s $operator/blobs/sha256/$digest -o $name.tar.gz | |
| mkdir manifests/$name | |
| tar xf $name.tar.gz -C manifests/$name | |
| done | |
| podman build --no-cache . -t registry.lab.variantweb.net/openshift4/mirrored-registry:4.2.2 | |
| podman push registry.lab.variantweb.net/openshift4/mirrored-registry:4.2.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM registry.redhat.io/openshift4/ose-operator-registry:v4.2.1 | |
| COPY manifests manifests | |
| RUN /bin/initializer -o ./bundles.db | |
| EXPOSE 50051 | |
| ENTRYPOINT ["/bin/registry-server"] | |
| CMD ["--database", "bundles.db"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cat mirror-service-mesh-images.sh | |
| #!/bin/bash | |
| set -eu | |
| images=( | |
| docker.io/maistra/examples-bookinfo-details-v1:0.12.0 | |
| docker.io/maistra/examples-bookinfo-productpage-v1:0.12.0 | |
| docker.io/maistra/examples-bookinfo-ratings-v1:0.12.0 | |
| docker.io/maistra/examples-bookinfo-reviews-v1:0.12.0 | |
| docker.io/maistra/examples-bookinfo-reviews-v2:0.12.0 | |
| docker.io/maistra/examples-bookinfo-reviews-v3:0.12.0 | |
| registry.redhat.io/distributed-tracing/jaeger-all-in-one-rhel7:1.13.1 | |
| registry.redhat.io/distributed-tracing/jaeger-rhel7-operator:1.13.1 | |
| registry.redhat.io/openshift-service-mesh/kiali-rhel7-operator:1.0.6 | |
| registry.redhat.io/openshift-service-mesh/kiali-rhel7:1.0.6 | |
| registry.redhat.io/openshift-service-mesh/istio-rhel8-operator:1.0.1 | |
| registry.redhat.io/openshift4/ose-oauth-proxy:4.1 | |
| registry.redhat.io/openshift4/ose-oauth-proxy:latest | |
| registry.redhat.io/openshift-service-mesh/citadel-rhel8:1.0.1 | |
| registry.redhat.io/openshift-service-mesh/galley-rhel8:1.0.1 | |
| registry.redhat.io/openshift-service-mesh/grafana-rhel8:1.0.1 | |
| registry.redhat.io/openshift-service-mesh/istio-cni-rhel8:1.0.1 | |
| registry.redhat.io/openshift-service-mesh/istio-rhel8-operator:1.0.1 | |
| registry.redhat.io/openshift-service-mesh/mixer-rhel8:1.0.1 | |
| registry.redhat.io/openshift-service-mesh/pilot-rhel8:1.0.1 | |
| registry.redhat.io/openshift-service-mesh/prometheus-rhel8:1.0.1 | |
| registry.redhat.io/openshift-service-mesh/proxyv2-rhel8:1.0.1 | |
| registry.redhat.io/openshift-service-mesh/sidecar-injector-rhel8:1.0.1 | |
| ) | |
| for image in ${images[@]}; do | |
| src=$image | |
| dst=registry.lab.variantweb.net/${image#*/} | |
| skopeo copy --format=v2s2 docker://$src docker://$dst | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: operators.coreos.com/v1alpha1 | |
| kind: CatalogSource | |
| metadata: | |
| name: mirrored-operator-catalog | |
| namespace: openshift-marketplace | |
| spec: | |
| displayName: Mirrored Operator Catalog | |
| sourceType: grpc | |
| image: registry.lab.variantweb.net/openshift4/mirrored-registry:4.2.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unqualified-search-registries = ["registry.access.redhat.com", "docker.io"] | |
| [[registry]] | |
| location = "quay.io/openshift-release-dev/ocp-release" | |
| insecure = false | |
| blocked = false | |
| mirror-by-digest-only = true | |
| prefix = "" | |
| [[registry.mirror]] | |
| location = "registry.lab.variantweb.net/ocp/release" | |
| insecure = false | |
| [[registry]] | |
| location = "quay.io/openshift-release-dev/ocp-v4.0-art-dev" | |
| insecure = false | |
| blocked = false | |
| mirror-by-digest-only = true | |
| prefix = "" | |
| [[registry.mirror]] | |
| location = "registry.lab.variantweb.net/ocp/release" | |
| insecure = false | |
| [[registry]] | |
| location = "registry.redhat.io/distributed-tracing" | |
| insecure = false | |
| blocked = false | |
| prefix = "" | |
| [[registry.mirror]] | |
| location = "registry.lab.variantweb.net/distributed-tracing" | |
| insecure = false | |
| [[registry]] | |
| location = "registry.redhat.io/openshift-service-mesh" | |
| insecure = false | |
| blocked = false | |
| prefix = "" | |
| [[registry.mirror]] | |
| location = "registry.lab.variantweb.net/openshift-service-mesh" | |
| insecure = false | |
| [[registry]] | |
| location = "registry.redhat.io/openshift4" | |
| insecure = false | |
| blocked = false | |
| prefix = "" | |
| [[registry.mirror]] | |
| location = "registry.lab.variantweb.net/openshift4" | |
| insecure = false | |
| [[registry]] | |
| location = "docker.io/maistra" | |
| insecure = false | |
| blocked = false | |
| prefix = "" | |
| [[registry.mirror]] | |
| location = "registry.lab.variantweb.net/maistra" | |
| insecure = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment