Download Installation Image

注册订阅账户

# subscription-manager register --username=<user_name> --password=<password>

查找包含 OpenShift 订阅的 Pool ID

# subscription-manager list --available --matches '*OpenShift Container Platform*'

绑定到你的 Pool ID

# subscription-manager attach --pool=<YOUR_POOL_ID>

启用 OpenShift 需要的 Repo

禁止所有的 repo
# subscription-manager repos --disable="*"
查看是否还有未被禁止的 repo
# yum repolist
如果还有未被禁止的 repo,手工禁止它
# yum-config-manager --disable <repo_id>
# yum-config-manager --disable \*
仅启用 OCP 3.5 所需的 repo
# subscription-manager repos --enable="rhel-7-server-rpms" --enable="rhel-7-server-extras-rpms" --enable="rhel-7-server-ose-3.5-rpms" --enable="rhel-7-fast-datapath-rpms"

安装 reposync 命令

# yum install -y yum-utils

下载 OpenShift 需要的 Repo

# reposync -p /opt/ose -n

下载红帽官方镜像

红帽官方镜像查询和下载地址:https://access.redhat.com/containers/

# REGISTRY="registry.access.redhat.com";PTH="openshift3";VERSION="v3.5";
# echo $REGISTRY $PTH $VERSION
registry.access.redhat.com openshift3 v3.5

安装启动 docker

yum install docker
systemctl start docker
systemctl enable docker

下载核心镜像

docker pull $REGISTRY/$PTH/ose:$VERSION ; \
docker pull $REGISTRY/$PTH/ose-haproxy-router:$VERSION ; \
docker pull $REGISTRY/$PTH/ose-deployer:$VERSION ; \
docker pull $REGISTRY/$PTH/ose-sti-builder:$VERSION ; \
docker pull $REGISTRY/$PTH/ose-docker-builder:$VERSION ; \
docker pull $REGISTRY/$PTH/ose-pod:$VERSION ; \
docker pull $REGISTRY/$PTH/ose-keepalived-ipfailover:$VERSION ; \
docker pull $REGISTRY/$PTH/ose-docker-registry:$VERSION; \
docker pull $REGISTRY/$PTH/ose-recycler:$VERSION; \
docker pull $REGISTRY/$PTH/registry-console:$VERSION;

导出镜像为 tar.gz

docker save -o ose-images-core-$VERSION_`date +'%Y%m%d'`.tar.gz $REGISTRY/$PTH/ose:$VERSION $REGISTRY/$PTH/ose-haproxy-router:$VERSION $REGISTRY/$PTH/ose-deployer:$VERSION $REGISTRY/$PTH/ose-sti-builder:$VERSION $REGISTRY/$PTH/ose-docker-builder:$VERSION $REGISTRY/$PTH/ose-pod:$VERSION $REGISTRY/$PTH/ose-keepalived-ipfailover:$VERSION $REGISTRY/$PTH/ose-docker-registry:$VERSION $REGISTRY/$PTH/ose-recycler:$VERSION $REGISTRY/$PTH/registry-console:$VERSION

下载 logging 和 metrics 镜像

docker pull $REGISTRY/$PTH/logging-deployer:$VERSION; \
docker pull $REGISTRY/$PTH/logging-elasticsearch:$VERSION; \
docker pull $REGISTRY/$PTH/logging-kibana:$VERSION; \
docker pull $REGISTRY/$PTH/logging-fluentd:$VERSION; \
docker pull $REGISTRY/$PTH/logging-auth-proxy:$VERSION; \
docker pull $REGISTRY/$PTH/logging-curator:$VERSION; \
docker pull $REGISTRY/$PTH/metrics-deployer:$VERSION; \
docker pull $REGISTRY/$PTH/metrics-hawkular-metrics:$VERSION; \
docker pull $REGISTRY/$PTH/metrics-cassandra:$VERSION; \
docker pull $REGISTRY/$PTH/metrics-heapster:$VERSION;

导出镜像为 tar.gz

