2017年5月21日星期日

OpenShift_075:离线安装 OCP 3.5 之 下载安装介质

环境 OCP 3.5

OpenShift Container Platform 3.5 于 2017年4月18日正式发布。

1. 安装 RHEL 7.3 
所有操作以 root 用户进行。

2. 注册订阅账户
subscription-manager register --username=<user_name> --password=<password>

3. 查找包含 OpenShift 订阅的 Pool ID
subscription-manager list --available;
subscription-manager list --available --matches '*OpenShift*'

4. 绑定到你的 Pool ID
subscription-manager attach --pool=<YOUR_POOL_ID>;

5. 启用 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"

注意,OCP 3.5 比 3.4 多了一个 repo:rhel-7-fast-datapath-rpms。

6. 安装 reposync 命令
yum install -y yum-utils;

7. 下载 OpenShift 需要的 Repo
reposync -p /opt/ose -n;

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

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

8.1 下载核心镜像
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

8.2 下载 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

8.3 下载 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;

没有评论: