Device Cache Warmup
The Device Cache Warmup microservice preloads devices from a set of zones into the Redis database. It runs once as a sidecar after first deploying the Redis microservice. Subsequent runs are not required.
This microservice is part of the Event microservice pipeline. See Understanding Microservice Pipelines in Unified Assurance Concepts for conceptual information about microservice pipelines.
Device Cache Warmup Prerequisites
Before deploying the microservice, confirm that the following prerequisites are met:
-
A microservice cluster is set up. See Microservice Cluster Setup.
-
The Redis microservice is installed. See Redis.
Deploying Device Cache Warmup
To deploy the microservice, run the following commands:
su - assure1
export NAMESPACE=<namespace>
export WEBFQDN=<WebFQDN>
a1helm install <microservice-release-name> assure1/device-cache-warmup -n $NAMESPACE --set global.imageRegistry=$WEBFQDN
In the commands:
-
<namespace> is the namespace where you are deploying the microservice. The default namespace is a1-zone1-pri, but you can change the zone number and, when deploying to a redundant cluster, change pri to sec.
-
<WebFQDN> is the fully-qualified domain name of the primary presentation server for the cluster.
-
<microservice-release-name> is the name to use for the microservice instance. Oracle recommends using the microservice name (device-cache-warmup) unless you are deploying multiple instances of the microservice to the same cluster.
You can also use the Unified Assurance UI to deploy microservices. See Deploying a Microservice by Using the UI for more information.
Changing Device Cache Warmup Configuration Parameters
When running the install command, you can optionally change default configuration parameter values by including them in the command with additional --set arguments. You can add as many additional --set arguments as you need.
For example:
-
Set a parameter described in Default Device Cache Warmup Configuration by adding --set configData.<parameter_name>=<parameter_value>. For example, --set configData.LOG_LEVEL=DEBUG.
-
Load all zones by adding --set-string configData.ZONES=""
-
Load only zone 2 by adding --set-string configData.ZONES="2"
-
Load zones 1-4 by adding --set-string configData.ZONES="1\,2\,3\,4"
Default Device Cache Warmup Configuration
The following table describes the default configuration parameters found in the Helm chart under configData for the microservice.
Name | Default Value | Possible Values | Notes |
---|---|---|---|
LOG_LEVEL | INFO | FATAL, ERROR, WARN, INFO, DEBUG | Logging level used by application. |
STREAM_INPUT | mysql:///Devices | Text, 255 characters | MySQL connection URI. |
STREAM_OUTPUT | redis://redis-master.a1-zone1-pri.svc.cluster.local:6379 | Text, 255 characters | Redis server hostname and port. |
CACHE_TTL | "21600" | Number | The TTL in seconds set on each record in the cache. |
BATCH_SIZE | "20000" | Number | The amount of records to read at once during the warmup. Higher batch sizes will utilize more resources but lower the total processing time. |
ZONES | "1" | Text, 255 characters | A comma separated list of zones. All zones are preloaded if an empty string is set. |