docker save -o ose-images-logging_metric-$VERSION_`date +'%Y%m%d'`.tar.gz $REGISTRY/$PTH/logging-deployer:$VERSION $REGISTRY/$PTH/logging-elasticsearch:$VERSION $REGISTRY/$PTH/logging-kibana:$VERSION $REGISTRY/$PTH/logging-fluentd:$VERSION $REGISTRY/$PTH/logging-auth-proxy:$VERSION $REGISTRY/$PTH/logging-curator:$VERSION $REGISTRY/$PTH/metrics-deployer:$VERSION $REGISTRY/$PTH/metrics-hawkular-metrics:$VERSION $REGISTRY/$PTH/metrics-cassandra:$VERSION $REGISTRY/$PTH/metrics-heapster:$VERSION

下载 apps 镜像

docker pull $REGISTRY/jboss-webserver-3/webserver30-tomcat7-openshift:latest; \
docker pull $REGISTRY/jboss-webserver-3/webserver30-tomcat8-openshift:latest; \
docker pull $REGISTRY/jboss-eap-6/eap64-openshift:latest; \
docker pull $REGISTRY/jboss-eap-7/eap70-openshift:latest; \
docker pull $REGISTRY/jboss-amq-6/amq62-openshift:latest; \
docker pull $REGISTRY/jboss-fuse-6/fis-java-openshift:latest; \
docker pull $REGISTRY/jboss-fuse-6/fis-karaf-openshift:latest; \
docker pull $REGISTRY/jboss-processserver-6/processserver63-openshift:latest; \
docker pull $REGISTRY/jboss-decisionserver-6/decisionserver63-openshift:latest; \
docker pull $REGISTRY/rhscl/mongodb-32-rhel7:latest; \
docker pull $REGISTRY/rhscl/mysql-56-rhel7:latest; \
docker pull $REGISTRY/rhscl/mysql-57-rhel7:latest; \
docker pull $REGISTRY/rhscl/php-56-rhel7:latest; \
docker pull $REGISTRY/rhscl/php-70-rhel7:latest; \
docker pull $REGISTRY/rhscl/python-35-rhel7:latest; \
docker pull $REGISTRY/rhscl/redis-32-rhel7:latest; \
docker pull $REGISTRY/rhscl/ruby-23-rhel7:latest; \
docker pull $REGISTRY/rhscl/s2i-base-rhel7:latest; \
docker pull $REGISTRY/$PTH/jenkins-1-rhel7:latest; \
docker pull $REGISTRY/$PTH/jenkins-2-rhel7:latest; \
docker pull $REGISTRY/$PTH/jenkins-slave-base-rhel7:latest; \
docker pull $REGISTRY/$PTH/jenkins-slave-maven-rhel7:latest; \
docker pull $REGISTRY/$PTH/jenkins-slave-nodejs-rhel7:latest; \
docker pull $REGISTRY/$PTH/nodejs-010-rhel7:latest;

导出 apps 镜像为 tar.gz

docker save -o ose-images-apps-latest_`date +'%Y%m%d'`.tar.gz $REGISTRY/jboss-webserver-3/webserver30-tomcat8-openshift:latest $REGISTRY/jboss-eap-7/eap70-openshift:latest $REGISTRY/rhscl/mongodb-32-rhel7:latest $REGISTRY/rhscl/mysql-56-rhel7:latest $REGISTRY/rhscl/php-56-rhel7:latest $REGISTRY/rhscl/python-35-rhel7:latest $REGISTRY/rhscl/redis-32-rhel7:latest $REGISTRY/rhscl/ruby-23-rhel7:latest $REGISTRY/$PTH/jenkins-1-rhel7:latest $REGISTRY/$PTH/jenkins-2-rhel7:latest $REGISTRY/$PTH/nodejs-010-rhel7:latest;

导出 extra apps 镜像为 tar.gz

docker save -o ose-images-apps-extra-latest_`date +'%Y%m%d'`.tar.gz $REGISTRY/jboss-webserver-3/webserver30-tomcat7-openshift:latest $REGISTRY/jboss-eap-6/eap64-openshift:latest $REGISTRY/jboss-amq-6/amq62-openshift:latest $REGISTRY/jboss-processserver-6/processserver63-openshift:latest $REGISTRY/jboss-decisionserver-6/decisionserver63-openshift:latest $REGISTRY/rhscl/mysql-57-rhel7:latest $REGISTRY/rhscl/php-70-rhel7:latest $REGISTRY/rhscl/s2i-base-rhel7:latest $REGISTRY/$PTH/jenkins-slave-base-rhel7:latest $REGISTRY/$PTH/jenkins-slave-maven-rhel7:latest;

results matching ""

    No results matching ""