From 1034c31ad0e8b00e8ecb6690162bfa7183c0ff2f Mon Sep 17 00:00:00 2001 From: Andrew Rynhard Date: Thu, 17 Feb 2022 13:37:49 -0800 Subject: [PATCH 1/2] feat: add iscsid Adds iscsid as a system extension. Signed-off-by: Andrew Rynhard --- .drone.yaml | 2 ++ Makefile | 13 +++++++++++-- iscsid/Dockerfile | 11 +++++++++++ iscsid/iscsid.yaml | 6 ++++++ iscsid/manifest.yaml | 10 ++++++++++ 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 iscsid/Dockerfile create mode 100644 iscsid/iscsid.yaml create mode 100644 iscsid/manifest.yaml diff --git a/.drone.yaml b/.drone.yaml index 47527f84..d3d8f8b6 100644 --- a/.drone.yaml +++ b/.drone.yaml @@ -32,6 +32,7 @@ steps: DOCKER_CLI_EXPERIMENTAL: enabled commands: - make + - make docker_all when: event: include: @@ -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: diff --git a/Makefile b/Makefile index 82cd3be4..084f8950 100644 --- a/Makefile +++ b/Makefile @@ -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) @@ -20,10 +22,13 @@ empty := space = $(empty) $(empty) TARGETS = amd-ucode bnx2-bnx2x gvisor hello-world-service intel-ucode +DOCKER_TARGETS = iscsid NONFREE_TARGETS = all: $(TARGETS) ## Builds all known pkgs. +docker_all: $(DOCKER_TARGETS) + nonfree: $(NONFREE_TARGETS) ## Builds all known non-free pkgs. .PHONY: help @@ -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)" @@ -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 diff --git a/iscsid/Dockerfile b/iscsid/Dockerfile new file mode 100644 index 00000000..7d3d5127 --- /dev/null +++ b/iscsid/Dockerfile @@ -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 \ No newline at end of file diff --git a/iscsid/iscsid.yaml b/iscsid/iscsid.yaml new file mode 100644 index 00000000..a3a659e5 --- /dev/null +++ b/iscsid/iscsid.yaml @@ -0,0 +1,6 @@ +name: iscsid +container: + entrypoint: /sbin/iscsid + args: + - -f +restart: always diff --git a/iscsid/manifest.yaml b/iscsid/manifest.yaml new file mode 100644 index 00000000..2c7470cb --- /dev/null +++ b/iscsid/manifest.yaml @@ -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" \ No newline at end of file From cd6f4edb8cbdad038ff880ac27cec93addd12084 Mon Sep 17 00:00:00 2001 From: Andrew Rynhard Date: Fri, 18 Feb 2022 09:53:09 -0800 Subject: [PATCH 2/2] feat: add FRR Adds FRR as a service system extension. Signed-off-by: Andrew Rynhard --- Makefile | 2 +- frr/Dockerfile | 4 ++++ frr/frr.yaml | 6 ++++++ frr/manifest.yaml | 10 ++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 frr/Dockerfile create mode 100644 frr/frr.yaml create mode 100644 frr/manifest.yaml diff --git a/Makefile b/Makefile index 084f8950..07edf749 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ empty := space = $(empty) $(empty) TARGETS = amd-ucode bnx2-bnx2x gvisor hello-world-service intel-ucode -DOCKER_TARGETS = iscsid +DOCKER_TARGETS = frr iscsid NONFREE_TARGETS = all: $(TARGETS) ## Builds all known pkgs. diff --git a/frr/Dockerfile b/frr/Dockerfile new file mode 100644 index 00000000..bd3236ad --- /dev/null +++ b/frr/Dockerfile @@ -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 diff --git a/frr/frr.yaml b/frr/frr.yaml new file mode 100644 index 00000000..665134b9 --- /dev/null +++ b/frr/frr.yaml @@ -0,0 +1,6 @@ +name: frr +container: + entrypoint: /bin/frr + args: + - -f +restart: always diff --git a/frr/manifest.yaml b/frr/manifest.yaml new file mode 100644 index 00000000..a4c11396 --- /dev/null +++ b/frr/manifest.yaml @@ -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" \ No newline at end of file