オプション1: 公式のTimesTenコンテナ・イメージを使用する

このオプションでは、https://container-registry.oracle.comにあるOracle Container Registry上の公式のTimesTenコンテナ・イメージを使用します。Oracle Container Registryには、timestenおよびtimesten-xeという2つのTimesTenリポジトリがあります。timestenリポジトリには、Oracle TimesTen In-Memory Databaseの公式コンテナ・イメージが含まれます。timesten-XEリポジトリには、Oracle TimesTen In-Memory Database Express Edition (TimesTen XE)の公式コンテナ・イメージが含まれます。

これらのリポジトリ内のTimesTenコンテナ・イメージのリストを表示するには、https://container-registry.oracle.comにあるOracle Container Registryに移動します。「Search Oracle Container Registry」フィールドに、「timesten」と入力します。次に、[Enter]を押します。その後、timestenまたはtimesten-xeリポジトリを選択できます。この章およびマニュアル全体の例では、TimesTenコンテナ・イメージにtimestenリポジトリを使用します。

このイメージでの事前定義値を次に示します。次の値は変更できません。
  • timesten: コンテナ・イメージで作成されたLinuxユーザーおよびLinuxグループの名前。Linuxユーザーは、TimesTenを実行するユーザーです。LinuxグループはTimesTenユーザー・グループです。

  • 3429: timestenユーザーおよびTimesTenユーザー・グループの数値UIDおよびGID。

Oracle Container RegistrytimestenリポジトリにあるTimesTenコンテナ・イメージを取得して使用するためのタスクについて説明します。

Oracle TimesTenライセンス契約の同意

この項で示されている手順は1回実行する必要があります。以前にOracle TimesTenライセンス契約に同意しており、Kubernetes Secretを作成してある場合は、「公式TimesTenイメージからのTimesTenオペレータ・マニフェスト・ファイルの取得」に進んでください。

