Introduction
An active standby pair replication scheme in TimesTen consists of two TimesTen databases. One database is the active, and the second database is the standby. Applications update the active database. The standby database is read-only and receives replicated updates from the active database. Only one of the two databases functions as the active database at any one time. If the active database fails, the standby database is promoted to be the active. After the failed (active) database is recovered, it becomes the standby database.
Oracle TimesTen In-Memory Database for Kubernetes - BYOL in Oracle Cloud Marketplace consists of a container image that contains TimesTen, its software prerequisites, and everything you need to run TimesTen in a containerized environment. The container image also includes the YAML manifest files and Helm charts needed to deploy the TimesTen Operator and create TimesTen databases.
This guide walks you through the steps to export the TimesTen container image and get access to the TimesTen container image by logging in to Container Registry and creating a Kubernetes Secret with the credentials needed for your Kubernetes cluster to access the container image in Oracle Cloud Infrastructure (OCI). It also provides references to the TimesTen documentation on extracting the manifest files, deploying the TimesTen Operator, and creating the TimesTen databases in your Kubernetes cluster.
Objectives
-
Export a TimesTen container image into a repository in Oracle Cloud Infrastructure Registry (Container Registry).
-
Log in to Container Registry on your development host and create a Kubernetes Secret to store the credentials that your Kubernetes cluster needs to access Container Registry.
Before You Begin
Before you begin using Marketplace, you should be familiar with Oracle Cloud. Also, ensure you have the following:
-
Access to an Oracle Cloud Infrastructure (OCI) tenancy. The tenancy must be subscribed to one or more of the regions in which Container Registry is available. See Availability by Region.
Note:
To log in to Container Registry, you will need the Object Storage namespace name of the tenancy. It can be found in the Tenancy Details page.
-
An OCI user that belongs to a group that can read and use Marketplace listings and manage repositories in Container Registry.
Note:
If your tenancy uses identity domains, you will need the name of the identity domain to log in to Container Registry. You are required to select the name of the identity domain associated with your user upon login to the OCI Console if your tenancy uses identity domains.
The following Identity and Access Management (IAM) policies enable the specified group to read and use listings and manage repositories in the specified compartment:
Allow group <group_name> to inspect all-resources in tenancy Allow group <group_name> to manage app-catalog-listings in compartment <compartment_name> Allow group <group_name> to use marketplace-listings in compartment <compartment_name> Allow group <group_name> to read marketplace-workrequests in compartment <compartment_name> Allow group <group_name> to manage repos in compartment <compartment_name>
See Required IAM Policy.
-
An auth token for the OCI user. If you forgot your auth token or have yet to create one for your OCI user, see Getting an Auth Token.
-
A working Kubernetes cluster. If your cluster was not set up using Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE), ensure that:
-
The cluster provides a StorageClass that can be used to request persistent volumes.
-
The nodes have their clocks synchronized through NTP or equivalent.
-
-
A development host to access the Kubernetes cluster. The host can be a virtual machine (VM) instance in the same tenancy as your cluster. Ensure that:
-
The host resides outside the Kubernetes cluster.
-
The host is able to access and control the Kubernetes cluster. For this, ensure that the
docker
(orpodman
) andkubectl
command line tools are installed on the host. See the Docker and kubectl documentation.If you decide to use the Helm charts provided by the container image, ensure that the
helm
command line tool is also installed. See the Helm documentation.
-
Task 1: Export the TimesTen Container Image
Task 2: Get Access to the TimesTen Container Image
A Kubernetes Secret is an object that contains a small amount of sensitive data. Your Kubernetes cluster needs a secret containing your OCI user name and auth token to access the TimesTen container image in Container Registry.
To get access to the TimesTen container image on your development host and Kubernetes cluster:
Next Steps
Now that you have a TimesTen container image in a repository in Container Registry and a Kubernetes Secret in your Kubernetes cluster to access Container Registry, you have all you need to deploy the TimesTen Operator and create TimesTen databases. You can either use the YAML manifest files or Helm charts included in the TimesTen container image to perform those tasks.
-
Obtain the YAML manifest files and Helm charts for the TimesTen Operator, see Obtain TimesTen YAML Manifest Files and Helm Charts.
While following the examples, where you create a new container, remember to replace the
IMAGE
argument in the examples with the region endpoint plus the full path of the container image.docker create --name ttoper <region_key>.ocir.io/<tenancy_namespace>/<repository_name>:<image_tag>
For example, for the
samplerepository
repository in thesampletenancy
tenancy in the US West (Phoenix) region with a container image of package version22.1.1.23.0
, the command to create a new container should look like this:docker create --name ttoper phx.ocir.io/sampletenancy/samplerepository:<unique_ID>-timesten-22.1.1.23.0
-
Install the TimesTen Custom Resource Definitions (CRDs), see Install TimesTen CRDs.
-
Deploy the TimesTen Operator, see Install the TimesTen Operator.
Note:
You can skip this step if you intend to use Helm to deploy the TimesTen Operator.
While following the examples, where you customize the TimesTen Operator, remember to replace the value for
name
inimagePullSecrets
with the name of the Kubernetes Secret you just created and the value forimage
incontainers
with the region endpoint plus the full path of the container image.imagePullSecrets: - name: <secret_name> containers: - name: timesten-operator image: <region_key>.ocir.io/<tenancy_namespace>/<repository_name>:<image_tag>
For example, for the
samplerepository
repository in thesampletenancy
tenancy in the US West (Phoenix) region with a container image of package version22.1.1.23.0
and thesekret
Kubernetes Secret, theoperator.yaml
file should include these values:imagePullSecrets: - name: sekret containers: - name: timesten-operator image: phx.ocir.io/sampletenancy/samplerepository:<unique_ID>-timesten-22.1.1.23.0
-
Create TimesTen databases with the TimesTen Operator, see Create TimesTen Classic Databases.
Note:
You can skip this step if you intend to use Helm to create the TimesTen databases.
While following the examples, where you create the YAML file to define the TimesTenClassic object, remember to replace the values for
image
andimagePullSecret
inttspec
with the region endpoint plus the full path of the container image and the name of your Kubernetes Secret, respectively.ttspec: image: <region_key>.ocir.io/<tenancy_namespace>/<repository_name>:<image_tag> imagePullSecret: <secret_name>
For example, for the
samplerepository
repository in thesampletenancy
tenancy in the US West (Phoenix) region with a container image of package version22.1.1.23.0
and thesekret
Kubernetes Secret, the YAML file should include these values:ttspec: image: phx.ocir.io/sampletenancy/samplerepository:<unique_ID>-timesten-22.1.1.23.0 imagePullSecret: sekret
-
Alternatively, you can use Helm to deploy the TimesTen Operator and create the TimesTen databases, see Use Helm in Your TimesTen Kubernetes Operator Environment.
Note:
You can skip this step if you intend to use the YAML manifest files to deploy the TimesTen Operator and create the TimesTen databases.
While following the examples, where you create the YAML files to define the configuration of the TimesTen Operator and TimesTen databases, remember to replace the values for
repository
andtag
inimage
with the region endpoint plus the full path of the container image and the value forname
inimagePullSecrets
with the name of your Kubernetes Secret.image: repository: <region_key>.ocir.io/<tenancy_namespace>/<repository_name> tag: <image_tag> imagePullSecrets: - name: <secret_name>
For example, for the
samplerepository
repository in thesampletenancy
tenancy in the US West (Phoenix) region with a container image of package version22.1.1.23.0
and thesekret
Kubernetes Secret, the YAML files should include these values:image: repository: phx.ocir.io/sampletenancy/samplerepository tag: <unique_ID>-timesten-22.1.1.23.0 imagePullSecrets: - name: sekret
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customer access to and use of Oracle support services will be pursuant to the terms and conditions specified in their Oracle order for the applicable services.
Oracle TimesTen In-Memory Database Using Oracle Cloud Marketplace to Obtain a TimesTen Container Image (BYOL), Release 22.1
F95963-03
September 2024
Primary Author: Ricardo Rosas