Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add FRR #18

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .drone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ steps:
DOCKER_CLI_EXPERIMENTAL: enabled
commands:
- make
- make docker_all
when:
event:
include:
Expand Down Expand Up @@ -74,6 +75,7 @@ steps:
commands:
- docker login ghcr.io --username "$${GHCR_USERNAME}" --password "$${GHCR_PASSWORD}"
- make PUSH=true
- make docker_all PUSH=true
when:
event:
exclude:
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ BUILD := docker buildx build
PLATFORM ?= linux/amd64,linux/arm64
PROGRESS ?= auto
PUSH ?= false
COMMON_ARGS := --file=Pkgfile
FILE ?=Pkgfile
CONTEXT ?=.
COMMON_ARGS := --file=$(FILE)
COMMON_ARGS += --progress=$(PROGRESS)
COMMON_ARGS += --platform=$(PLATFORM)
COMMON_ARGS += --build-arg=http_proxy=$(http_proxy)
Expand All @@ -20,10 +22,13 @@ empty :=
space = $(empty) $(empty)

TARGETS = amd-ucode bnx2-bnx2x gvisor hello-world-service intel-ucode
DOCKER_TARGETS = frr iscsid
NONFREE_TARGETS =

all: $(TARGETS) ## Builds all known pkgs.

docker_all: $(DOCKER_TARGETS)

nonfree: $(NONFREE_TARGETS) ## Builds all known non-free pkgs.

.PHONY: help
Expand All @@ -38,7 +43,7 @@ target-%: ## Builds the specified target defined in the Dockerfile. The build re
@$(BUILD) \
--target=$* \
$(COMMON_ARGS) \
$(TARGET_ARGS) .
$(TARGET_ARGS) $(CONTEXT)

docker-%: ## Builds the specified target defined in the Dockerfile using the docker output type. The build result will be loaded into docker.
@$(MAKE) target-$* TARGET_ARGS="$(TARGET_ARGS)"
Expand All @@ -47,6 +52,10 @@ docker-%: ## Builds the specified target defined in the Dockerfile using the doc
$(TARGETS) $(NONFREE_TARGETS):
@$(MAKE) docker-$@ TARGET_ARGS="--tag=$(REGISTRY)/$(USERNAME)/$@:$(TAG) --push=$(PUSH)"

.PHONY: $(DOCKER_TARGETS)
$(DOCKER_TARGETS):
@$(MAKE) docker-$@ TARGET_ARGS="--tag=$(REGISTRY)/$(USERNAME)/$@:$(TAG) --push=$(PUSH)" FILE=$@/Dockerfile CONTEXT=$@

.PHONY: deps.png
deps.png:
bldr graph | dot -Tpng > deps.png
Expand Down
4 changes: 4 additions & 0 deletions frr/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM scratch AS frr
COPY --from=frrouting/frr:latest / /usr/local/lib/containers/frr/
COPY frr.yaml /rootfs/usr/local/etc/containers/frr.yaml
COPY manifest.yaml /manifest.yaml
6 changes: 6 additions & 0 deletions frr/frr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: frr
container:
entrypoint: /bin/frr
args:
- -f
restart: always
10 changes: 10 additions & 0 deletions frr/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: frr
version: v2.1.4
author: Andrew Rynhard
description: |
This system extension provides `frr`.
compatibility:
talos:
version: "> v0.15.0-alpha.2"
11 changes: 11 additions & 0 deletions iscsid/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# syntax=docker/dockerfile:1.3

FROM scratch AS iscsid
COPY --from=ghcr.io/talos-systems/kmod:v0.9.0 / /rootfs
COPY --from=ghcr.io/talos-systems/libressl:v0.9.0 / /rootfs
COPY --from=ghcr.io/talos-systems/musl:v0.9.0 / /rootfs
COPY --from=ghcr.io/talos-systems/open-isns:v0.9.0 / /rootfs
COPY --from=ghcr.io/talos-systems/util-linux:v0.9.0 / /rootfs
COPY --from=ghcr.io/talos-systems/open-iscsi:v0.9.0 / /rootfs
COPY iscsid.yaml /rootfs/usr/local/etc/containers/iscsid.yaml
COPY manifest.yaml /manifest.yaml
6 changes: 6 additions & 0 deletions iscsid/iscsid.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: iscsid
container:
entrypoint: /sbin/iscsid
args:
- -f
restart: always
10 changes: 10 additions & 0 deletions iscsid/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: iscsid
version: v2.1.4
author: Andrew Rynhard
description: |
This system extension provides `iscsid`.
compatibility:
talos:
version: "> v0.15.0-alpha.2"