Skip to main content
tip

Raptor installation is not required for training purposes.

You need to install Raptor Core only when deploying to production (or staging).

Prerequisites

  1. Kubernetes cluster

    (You can use Kind to install Raptor locally)

  2. Redis server (> 2.8.9)

tip

You can also use a managed Redis solution such as AWS ElasticCache or GCP Memorystore, or via the K8s Redis Operator

Choosing your Historical Data Provider

Historical Data Provider is the driver that Raptor uses to save historical snapshots of your production data. This is very useful for training purposes, but technically is not required for production.

At the moment, Raptor supports the following historical data providers:

ProviderData retrieval supportDescriptionRequired configuration
snowflakeYesHistorical data is stored in a Snowflake databaseA valid snowflake URI shold be provided via the snowflake-uri configuration
Example: username:password@account-id/RAPTOR_SYSTEM/HISTORICAL?warehouse=COMPUTE_WH
s3-parquetNoHistorical data is partitioned and stored in S3 in Parquet formatThe following configurations should be set:
aws-access-key, aws-region, aws-secret-key,s3-basedir, s3-bucket
warning

It's highly recommended to use Kubernetes Secrets to store your credentials, and then to configure Raptor's Deployment with Environment Variables.

Installing Raptor

There are a few ways to install Raptor. The easiest way is to use the OperatorHub installer.

OperatorHub Installation

apiVersion: v1
kind: Secret
metadata:
name: raptor-providers-creds
namespace: raptor-system
data:
REDIS: "my-redis.default.svc.cluster.local"
AWS_ACCESS_KEY: ""
AWS_SECRET_KEY: ""
SNOWFLAKE_URI: <user>:<pass>@<account-id>/<db>/<schema>?warehouse=<warehouse-name>
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: raptor
spec:
package: raptor
channel: alpha
config:
env:
- name: HISTORICAL_WRITER_PROVIDER
value: "snowflake"
envFrom:
- secretRef:
name: raptor-providers-credentials

Configuration Parameters

The configuration parameters below can be used to customize Raptor deployments:

Core Configuration

flagenvironment variabletypedescription
--accessor-grpc-addressACCESSOR_GRPC_ADDRESSstringThe address the grpc accessor binds to. (default ":60000")
--accessor-http-addressACCESSOR_HTTP_ADDRESSstringThe address the http accessor binds to. (default ":60001")
--accessor-http-prefixACCESSOR_HTTP_PREFIXstringThe the http accessor path prefix. (default "/api")
--accessor-serviceACCESSOR_SERVICEstringThe the accessor service URL (that points the this application).
--aws-access-keyAWS_ACCESS_KEYstringAWS Access Key - for historical data
--aws-regionAWS_REGIONstringAWS Region - for historical data
--aws-secret-keyAWS_SECRET_KEYstringAWS Secret Key - for historical data
--disable-cert-managementDISABLE_CERT_MANAGEMENTboolSetting this flag will disable the automatically certificate binding to the K8s API webhooks.
--health-probe-bind-addressHEALTH_PROBE_BIND_ADDRESSstringThe address the probe endpoint binds to. (default ":8081")
--kubeconfigKUBECONFIGstringPaths to a kubeconfig. Only required if out-of-cluster.
--leader-electLEADER_ELECTboolEnable leader election for controller manager.Enabling this will ensure there is only one active controller manager.
--metrics-bind-addressMETRICS_BIND_ADDRESSstringThe address the metric endpoint binds to. (default ":8080")
--metrics-secure-servingMETRICS_SECURE_SERVINGboolEnable serving the metrics over HTTPS. (default true)
--no-webhooksNO_WEBHOOKSboolSetting this flag will disable the K8s API webhook.
--notifier-providerNOTIFIER_PROVIDERstringThe notifier provider. (default "redis")
--productionPRODUCTIONboolSet as production (default true)
--redis (alias: --r)REDISstringArrayRedis servers
--redis-dbREDIS_DBintRedis DB
--redis-masterREDIS_MASTERstringRedis Sentinel master name
--redis-passREDIS_PASSstringRedis password
--redis-sentinel-passREDIS_SENTINEL_PASSstringRedis Sentinel password
--redis-sentinel-userREDIS_SENTINEL_USERstringRedis Sentinel username
--redis-tlsREDIS_TLSboolEnable TLS for Redis
--redis-userREDIS_USERstringRedis username
--s3-basedirS3_BASEDIRstringS3 Base directory for storing features - for historical data (default "raptor/features/")
--s3-bucketS3_BUCKETstringS3 Bucket - for historical data
--snowflake-uriSNOWFLAKE_URIstringSnowflake DSN URI
--state-providerSTATE_PROVIDERstringThe state provider. (default "redis")
--usage-reportingUSAGE_REPORTINGboolAllow us to anonymously report usage statistics to improve Raptor 🪄 (default true)
--usage-reporting-uidUSAGE_REPORTING_UIDstringUsage reporting Unique Identifier. You can use this to set a unique identifier for your cluster.
--zap-develZAP_DEVELboolDevelopment Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error)
--zap-encoderZAP_ENCODERencoderZap log encoding (one of 'json' or 'console')
--zap-log-levelZAP_LOG_LEVELlevelZap Level to configure the verbosity of logging. Can be one of
'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity
--zap-stacktrace-levelZAP_STACKTRACE_LEVELlevelZap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic').
--zap-time-encodingZAP_TIME_ENCODINGtimeEncodingZap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'.

