Skip to content

Commit c0353a6

Browse files
committed
microshift-bootc: convert to svc
1 parent 2cd20b3 commit c0353a6

File tree

7 files changed

+297
-348
lines changed

7 files changed

+297
-348
lines changed

deploy/microshift-bootc/Containerfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
FROM ghcr.io/microshift-io/microshift:release-4.20-4.20.0-okd-scos.9
22

3+
# Install dependencies for config-svc
4+
RUN dnf install -y epel-release && \
5+
dnf install -y python3 iproute python3-flask python3-pip && \
6+
pip3 install python-pam && \
7+
dnf clean all
8+
9+
# Install config-svc systemd service
10+
COPY deploy/microshift-bootc/config-svc/app.py /usr/local/bin/config-svc
11+
RUN chmod +x /usr/local/bin/config-svc
12+
COPY deploy/microshift-bootc/config-svc/config-svc.service /etc/systemd/system/config-svc.service
13+
RUN systemctl enable config-svc.service
14+
15+
# Install MicroShift manifests
316
RUN mkdir -p /usr/lib/microshift/manifests.d/002-jumpstarter
417
COPY deploy/microshift-bootc/kustomization.yaml /usr/lib/microshift/manifests.d/002-jumpstarter/kustomization.yaml
518
COPY deploy/operator/dist/install.yaml /usr/lib/microshift/manifests.d/002-jumpstarter/install-operator.yaml
6-
COPY deploy/microshift-bootc/config-svc/manifest.yaml /usr/lib/microshift/manifests.d/002-jumpstarter/config-svc.yaml

deploy/microshift-bootc/Makefile

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
.PHONY: help build build-config-svc build-bootc push push-config-svc push-bootc
1+
.PHONY: help build build-bootc push push-bootc
22

33
# Default image tags
4-
CONFIG_SVC_IMG ?= quay.io/jumpstarter-dev/microshift/config-svc:latest
54
BOOTC_IMG ?= quay.io/jumpstarter-dev/microshift/bootc:latest
65

76

@@ -10,11 +9,7 @@ help: ## Display this help
109

1110
##@ Build
1211

13-
build: build-config-svc ## Build config-svc container (default target)
14-
15-
build-config-svc: ## Build the config-svc container image
16-
@echo "Building config-svc container: $(CONFIG_SVC_IMG)"
17-
cd config-svc && podman build -t $(CONFIG_SVC_IMG) -f Containerfile .
12+
build: build-bootc ## Build bootc image (default target)
1813

1914
build-bootc: ## Build the bootc image with MicroShift
2015
@echo "Building bootc image: $(BOOTC_IMG): buinding as root to be on the container storage from root"
@@ -39,27 +34,28 @@ output/qcow2/disk.qcow2: ## Build a bootable QCOW2 image from the bootc image
3934
$(BOOTC_IMG)
4035
@echo "QCOW2 image built successfully in ./output/"
4136

42-
##@ Push
37+
build-image: build-bootc ## Build the the bootc based qcow2 image
38+
@echo "Building image: output/qcow2/disk.qcow2"
39+
sudo rm output/qcow2/disk.qcow2
40+
make output/qcow2/disk.qcow2
41+
@echo "Image built successfully in ./output/"
4342

44-
push: push-config-svc ## Push config-svc container to registry
43+
##@ Push
4544

46-
push-config-svc: ## Push the config-svc container image to registry
47-
@echo "Pushing config-svc container: $(CONFIG_SVC_IMG)"
48-
podman push $(CONFIG_SVC_IMG)
45+
push: push-bootc ## Push bootc image to registry
4946

5047
push-bootc: ## Push the bootc image to registry
5148
@echo "Pushing bootc image: $(BOOTC_IMG)"
5249
podman push $(BOOTC_IMG)
5350

5451
##@ Development
5552

56-
build-all: build-config-svc build-bootc ## Build both config-svc and bootc images
53+
build-all: build-bootc ## Build bootc image
5754

58-
push-all: push-config-svc push-bootc ## Push both images to registry
55+
push-all: push-bootc ## Push bootc image to registry
5956

6057
clean: ## Clean up local images and build artifacts
6158
@echo "Removing local images..."
62-
-podman rmi $(CONFIG_SVC_IMG)
6359
-podman rmi $(BOOTC_IMG)
6460
@echo "Removing QCOW2 output..."
6561
-sudo rm -rf output/qcow2/disk.qcow2

deploy/microshift-bootc/config-svc/Containerfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)