Traffic API Proxy | On-Premise | 2GIS Documentation
On-Premise

Installing Traffic API Proxy

Important note:

All passwords and keys in this section are given for illustration purposes.

During a real installation, it is recommended to use more complex and reliable passwords.

  1. Consider getting familiar with:

  2. Make sure the necessary preparation steps are completed:

    1. Preparation for installation
    2. Fetching installation artifacts
    3. Installing License service
    4. Installing API Keys service
  3. Collect the necessary information that was set or retrieved on previous steps:

    Object Example value How to get value
    Docker Registry mirror endpoint docker.storage.example.local:5000 See Fetching installation artifacts
    Kubernetes secret for accessing Docker Registry onpremise-registry-creds See Fetching installation artifacts
  4. Make sure that the resource requirements specified in the Helm chart are met. For more information on how to do this, refer to the System requirements document.

Note

Contents of the Helm chart described in this chapter are relevant for the latest On-Premise version (see Release notes). To find parameters for earlier versions, open values.yaml on GitHub and enter the required version number (for example, 1.18.0) in the tag switcher on the left.

  1. Create a Helm configuration file. See here for more details on the available settings.

    The example is prefilled with the necessary data collected on previous steps.

    values-traffic-proxy.yaml
    dgctlDockerRegistry: docker.storage.example.local:5000
    replicaCount: 1
    
    proxy.host: https://traffic-jams.2gis.com
    
    resources:
        requests:
            cpu: 10m
            memory: 32Mi
        limits:
            cpu: 500m
            memory: 256Mi
    
    ingress:
        enabled: true
        className: nginx
        hosts:
            - host: traffic-proxy.example.com
              paths:
                  - path: /
                    pathType: Prefix
        tls: []
        #- hosts:
        #  - traffic-proxy-api.example.com
        #  secretName: secret.tls
    

    Where:

    • dgctlDockerRegistry: your Docker Registry endpoint where On-Premise services' images reside.

    • replicaCount: number of the NGINX service replicas.

    • proxy.host: FQDN of a public Traffic Update server. For the list of available servers see the Architecture section of the document.

    • resources: computational resources settings for the service. To find out recommended resource values, see Computational resources.

    • ingress: configuration of the Ingress resource. Adapt it to your Ingress installation. Note that the path for the host should point to the root: /.

  2. Deploy the service with Helm using created values-traffic-proxy.yaml configuration file:

    helm upgrade --install --atomic --wait-for-jobs --values ./values-traffic-proxy.yaml traffic-proxy 2gis-on-premise/traffic-proxy
    

To test the operability of the service, open the ingress.hosts.host address from a browser. The service should return a list of files containing traffic data.

Alternatively, test the deployment of an On-Premise service that uses the Traffic Proxy service.

What's next?