Thread
#help
    m

    Mike Logaciuk

    1 month ago
    Hi! I've built sample docker-compose for future development with lakeFS and minIO as S3 imitation. However I can't get it able to work, I've done configuration as it is said in docs, minIO instance is seen and works, I am even able to connect it as a S3 in Pycharm, however lakeFS after minute of trying to start, returns timeout in Docker. It doesn't return any log or what so ever:
    version: '3.9'
    # Settings and configurations that are common for all containers
    x-minio-common:
    _&_minio-common
    image: 'minio/minio:latest'
    command: server --console-address ":9001" <http://lakefs-minio>{1...4}/data{1...2}
    expose:
    - "9000"
    - "9001"
    environment:
    MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
    MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
    networks:
    - lakefs-network
    healthcheck:
    test:
    [
    "CMD",
    "curl",
    "-f",
    "<http://localhost:9000/minio/health/live>"
    ]
    interval: 30s
    timeout: 20s
    retries: 3
    # starts 4 docker containers running minio server instances.
    # using nginx reverse proxy, load balancing, you can access
    # it through port 9000.
    services:
    lakefs-minio1:
    <<: _*_minio-common
    hostname: lakefs-minio1
    container_name: lakefs-minio1
    networks:
    - lakefs-network
    volumes:
    - data1-1:/data1
    - data1-2:/data2
    lakefs-minio2:
    <<: _*_minio-common
    hostname: lakefs-minio2
    container_name: lakefs-minio2
    networks:
    - lakefs-network
    volumes:
    - data2-1:/data1
    - data2-2:/data2
    lakefs-minio3:
    <<: _*_minio-common
    hostname: lakefs-minio3
    container_name: lakefs-minio3
    networks:
    - lakefs-network
    volumes:
    - data3-1:/data1
    - data3-2:/data2
    lakefs-minio4:
    <<: _*_minio-common
    hostname: lakefs-minio4
    container_name: lakefs-minio4
    networks:
    - lakefs-network
    volumes:
    - data4-1:/data1
    - data4-2:/data2
    lakefs-minio-setup:
    image: minio/mc
    container_name: lakefs-minio-setup
    environment:
    - MC_HOST_lakefs=http://${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}@lakefs-minio1:9000
    depends_on:
    - lakefs-minio1
    - lakefs-minio2
    - lakefs-minio3
    - lakefs-minio4
    command: [ "mb", "lakefs/example" ]
    networks:
    - lakefs-network
    lakefs-nginx:
    image: nginx:1.19.2-alpine
    hostname: lakefs-nginx
    container_name: lakefs-nginx
    networks:
    - lakefs-network
    volumes:
    - ./nginx.conf:/etc/nginx/nginx.conf:ro
    ports:
    - "9000:9000"
    - "9001:9001"
    depends_on:
    - lakefs-minio1
    - lakefs-minio2
    - lakefs-minio3
    - lakefs-minio4
    lakefs-postgres:
    image: "postgres:11"
    hostname: lakefs-postgres
    container_name: lakefs-postgres
    environment:
    POSTGRES_USER: ${POSTGRES_USER}
    POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    POSTGRES_DB: ${POSTGRES_DB}
    networks:
    - lakefs-network
    lakefs-setup:
    image: treeverse/lakefs:latest
    container_name: lakefs-setup
    depends_on:
    - lakefs-POSTGRES_DB
    - lakefs-minio-setup
    environment:
    - LAKEFS_AUTH_ENCRYPT_SECRET_KEY=${LAKEFS_AUTH_ENCRYPT_SECRET_KEY}
    - LAKEFS_DATABASE_CONNECTION_STRING=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@lakefs-postgres/postgres?sslmode=disable
    - LAKECTL_CREDENTIALS_ACCESS_KEY_ID=${LAKECTL_CREDENTIALS_ACCESS_KEY_ID}
    - LAKECTL_CREDENTIALS_SECRET_ACCESS_KEY=${LAKECTL_CREDENTIALS_SECRET_ACCESS_KEY}
    - LAKECTL_SERVER_ENDPOINT_URL=<http://lakefs:8000>
    - LAKEFS_BLOCKSTORE_TYPE=s3
    entrypoint: ["/app/wait-for", "postgres:5432", "--", "sh", "-c",
    "lakefs setup --user-name docker --access-key-id  ${LAKECTL_CREDENTIALS_ACCESS_KEY_ID} --secret-access-key ${LAKECTL_CREDENTIALS_SECRET_ACCESS_KEY} && lakectl repo create <lakefs://example>
    <s3://example>"
    ]
    networks:
    - lakefs-network
    lakefs:
    image: "treeverse/lakefs:latest"
    container_name: lakefs
    ports:
    - "8001:8000"
    depends_on:
    - "lakefs-postgres"
    environment:
    - LAKEFS_AUTH_ENCRYPT_SECRET_KEY=${LAKEFS_AUTH_ENCRYPT_SECRET_KEY}
    - LAKEFS_DATABASE_CONNECTION_STRING=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@lakefs-postgres/postgres?sslmode=disable
    - LAKEFS_BLOCKSTORE_TYPE=s3
    - LAKEFS_BLOCKSTORE_LOCAL_PATH=${LAKEFS_BLOCKSTORE_LOCAL_PATH:-/home/lakefs}
    - LAKEFS_GATEWAYS_S3_DOMAIN_NAME=${LAKEFS_GATEWAYS_S3_DOMAIN_NAME:-<http://s3.local.lakefs.io:8000|s3.local.lakefs.io:8000>}
    - LAKEFS_BLOCKSTORE_S3_CREDENTIALS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
    - LAKEFS_BLOCKSTORE_S3_CREDENTIALS_ACCESS_SECRET_KEY=${AWS_SECRET_ACCESS_KEY}
    - LAKEFS_LOGGING_LEVEL=DEBUG
    - LAKEFS_STATS_ENABLED
    - LAKEFS_BLOCKSTORE_S3_ENDPOINT=<http://localhost:9000>
    - LAKEFS_BLOCKSTORE_S3_FORCE_PATH_STYLE=true
    - LAKEFS_COMMITTED_LOCAL_CACHE_DIR=${LAKEFS_COMMITTED_LOCAL_CACHE_DIR:-/home/lakefs/.local_tier}
    entrypoint:
    [
    "/app/wait-for",
    "postgres:5432",
    "--",
    "/app/lakefs",
    "run"
    ]
    volumes:
    data1-1:
    name: lakefs-minio1-storage-1
    data1-2:
    name: lakefs-minio1-storage-2
    data2-1:
    name: lakefs-minio2-storage-1
    data2-2:
    name: lakefs-minio2-storage-2
    data3-1:
    name: lakefs-minio3-storage-1
    data3-2:
    name: lakefs-minio3-storage-2
    data4-1:
    name: lakefs-minio4-storage-1
    data4-2:
    name: lakefs-minio4-storage-2
    networks:
    lakefs-network:
    driver: bridge
    name: lakefs-network
    Jonathan Rosenberg

    Jonathan Rosenberg

    1 month ago
    Hi Mike, let me check it
    m

    Mike Logaciuk

    1 month ago
    Would be grateful ❤️
    Jonathan Rosenberg

    Jonathan Rosenberg

    1 month ago
    entrypoint: ["/app/wait-for", "postgres:5432", "--", "sh", "-c",
    You need to wait for
    lakefs-postgres
    and not
    postgres
    This explains why there are no logs…
    Same thing for the
    lakefs
    container… Also, in
    lakefs-setup
    it looks like you’re dependent on
    lakefs-POSTGRES_DB
    which is not something you defined if I get it right.
    m

    Mike Logaciuk

    1 month ago
    Ohh, that's unfortunate. That happens when you are working too much. Thanks for pointing out errors. Now the stack works like it should.
    Jonathan Rosenberg

    Jonathan Rosenberg

    1 month ago
    Great! A break is necessary from time to time 😄 Please let us know if you need any further help