Overview
RPI Realtime uses geolocation to find where a visitor is, so that Realtime decisions can use location, distance, geofence, and weather rules. RPI includes a built-in Azure Maps provider. You can also plug in your own geolocation provider, or a plugin that finds a visitor's location from their IP address.
Geolocation is off by default. When you turn it on, RPI Realtime needs an API key from your provider, stored as a secret.
Prerequisites
|
Value |
Where to find it |
|---|---|
|
Azure Maps API key |
In the Azure portal, open your Azure Maps account and go to Settings > Authentication. Copy the Primary Key. |
|
Custom provider details (optional) |
If you use your own provider plugin, you need the plugin's assembly name, its fully qualified type name, and any settings it expects. |
|
IP lookup plugin details (optional) |
If you look up location from IP addresses, you need the same plugin details for your IP lookup plugin. |
Finish setting up your provider account before you generate your overrides.
Store the API key
When enabled is true, RPI Realtime requires the secret key RealtimeAPI_Geolocation_APIKey. Add your provider's API key under that name, in a Kubernetes secret or your CSI secret store, whichever your deployment uses. Refer to Secrets management for additional information.
Configure geolocation
Adjust these values under realtimeapi to match your environment:
realtimeapi:
geolocation:
enabled: true
provider: Azure
weatherUnits: imperial
coordsCacheTimespanMinutes: 10
|
Setting |
Description |
|---|---|
|
|
Turns geolocation on or off. Defaults to |
|
|
The geolocation provider. Defaults to |
|
|
Units for weather data. Set it to |
|
|
How long, in minutes, RPI Realtime reuses a visitor's coordinates before looking them up again. Defaults to |
|
|
The assembly name of a custom provider plugin. Leave it blank to use Azure Maps. |
|
|
The fully qualified type name of a custom provider plugin. |
|
|
Key/value settings passed to a custom provider plugin. |
If you set provider to a custom value and the plugin can't be loaded, RPI Realtime uses Azure Maps instead and logs an error.
Look up location from IP addresses (optional)
RPI Realtime can find a visitor's location from their IP address. It doesn't include a native IP lookup provider, so you need a plugin for this. The lookup runs only when enableGeoIPLookup is true and both pluginAssembly and pluginType are set.
realtimeapi:
geolocation:
enabled: true
ipLookup:
enableGeoIPLookup: true
coordsCacheTimespanMinutesIPLookup: 30
pluginAssembly: <assembly name>
pluginType: <fully qualified type>
pluginSettings:
- key: apiKey
value: <your key>
|
Setting |
Description |
|---|---|
|
|
Turns IP-based lookup on or off. Defaults to |
|
|
How long, in minutes, RPI Realtime reuses coordinates found by IP lookup before looking them up again. Defaults to |
|
|
The assembly name of the IP lookup plugin. |
|
|
The fully qualified type name of the IP lookup plugin. |
|
|
Key/value settings passed to the IP lookup plugin. |
Generate your overrides
When you have the values above, go to the Helm Assistant Configure tab. Refer to Managing Helm chart updates for more information about adding values to your overrides.yaml. For a complete list of geolocation keys, see the Helm Assistant Reference tab.