OpenShift Origin v3.7 安装-手工部署All-In-One Server

我安装的是Openshift Origin v3.7,以后版本的安装推荐按照官方文档做:https://docs.openshift.org/latest/getting_started/administrators.html#downloading-the-binary

1、下载OpenShift Origin

cd /home/eos-paas/
wget http://192.168.199.230/m/openshift-origin-server-v3.7.0-alpha.1-fdbd3dc-linux-64bit.tar.gz

tar -xvzf openshift-origin-server-v3.7.0-alpha.1-fdbd3dc-linux-64bit.tar.gz

mv openshift-origin-server-v3.7.0-alpha.1-fdbd3dc-linux-64bit openshiftorigin

2、环境准备

yum install -y docker
systemctl start docker
systemctl enable docker

systemctl stop firewalld
systemctl disable firewalld

yum install -y git

vi /etc/hosts
加入 eos.mypaas.com

vi /etc/profile
在文档最底下添加:
export PATH=/home/eos-paas/openshiftorigin:$PATH

export KUBECONFIG=/home/eos-paas/openshiftorigin/openshift.local.config/master/admin.kubeconfig

export CURL_CA_BUNDLE=/home/eos-paas/openshiftorigin/openshift.local.config/master/ca.crt

export IMAGESTREAMDIR=~/openshift-ansible/roles/openshift_examples/files/examples/v3.6/image-streams

export QSTEMPLATES=~/openshift-ansible/roles/openshift_examples/files/examples/v3.6/quickstart-templates

source /etc/profile
cd /home/eos-paas/openshiftorigin
sudo chmod +r /home/eos-paas/openshiftorigin/openshift.local.config/master/admin.kubeconfig

vi /etc/sysconfig/docker
加入 –insecure-registry=172.30.0.0/16

3、启动Openshift

cd /home/eos-paas/openshiftorigin
openshift start

4、配置OpenShift

-部署 docker registry
oadm registry –config=/home/eos-paas/openshiftorigin/openshift.local.config/master/admin.kubeconfig –service-account=registry

部署 router
oc adm policy add-scc-to-user privileged system:serviceaccount:default:router
oadm policy add-cluster-role-to-user cluster-reader system:serviceaccount:default:router
oc adm router router –replicas=1 –service-account=router

部署 Image-Stream、Templete
cd ~
git clone https://github.com/openshift/openshift-ansible

oc create -f $IMAGESTREAMDIR/image-streams-centos7.json -n >openshift
oc create -f $DBTEMPLATES -n openshift
oc create -f $QSTEMPLATES -n openshift

5、常见问题

容器运行时需要root权限

oc adm policy add-scc-to-group anyuid system:authenticated
oc adm policy add-scc-to-group anyuid system:admin

无法看到pod的日至,容器控制台无法连接

hostname 未绑定,修改 /etc/hosts

git 无法访问

检查容器是否能访问网络
看看是不是ping 的时候 加上了额外的dns-search 信息
修改 服务器上 /etc/resolv.conf文件 去掉 search 后面的内容
resolv.conf 的dns 增加一个 部署openshiftorigin 服务器的地址或者独立DNS地址

Removing all searchdomain entries in /etc/sysconfig/network-scripts or /etc/resolv.conf file fixed the issue.

This was discovered by testing on a local setup with DHCP addressing instead of a manually assigned IP with the host in my original question, which worked fine, which helped to narrow down the issue to networking differences between both environments.

# Generated by NetworkManager
search
nameserver 192.168.199.1
nameserver 192.168.199.161

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值