3.2. OpenShift テンプレートを使用した APIcast のデプロイ

注記
  • テンプレートを使用する場合は、OpenShift Container Platform (OCP) 3.11 にのみ APIcast をデプロイすることができます。
  • operator ベースのインストールは、OCP バージョン 4.1 および 4.2 でのみサポートされます。
  • サポート対象設定の情報については、3scale API Management 2.7 Supported Configurations のアーティクルを参照してください。

OpenShift テンプレートを使用して APIcast をデプロイするには、以下の手順を使用します。

手順

  1. デフォルトでは、developer としてログインしていて、次のステップに進むことができます。

    そうでなければ、前の手順でダウンロードおよびインストールした OpenShift クライアントツールから oc login コマンドを使用して OpenShift にログインします。デフォルトのログインクレデンシャルは username = "developer"password = "developer" です。

    oc login https://OPENSHIFT-SERVER-IP:8443

    出力に Login successful. が表示されるはずです。

  2. プロジェクトを作成します。この例では表示名を gateway と設定します。

    oc new-project "3scalegateway" --display-name="gateway" --description="3scale gateway demo"

    応答は以下のようになります。

    Now using project "3scalegateway" on server "https://172.30.0.112:8443"

    コマンドプロンプトのテキスト出力で提案される次のステップを無視し、以下に示す次のステップに進みます。

  3. プロジェクトを参照する新しいシークレットを作成します。<access_token> および <domain> はご自分のクレデンシャルに置き換えます。<access_token> および <domain> の詳細は、以下を参照してください。

    oc create secret generic apicast-configuration-url-secret --from-literal=password=https://<access_token>@<admin_portal_domain>  --type=kubernetes.io/basic-auth

    ここでは、<access_token> は 3scale アカウントの アクセストークン で、<domain>-admin.3scale.net は 3scale 管理ポータルの URL になります。

    応答は以下のようになります。

    secret/apicast-configuration-url-secret
  4. テンプレートから APIcast ゲートウェイのアプリケーションを作成し、デプロイメントを開始します。

    oc new-app -f https://raw.githubusercontent.com/3scale/3scale-amp-openshift-templates/2.8.0.GA/apicast-gateway/apicast.yml

    出力の最後に以下のメッセージが表示されるはずです。

        --> Creating resources with label app=3scale-gateway ...
            deploymentconfig "apicast" created
            service "apicast" created
        --> Success
            Run 'oc status' to view your app.