Revision d497bb6a90dd3c9625c3c8e8f73278019e21983d authored by Roman Donchenko on 29 September 2023, 07:03:49 UTC, committed by GitHub on 29 September 2023, 07:03:49 UTC
This functionality has accumulated significant technical debt:

* Most importantly, it does not use the current authorization system,
  rendering it accessible only for admin users.

* It doesn't follow the regular API conventions and is not visible in
the API
  schema. This necessitates a special code in the SDK.

* The initialization code in `base.py` is not safe when multiple
instances of
the server starts at the same time (each instance may end up generating
its
  own key).

The team has decided that the cost of fixing these issues outweighs the benefit of the functionality, so remove it.
1 parent 4a487c3
Raw File
docker-compose.minio.yml
services:
  minio:
    image: quay.io/minio/minio:RELEASE.2022-09-17T00-09-45Z
    hostname: minio
    restart: always
    command: server /data --console-address ":9001"
    expose:
      - "9000"
      - "9001"
    ports:
      - 9000:9000
      - 9001:9001
    environment:
      MINIO_ROOT_USER: "minio_access_key"
      MINIO_ROOT_PASSWORD: "minio_secret_key"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
    networks:
      cvat:
        aliases:
          - minio
  mc:
    image: minio/mc:RELEASE.2022-09-16T09-16-47Z
    depends_on:
      - minio
    environment:
      MC_PATH: "/usr/bin/mc"
      MINIO_HOST: "http://minio:9000"
      MINIO_ACCESS_KEY: "minio_access_key"
      MINIO_SECRET_KEY: "minio_secret_key"
      MINIO_ALIAS: "local_minio"
      PRIVATE_BUCKET: "private"
      PUBLIC_BUCKET: "public"
      TEST_BUCKET: "test"
      IMPORT_EXPORT_BUCKET: "importexportbucket"
    volumes:
      - ./tests/cypress/e2e/actions_tasks/assets/case_65_manifest/:/storage
    networks:
      - cvat
    entrypoint: >
      /bin/sh -c "
      $${MC_PATH} config host add --quiet --api s3v4 $${MINIO_ALIAS} $${MINIO_HOST} $${MINIO_ACCESS_KEY} $${MINIO_SECRET_KEY};
      $${MC_PATH} mb $${MINIO_ALIAS}/$${PRIVATE_BUCKET} $${MINIO_ALIAS}/$${PUBLIC_BUCKET} $${MINIO_ALIAS}/$${TEST_BUCKET} $${MINIO_ALIAS}/$${IMPORT_EXPORT_BUCKET};
      for BUCKET in $${MINIO_ALIAS}/$${PRIVATE_BUCKET} $${MINIO_ALIAS}/$${PUBLIC_BUCKET} $${MINIO_ALIAS}/$${TEST_BUCKET} $${MINIO_ALIAS}/$${IMPORT_EXPORT_BUCKET};
      do
          if [ $${BUCKET} == $${MINIO_ALIAS}/$${PRIVATE_BUCKET} ]
          then
            FULL_PATH=$${BUCKET}/'sub'
          else
            FULL_PATH=$${BUCKET}
          fi
          $${MC_PATH} cp --recursive /storage/ $${FULL_PATH};
          for i in 1 2;
          do
              $${MC_PATH} cp /storage/manifest.jsonl $${FULL_PATH}/manifest_$${i}.jsonl;
          done;
      done;
      $${MC_PATH} policy set public $${MINIO_ALIAS}/$${PUBLIC_BUCKET};
      exit 0;
      "
back to top