About the Examples

The following examples show you how to create YAML manifest files that define replicated and non-replicated configurations. Both examples use the same set of metadata files and both use Kubernetes ConfigMaps to get the metadata files into the tt containers. The examples show you how to deploy the TimesTenClassic objects in your Kubernetes namespace. The examples then show you how to monitor the progress of the TimesTen Operator as it creates TimesTen databases and gets them up and running and operational. The examples conclude with showing you how to connect to a TimesTen database and perform operations on it.

The examples use YAML manifest files. If you are using Helm to create TimesTen Classic databases, see Use Helm in Your TimesTen Kubernetes Operator Environment.

For simplicity, let's create the metadata files and ConfigMaps used in the examples. For complete details about metadata files, see Use Configuration Metadata and Populate the /ttconfig Directory.

  1. On your development host, from the directory of your choice, create an empty subdirectory for the metadata files and change to that directory. This example creates the kube_files/cm subdirectory.
    mkdir -p kube_files/cm
    cd kube_files/cm
  2. Create a db.ini file.
    vi db.ini
    
    PermSize=200
    DatabaseCharacterSet=AL32UTF8
  3. Create an AdminUser file.
    vi adminUser
    
    adminuser/adminuserpwd
  4. Create a schema.sql file.
    vi schema.sql
    
    create table adminuser.emp (id number not null primary key, name char (32));
  5. Create the ConfigMaps.
    1. For the replicated object, create the repsample ConfigMap.
      kubectl create configmap repsample --from-file .

      The output is the following:

      configmap/repsample created
    2. For the non-replicated object, create the norepsample ConfigMap.
      kubectl create configmap norepsample --from-file .

      The output is the following:

      configmap/norepsample created
    The examples show how to specify the preceding ConfigMaps in the .spec.ttspec.dbConfigMap section of your YAML manifest files.