1. 程式人生 > >Openshift 3.6 安裝

Openshift 3.6 安裝

因為有客戶需求,所以必須嘗試一下,可悲的是手裡只有3.7的離線安裝文件,加上之前3.11安裝因為同事文件寫得太好,基本沒遇到什麼坑,所以就沒仔細研究就開始搞了。

結果果然是因為/etc/ansible/host檔案寫得有問題,遇到一堆問題,包括:

  • 映象不ready,雖然都pull下來了,可是沒仔細看文件,就save -o了文件中的那幾個,所以就造成下面的錯誤,只好重新開始下載
One or more required container images are not available:
                   openshift3/registry-console:v3.6
, registry.example.com/openshift3/ose-deployer:v3.6.173.0.130, registry.example.com/openshift3/ose-docker-registry:v3.6.173.0.130, registry.example.com/openshift3/ose-haproxy-router:v3.6.173.0.130, registry.example.com/openshift3/ose-pod:v3.6.173
.0.130 Checked with: skopeo inspect [--tls-verify=false] [--creds=<user>:<pass>] docker://<registry>/<image> Default registries searched: registry.example.com, registry.access.redhat.com Failed connecting to: registry.example.com, registry.access.redhat.com
  • registry 443埠沒配,學3.11安裝配了個80以為可以繞信過關,結果就報錯了
[[email protected] ~]# oc logs  registry-console-1-deploy -n default
--> Scaling registry-console-1 to 1
--> Waiting up to 10m0s for pods in rc registry-console-1 to become ready
E1114 13:34:58.912499       1 reflector.go:304] github.com/openshift/origin/pkg/deploy/strategy/support/lifecycle.go:509: Failed to watch *api.Pod: Get https://172.30.0.1:443/api/v1/namespaces/default/pods?labelSelector=deployment%3Dregistry-console-1%2Cdeploymentconfig%3Dregistry-console%2Cname%3Dregistry-console&resourceVersion=1981&timeoutSeconds=412&watch=true: dial tcp 172.30.0.1:443: getsockopt: connection refused
  • pull service-catalog的映象出問題,這個是個大坑啊,每次一裝就需要1個多鐘頭,錯誤如下
15m        13m        4    kubelet, master.example.com    spec.containers{apiserver}    Normal        Pulling        pulling image "registry.access.redhat.com/openshift3/ose-service-catalog:v3.6"
  15m        13m        4    kubelet, master.example.com    spec.containers{apiserver}    Warning        Failed        Failed to pull image "registry.access.redhat.com/openshift3/ose-service-catalog:v3.6": rpc error: code = 2 desc = All endpoints blocked.
  15m        13m        6    kubelet, master.example.com    spec.containers{apiserver}    Normal        BackOff        Back-off pulling image "registry.access.redhat.com/openshift3/ose-service-catalog:v3.6"
  15m        4m        46    kubelet, master.example.com                    Warning        FailedSync    Error syncing pod
  
  • master上安裝docker找不到,大家都是配置同樣的yum repository,後來只好通過聯網方式的subscription-manager註冊解決。

3.6不像3.11有一個Prequrest的check,這個直接安裝上來,就需要一直等他是否出錯的資訊了,所以每次安裝很長時間。

host檔案的選項可以參考,踩坑必看啊。

https://docs.okd.io/3.6/install_config/install/advanced_install.html#enabling-service-catalog

 

雖然踩了不少坑,但對安裝過程也有了進一步的瞭解,好吧,我只能這樣安慰一下自己了。