公式のTimesTenコンテナ・イメージは、Oracle Container Registry (https://container-registry.oracle.com/)にあります。TimesTenなどのライセンス済Oracleソフトウェア・イメージを使用するには、Oracle Container RegistryのWebインタフェースにログインし、そのイメージについて「Oracle Standard Terms and Restrictions」に同意する必要があります。次の手順が完了すると、YAMLマニフェスト・ファイル内で公式TimesTenコンテナ・イメージを参照できるようになります。

ノート:

入手可能なTimesTenイメージのリストがcontainer-registry.oracle.com/timestenリポジトリにあります。使用するイメージを選択します。このドキュメント内の例では、様々なイメージを使用しています。TimesTenコンテナ・イメージの一例は、container-registry.oracle.com/timesten/timesten:22.1.1.19.0です。
  1. Webブラウザで、Oracleアカウントを使用して、https://container-registry.oracle.com/にあるOracle Container Registryにログインします。
  2. 「Oracle Container Registry」ページの「Browse Containers」セクションで、「TimesTen」をクリックします。
  3. 「TimesTen Repositories」ページの「Repository」列で、「timesten」を選択します。
  4. 「Official container images for the Oracle TimesTen In-Memory Database」ページで、「Quick Reference Description」の右側にある「Select Language」ドロップダウン・リストを見つけます。「Select Language」ドロップダウン・リストで、お使いの言語を選択します。「Continue」ボタンの前のテキストを確認し、「Continue」をクリックします。

    「Continue」ボタンの前に表示されるテキストは、次のようになります: 「You must agree to and accept the Oracle Standard Terms and Restrictions prior to downloading from the Oracle Container Registry.Please read the license agreement on the following page carefully.」

  5. 「Oracle Standard Terms and Restrictions」ページで、ページの情報を確認し、ページの下部にある「Accept」をクリックします。
    「Official container images for the Oracle TimesTen In-Memory Database」ページが再度表示されます。「Quick Reference Description」の右側にある緑色のチェック・マークと次のようなテキストを探します: 「You last accepted the Oracle Standard Terms and Restrictions on 01/08/2023 at 01:28 PM Coordinated Universal Time (UTC).」
  6. 開発ホストで、docker loginコマンドを使用して、Oracle Container RegistryのWebインタフェースへのログインに使用したのと同じOracleアカウントを使用して、Oracle Container Registryに対して認証を行います。
    docker login container-registry.oracle.com

    Oracleアカウントとパスワードの入力を求められます。

    テキストは次のようになります。
    Username (oracleuser@oracle.com):
    Password:
    WARNING! Your password will be stored unencrypted in /home/oracleuser/.docker/config.json.
    Configure a credential helper to remove this warning. See
    https://docs.docker.com/engine/reference/commandline/login/#credentials-store
    
    Login Succeeded
  7. container-registry.oracle.comのイメージ・プル・シークレットを作成します。
    kubectl create secret generic sekret \
    --from-file=.dockerconfigjson=$HOME/.docker/config.json \
    --type=kubernetes.io/dockerconfigjson

    イメージ・プル・シークレットの名前を保存します。これは、後でTimesTenClassicオブジェクトまたはTimesTenScaleoutオブジェクトをデプロイするときに必要です。「TimesTenClassicオブジェクトの定義および作成」および「TimesTenScaleoutオブジェクトの定義およびデプロイ」を参照してください。

    Kubernetes Secretの作成の詳細は、デプロイ中のレジストリからのイメージのプルを参照してください。

Oracle Container Registryに正常にログインし、公式のTimesTenコンテナ・イメージのOracle Standard Terms and Conditionsに同意しました。これで、YAMLマニフェスト・ファイルでTimesTenコンテナ・イメージを参照できるようになりました。「公式TimesTenイメージからのTimesTenオペレータ・マニフェスト・ファイルの取得」に進んでください。

公式TimesTenイメージからのTimesTenオペレータ・マニフェスト・ファイルの取得

TimesTenオペレータのマニフェスト・ファイルは、公式のTimesTenコンテナ・イメージに含まれています。この例では、公式のTimesTenコンテナ・イメージは、Oracle Container Registrytimestenリポジトリにあります。

公式のTimesTenコンテナ・イメージの場所に移動する方法の詳細は、「オプション1: 公式のTimesTenコンテナ・イメージを使用する」を参照してください。

この項で示す例では、container-registry.oracle.com/timesten/timesten:22.1.1.19.0イメージを使用します。

container-registry.oracle.com/timesten/timesten:22.1.1.19.0コンテナ・イメージ内にあるTimesTenオペレータ・マニフェスト・ファイルを取得する手順について説明します。

  1. 開発ホストで、任意のディレクトリから、TimesTenオペレータ・ファイル用のサブディレクトリを作成します。この例では、kube_filesおよびkube_files/deployディレクトリを作成します。
    mkdir -p kube_files
    cd kube_files
    mkdir -p deploy
  2. container-registry.oracle.com/timesten/timesten:22.1.1.19.0イメージから、名前を指定して新しいコンテナを作成します。この例では、そのコンテナの名前はttoperです。
    docker create --name ttoper container-registry.oracle.com/timesten/timesten:22.1.1.19.0

    出力は次のようになります。

    Unable to find image 'container-registry.oracle.com/timesten/timesten:22.1.1.19.0' locally
    Trying to pull repository container-registry.oracle.com/timesten/timesten:22.1.1.19.0 ...
    20221215: Pulling from container-registry.oracle.com/timesten/timesten:22.1.1.19.0
    ...
    Digest: sha256:bb58e32d2e08a66c55fb09afd8958feb91300134fc7a019bcb39a241f48fd995
    Status: Downloaded newer image for container-registry.oracle.com/timesten/timesten:22.1.1.19.0
    d03a6e534e8bcce435b86795e8b3082487e5f18af64a522ebfbabff3baec321a
  3. ttoperコンテナから、先ほど作成したkube_files/deployにTimesTenオペレータ・ファイルをコピーします。また、helmディレクトリをttoperコンテナからコピーします。
    docker cp ttoper:/timesten/operator/deploy/crd.yaml deploy/crd.yaml
    docker cp ttoper:/timesten/operator/deploy/operator.yaml deploy/operator.yaml
    docker cp ttoper:/timesten/operator/deploy/service_account.yaml deploy/service_account.yaml
    docker cp ttoper:/timesten/operator/helm .

    crd.yamloperator.yamlおよびservice_account.yamlファイルがkube_files/deployディレクトリにコピーされます。helmディレクトリとその内容がkube_filesディレクトリにコピーされます。これらのファイルについては、後で説明します。

  4. ttoperコンテナを削除します。
    docker rm ttoper

    出力は次のようになります。

    ttoper
  5. TimesTenコンテナ・イメージを削除します。
    docker image rm container-registry.oracle.com/timesten/timesten:22.1.1.19.0

    出力は次のようになります。

    Untagged: container-registry.oracle.com/timesten/timesten:22.1.1.19.0
    ...

これで、TimesTenオペレータ・マニフェスト・ファイルが正常に取得されました。「TimesTen演算子のデプロイについて」に進み、TimesTenオペレータをデプロイしてください。