7.2.3. 导出镜像
如果您的环境无法访问您的内部网络,并需要使用物理介质来传输内容,请导出镜像到压缩文件。如果您的主机同时连接到互联网和您的内部网络,可以跳过以下步骤,然后继续准备并填充存储库服务器。
创建用于存储压缩镜像的目录并进行以下改变:
$ mkdir </path/to/images> $ cd </path/to/images>
导出 OpenShift Container Platform 基础架构组件镜像。如果使用容器化安装程序,除这些所需镜像外还需要额外导出
registry.redhat.io/openshift3/ose-ansible:v3.11
:对于 x86_64 服务器中的内部安装,请运行以下命令:
$ docker save -o ose3-images.tar \ registry.redhat.io/openshift3/apb-base \ registry.redhat.io/openshift3/apb-tools \ registry.redhat.io/openshift3/automation-broker-apb \ registry.redhat.io/openshift3/csi-attacher \ registry.redhat.io/openshift3/csi-driver-registrar \ registry.redhat.io/openshift3/csi-livenessprobe \ registry.redhat.io/openshift3/csi-provisioner \ registry.redhat.io/openshift3/grafana \ registry.redhat.io/openshift3/kuryr-controller \ registry.redhat.io/openshift3/kuryr-cni \ registry.redhat.io/openshift3/local-storage-provisioner \ registry.redhat.io/openshift3/manila-provisioner \ registry.redhat.io/openshift3/mariadb-apb \ registry.redhat.io/openshift3/mediawiki \ registry.redhat.io/openshift3/mediawiki-apb \ registry.redhat.io/openshift3/mysql-apb \ registry.redhat.io/openshift3/ose-ansible-service-broker \ registry.redhat.io/openshift3/ose-cli \ registry.redhat.io/openshift3/ose-cluster-autoscaler \ registry.redhat.io/openshift3/ose-cluster-capacity \ registry.redhat.io/openshift3/ose-cluster-monitoring-operator \ registry.redhat.io/openshift3/ose-console \ registry.redhat.io/openshift3/ose-configmap-reloader \ registry.redhat.io/openshift3/ose-control-plane \ registry.redhat.io/openshift3/ose-deployer \ registry.redhat.io/openshift3/ose-descheduler \ registry.redhat.io/openshift3/ose-docker-builder \ registry.redhat.io/openshift3/ose-docker-registry \ registry.redhat.io/openshift3/ose-efs-provisioner \ registry.redhat.io/openshift3/ose-egress-dns-proxy \ registry.redhat.io/openshift3/ose-egress-http-proxy \ registry.redhat.io/openshift3/ose-egress-router \ registry.redhat.io/openshift3/ose-haproxy-router \ registry.redhat.io/openshift3/ose-hyperkube \ registry.redhat.io/openshift3/ose-hypershift \ registry.redhat.io/openshift3/ose-keepalived-ipfailover \ registry.redhat.io/openshift3/ose-kube-rbac-proxy \ registry.redhat.io/openshift3/ose-kube-state-metrics \ registry.redhat.io/openshift3/ose-metrics-server \ registry.redhat.io/openshift3/ose-node \ registry.redhat.io/openshift3/ose-node-problem-detector \ registry.redhat.io/openshift3/ose-operator-lifecycle-manager \ registry.redhat.io/openshift3/ose-ovn-kubernetes \ registry.redhat.io/openshift3/ose-pod \ registry.redhat.io/openshift3/ose-prometheus-config-reloader \ registry.redhat.io/openshift3/ose-prometheus-operator \ registry.redhat.io/openshift3/ose-recycler \ registry.redhat.io/openshift3/ose-service-catalog \ registry.redhat.io/openshift3/ose-template-service-broker \ registry.redhat.io/openshift3/ose-tests \ registry.redhat.io/openshift3/ose-web-console \ registry.redhat.io/openshift3/postgresql-apb \ registry.redhat.io/openshift3/registry-console \ registry.redhat.io/openshift3/snapshot-controller \ registry.redhat.io/openshift3/snapshot-provisioner \ registry.redhat.io/rhel7/etcd:3.2.28 \
对于 IBM POWER8 或 IBM POWER9 服务器中的内部安装,请运行以下命令:
$ docker save -o ose3-images.tar \ registry.redhat.io/openshift3/apb-base \ registry.redhat.io/openshift3/apb-tools \ registry.redhat.io/openshift3/automation-broker-apb \ registry.redhat.io/openshift3/csi-attacher \ registry.redhat.io/openshift3/csi-driver-registrar \ registry.redhat.io/openshift3/csi-livenessprobe \ registry.redhat.io/openshift3/csi-provisioner \ registry.redhat.io/openshift3/grafana \ registry.redhat.io/openshift3/kuryr-controller \ registry.redhat.io/openshift3/kuryr-cni \ registry.redhat.io/openshift3/local-storage-provisioner \ registry.redhat.io/openshift3/manila-provisioner \ registry.redhat.io/openshift3/mariadb-apb \ registry.redhat.io/openshift3/mediawiki \ registry.redhat.io/openshift3/mediawiki-apb \ registry.redhat.io/openshift3/mysql-apb \ registry.redhat.io/openshift3/ose-ansible-service-broker \ registry.redhat.io/openshift3/ose-cli \ registry.redhat.io/openshift3/ose-cluster-autoscaler \ registry.redhat.io/openshift3/ose-cluster-capacity \ registry.redhat.io/openshift3/ose-cluster-monitoring-operator \ registry.redhat.io/openshift3/ose-console \ registry.redhat.io/openshift3/ose-configmap-reloader \ registry.redhat.io/openshift3/ose-control-plane \ registry.redhat.io/openshift3/ose-deployer \ registry.redhat.io/openshift3/ose-descheduler \ registry.redhat.io/openshift3/ose-docker-builder \ registry.redhat.io/openshift3/ose-docker-registry \ registry.redhat.io/openshift3/ose-egress-dns-proxy \ registry.redhat.io/openshift3/ose-egress-http-proxy \ registry.redhat.io/openshift3/ose-egress-router \ registry.redhat.io/openshift3/ose-haproxy-router \ registry.redhat.io/openshift3/ose-hyperkube \ registry.redhat.io/openshift3/ose-hypershift \ registry.redhat.io/openshift3/ose-keepalived-ipfailover \ registry.redhat.io/openshift3/ose-kube-rbac-proxy \ registry.redhat.io/openshift3/ose-kube-state-metrics \ registry.redhat.io/openshift3/ose-metrics-server \ registry.redhat.io/openshift3/ose-node \ registry.redhat.io/openshift3/ose-node-problem-detector \ registry.redhat.io/openshift3/ose-operator-lifecycle-manager \ registry.redhat.io/openshift3/ose-ovn-kubernetes \ registry.redhat.io/openshift3/ose-pod \ registry.redhat.io/openshift3/ose-prometheus-config-reloader \ registry.redhat.io/openshift3/ose-prometheus-operator \ registry.redhat.io/openshift3/ose-recycler \ registry.redhat.io/openshift3/ose-service-catalog \ registry.redhat.io/openshift3/ose-template-service-broker \ registry.redhat.io/openshift3/ose-tests \ registry.redhat.io/openshift3/ose-web-console \ registry.redhat.io/openshift3/postgresql-apb \ registry.redhat.io/openshift3/registry-console \ registry.redhat.io/openshift3/snapshot-controller \ registry.redhat.io/openshift3/snapshot-provisioner \ registry.redhat.io/rhel7/etcd:3.2.28 \
如果您为可选组件同步了镜像,请导出它们:
对于 x86_64 服务器中的内部安装,请运行以下命令:
$ docker save -o ose3-optional-imags.tar \ registry.redhat.io/openshift3/metrics-cassandra \ registry.redhat.io/openshift3/metrics-hawkular-metrics \ registry.redhat.io/openshift3/metrics-hawkular-openshift-agent \ registry.redhat.io/openshift3/metrics-heapster \ registry.redhat.io/openshift3/metrics-schema-installer \ registry.redhat.io/openshift3/oauth-proxy \ registry.redhat.io/openshift3/ose-logging-curator5 \ registry.redhat.io/openshift3/ose-logging-elasticsearch5 \ registry.redhat.io/openshift3/ose-logging-eventrouter \ registry.redhat.io/openshift3/ose-logging-fluentd \ registry.redhat.io/openshift3/ose-logging-kibana5 \ registry.redhat.io/openshift3/prometheus \ registry.redhat.io/openshift3/prometheus-alertmanager \ registry.redhat.io/openshift3/prometheus-node-exporter \ registry.redhat.io/cloudforms46/cfme-openshift-postgresql \ registry.redhat.io/cloudforms46/cfme-openshift-memcached \ registry.redhat.io/cloudforms46/cfme-openshift-app-ui \ registry.redhat.io/cloudforms46/cfme-openshift-app \ registry.redhat.io/cloudforms46/cfme-openshift-embedded-ansible \ registry.redhat.io/cloudforms46/cfme-openshift-httpd \ registry.redhat.io/cloudforms46/cfme-httpd-configmap-generator \ registry.redhat.io/rhgs3/rhgs-server-rhel7 \ registry.redhat.io/rhgs3/rhgs-volmanager-rhel7 \ registry.redhat.io/rhgs3/rhgs-gluster-block-prov-rhel7 \ registry.redhat.io/rhgs3/rhgs-s3-server-rhel7 \
对于 IBM POWER8 或 IBM POWER9 服务器中的内部安装,请运行以下命令:
$ docker save -o ose3-optional-imags.tar \ registry.redhat.io/openshift3/metrics-cassandra \ registry.redhat.io/openshift3/metrics-hawkular-openshift-agent \ registry.redhat.io/openshift3/metrics-heapster \ registry.redhat.io/openshift3/metrics-schema-installer \ registry.redhat.io/openshift3/oauth-proxy \ registry.redhat.io/openshift3/ose-logging-curator5 \ registry.redhat.io/openshift3/ose-logging-elasticsearch5 \ registry.redhat.io/openshift3/ose-logging-eventrouter \ registry.redhat.io/openshift3/ose-logging-fluentd \ registry.redhat.io/openshift3/ose-logging-kibana5 \ registry.redhat.io/openshift3/prometheus \ registry.redhat.io/openshift3/prometheus-alert-buffer \ registry.redhat.io/openshift3/prometheus-alertmanager \ registry.redhat.io/openshift3/prometheus-node-exporter \
导出您拉取的 S2I 构建器镜像。例如,如果只同步了 Jenkins 和 Tomcat 镜像:
$ docker save -o ose3-builder-images.tar \ registry.redhat.io/jboss-webserver-3/webserver31-tomcat7-openshift:<tag> \ registry.redhat.io/jboss-webserver-3/webserver31-tomcat8-openshift:<tag> \ registry.redhat.io/openshift3/jenkins-2-rhel7:<tag> \ registry.redhat.io/openshift3/jenkins-agent-maven-35-rhel7:<tag> \ registry.redhat.io/openshift3/jenkins-agent-nodejs-8-rhel7:<tag> \ registry.redhat.io/openshift3/jenkins-slave-base-rhel7:<tag> \ registry.redhat.io/openshift3/jenkins-slave-maven-rhel7:<tag> \ registry.redhat.io/openshift3/jenkins-slave-nodejs-rhel7:<tag> \
- 将互联网连接主机中压缩的文件复制到您的内部主机中。
加载您复制的镜像:
$ docker load -i ose3-images.tar $ docker load -i ose3-builder-images.tar $ docker load -i ose3-optional-images.tar