2.2. OpenShift 4.x サーバーでの Fuse イメージストリームおよびテンプレートのインストール
OpenShift Container Platform 4.1 は、OpenShift namespace で操作する Samples Operator を使用して、Red Hat Enterprise Linux (RHEL) ベースの OpenShift Container Platform イメージストリームおよびテンプレートをインストールおよび更新します。Fuse on OpenShift イメージストリームおよびテンプレートをインストールするには、以下を行います。
- Samples Operator の再設定
Fuse イメージストリームおよびテンプレートを
Skipped Imagestreams and Skipped Templates
フィールドに追加します。- Skipped Imagestreams (スキップされるイメージストリーム): Samples Operator のインベントリーにあるが、クラスター管理者の希望により Operator が無視または管理しないようにするイメージストリーム。
- Skipped Templates (スキップされるテンプレート): Samples Operator のインベントリーにあるが、クラスター管理者の希望により Operator が無視または管理しないようにするテンプレート。
前提条件
- OpenShift サーバーにアクセスできる必要があります。
- Red Hat コンテナーレジストリーへの認証が設定されている必要があります。
- オプションで、インストール後に、OpenShift ダッシュボードに Fuse テンプレートを表示させる場合には、OpenShift ドキュメント (https://docs.openshift.com/container-platform/4.1/applications/service_brokers/installing-service-catalog.html) に記載されているように、サービスカタログとテンプレートサービスブローカーを先にインストールする必要があります。
手順
- OpenShift 4 サーバーを起動します。
OpenShift サーバーに管理者としてログインします。
oc login -u system:admin
oc login -u system:admin
Copy to Clipboard Copied! docker-registry シークレットを作成したプロジェクトを使用していることを確認します。
oc project openshift
oc project openshift
Copy to Clipboard Copied! Samples Operator の現在の設定を表示します。
oc get configs.samples.operator.openshift.io -n openshift-cluster-samples-operator -o yaml
oc get configs.samples.operator.openshift.io -n openshift-cluster-samples-operator -o yaml
Copy to Clipboard Copied! Samples Operator が、追加された Fuse テンプレートおよびイメージストリームを無視するよう設定します。
oc edit configs.samples.operator.openshift.io -n openshift-cluster-samples-operator
oc edit configs.samples.operator.openshift.io -n openshift-cluster-samples-operator
Copy to Clipboard Copied! Fuse イメージストリームおよびテンプレートをそれぞれ Skipped Imagestreams および Skipped Templates セクションに追加します。
[...] spec: architectures: - x86_64 managementState: Managed skippedImagestreams: - fis-java-openshift - fis-karaf-openshift - fuse7-console - fuse7-eap-openshift - fuse7-java-openshift - fuse7-karaf-openshift - jboss-fuse70-console - jboss-fuse70-eap-openshift - jboss-fuse70-java-openshift - jboss-fuse70-karaf-openshift - fuse-apicurito-generator - apicurito-ui skippedTemplates: - s2i-fuse74-eap-camel-amq - s2i-fuse74-eap-camel-cdi - s2i-fuse74-eap-camel-cxf-jaxrs - s2i-fuse74-eap-camel-cxf-jaxws - s2i-fuse74-eap-camel-jpa - s2i-fuse74-karaf-camel-amq - s2i-fuse74-karaf-camel-log - s2i-fuse74-karaf-camel-rest-sql - s2i-fuse74-karaf-cxf-rest - s2i-fuse74-spring-boot-camel - s2i-fuse74-spring-boot-camel-amq - s2i-fuse74-spring-boot-camel-config - s2i-fuse74-spring-boot-camel-drools - s2i-fuse74-spring-boot-camel-infinispan - s2i-fuse74-spring-boot-camel-rest-sql - s2i-fuse74-spring-boot-camel-xa - s2i-fuse74-spring-boot-camel-xml - s2i-fuse74-spring-boot-cxf-jaxrs
[...] spec: architectures: - x86_64 managementState: Managed skippedImagestreams: - fis-java-openshift - fis-karaf-openshift - fuse7-console - fuse7-eap-openshift - fuse7-java-openshift - fuse7-karaf-openshift - jboss-fuse70-console - jboss-fuse70-eap-openshift - jboss-fuse70-java-openshift - jboss-fuse70-karaf-openshift - fuse-apicurito-generator - apicurito-ui skippedTemplates: - s2i-fuse74-eap-camel-amq - s2i-fuse74-eap-camel-cdi - s2i-fuse74-eap-camel-cxf-jaxrs - s2i-fuse74-eap-camel-cxf-jaxws - s2i-fuse74-eap-camel-jpa - s2i-fuse74-karaf-camel-amq - s2i-fuse74-karaf-camel-log - s2i-fuse74-karaf-camel-rest-sql - s2i-fuse74-karaf-cxf-rest - s2i-fuse74-spring-boot-camel - s2i-fuse74-spring-boot-camel-amq - s2i-fuse74-spring-boot-camel-config - s2i-fuse74-spring-boot-camel-drools - s2i-fuse74-spring-boot-camel-infinispan - s2i-fuse74-spring-boot-camel-rest-sql - s2i-fuse74-spring-boot-camel-xa - s2i-fuse74-spring-boot-camel-xml - s2i-fuse74-spring-boot-cxf-jaxrs
Copy to Clipboard Copied! Fuse on OpenShift イメージストリームをインストールします。
BASEURL=https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003 oc create -n openshift -f ${BASEURL}/fis-image-streams.json
BASEURL=https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003 oc create -n openshift -f ${BASEURL}/fis-image-streams.json
Copy to Clipboard Copied! クイックスタートテンプレートをインストールします。
for template in eap-camel-amq-template.json \ eap-camel-cdi-template.json \ eap-camel-cxf-jaxrs-template.json \ eap-camel-cxf-jaxws-template.json \ eap-camel-jpa-template.json \ karaf-camel-amq-template.json \ karaf-camel-log-template.json \ karaf-camel-rest-sql-template.json \ karaf-cxf-rest-template.json \ spring-boot-camel-amq-template.json \ spring-boot-camel-config-template.json \ spring-boot-camel-drools-template.json \ spring-boot-camel-infinispan-template.json \ spring-boot-camel-rest-sql-template.json \ spring-boot-camel-template.json \ spring-boot-camel-xa-template.json \ spring-boot-camel-xml-template.json \ spring-boot-cxf-jaxrs-template.json \ spring-boot-cxf-jaxws-template.json ; do oc create -n openshift -f \ https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/quickstarts/${template} done
for template in eap-camel-amq-template.json \ eap-camel-cdi-template.json \ eap-camel-cxf-jaxrs-template.json \ eap-camel-cxf-jaxws-template.json \ eap-camel-jpa-template.json \ karaf-camel-amq-template.json \ karaf-camel-log-template.json \ karaf-camel-rest-sql-template.json \ karaf-cxf-rest-template.json \ spring-boot-camel-amq-template.json \ spring-boot-camel-config-template.json \ spring-boot-camel-drools-template.json \ spring-boot-camel-infinispan-template.json \ spring-boot-camel-rest-sql-template.json \ spring-boot-camel-template.json \ spring-boot-camel-xa-template.json \ spring-boot-camel-xml-template.json \ spring-boot-cxf-jaxrs-template.json \ spring-boot-cxf-jaxws-template.json ; do oc create -n openshift -f \ https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/quickstarts/${template} done
Copy to Clipboard Copied! Fuse Console のテンプレートをインストールします。
oc create -n openshift -f https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/fis-console-cluster-template.json oc create -n openshift -f https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/fis-console-namespace-template.json
oc create -n openshift -f https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/fis-console-cluster-template.json oc create -n openshift -f https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/fis-console-namespace-template.json
Copy to Clipboard Copied! 注記Fuse Console のデプロイに関する詳細は、OpenShift 4.x での Fuse Console の設定 を参照してください。
(任意手順): インストールされた Fuse on OpenShift イメージおよびテンプレートを表示します。
oc get template -n openshift
oc get template -n openshift
Copy to Clipboard Copied!