Option 3: Build a Container Image

Here are the tasks to build your own TimesTen container image:

Task 1: Download and Unpack a TimesTen Distribution

  1. Download a TimesTen distribution to a download_location.
  2. On your development host, from the directory of your choice:
    • Create one subdirectory for the TimesTen distribution. This example creates the installation_dir subdirectory.

    • Create a second subdirectory for the TimesTen Operator distribution. This example creates the kube_files subdirectory.

    mkdir -p installation_dir
    mkdir -p kube_files
  3. Change to the TimesTen distribution subdirectory. Next, copy the TimesTen distribution that you previously downloaded into this subdirectory.
    cd installation_dir
    cp download_location/timesten2211270.server.linux8664.zip .
  4. Unpack the TimesTen distribution.
    unzip timesten2211270.server.linux8664.zip

    The output is similar to the following:

    Archive:  timesten2211270.server.linux8664.zip
       creating: tt22.1.1.27.0/
       ...
       creating: tt22.1.1.27.0/kubernetes/
     extracting: tt22.1.1.27.0/kubernetes/operator.zip
    ...
    The TimesTen Kubernetes Operator distribution is installation_dir/tt22.1.1.27.0/kubernetes/operator.zip.

    Note:

    Do not delete the TimesTen distribution. You need it later.
  5. Change to the TimesTen Kubernetes Operator subdirectory you created in a previous step. (In this example, kube_files.) Next, unpack the TimesTen Kubernetes Operator distribution.
    cd kube_files
    unzip installation_dir/tt22.1.1.27.0/kubernetes/operator.zip
    The output is similar to the following:
    Archive:  installation_dir/tt22.1.1.27.0/kubernetes/operator.zip
       ...
       creating: helm/
       creating: helm/ttclassic/
       ...
       creating: helm/ttcrd/
       ...
       creating: helm/ttoperator/
       ...
       creating: deploy/
      inflating: deploy/crd.yaml
      inflating: deploy/service_account.yaml
      inflating: deploy/operator.yaml
       creating: image/
      inflating: image/Dockerfile
       creating: operator/
      ...

Task 2: Build the Container Image

TimesTen provides the files you need to build a TimesTen container image in its TimesTen Kubernetes Operator distribution. In this example, the directory that contains the unzipped TimesTen Kubernetes Operator distribution is kube_files.

  1. On your development host, change to the image directory of the unzipped TimesTen Kubernetes Operator distribution (kube_files/image, in this example).
    cd kube_files/image
  2. Copy the TimesTen distribution into the directory. In a previous example, you created the installation_dir directory. This directory contains the TimesTen distribution.
    cp installation_dir/timesten2211270.server.linux8664.zip .
  3. On your development host, change to the kube_files/image directory if you are not in that directory. Next, use the docker build command to build a TimesTen container image.

    This example specifies the following Dockerfile ARGs on the command line.

    • TT_DISTRO: The name of the file containing the TimesTen distribution (timesten2211270.server.linux8664.zip, in this example).

    • TT_RELEASE: The name of the TimesTen release in dotted format (22.1.1.27.0, in this example).
    docker build -t ttimage:22.1.1.27.0 \
    --build-arg TT_DISTRO=timesten2211250.server.linux8664.zip \
    --build-arg TT_RELEASE=22.1.1.27.0 .
    The build process starts. When completed, output similar to the following displays:
    Successfully tagged ttimage:22.1.1.27.0

    The name of the container image is ttimage:22.1.1.27.0.

Congratulations! You successfully built a TimesTen container image. Save the name of the container image. You need it later.

Next Steps

Proceed to Part 2: Choose a Container Registry for Your Kubernetes Cluster.