Skip to content

Instantly share code, notes, and snippets.

@max-cx
Last active August 3, 2023 08:48
Show Gist options
  • Save max-cx/06ce2c7aca11110ffdd19c8330edeb72 to your computer and use it in GitHub Desktop.
Save max-cx/06ce2c7aca11110ffdd19c8330edeb72 to your computer and use it in GitHub Desktop.
Installing Tempo by using the OpenShift web console

Installing {TempoName} by using the OpenShift web console

Installing {TempoName} in the OpenShift web console involves installing the Tempo Operator, creating a Secret and namespace, and using the Operator to deploy a TempoStack instance in the namespace for use with the Secret.

Prerequisites
Procedure
  1. Install the Tempo Operator:

    1. In the Administrator view of the OpenShift web console, go to OperatorsOperatorHub and search for Tempo Operator.

    2. Select Tempo Operator that is OpenShift Operator for TempoInstallInstallView Operator.

      Important

      This installs the Operator with the default presets:

      • Update channelstable

      • Installation modeAll namespaces on the cluster

      • Installed Namespaceopenshift-operators

      • Update approvalAutomatic

    3. In the Details tab of the installed Operator page, under ClusterServiceVersion details, verify that the installation Status is Succeeded.

  2. Create a Secret for your object storage bucket.

    You can do this in the Administrator view of the OpenShift web console: go to WorkloadsSecretsCreateFrom YAML.

    Table 1. Required Secret parameters
    Storage provider Secret parameters

    Red Hat OpenShift Data Foundation

    name: tempostack-dev-odf # example

    bucket: <bucket_name> # requires an ObjectBucketClaim

    endpoint: https://s3.openshift-storage.svc

    access_key_id: <data_foundation_access_key_id>

    access_key_secret: <data_foundation_access_key_secret>

    MinIO

    See MinIO Operator.

    name: tempostack-dev-minio # example

    bucket: <minio_bucket_name> # MinIO documentation

    endpoint: <minio_bucket_endpoint>

    access_key_id: <minio_access_key_id>

    access_key_secret: <minio_access_key_secret>

    Amazon S3

    name: tempostack-dev-s3 # example

    bucket: <s3_bucket_name> # Amazon S3 documentation

    endpoint: <s3_bucket_endpoint>

    access_key_id: <s3_access_key_id>

    access_key_secret: <s3_access_key_secret>

    Microsoft Azure Blob Storage

    name: tempostack-dev-azure # example

    container: <azure_blob_storage_container_name> # Microsoft Azure documentation

    account_name: <azure_blob_storage_account_name>

    account_key: <azure_blob_storage_account_key>

    Google Cloud Storage on Google Cloud Platform (GCP)

    name: tempostack-dev-gcs # example

    bucketname: <google_cloud_storage_bucket_name> # requires a bucket created in a GCP project

    key.json: <path/to/key.json> # requires a service account in the bucket’s GCP project for GCP authentication

    Example 1. Secret for Amazon S3 and MinIO storage
    apiVersion: v1
    kind: Secret
    metadata:
      name: minio-test
    stringData:
      endpoint: http://minio.minio.svc:9000
      bucket: tempo
      access_key_id: tempo
      access_key_secret: supersecret
    type: Opaque
  3. Create a namespace for the TempoStack instance that you will create in the next step.

    You can do this in the Administrator view of the OpenShift web console: go to HomeProjectsCreate Project.

  4. Create a TempoStack instance.

    Note
    You can create multiple TempoStack instances in separate namespaces on the same cluster.

    You can create a TempoStack instance as follows:

    1. Go to OperatorsInstalled Operators.

      Tip

      You can use the Project: dropdown list to select the namespace that you created for the TempoStack instance in the previous step.

    2. Select TempoStackCreate TempoStackYAML view.

    3. In the YAML view, customize the TempoStack custom resource (CR):

      apiVersion: tempo.grafana.com/v1alpha1
      kind: TempoStack
      metadata:
        name: sample
        namespace: <namespace_from_previous_step>
      spec:
        storageSize: 1Gi
        storage:
            secret:
                name: <secret-name> (1)
                type: <secret-provider> (2)
        template:
          queryFrontend:
            jaegerQuery:
              enabled: true
              ingress:
                route:
                  termination: edge
                type: route
      1. The value of name in the metadata of the Secret.

      2. The accepted values are azure for Azure Blob Storage, gcs for Google Cloud Storage, and s3 for Amazon S3 or MinIO or Red Hat OpenShift Data Foundation.

        Example 2. TempoStack CR for AWS S3 and MinIO storage
        apiVersion: tempo.grafana.com/v1alpha1
        kind: TempoStack
        metadata:
          name: simplest
          namespace: tempostacknamespace
        spec:
          storage:
            secret:
              name: minio-test
              type: s3
          storageSize: 1Gi
          resources:
            total:
              limits:
                memory: 2Gi
                cpu: 2000m
          template:
            queryFrontend:
              jaegerQuery:
                enabled: true
                ingress:
                  route:
                    termination: edge
                  type: route

        The stack deployed in this example is configured to receive Jaeger Thrift over HTTP and OpenTelemetry Protocol (OTLP), which permits visualizing the data with the Jaeger UI.

    4. Select Create.

WIP
  1. Verify that pods are created on the namespace.

  2. Wait until the stack stabilizes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment