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

chore(core): build images on alt-linux and base-scratch #98

Merged
merged 2 commits into from
Jun 6, 2024
Merged
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
7 changes: 7 additions & 0 deletions images/base-alt-p10/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
image: {{ $.ImageName }}
from: docker.io/alt:p10@sha256:aaddacc787afa546cc03a252adf9799d48f7a0498ecb46ea0d477642b03018eb
shell:
setup:
# Create nonroot-user group and user.
- groupadd --gid 1001 nonroot-user && useradd nonroot-user --uid 1001 --gid 1001 --shell /bin/bash --create-home
21 changes: 15 additions & 6 deletions images/cdi-apiserver/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
---
image: {{ $.ImageName }}
fromImage: base-scratch
fromImage: base-alt-p10
import:
- image: cdi-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
to: /
add: /images/kubevirt/{{ $.ImageName }}:latest/usr/bin
to: /usr/bin
before: setup
# Source https://github.com/kubevirt/containerized-data-importer/blob/main/cmd/cdi-apiserver/BUILD.bazel
includePaths:
- cdi-apiserver
shell:
install:
# Install packages from Sisyphus repository because p10 repository does not have required versions.
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic" > /etc/apt/sources.list.d/sisyphus.list
- |
apt-get update && apt-get install --yes \
glibc==6:2.38.0.76.e9f05fa1c6-alt1:sisyphus+347163.100.1.1
- apt-get clean
- rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org*
# Source https://github.com/kubevirt/containerized-data-importer/blob/v1.58.0/cmd/cdi-apiserver/BUILD.bazel
docker:
ENTRYPOINT: ["/usr/bin/cdi-apiserver", "-alsologtostderr"]
USER: 1001
Expand Down
22 changes: 16 additions & 6 deletions images/cdi-cloner/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
---
image: {{ $.ImageName }}
fromImage: base-scratch
fromImage: base-alt-p10
import:
- image: cdi-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
to: /
add: /images/kubevirt/{{ $.ImageName }}:latest/usr/bin
to: /usr/bin
before: setup
# Source https://github.com/kubevirt/containerized-data-importer/blob/main/cmd/cdi-cloner/BUILD.bazel
includePaths:
- cdi-cloner
- cloner_startup.sh
shell:
install:
# Install packages from Sisyphus repository because p10 repository does not have required versions.
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic" > /etc/apt/sources.list.d/sisyphus.list
- |
apt-get update && apt-get install --yes \
glibc==6:2.38.0.76.e9f05fa1c6-alt1:sisyphus+347163.100.1.1
- apt-get clean
- rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org*
# Source https://github.com/kubevirt/containerized-data-importer/blob/v1.58.0/cmd/cdi-cloner/BUILD.bazel
docker:
ENTRYPOINT: ["/usr/bin/cloner_startup.sh"]
21 changes: 15 additions & 6 deletions images/cdi-controller/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
---
image: {{ $.ImageName }}
fromImage: base-scratch
fromImage: base-alt-p10
import:
- image: cdi-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
to: /
add: /images/kubevirt/{{ $.ImageName }}:latest/usr/bin
to: /usr/bin
before: setup
# Source https://github.com/kubevirt/containerized-data-importer/blob/main/cmd/cdi-controller/controller.go
includePaths:
- cdi-controller
shell:
install:
# Install packages from Sisyphus repository because p10 repository does not have required versions.
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic" > /etc/apt/sources.list.d/sisyphus.list
- |
apt-get update && apt-get install --yes \
glibc==6:2.38.0.76.e9f05fa1c6-alt1:sisyphus+347163.100.1.1
- apt-get clean
- rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org*
# Source https://github.com/kubevirt/containerized-data-importer/blob/v1.58.0/cmd/cdi-controller/BUILD.bazel
docker:
ENTRYPOINT: ["/usr/bin/cdi-controller", "-alsologtostderr"]
USER: 1001
Expand Down
35 changes: 29 additions & 6 deletions images/cdi-importer/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
---
image: {{ $.ImageName }}
fromImage: base-scratch
fromImage: base-alt-p10
import:
- image: cdi-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
to: /
add: /images/kubevirt/{{ $.ImageName }}:latest/usr/bin
to: /usr/bin
before: setup
# Source https://github.com/kubevirt/containerized-data-importer/blob/main/cmd/cdi-importer/BUILD.bazel
includePaths:
- cdi-containerimage-server
- cdi-image-size-detection
- cdi-importer
- cdi-source-update-poller
shell:
install:
# Intall main packages.
- |
apt-get update && apt-get install --yes \
qemu-img==8.2.2-alt0.p10.1:p10+345290.260.6.1 \
sqlite3==3.35.5-alt1.p10.1:p10+340851.100.1.1 \
nbd-client==3.25-alt3:p10+340489.300.2.1 \
nbd-server==3.25-alt3:p10+340489.300.2.1
# Install packages from Sisyphus repository because p10 repository does not have required versions.
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic" > /etc/apt/sources.list.d/sisyphus.list
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus noarch classic" >> /etc/apt/sources.list.d/sisyphus.list
- |
apt-get update && apt-get install --yes \
glibc==6:2.38.0.76.e9f05fa1c6-alt1:sisyphus+347163.100.1.1 \
libnbd==1.19.11-alt1:sisyphus+347436.100.3.1
- apt-get clean
- rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org*
setup:
- ln -s /sbin/blockdev /usr/sbin/blockdev
# Source https://github.com/kubevirt/containerized-data-importer/blob/v1.58.0/cmd/cdi-importer/BUILD.bazel
docker:
ENTRYPOINT: ["/usr/bin/cdi-importer", "-alsologtostderr"]
22 changes: 16 additions & 6 deletions images/cdi-operator/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
---
image: {{ $.ImageName }}
fromImage: base-scratch
fromImage: base-alt-p10
import:
- image: cdi-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
to: /
add: /images/kubevirt/{{ $.ImageName }}:latest/usr/bin
to: /usr/bin
includePaths:
- cdi-operator
- csv-generator
before: setup
# Source https://github.com/kubevirt/containerized-data-importer/blob/main/cmd/cdi-operator/BUILD.bazel
shell:
install:
# Install packages from Sisyphus repository because p10 repository does not have required versions.
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic" > /etc/apt/sources.list.d/sisyphus.list
- |
apt-get update && apt-get install --yes \
glibc==6:2.38.0.76.e9f05fa1c6-alt1:sisyphus+347163.100.1.1
- apt-get clean
- rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org*
# Source https://github.com/kubevirt/containerized-data-importer/blob/v1.58.0/cmd/cdi-operator/BUILD.bazel
docker:
ENTRYPOINT: ["/usr/bin/cdi-operator"]
USER: 1001
Expand Down
19 changes: 14 additions & 5 deletions images/cdi-uploadproxy/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
---
image: {{ $.ImageName }}
fromImage: base-scratch
fromImage: base-alt-p10
import:
- image: cdi-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
to: /
add: /images/kubevirt/{{ $.ImageName }}:latest/usr/bin
includePaths:
- cdi-uploadproxy
to: /usr/bin
before: setup
shell:
install:
# Install packages from Sisyphus repository because p10 repository does not have required versions.
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic" > /etc/apt/sources.list.d/sisyphus.list
- |
apt-get update && apt-get install --yes \
glibc==6:2.38.0.76.e9f05fa1c6-alt1:sisyphus+347163.100.1.1
- apt-get clean
- rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org*
# Source https://github.com/kubevirt/containerized-data-importer/blob/main/cmd/cdi-uploadproxy/BUILD.bazel
docker:
ENTRYPOINT: ["/usr/bin/cdi-uploadproxy", "-alsologtostderr"]
Expand Down
27 changes: 21 additions & 6 deletions images/cdi-uploadserver/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
---
image: {{ $.ImageName }}
fromImage: base-scratch
fromImage: base-alt-p10
import:
- image: cdi-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
to: /
add: /images/kubevirt/{{ $.ImageName }}:latest/usr/bin
includePaths:
- cdi-uploadserver
to: /usr/bin
before: setup
# Source https://github.com/kubevirt/containerized-data-importer/blob/main/cmd/cdi-uploadserver/BUILD.bazel
shell:
install:
# Intall main packages.
- |
apt-get update && apt-get install --yes \
qemu-img==8.2.2-alt0.p10.1:p10+345290.260.6.1
# Install packages from Sisyphus repository because p10 repository does not have required versions.
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic" > /etc/apt/sources.list.d/sisyphus.list
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus noarch classic" >> /etc/apt/sources.list.d/sisyphus.list
- |
apt-get update && apt-get install --yes \
glibc==6:2.38.0.76.e9f05fa1c6-alt1:sisyphus+347163.100.1.1 \
libnbd==1.19.11-alt1:sisyphus+347436.100.3.1
- apt-get clean
- rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org*
# Source https://github.com/kubevirt/containerized-data-importer/blob/v1.58.0/cmd/cdi-uploadserver/BUILD.bazel
docker:
ENTRYPOINT: ["/usr/bin/cdi-uploadserver", "-alsologtostderr"]
37 changes: 34 additions & 3 deletions images/libguestfs/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,41 @@
---
image: {{ $.ImageName }}
fromImage: base-scratch
fromImage: base-alt-p10
import:
- image: virt-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest/usr/local/lib/guestfs/appliance
includePaths:
- '*'
to: /usr/local/lib/guestfs/appliance
before: setup
- image: virt-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
includePaths:
- .version
- entrypoint.sh
to: /
before: setup
shell:
install:
# Intall main packages.
- |
apt-get update && apt-get install --yes \
acl==2.3.1-alt1:sisyphus+279621.200.1.1 \
libguestfs==1.48.4-alt2:p10+307399.200.6.1 \
guestfs-tools==1.48.2-alt1:p10+307399.300.6.1 \
libvirt-daemon-driver-qemu==9.7.0-alt2.p10.2:p10+343223.200.3.1 \
qemu-kvm-core==8.2.2-alt0.p10.1:p10+345290.260.6.1
# Install packages from Sisyphus repository because p10 repository does not have required versions.
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic" >> /etc/apt/sources.list.d/sisyphus.list
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus noarch classic" >> /etc/apt/sources.list.d/sisyphus.list
- |
apt-get update && apt-get install --yes \
glibc==6:2.38.0.76.e9f05fa1c6-alt1:sisyphus+347163.100.1.1 \
seabios==1.16.3-alt3:sisyphus+339925.100.2.1 \
edk2-ovmf==20231115-alt1:sisyphus+339582.600.5.1
- apt-get clean
- rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org*
# Source https://github.com/kubevirt/kubevirt/blob/v1.0.0/cmd/libguestfs/BUILD.bazel
docker:
ENTRYPOINT: ["/entrypoint.sh"]
USER: 1001
25 changes: 20 additions & 5 deletions images/virt-exportproxy/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
---
image: {{ $.ImageName }}
fromImage: base-scratch
fromImage: base-alt-p10
import:
- image: virt-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
add: /images/kubevirt/{{ $.ImageName }}:latest/usr/bin
includePaths:
- virt-exportproxy
to: /usr/bin
before: setup
- image: virt-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest/
includePaths:
- .version
to: /
before: setup
# Source https://github.com/kubevirt/kubevirt/blob/main/cmd/virt-exportproxy/BUILD.bazel
shell:
install:
# Install packages from Sisyphus repository because p10 repository does not have required versions.
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic" > /etc/apt/sources.list.d/sisyphus.list
- |
apt-get update && apt-get install --yes \
glibc==6:2.38.0.76.e9f05fa1c6-alt1:sisyphus+347163.100.1.1
- apt-get clean
- rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org*
# Source https://github.com/kubevirt/kubevirt/blob/v1.0.0/cmd/virt-exportproxy/BUILD.bazel
docker:
ENTRYPOINT: ["/usr/bin/virt-exportproxy"]
USER: 1001
25 changes: 20 additions & 5 deletions images/virt-exportserver/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
---
image: {{ $.ImageName }}
fromImage: base-scratch
fromImage: base-alt-p10
import:
- image: virt-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
add: /images/kubevirt/{{ $.ImageName }}:latest/usr/bin
includePaths:
- virt-exportserver
to: /usr/bin
before: setup
- image: virt-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest/
includePaths:
- .version
to: /
before: setup
# Source https://github.com/kubevirt/kubevirt/blob/main/cmd/virt-exportserver/BUILD.bazel
shell:
install:
# Install packages from Sisyphus repository because p10 repository does not have required versions.
- echo "rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic" > /etc/apt/sources.list.d/sisyphus.list
- |
apt-get update && apt-get install --yes \
glibc==6:2.38.0.76.e9f05fa1c6-alt1:sisyphus+347163.100.1.1
- apt-get clean
- rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org*
# Source https://github.com/kubevirt/kubevirt/blob/v1.0.0/cmd/virt-exportserver/BUILD.bazel
docker:
ENTRYPOINT: ["/usr/bin/virt-exportserver"]
USER: 1001
Loading