From e98cf0bacfe1aa98f952bf69f811d73a8d397ac8 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 31 Oct 2021 18:19:47 -0700 Subject: [PATCH] Updated Harbor with SeaweedFS (markdown) --- Harbor-with-SeaweedFS.md | 49 ++++------------------------------------ 1 file changed, 4 insertions(+), 45 deletions(-) diff --git a/Harbor-with-SeaweedFS.md b/Harbor-with-SeaweedFS.md index 3ea2178..62ce198 100644 --- a/Harbor-with-SeaweedFS.md +++ b/Harbor-with-SeaweedFS.md @@ -1,48 +1,7 @@ Harbor https://github.com/goharbor/harbor is to store docker images. -We noticed the Harbor S3 storage backend is not robust. The following is a known issue: +There are two ways to use SeaweedFS as a storage backend for Harbor: +1. Use Harbor S3 storage backend with SeaweedFS S3. +2. Use Harbor file storage backend with SeaweedFS FUSE mount. -* Image Push Fails with "500 Internal Server Error" on S3 Storage -https://docs.openshift.com/container-platform/3.10/install_config/registry/registry_known_issues.html#known-issue-s3-image-push-fails - -The better way to get around this is to simply use `weed mount`. Nothing special. Here is the Harbor config.yml -``` -version: 0.1 -log: - fields: - service: registry -storage: - cache: - blobdescriptor: inmemory - filesystem: - rootdirectory: /data -http: - addr: :5000 - headers: - X-Content-Type-Options: [nosniff] -health: - storagedriver: - enabled: true - interval: 10s - threshold: 3 - -``` - -Suppose you mount the Seaweed to `` -``` -weed mount -dir= -``` - -Start Harbor -``` -docker run -p 5000:5000 --restart=always -v ./config.yml:/etc/docker/registry/config.yml -v /data:/data registry:2 -``` - - -Now you can use the harbor running in your `:5000`. - -``` -$ docker pull nginx:1.13.5-alpine -$ docker tag nginx:1.13.5-alpine :5000/nginx:1.13.5-alpine -$ docker push :5000/nginx:1.13.5-alpine -``` +For better performance, use S3 API is recommended. This is because FUSE mount currently needs to save the file to a local folder, before uploading the file to SeaweedFS cluster.