OpenShift 4.3 通過腳本配置ServiceMesh和Serverless運行環境

Install CatalogSourceConfig

  1. 創建CatalogSourceConfig資源
$ oc apply -f https://raw.githubusercontent.com/liuxiaoyu-git/knative-tutorial/release/0.7.x/install/redhat-operators-csc.yaml
$ oc apply -f https://raw.githubusercontent.com/liuxiaoyu-git/knative-tutorial/release/0.7.x/install/community-operators-csc.yaml
  1. 查看CatalogSourceConfig資源
$ oc -n openshift-marketplace get csc
NAME                           STATUS      MESSAGE                                       AGE
community-operators-packages   Succeeded   The object has been successfully reconciled   48s
redhat-operators-packages      Succeeded   The object has been successfully reconciled   58s

Install Servicemesh

  1. 安裝Servicemesh所需Operator
$ oc apply -f https://raw.githubusercontent.com/liuxiaoyu-git/knative-tutorial/release/0.7.x/install/servicemesh/subscription.yaml
subscription.operators.coreos.com/elastic-search created
subscription.operators.coreos.com/jaeger created
subscription.operators.coreos.com/kiali created
subscription.operators.coreos.com/servicemesh created
  1. 查看Operator安裝狀態。
$ oc get csv -w
NAME                                         DISPLAY                          VERSION               REPLACES                     PHASE
elasticsearch-operator.4.1.34-202002040910   Elasticsearch Operator           4.1.34-202002040910                                Succeeded
jaeger-operator.v1.13.1                      Jaeger Operator                  1.13.1                                             Succeeded
kiali-operator.v1.0.11                       Kiali Operator                   1.0.11                kiali-operator.v1.0.10       Succeeded
servicemeshoperator.v1.0.8                   Red Hat OpenShift Service Mesh   1.0.8                 servicemeshoperator.v1.0.7   Succeeded
  1. 新建Servicemesh用的項目,然後創建Servicemesh的ServiceMeshControlPlane和ServiceMeshMemberRoll
$ oc new-project istio-system 
$ oc create -f https://raw.githubusercontent.com/liuxiaoyu-git/knative-tutorial/release/0.7.x/install/servicemesh/smcp.yaml
$ oc create -f https://raw.githubusercontent.com/liuxiaoyu-git/knative-tutorial/release/0.7.x/install/servicemesh/smmr.yaml
  1. 查看Servicemesh相關pod創建情況
$ oc get pods -n istio-system -w
NAME                                     READY   STATUS    RESTARTS   AGE
cluster-local-gateway-54c465457d-d8q77   1/1     Running   0          88s
istio-citadel-84b9959cc6-vm4n2           1/1     Running   0          2m47s
istio-galley-cc75d7c89-k56qj             1/1     Running   0          2m33s
istio-ingressgateway-bdb9f6dd6-nlsnv     1/1     Running   0          88s
istio-pilot-58f6d6b8f5-6nh2c             1/1     Running   0          2m10s

Install Knative Serving

  1. 安裝serverless-operator的Operator訂閱
$ oc apply -f https://raw.githubusercontent.com/liuxiaoyu-git/knative-tutorial/release/0.7.x/install/knative-serving/subscription.yaml
  1. 查看serverless-operator的部署情況。
$ oc get csv | grep serverless-operator
serverless-operator.v1.4.1                   OpenShift Serverless Operator    1.4.1                 serverless-operator.v1.4.0   Succeeded
  1. 新建Knative Serving資源的項目,然後創建所需對象。
$ oc new-project knative-serving  
$ oc apply -f https://raw.githubusercontent.com/liuxiaoyu-git/knative-tutorial/release/0.7.x/install/knative-serving/cr.yaml
  1. 查看支持knative-serving的pod運行情況
$ oc get pods -n knative-serving
NAME                               READY   STATUS    RESTARTS   AGE
activator-84b5f4f4d6-cv92n         1/1     Running   0          60s
autoscaler-84d84b65db-5xprt        1/1     Running   0          59s
autoscaler-hpa-66f7f47c4c-4fhtl    1/1     Running   0          59s
controller-cb7dff454-6rht5         1/1     Running   0          55s
networking-istio-c9c98f574-65mpt   1/1     Running   0          52s
webhook-65b6db457c-cjr7d           1/1     Running   0          54s
  1. 查看knative-serving的狀態,成功完成後顯示以下內容。
$ oc get knativeserving.operator.knative.dev/knative-serving -n knative-serving --template='{{range .status.conditions}}{{printf "%s =%s\n" .type .status}}{{end}}'
DependenciesInstalled=True
DeploymentsAvailable=True
InstallSucceeded=True
Ready=True

Install Knative Eventing

  1. 創建運行Knative Eventing資源的項目
$ oc new-project knative-eventing
  1. 安裝Knative Eventing的Operator訂閱
$ oc apply -f https://raw.githubusercontent.com/liuxiaoyu-git/knative-tutorial/release/0.7.x/install/knative-eventing/subscription.yaml
  1. 查看knative-eventing-operator安裝情況
$ oc get csv -n knative-eventing
NAME                                         DISPLAY                          VERSION               REPLACES                            PHASE
elasticsearch-operator.4.1.34-202002040910   Elasticsearch Operator           4.1.34-202002040910                                       Succeeded
jaeger-operator.v1.13.1                      Jaeger Operator                  1.13.1                                                    Succeeded
kiali-operator.v1.0.9                        Kiali Operator                   1.0.9                 kiali-operator.v1.0.8               Succeeded
knative-eventing-operator.v0.12.0            Knative Eventing Operator        0.12.0                knative-eventing-operator.v0.11.0
serverless-operator.v1.4.1                   OpenShift Serverless Operator    1.4.1                 serverless-operator.v1.4.0          Succeeded
servicemeshoperator.v1.0.7                   Red Hat OpenShift Service Mesh   1.0.7                 servicemeshoperator.v1.0.6          Succeeded
  1. 查看支持knative-eventing的pod運行情況
$ oc get pods -n knative-eventing -w
NAME                                   READY   STATUS    RESTARTS   AGE
eventing-controller-6b69c6778b-4flw2   1/1     Running   0          2m35s
eventing-webhook-c7d46444b-wpkfw       1/1     Running   0          2m32s
imc-controller-69c4775c85-wqd6r        1/1     Running   0          2m27s
imc-dispatcher-655ff59648-zzcf6        1/1     Running   0          2m26s
sources-controller-7887fbc859-l86vk    1/1     Running   0          2m35s
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章