From 1a050f7ed33e427632e6aa9f6b96e4fe79fe8e0a Mon Sep 17 00:00:00 2001 From: ruhan Date: Thu, 11 Sep 2025 11:04:34 +0800 Subject: [PATCH] Update readme --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ed428ee..19eee03 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,54 @@ -# Indy sidecar +# Indy Sidecar +A Quarkus-based sidecar service that optimizes build performance by pre-downloading and caching dependency artifacts from previous builds. Deployed within builder pods, it proxies download/upload requests to remote repositories while serving cached artifacts locally to accelerate builds. -## build image +## Architecture -**JVM image** +- **Proxy Service**: Routes HTTP requests (GET/POST/PUT/DELETE/HEAD) to configured remote services +- **Archive Retrieval**: Downloads artifact zip files from the external Archive Service for each build config +- **Tracking Service**: External service that records artifact information sent by the sidecar -```shell -./mvnw clean package -Dquarkus.container-image.build=true -``` +## Workflow + +1. **Archive Generation**: After a build completes, users trigger artifact zip file generation via REST API to the Archive Service +2. **Zip Download**: The sidecar downloads the latest artifact zip file for the current build from the Archive Service +3. **Local Caching**: Downloaded artifacts are cached locally and served directly to current build +4. **Proxy Fallback**: For artifacts not in cache (new dependencies), requests are proxied to remote repositories +5. **Records Collection**: All download/upload operations are sent to the external Tracking Service for recording and observability -use `src/main/resources/application.properties` to control image build plugin, by default, indy-sidecar use docker as builder. +## Configuration ---- +Configure via `application.yaml`: -**Native executable** +```yaml +sidecar: + archive-api: http://localhost:8081/api/archive + local-repository: ${user.home}/preSeedRepo + +proxy: + read-timeout: 30m + retry: + count: 3 + interval: 3000 + services: + - host: your-repo-host + port: 80 + path-pattern: /api/.+ +``` +## Build & Deploy -```shell +**JVM Image:** +```bash +./mvnw clean package -Dquarkus.container-image.build=true +``` + +**Native Executable:** +```bash ./mvnw package -Pnative -Dquarkus.native.container-build=true docker build -f src/main/docker/Dockerfile.native -t indy-sidecar:native . ``` - -Our build: `quay.io/kaine/indy-sidecar` tag:`latest` `native-latest` +**Pre-built Images:** +- `quay.io/kaine/indy-sidecar:latest` (JVM) +- `quay.io/kaine/indy-sidecar:native-latest` (Native)