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 insidetim-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
- Allowed network communication from Kubernetes cluster (all pods inside
- 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
- Create PostgreSQL instance matching the requirements described in this document
- Make sure
UUID-OSSP
extension is installed and enabled - Connect to the PostgreSQL instance as admin user (for example with psql utility)
- Execute SQL file
database_resources/01_tim-platform-db_create-user.sql
as PostgreSQL admin user - Logout from the database instance (for example by typing
\q
in psql utility) - Connect to the
timplatformdb
database in your PostgreSQL instance as admin user (for example with psql utility) - Execute SQL file
database_resources/02_tim-platform-db_create-extension.sql
as PostgreSQL admin user insidetimplatformdb
database - Logout from the database instance (for example by typing
\q
in psql utility) - Connect to the
timplatformdb
database in your PostgreSQL instance astimplatformuser
user (for example with psql utility) - Execute SQL file
database_resources/03_tim-platform-db_init.sql
astimplatformuser
insidetimplatformdb
database - Logout from the database instance (for example by typing
\q
in psql utility)
Kubernetes cluster setup
- Create Kubernetes cluster matching the requirements described in this document
- Ensure that networking requirements described in this document are met
- (Optional) Create ingress controller
- 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
- We also recommend using ingress controller for any production use case
- It is recommended to use Nginx ingress controller
- More information about the installation of Nginx ingress controller can be found here: Create an unmanaged ingress controller - Azure Kubernetes Service
- Edit file
kubernetes_resources/tim_v5_kube_deployment.yaml
- Go to line 18 in this file
- Replace placeholder
<postgres-host>
with PostgreSQL instance hostname or IP address - Save changes to the file
- Apply Kubernetes manifest to your Kubernetes cluster
- We recommend to use
kubectl
utility - Please make sure your
kubectl
utility is configured correctly and set to communicate with the cluster created in step 1 - Execute command
kubectl apply -f kubernetes_resources/tim_v5_kube_deployment.yaml
- We recommend to use
- Wait approximately 10 minutes for TIM to start
- Check the list of Kubernetes pods inside
tim-platform
with commandkubectl get pods -n tim-platform
- 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)
- Use
kubectl
utility to forward traffic on port 8000 from your localhost to Kubernetes cluster:kubectl port-forward deployments/rest-api 8000:8000
- TIM API is then available from your localhost on hostname
localhost
on port 8000- You can access the API from your localhost on URL http://localhost:8000/api/v5
- You can visit the Swagger OpenAPI documentation on URL http://localhost:8000/api/v5/swagger-ui.html
- 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.
Find out hostname or IP address assigned to your cluster
- If you installed Nginx ingress controller, you can get your IP address with command
kubectl get service ingress-nginx-controller -n ingress-nginx
- 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- If you installed Nginx ingress controller, you can get your IP address with command
Public IP/host is displayed in EXTERNAL-IP column
TIM API is then available on this IP/host on port 443 (https)
- You can access the API on URL http://1.2.3.4/api/v5
- You can visit the Swagger OpenAPI documentation on URL http://1.2.3.4/api/v5/swagger-ui.html