Sign inSign up

reportportal/migrations-complex

By reportportal

Updated 8 months ago

Image
0

817

reportportal/migrations-complex repository overview

ReportPortal Migrations Complex

A service for migrating ReportPortal data between storage systems and upgrading database schemas. Supports three migration types that can run independently or together in a single execution.

What It Does

CapabilityDescription
Upgrade to 23.3+Migrate OAuth access tokens to API keys (required for ReportPortal 23.3+)
Consolidate storageMerge multiple buckets (e.g. prj-1, prj-2, rp-bucket) into one (MinIO or S3)
MinIO → S3Migrate data from MinIO to Amazon S3

Benefits: All migrations can run in one job, execute sequentially, and preserve data integrity.

Downtime

MigrationDowntime
API KeysYes — ReportPortal must be stopped
Multi-bucket → single bucketYes — ReportPortal must be stopped
MinIO to S3No — ReportPortal can keep running; switch to S3 and run migration in background

Quick Start (Helm)

helm repo add reportportal-migrations https://reportportal.io/migrations-complex/
helm repo update
helm show values reportportal-migrations/migrations-complex > my-values.yaml
# Edit my-values.yaml: enable migrations and set DB/storage credentials
helm install my-migration reportportal-migrations/migrations-complex -f my-values.yaml

Monitor:

kubectl logs -l app.kubernetes.io/name=migrations-complex --follow

Clean up:

helm uninstall my-migration

Migration Types (Summary)

  1. Database API Keys — Converts OAuth tokens to API keys. Needs DB credentials. Requires downtime.
  2. Multi-bucket to single bucket — Finds buckets by prefix, merges into one, updates DB. Needs DB + storage (MinIO or S3). Requires downtime.
  3. MinIO to S3 — Copies data from one MinIO bucket to one S3 bucket. Needs MinIO + S3 credentials. No downtime.

Prerequisites

  • Kubernetes cluster with Helm 3.x
  • Access to ReportPortal database (PostgreSQL)
  • Storage credentials (MinIO and/or S3) with read/write
  • Database backup recommended

Configuration (Values)

Enable migrations and set endpoints/credentials in your values file:

migrations:
  database:
    apiKeys:
      enabled: false   # true for API keys migration
  storage:
    multiBucketToSingleBucket:
      enabled: false
      destinationType: minio   # or "s3"
      buckets:
        projectPrefix: "prj-"
        pluginsBucket: "rp-bucket"
        singleBucketName: "rp-storage"
    minioToS3:
      enabled: false
      buckets:
        sourceBucket: "rp-storage"
        destinationBucket: "rp-s3-storage"

database:
  endpoint: <postgres-host>
  port: 5432
  user: rpuser
  dbName: reportportal
  password: ""   # or use secretName

storage:
  minio:
    endpoint: <minio-host>
    port: 9000
    ssl: false
    accessKey: ""
    secretKey: ""
  s3:
    region: "eu-central-1"
    endpoint: s3.eu-central-1.amazonaws.com
    ssl: true
    accessKey: ""
    secretKey: ""

Use Kubernetes secrets for credentials when possible (secretName / passwordKeyName, etc.).

Troubleshooting

  • Job won’t start: Check resources, image pull secrets, node selectors/tolerations.
  • DB errors: Verify endpoint, credentials, and network from pod (e.g. kubectl run with postgres image and psql).
  • Storage errors: Check bucket names, credentials, and IAM/permissions (S3) or endpoint/SSL (MinIO).
  • Slow migration: Increase CPU/memory limits and check network/storage performance.

Documentation

License

See repository LICENSE file.

Tag summary

Content type

Image

Digest

sha256:ddca10b1f

Size

375.6 MB

Last updated

8 months ago

docker pull reportportal/migrations-complex