vinbigdata-medical / vindr-lab-deployment

Getting started with VinDr Lab. We support Kubernetes and Docker deployments.
MIT License
19 stars 8 forks source link

Minio and elastic search not working #10

Closed FeryET closed 2 years ago

FeryET commented 2 years ago

Hi,

I'm trying to deploy the docker compose using the step by step guide, but the elastic search and the minio services are not accessible in api service.

There are a couple of issues:

  1. The minio subpath does not work behind nginx, I had to expose the ports manually to make it work. This is a bug from minio and has nothing to do with the deployment setup here.
  2. There is insufficient description about how to setup minio. The docker/conf/api/config.production.toml has some configs that need explaining. What exactly are access_key_id, secret_access_key and bucket_name and should we do anything in the Minio console panel after logging in. Should any of the elasticsearch segment be customized?
  3. There's also this log:
    2022/04/29 12:03:45 [INFO] [main.go:76] API is running in [production] mode
    2022/04/29 12:03:45 [INFO] [main.go:97] [http://vinlab-es:9200]
    2022/04/29 12:03:45 [ERROR] [main.main:/opt/app/main.go:134] 404 Not Found ERROR putting template es_template_annotation
    2022/04/29 12:03:45 [ERROR] [main.main:/opt/app/main.go:135] 400 Bad Request ERROR putting template es_template_annotation
    2022/04/29 12:03:45 [INFO] [main.go:145] http://vinlab-minio:9000
    panic: Cannot connect to MinIO

What are these templates, and if I only import the two configurations for keycloak, is that enough for the elastic search templates?

Thanks

iamatsundere commented 2 years ago

I've updated in the release v1.0.2, please check!

FeryET commented 2 years ago

The issue still persists if you are using a different BASE_URI other than localhost:8080. For example vindr.labelling.com.

iamatsundere commented 2 years ago

Unfortunately, we are accessing through host:port connection. If you want to publish or access the LAB service through domain, you can use a proxy by nginx in front of service, here is the config example:

http {
      server {
          listen     80;
          server_name your.domain;
          client_max_body_size 100m;
          proxy_set_header Host $host;
          proxy_request_buffering off;
          proxy_max_temp_file_size 0;

          location / {
            proxy_http_version 1.1;
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Server $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_host;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
            proxy_pass_request_headers on;
            proxy_pass http://1.2.3.4:8080;
          }
        }

    events {
      worker_connections 4096;  ## Default: 1024
    }