Skip to content

Commit

Permalink
Merge pull request #8301 from kiendang/helm-cleanup-docker
Browse files Browse the repository at this point in the history
Clean up HELM docker
  • Loading branch information
koenvanderveen authored Dec 5, 2023
2 parents d307f68 + dfa0ea8 commit faa18bd
Show file tree
Hide file tree
Showing 15 changed files with 1,970 additions and 408 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/cd-syft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,24 @@ jobs:
digest="${{ steps.grid-frontend-build.outputs.digest }}"
touch "/tmp/digests/grid-frontend/${digest#sha256:}"
- name: Upload digest for grid-backend and grid-frontend
- name: Build and push `grid-seaweedfs` image to DockerHub
id: grid-seaweedfs-build
uses: docker/build-push-action@v5
with:
context: ./packages/grid/seaweedfs
file: ./packages/grid/seaweedfs/seaweedfs.dockerfile
platforms: ${{ steps.release_metadata.outputs.release_platform }}
outputs: type=image,name=openmined/grid-seaweedfs,push-by-digest=true,name-canonical=true,push=true
cache-from: type=registry,ref=openmined/grid-seaweedfs:cache-${{ steps.release_metadata.outputs.short_release_platform }}
cache-to: type=registry,ref=openmined/grid-seaweedfs:cache-${{ steps.release_metadata.outputs.short_release_platform}},mode=max

- name: Export digest for grid-seaweedfs
run: |
mkdir -p /tmp/digests/grid-seaweedfs
digest="${{ steps.grid-seaweedfs-build.outputs.digest }}"
touch "/tmp/digests/grid-seaweedfs/${digest#sha256:}"
- name: Upload digest for grid-backend, grid-frontend and grid-seaweedfs
uses: actions/upload-artifact@v3
with:
name: digests-${{ steps.release_metadata.outputs.grid_version }}
Expand Down Expand Up @@ -221,6 +238,14 @@ jobs:
-t openmined/grid-frontend:${{ needs.build-and-push-docker-images.outputs.release_tag }} \
$(printf 'openmined/grid-frontend@sha256:%s ' *)
- name: Create manifest list and push for grid-seaweedfs
working-directory: /tmp/digests/grid-seaweedfs
run: |
docker buildx imagetools create \
-t openmined/grid-seaweedfs:${{ needs.build-and-push-docker-images.outputs.grid_version }} \
-t openmined/grid-seaweedfs:${{ needs.build-and-push-docker-images.outputs.release_tag }} \
$(printf 'openmined/grid-seaweedfs@sha256:%s ' *)
deploy-syft:
needs: [merge-docker-images]
if: always() && needs.merge-docker-images.result == 'success'
Expand Down
1,330 changes: 980 additions & 350 deletions notebooks/helm/docker-helm-syft.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/grid/default.env
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TRAEFIK_VERSION=v2.10
REDIS_VERSION=6.2
RABBITMQ_VERSION=3
SEAWEEDFS_VERSION="3.59"
DOCKER_IMAGE_SEAWEEDFS=chrislusf/seaweedfs
DOCKER_IMAGE_SEAWEEDFS=openmined/grid-seaweedfs
VERSION=latest
VERSION_HASH=unknown
STACK_API_KEY=""
Expand Down
18 changes: 14 additions & 4 deletions packages/grid/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ images:
tags:
- dev-latest
- "${VERSION}"
seaweedfs:
image: "${CONTAINER_REGISTRY}/${DOCKER_IMAGE_SEAWEEDFS}"
buildKit: {}
buildArgs:
SEAWEEDFS_VERSION: ${SEAWEEDFS_VERSION}
dockerfile: ./seaweedfs/seaweedfs.dockerfile
context: ./seaweedfs
tags:
- dev-latest
- "${VERSION}"

