Skip to main content

Installation

Requirements

  • PostgreSQL database
    • PostgreSQL version 13 or higher
    • Minimum hardware requirements of the database instance
      • 2 CPU cores
      • 8 GiB RAM
      • At least 100 GiB of storage for testing
      • Or at least 200 GB of storage is recommended for production use
    • Recommended Azure instance: General Purpose instance of type D2ds_v4
    • During the installation it is necessary to manually execute SQL statements from .sql text file
      • We recommend using psql utility or DBeaver application
      • Admin access to this PostgreSQL instance is required during the installation
  • Kubernetes cluster
    • Kubernetes version 1.27 or higher
    • Minimum hardware requirements of the cluster
      • 5 nodes
      • Each node:
        • 4 CPU cores
        • 16 GiB RAM
        • Recommended Azure instance type: Standard_D4s_v3
    • During the installation it is necessary to apply Kubernetes manifest from .yaml text file
      • We recommend using kubectl utility and configure it to access this Kubernetes cluster
      • Admin access to this cluster (get, list, watch, create, update, patch and delete on namespaces, deployments, services, jobs, cronjobs, statefulsets, secrets, configmaps, pods, ingresses) is required during the installation
  • Networking requirements
    • Allowed network communication from Kubernetes cluster (all pods inside tim-platform namespace) to PostgreSQL database - TCP port 5432
    • Allowed network communication between all pods inside tim-platform namespace - TCP+UDP ports 80, 443, 5672, 15672, 5000, 8000, 8071, 8073, 8080
    • Allowed network communication (internet access) from rest-api pods inside tim-platform namespace to TIM Identity Management - TCP port 443 to host tim-platform-im.tangent.works (or IP address 20.86.206.245)
      • TIM Identity Management is publicly accessible service on the internet
    • Allowed network communication (internet access) from Kubernetes cluster to Docker Hub (public docker image registry) - TCP port 443 to hosts .docker.io and .docker.com
    • Allowed network communication (internet access) from Kubernetes cluster to Tangent Works private docker image registry - TCP port 443 to host euwestacrtangentworks01.azurecr.io
  • Administrator's PC
    • Note: Administrator's PC is a machine from which TIM v5 installation and management is happening. It can be a developer's PC or a virtual machine in the cloud (jump server)
    • psql utility installed and configurred with access to PostgreSQL instance
    • kubectl utility installed and configured with context accessing the Kubernetes cluster
    • TIM v5 OEM installer files present on this machine

PostgreSQL database setup

  1. Create PostgreSQL instance matching the requirements described in this document
  2. Make sure UUID-OSSP extension is installed and enabled
  3. Connect to the PostgreSQL instance as admin user (for example with psql utility)
  4. Execute SQL file database_resources/01_tim-platform-db_create-user.sql as PostgreSQL admin user
  5. Logout from the database instance (for example by typing \q in psql utility)
  6. Connect to the timplatformdb database in your PostgreSQL instance as admin user (for example with psql utility)
  7. Execute SQL file database_resources/02_tim-platform-db_create-extension.sql as PostgreSQL admin user inside timplatformdb database
  8. Logout from the database instance (for example by typing \q in psql utility)
  9. Connect to the timplatformdb database in your PostgreSQL instance as timplatformuser user (for example with psql utility)
  10. Execute SQL file database_resources/03_tim-platform-db_init.sql as timplatformuser inside timplatformdb database
  11. Logout from the database instance (for example by typing \q in psql utility)

Kubernetes cluster setup

  1. Create Kubernetes cluster matching the requirements described in this document
  2. Ensure that networking requirements described in this document are met
  3. (Optional) Create ingress controller
    1. If you would like to use HTTPS protocol to communicate with TIM or you are planning to use TIM Studio, we recommend setting up an ingress controller
    2. We also recommend using ingress controller for any production use case
    3. It is recommended to use Nginx ingress controller
    4. More information about the installation of Nginx ingress controller can be found here: Create an unmanaged ingress controller - Azure Kubernetes Service
  4. Edit file kubernetes_resources/tim_v5_kube_deployment.yaml
    1. Go to line 18 in this file
    2. Replace placeholder <postgres-host> with PostgreSQL instance hostname or IP address
    3. Save changes to the file
  5. Apply Kubernetes manifest to your Kubernetes cluster
    1. We recommend to use kubectl utility
    2. Please make sure your kubectl utility is configured correctly and set to communicate with the cluster created in step 1
    3. Execute command kubectl apply -f kubernetes_resources/tim_v5_kube_deployment.yaml
  6. Wait approximately 10 minutes for TIM to start
  7. Check the list of Kubernetes pods inside tim-platform with command kubectl get pods -n tim-platform
  8. Look for any errors or crashes in this list. If everything is running as expected, you should see a list similar to this:
