Skip to main content

Installation

Prerequisites

  • Locally-hosted insfrastructure
    • PostgreSQL database
      • Version 13 or higher
      • Provisioned hardware is complying with TIM v5 hardware requirements
      • Admin access to this database (with privilege to create new databases and users)
      • uuid-ossp extension enabled
    • Kubernetes cluster
  • Administrator's PC
    • psql utility installed and configurred with access to PostgreSQL database
    • kubectl utility installed and configured with context accessing the Kubernetes cluster
    • (Optional) azure cli installed and configured
    • TIM v5 installation files present on this machine

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).

PostgreSQL database setup

  1. Connect to PostgreSQL as admin user
  2. Run SQL statements from file 01_tim-platform-db_create-user.sql
  3. Logout from the database
  4. Connect to the timplatformdb database in PostgreSQL as admin user
  5. Run SQL statements from file 02_tim-platform-db_create-extension.sql
  6. Logout from the database
  7. Connect to the timplatformdb database in PostgreSQL as timplatformuser user
  8. Run SQL statements from file 03_tim-platform-db_init.sql
  9. Logout from the database

Kubernetes cluster setup

  1. Edit file tim_v5_azure_kube_deployment.yaml
    1. Replace placeholder <postgres-host> with PostgreSQL hostname or IP address
    2. Replace placeholder <rest-host> with public DNS record of TIM v5 REST API if available, otherwise replace placeholder <rest-host> with localhost
    3. Save changes to the file
  2. (Optional) Install Nginx ingress controller to the Kubernetes cluster (Create an ingress controller in Azure Kubernetes Service)
  3. Apply changes to the Kubernetes cluster by running command kubectl apply -f tim_v5_azure_kube_deployment.yaml
  4. Wait 5 minutes for the deployment to complete
  5. Check status of the deployment by running command kubectl get pods -n tim-platform

Accessing TIM v5 REST API

TIM v5 REST API is accessible via port 8000 on rest-api Kubernetes service in namespace tim-platform. If Nginx ingress controller is installed and public IP/host provisioning is enabled, you can find public IP/host of the TIM v5 REST API by running command kubectl get service ingress-nginx-controller -n ingress-nginx. Public IP/host is displayed in EXTERNAL-IP column. The REST API is then available on this IP/host on port 443 (https).