# This is a list of `deployments` that DevSpace can create for this project
deployments:
Expand Down Expand Up @@ -211,10 +221,7 @@ deployments:
repo: https://charts.devspace.sh
values:
containers:
- image: "${DOCKER_IMAGE_SEAWEEDFS}:${SEAWEEDFS_VERSION}"
command:
- sh
- /etc/seaweedfs/start.sh
- image: "${CONTAINER_REGISTRY}/${DOCKER_IMAGE_SEAWEEDFS}:${VERSION}"
env:
- name: S3_VOLUME_SIZE_MB
value: "${S3_VOLUME_SIZE_MB}"
Expand All @@ -224,6 +231,8 @@ deployments:
value: "${S3_ROOT_PWD}"
- name: S3_PORT
value: "${S3_PORT}"
- name: SEAWEED_MOUNT_PORT
value: "${SEAWEED_MOUNT_PORT}"
volumeMounts:
- containerPath: /etc/seaweedfs/filer.toml
volume:
Expand Down Expand Up @@ -251,6 +260,7 @@ deployments:
ports:
- port: "8888" # filer
- port: "8333" # S3
- port: "4001" # mount azure

frontend:
helm:
Expand Down
6 changes: 6 additions & 0 deletions packages/grid/docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ services:
target: "backend"
profiles:
- backend

seaweedfs:
build:
context: ${RELATIVE_PATH}./seaweedfs
dockerfile: seaweedfs.dockerfile
args:
- SEAWEEDFS_VERSION=${SEAWEEDFS_VERSION}
profiles:
- blob-storage

worker:
build:
context: ${RELATIVE_PATH}../
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/docker-compose.pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
# image: rabbitmq:${RABBITMQ_VERSION?Variable not Set}${RABBITMQ_MANAGEMENT:-}

seaweedfs:
image: "${DOCKER_IMAGE_SEAWEEDFS?Variable not set}:${SEAWEEDFS_VERSION}"
image: "${DOCKER_IMAGE_SEAWEEDFS?Variable not set}:${VERSION-latest}"
profiles:
- blob-storage

Expand Down
6 changes: 2 additions & 4 deletions packages/grid/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,15 @@ services:
- blob-storage
depends_on:
- proxy
env_file:
- .env
image: "${DOCKER_IMAGE_SEAWEEDFS?Variable not set}:${VERSION-latest}"
environment:
- S3_VOLUME_SIZE_MB=${S3_VOLUME_SIZE_MB:-1024}
- S3_ROOT_USER=${S3_ROOT_USER:-admin}
- S3_ROOT_PWD=${S3_ROOT_PWD:-admin}
- S3_PORT=${S3_PORT:-8888}
- SEAWEED_MOUNT_PORT=${SEAWEED_MOUNT_PORT:-4001}
- STACK_API_KEY=$STACK_API_KEY
entrypoint: ["/bin/sh"]
command:
- "/start.sh"
volumes:
- seaweedfs-data:/data
- ./seaweedfs/filer.toml:/etc/seaweedfs/filer.toml
Expand Down
14 changes: 9 additions & 5 deletions packages/grid/helm/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
- name: NODE_NAME
value: default_node_name
- name: NODE_SIDE_TYPE
value: ${NODE_SIDE_TYPE}
value: high
- name: STACK_API_KEY
value: changeme
- name: PORT
Expand Down Expand Up @@ -533,6 +533,10 @@ spec:
port: 8333
protocol: TCP
targetPort: 8333
- name: port-2
port: 4001
protocol: TCP
targetPort: 4001
selector:
app.kubernetes.io/component: seaweedfs
app.kubernetes.io/name: devspace-app
Expand Down Expand Up @@ -569,9 +573,7 @@ spec:
affinity: null
containers:
- args: null
command:
- sh
- /etc/seaweedfs/start.sh
command: null
env:
- name: S3_VOLUME_SIZE_MB
value: '1024'
Expand All @@ -581,8 +583,10 @@ spec:
value: admin
- name: S3_PORT
value: '8333'
- name: SEAWEED_MOUNT_PORT
value: '4001'
envFrom: null
image: chrislusf/seaweedfs:3.59
image: docker.io/openmined/grid-seaweedfs:0.8.3-beta.3
lifecycle: null
livenessProbe: null
name: container-0
Expand Down
Loading

0 comments on commit faa18bd

Please sign in to comment.