2016年3月18日星期五

OpenShift_002:离线安装 OSE 3.1 之一:准备安装环境和安装介质

环境:OS X EI Capitan 10.11.3 + Open Shift Enterprise 3.1

首先感谢同事陈耿和王章贵的大力支持,谢谢你们!

1. 安装环境
一共 4 台虚机,请提前安装好 RHEL 7.2
(1)yum 源及第三方服务机器 192.168.56.105
这台机器要作为: yum repository, dns server, docker private registry, git server
(2)master 节点机器 192.168.56.106
(3)node1 节点机器 192.168.56.107
(4)node2 节点机器 192.168.56.108

2. 获取 yum repositories
(1)注册到 Red Hat RHN 上
subscription-manager register;
subscription-manager list --available >list;
subscription-manager attach --pool=YOUR_POOL_ID ;
subscription-manager repos --disable="*"
subscription-manager repos \
    --enable="rhel-7-server-rpms" \
--enable="rhel-7-server-extras-rpms" \
    --enable="rhel-7-server-optional-rpms" \
--enable="rhel-7-server-ose-3.1-rpms"
(2)将以上4个频道的 rpm 包备份到本地
reposync -p /opt/ose -n;
tar zcvf ose-3.1-repo.tar.gz /opt/ose

3. 获取 docker images
(1)获取 openshift 3.1 自带的 docker images
REGISTRY="registry.access.redhat.com";PTH="openshift3";VERSION="v3.1.0.4";
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/rhscl/python-27-rhel7:latest; \
docker pull $REGISTRY/rhscl/perl-520-rhel7:latest; \
docker pull $REGISTRY/openshift3/nodejs-010-rhel7:latest; \
docker pull $REGISTRY/jboss-amq-6/amq62-openshift:latest; \
docker pull $REGISTRY/openshift3/mysql-55-rhel7:latest; \
docker pull $REGISTRY/openshift3/php-55-rhel7:latest; \
docker pull $REGISTRY/openshift3/ruby-20-rhel7:latest; \
docker pull $REGISTRY/openshift3/jenkins-1-rhel7:latest; \
docker pull $REGISTRY/rhscl/python-34-rhel7:latest; \
docker pull $REGISTRY/rhscl/postgresql-94-rhel7:latest; \
docker pull $REGISTRY/jboss-webserver-3/webserver30-tomcat7-openshift:1.1-2; \
docker pull $REGISTRY/rhscl/mysql-56-rhel7:latest; \
docker pull $REGISTRY/rhscl/ruby-22-rhel7:latest; \
docker pull $REGISTRY/openshift3/mongodb-24-rhel7:latest; \
docker pull $REGISTRY/rhscl/mongodb-26-rhel7:latest; \
docker pull $REGISTRY/jboss-webserver-3/webserver30-tomcat8-openshift:1.1; \
docker pull $REGISTRY/openshift3/postgresql-92-rhel7:latest; \
docker pull $REGISTRY/jboss-eap-6/eap64-openshift:1.1; \
docker pull $REGISTRY/openshift3/perl-516-rhel7:latest; \
docker pull $REGISTRY/rhscl/php-56-rhel7:latest; \
docker pull $REGISTRY/openshift3/python-33-rhel7:latest;
(2)将 Docker images 以本地文件形式存储
mkdir /opt/images && cd /opt/images;
for i in `docker images|grep -v REPOSITORY|awk '{print $1":"$2}'` ; do docker save -o $(echo $i|awk -F " /" '{print $NF}'|tr ":" "-"|tr "/" "-").tar $i ;done;

4. 获取测试样例程序代码
wget https://codeload.github.com/openshift/cakephp-ex/zip/master

没有评论: