Skip to main content
Skip table of contents

DKP Insights BYOS (Bring Your Own Storage) to Insights

Ceph can be used as the CSI Provisioner in some environments. For environments where Ceph was installed before installing DKP, you can reuse your existing Ceph installation to satisfy the storage requirements of DKP Applications.

This guide assumes you have a Ceph cluster that is not managed by DKP.

Refer to Rook Ceph Configuration for information on how to configure the Ceph instance installed by DKP for use by DKP platform applications.

This guide also assumes that you have already disabled DKP Managed Ceph. For more information, refer to BYOS (Bring Your Own Storage) to DKP Clusters | Disable-DKP-Managed-Ceph

Requirements

  • You only need to disable the Object Bucket claim if you are using an S3 Provider that does not use an object bucket claim.

  • If you disable the Object Bucket Claim, then a S3 bucket needs to be created.

  • If you create the bucket, it must support the following:

    • At least 1GB of storage

    • TTL is set to a value of “n days” per S3 spec example: 7 Days. Insights will set TTL to this value on initialization and it fails if it can not be set.

    • It is our assumption that the storage is hosted in the same cluster with fast networking access.

    • The bandwidth usage is ~100Mb over the course of a day

    • Latency and speed should be <10 ms and >1Gbs

Create a Secret to support BYOS for Insights

You need to create a secret with the AWS S3 credentials for the S3 bucket created for Insights. Create this in the same namespace where you installed DKP Insights

CODE
# Set to the workspace namespace insights is installed in
export WORKSPACE_NAMESPACE=kommander

# Replace your AWS S3 credentials
kubectl create secret dkp-insights -n ${WORKSPACE_NAMESPACE} \
  --from-literal='AWS_ACCESS_KEY_ID=<Insert AWS Key Here>' \
  --from-literal='AWS_SECRET_ACCESS_KEY=<Insert AWS Secret Access Key Here>' \

Helm Values for Insights Storage

Below are the Helm Values for Insights storage along with a description of each component.

CODE
backend:
  s3:
    port: 80
    region: "us-east-1"
    endpoint: "rook-ceph-rgw-dkp-object-store"
    bucketSize: "1G"
    storageClassName: dkp-object-store
    enableObjectBucketClaim: true
cleanup:
  insightsTTL: "168h"

Name

Default Value

Description

port

80

Port of S3 storage provider.

region

us-east-1

AWS Region for S3 storage provider. May not be needed for all providers. (Set to dummy value.)

endpoint

rook-ceph-rgw-dkp-object-store

Endpoint URL for S3 storage provider. Exclude HTTP://

bucketSize

1G

Bucket size of bucket created in with Object Bucket Claim.

storageClassName

dkp-object-store

Storage class to use for the Object Bucket Claim.

enableObjectBucketClaim

true

To bring your own storage other than Ceph, set to false. This will require you to create your own bucket manually outside of the insights install.

insightsTTL

168h

The time in hours to keep insights data in database and S3. For S3 this is rounded up to the nearest day.

Object bucket claims (OBC) are a custom resource that declares object storage.
Ceph is one provider that uses custom resource definitions (CRD).
If you are using Ceph or another provider that supports object bucket claims, then you want to leave it on. This creates an OBC as part of installation. If you want to use S3 directly or create the storage container manually, then you should turn it off.

UI Install

For, Insights installed with special storage, add the following in the UI:

UI Install

The values configured here may need to change.

CODE
backend:
  s3:
    port: 80
    region: "us-east-1"
    endpoint: "rook-ceph-rgw-dkp-object-store"
    bucketSize: "1G"
    storageClassName: dkp-object-store
    enableObjectBucketClaim: true
cleanup:
  insightsTTL: "168h"

CLI Install

Follow the steps below to configure storage for Insights via the CLI:

CLI Install
  1. Create the ConfigMap with the name provided in the step above, with the custom configuration:

CODE
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
  namespace: ${WORKSPACE_NAMESPACE}
  name: dkp-insights-overrides
data:
  values.yaml: |
  # helm values here  
    backend:
      s3:
        port: 80
        region: "us-east-1"
        endpoint: "rook-ceph-rgw-dkp-object-store"
        bucketSize: "1G"
        storageClassName: dkp-object-store
        enableObjectBucketClaim: true
    cleanup:
      insightsTTL: "168h"
EOF

Kommander waits for the ConfigMap to be present before deploying the AppDeployment to the managed or attached clusters.

2. Provide the name of a ConfigMap in the AppDeployment, which provides a custom configuration on top of the default configuration:

CODE
cat <<EOF | kubectl apply -f -
apiVersion: apps.kommander.d2iq.io/v1alpha2
kind: AppDeployment
metadata:
  name: dkp-insights
  namespace: ${WORKSPACE_NAMESPACE}
spec:
  appRef:
    kind: App
    name: dkp-insights-0.4.1
  configOverrides:
    name: dkp-insights-overrides
EOF

Air-gapped Environment Install

Follow the steps below to configure storage for Insights in air-gapped environments:

Air-gapped installation via CLI

See Insights doc here for more information.

In kommander.yaml, enable DKP Insights and DKP Catalog Applications by setting the following:

CODE
apiVersion: config.kommander.mesosphere.io/v1alpha1
kind: Installation
apps:
  ...
  dkp-insights-management:
    enabled: true
    # helm values here
    backend:
      s3:
        port: 80
        region: "us-east-1"
        endpoint: "rook-ceph-rgw-dkp-object-store"
        bucketSize: "1G"
        storageClassName: dkp-object-store
        enableObjectBucketClaim: true
    cleanup:
      insightsTTL: "168h"
...
catalog:
  repositories:
    - name: insights-catalog-applications
      labels:
        kommander.d2iq.io/workspace-default-catalog-repository: "true"
        kommander.d2iq.io/gitapps-gitrepository-type: "dkp"
      path: ./application-repositories/dkp-insights-v2.5.0.tar.gz
    - name: dkp-catalog-applications
      labels:
        kommander.d2iq.io/project-default-catalog-repository: "true"
        kommander.d2iq.io/workspace-default-catalog-repository: "true"
        kommander.d2iq.io/gitapps-gitrepository-type: "dkp"
      path: ./application-repositories/dkp-catalog-applications-v2.5.0.tar.gz

Manually Create Object Bucket Claim (Optional)

If you need to manually create an OBC, such as when you do not want the Helm Chart to automatically generate one, follow these steps:

Creating an ObjectBucketClaim

  1. If needed, an ObjectBucketClaim can be created manually in the same namespace as dkp-insights.
    This results in the creation of ObjectBucket , which creates a Secret that is consumed by dkp-insights.

    1. For dkp-insights:

      CODE
      cat <<EOF | kubectl apply -f -
      apiVersion: objectbucket.io/v1alpha1
      kind: ObjectBucketClaim
      metadata:
        name: dkp-insights
        namespace: ${NAMESPACE}
      spec:
        additionalConfig:
          maxSize: 1G
        bucketName: dkp-insights
        storageClassName: dkp-object-store
      EOF
  • Bucket name cannot be changed.

  • The storage class and the maxSize can be configured, as needed.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.