Skip to content

Dapr Configurations

This content is not available in your language yet.

🟢 Management

Opstella has designed with Dapr to cooperate between its microservices, add configurations of Dapr within opstella-system is required to Opstella to function properly.

  1. Connect to 🟢 Management Kubernetes Cluster ; i.e w/ Kubeconfig File

    Terminal window
    export KUBECONFIG="$HOME/opstella-installation/kubeconfigs/management_cluster.yaml"
  2. Prepare 🟢 Management Kubernetes Cluster Information

    Ensure K8S_INTERNAL_DOMAIN is defined as per the Shell Variables guide.

  1. Install Pub/Sub Broker

    Use the Redis that you previously installed Host and Credentials.

    export REDIS_HOST="redis-sentinel-opstella.opstella-system.svc:26379"
    export REDIS_PASSWORD="CHANGEME"
    Terminal window
    kubectl apply --namespace opstella-system -f - <<EOF
    apiVersion: dapr.io/v1alpha1
    kind: Component
    spec:
    type: pubsub.redis
    version: v1
    metadata:
    - name: redisHost
    value: ${REDIS_HOST}
    - name: redisSentinelMasterName
    value: redis-opstella
    - name: redisType
    value: sentinel
    - name: enableTLS
    value: 'false'
    - name: redisPassword
    value: ${REDIS_PASSWORD}
    metadata:
    name: pubsub
    EOF
  2. Install Statestore Component

    Use the Redis that you previously installed Host and Credentials.

    Terminal window
    kubectl apply --namespace opstella-system -f - <<EOF
    apiVersion: dapr.io/v1alpha1
    kind: Component
    spec:
    type: state.redis
    version: v1
    metadata:
    - name: redisHost
    value: ${REDIS_HOST}
    - name: redisSentinelMasterName
    value: redis-opstella
    - name: redisType
    value: sentinel
    - name: keyPrefix
    value: none
    - name: redisPassword
    value: ${REDIS_PASSWORD}
    metadata:
    name: statestore
    EOF
  1. Install Resiliency

    Terminal window
    kubectl apply --namespace opstella-system -f - <<EOF
    apiVersion: dapr.io/v1alpha1
    kind: Resiliency
    spec:
    policies:
    retries:
    DaprBuiltInServiceRetries:
    policy: constant
    duration: 2s
    maxRetries: 5
    DefaultServiceInvocationRetries:
    policy: constant
    duration: 1s
    maxRetries: 3
    pubsubRetry:
    policy: constant
    duration: 30s
    maxRetries: 10
    targets:
    components:
    pubsub:
    inbound:
    retry: pubsubRetry
    metadata:
    name: resiliency
    EOF
  2. Install Kubernetes Name Resolution Configuration

    Terminal window
    kubectl apply --namespace opstella-system -f - <<EOF
    apiVersion: dapr.io/v1alpha1
    kind: Configuration
    spec:
    nameResolution:
    version: v1
    component: "kubernetes"
    configuration:
    clusterDomain: ${K8S_INTERNAL_DOMAIN}
    metadata:
    name: config
    EOF

Finished?

Use the below navigation to proceed