Historian Configuration

flagenvironment variabletypedescription
--aws-access-keyAWS_ACCESS_KEYstringAWS Access Key - for historical data
--aws-regionAWS_REGIONstringAWS Region - for historical data
--aws-secret-keyAWS_SECRET_KEYstringAWS Secret Key - for historical data
--health-probe-bind-addressHEALTH_PROBE_BIND_ADDRESSstringThe address the probe endpoint binds to. (default ":8081")
--historical-writer-providerHISTORICAL_WRITER_PROVIDERstringThe historical writer provider. (default "s3-parquet")
--kubeconfigKUBECONFIGstringPaths to a kubeconfig. Only required if out-of-cluster.
--leader-electLEADER_ELECTboolEnable leader election for controller manager.Enabling this will ensure there is only one active controller manager.
--metrics-bind-addressMETRICS_BIND_ADDRESSstringThe address the metric endpoint binds to. (default ":8080")
--metrics-secure-servingMETRICS_SECURE_SERVINGboolEnable serving the metrics over HTTPS. (default true)
--notifier-providerNOTIFIER_PROVIDERstringThe notifier provider. (default "redis")
--productionPRODUCTIONboolSet as production (default true)
--redis (alias -r)REDISstringArrayRedis servers
--redis-dbREDIS_DBintRedis DB
--redis-masterREDIS_MASTERstringRedis Sentinel master name
--redis-passREDIS_PASSstringRedis password
--redis-sentinel-passREDIS_SENTINEL_PASSstringRedis Sentinel password
--redis-sentinel-userREDIS_SENTINEL_USERstringRedis Sentinel username
--redis-tlsREDIS_TLSboolEnable TLS for Redis
--redis-userREDIS_USERstringRedis username
--s3-basedirS3_BASEDIRstringS3 Base directory for storing features - for historical data (default "raptor/features/")
--s3-bucketS3_BUCKETstringS3 Bucket - for historical data
--snowflake-uriSNOWFLAKE_URIstringSnowflake DSN URI
--state-providerSTATE_PROVIDERstringThe state provider. (default "redis")
--zap-develZAP_DEVELboolDevelopment Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error)
--zap-encoderZAP_ENCODERencoderZap log encoding (one of 'json' or 'console')
--zap-log-levelZAP_LOG_LEVELlevelZap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity
--zap-stacktrace-levelZAP_STACKTRACE_LEVELlevelZap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic').
--zap-time-encodingZAP_TIME_ENCODINGtimeEncodingZap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'.