NAME                                        READY   STATUS             RESTARTS         AGE
dataset-management-78d8bddcdd-dpkps 1/1 Running 0 10m
dataset-management-78d8bddcdd-ngk6q 1/1 Running 0 10m
dataset-management-worker-8cbbc4586-crs7l 1/1 Running 0 10m
dataset-management-worker-8cbbc4586-wq7hs 1/1 Running 0 10m
job-management-5968f76747-4jwmk 1/1 Running 0 10m
job-management-5968f76747-5cz5g 1/1 Running 0 10m
rabbitmq-0 1/1 Running 0 10m
rest-api-5b8d6b6d7d-4qdkm 1/1 Running 0 10m
rest-api-5b8d6b6d7d-5dg5s 1/1 Running 0 10m
rest-api-5b8d6b6d7d-7kkg4 1/1 Running 0 10m
rest-api-5b8d6b6d7d-9lbmx 1/1 Running 0 10m
rest-api-5b8d6b6d7d-fvcq2 1/1 Running 0 10m
rest-api-5b8d6b6d7d-jtsms 1/1 Running 0 10m
tim-studio-webapp-7c5b87f7c8-dtz2t 1/1 Running 0 10m
tim-studio-webapp-7c5b87f7c8-j59rq 1/1 Running 0 10m
worker-heavy-static-69bd7fbc7d-86dwv 1/1 Running 0 10m
worker-heavy-static-69bd7fbc7d-dwcxs 1/1 Running 0 10m
worker-light-static-c665ff9d6-jhf75 1/1 Running 0 10m
worker-light-static-c665ff9d6-t9k2c 1/1 Running 0 10m
workflow-management-5b476fd97d-qdwv2 1/1 Running 0 10m
workflow-management-5b476fd97d-s6f5h 1/1 Running 0 10m

Accessing TIM v5 API

There are 2 ways of accessing TIM API interface:

  • You can create a port forward to rest-api pod
    • This approach should be used for development purposes only
    • It should not be used in production
  • If you deployed ingress controller and your cluster is accessible externally, you can access TIM API directly via the ingress

Port forwarding (development purposes only)

  1. Use kubectl utility to forward traffic on port 8000 from your localhost to Kubernetes cluster: kubectl port-forward deployments/rest-api 8000:8000
  2. TIM API is then available from your localhost on hostname localhost on port 8000
    1. You can access the API from your localhost on URL http://localhost:8000/api/v5
    2. You can visit the Swagger OpenAPI documentation on URL http://localhost:8000/api/v5/swagger-ui.html
  3. When you are done using TIM, you should stop port forwarding using Ctrl+C keyboard shortcut in your terminal

Public access via ingress

If you deployed ingress controller to your cluster, you should be able to commnicate with TIM API via your cluster’s public hostname or IP.

  1. Find out hostname or IP address assigned to your cluster

    1. If you installed Nginx ingress controller, you can get your IP address with command kubectl get service ingress-nginx-controller -n ingress-nginx
    2. You should see a list similar to this
    NAME                                 TYPE           CLUSTER-IP    EXTERNAL-IP   PORT(S)                      AGE
    ingress-nginx-controller LoadBalancer 10.0.59.123 1.2.3.4 80:31467/TCP,443:30724/TCP 2h
  2. Public IP/host is displayed in EXTERNAL-IP column

  3. TIM API is then available on this IP/host on port 443 (https)

    1. You can access the API on URL http://1.2.3.4/api/v5
    2. You can visit the Swagger OpenAPI documentation on URL http://1.2.3.4/api/v5/swagger-ui.html