-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: switch from minikube to kind+tilt
- Loading branch information
1 parent
9c33adb
commit 666dc27
Showing
32 changed files
with
633 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Check Python code | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**/Tiltfile' | ||
- '**.py' | ||
- '.github/workflows/check-py.yml' | ||
|
||
jobs: | ||
check-fmt: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Check format | ||
uses: psf/black@stable | ||
options: '--line-length 100 --include Tiltfile --check' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,62 +2,77 @@ | |
|
||
## common: ## | ||
|
||
FROM docker.io/library/golang@sha256:1a5326b07cbab12f4fd7800425f2cf25ff2bd62c404ef41b56cb99669a710a83 as build-common | ||
FROM docker.io/library/golang:1.23.1-bullseye AS build-dependencies | ||
#FROM docker.io/library/golang@sha256:1a5326b07cbab12f4fd7800425f2cf25ff2bd62c404ef41b56cb99669a710a83 AS build-dependencies | ||
# 1.23.1-bookworm | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && apt-get install -y protobuf-compiler libgpgme-dev && rm -rf /var/lib/apt/lists/* | ||
RUN go install google.golang.org/protobuf/cmd/[email protected] && go install google.golang.org/grpc/cmd/[email protected] && go install github.com/ethereum/go-ethereum/cmd/[email protected] | ||
|
||
FROM build-dependencies AS build-common | ||
|
||
WORKDIR /app | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
RUN --mount=type=cache,target=/root/.cache/go-build go mod download && go mod verify | ||
|
||
COPY pkg ./pkg | ||
|
||
FROM docker.io/debian@sha256:a629e796d77a7b2ff82186ed15d01a493801c020eed5ce6adaa2704356f15a1c as run-common | ||
#FROM docker.io/debian@sha256:a629e796d77a7b2ff82186ed15d01a493801c020eed5ce6adaa2704356f15a1c AS run-common | ||
FROM docker.io/debian:bullseye-slim AS run-common | ||
# bookworm-20240904-slim matching golang:1.23.1-bookworm | ||
|
||
RUN apt-get update && apt-get install -y libgpgme11 curl jq && rm -rf /var/lib/apt/lists/* | ||
|
||
## p2p-helper: ## | ||
|
||
FROM build-common as build-p2p-helper | ||
FROM build-common AS build-p2p-helper | ||
|
||
COPY cmd/ipfs-p2p-helper ./cmd/ipfs-p2p-helper | ||
RUN --mount=type=cache,target=/root/.cache/go-build go build -v -o /usr/local/bin/ipfs-p2p-helper ./cmd/ipfs-p2p-helper | ||
|
||
FROM run-common as p2p-helper | ||
FROM run-common AS p2p-helper | ||
|
||
COPY --from=build-p2p-helper /usr/local/bin/ipfs-p2p-helper /usr/local/bin/ipfs-p2p-helper | ||
|
||
ENTRYPOINT ["ipfs-p2p-helper"] | ||
|
||
FROM run-common AS p2p-helper-copy-local | ||
|
||
COPY ./bin/ipfs-p2p-helper /usr/local/bin/ipfs-p2p-helper | ||
|
||
ENTRYPOINT ["ipfs-p2p-helper"] | ||
|
||
## server: ## | ||
|
||
FROM build-common as build-server | ||
FROM build-common AS build-server | ||
|
||
COPY cmd/tpodserver ./cmd/tpodserver | ||
RUN --mount=type=cache,target=/root/.cache/go-build go build -v -o /usr/local/bin/tpodserver ./cmd/tpodserver | ||
# RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=bind,source=.,target=/app go build -v -o /usr/local/bin/tpodserver ./cmd/tpodserver | ||
|
||
FROM run-common as server | ||
FROM run-common AS server | ||
|
||
COPY --from=build-server /usr/local/bin/tpodserver /usr/local/bin/tpodserver | ||
|
||
ENTRYPOINT ["tpodserver"] | ||
|
||
FROM run-common AS server-copy-local | ||
|
||
COPY ./bin/tpodserver /usr/local/bin/tpodserver | ||
|
||
ENTRYPOINT ["tpodserver"] | ||
|
||
## autoscaler: ## | ||
|
||
FROM build-common as build-autoscaler | ||
FROM build-common AS build-autoscaler | ||
|
||
COPY autoscaler ./autoscaler | ||
RUN --mount=type=cache,target=/root/.cache/go-build go build -v -o /usr/local/bin/autoscaler ./autoscaler | ||
|
||
FROM run-common as autoscaler | ||
FROM run-common AS autoscaler | ||
|
||
COPY --from=build-autoscaler /usr/local/bin/autoscaler /usr/local/bin/autoscaler | ||
|
||
ENTRYPOINT ["autoscaler"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# -*- mode: Python -*- | ||
# SPDX-License-Identifier: GPL-3.0 | ||
|
||
load( | ||
"./deploy/Tiltfile", "apocryph_resource", "apocryph_build_with_builder", "deploy_apocryph_stack" | ||
) | ||
|
||
config.define_string_list("include") | ||
cfg = config.parse() | ||
|
||
apocryph_build_with_builder() | ||
deploy_apocryph_stack() | ||
|
||
for f in cfg["include"]: | ||
load_dynamic(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.