diff --git a/.tekton/ovirt-populator-pull-request.yaml b/.tekton/ovirt-populator-pull-request.yaml index e430746f8..663843c30 100644 --- a/.tekton/ovirt-populator-pull-request.yaml +++ b/.tekton/ovirt-populator-pull-request.yaml @@ -218,6 +218,8 @@ spec: value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT) - name: CACHI2_ARTIFACT value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT) + - name: ACTIVATION_KEY + value: activation-key-rhel8 runAfter: - prefetch-dependencies taskRef: diff --git a/.tekton/ovirt-populator-push.yaml b/.tekton/ovirt-populator-push.yaml index b6f29ac4c..aa2cc5bc9 100644 --- a/.tekton/ovirt-populator-push.yaml +++ b/.tekton/ovirt-populator-push.yaml @@ -215,6 +215,8 @@ spec: value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT) - name: CACHI2_ARTIFACT value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT) + - name: ACTIVATION_KEY + value: activation-key-rhel8 runAfter: - prefetch-dependencies taskRef: diff --git a/.tekton/virt-v2v-pull-request.yaml b/.tekton/virt-v2v-pull-request.yaml index 800fc6040..fe79d4938 100644 --- a/.tekton/virt-v2v-pull-request.yaml +++ b/.tekton/virt-v2v-pull-request.yaml @@ -218,6 +218,8 @@ spec: value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT) - name: CACHI2_ARTIFACT value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT) + - name: ACTIVATION_KEY + value: activation-key-rhel9 runAfter: - prefetch-dependencies taskRef: diff --git a/.tekton/virt-v2v-push.yaml b/.tekton/virt-v2v-push.yaml index 81e518388..d40a26e81 100644 --- a/.tekton/virt-v2v-push.yaml +++ b/.tekton/virt-v2v-push.yaml @@ -215,6 +215,8 @@ spec: value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT) - name: CACHI2_ARTIFACT value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT) + - name: ACTIVATION_KEY + value: activation-key-rhel9 runAfter: - prefetch-dependencies taskRef: diff --git a/build/forklift-api/Containerfile b/build/forklift-api/Containerfile index 3d5bdde54..be9a4ec05 100644 --- a/build/forklift-api/Containerfile +++ b/build/forklift-api/Containerfile @@ -12,12 +12,13 @@ RUN microdnf -y install tar && microdnf clean all COPY --from=builder /app/forklift-api /usr/local/bin/forklift-api ENTRYPOINT ["/usr/local/bin/forklift-api"] LABEL \ - com.redhat.component="forklift-api-container" \ - name="forklift/forklift-api-rhel9" \ - io.k8s.display-name="Forklift" \ - io.k8s.description="Forklift API server is running Kubernetes validation and mutation webhooks for Forklift resources." \ - io.openshift.tags="migration,forklift,mtv" \ - summary="Forklift- API" \ - description="Forklift - API" \ + com.redhat.component="mtv-api-container" \ + name="migration-toolkit-virtualization/mtv-api-rhel9" \ + license="Apache License 2.0" \ + io.k8s.display-name="Migration Toolkit for Virtualization" \ + io.k8s.description="Migration Toolkit for Virtualization - API" \ + io.openshift.tags="migration,mtv,forklift" \ + description="Migration Toolkit for Virtualization - API" \ + summary="Migration Toolkit for Virtualization - API" \ vendor="Red Hat, Inc." \ - maintainer="Forklift by Konveyor Community " + maintainer="Migration Toolkit for Virtualization Team " diff --git a/build/forklift-controller/Containerfile b/build/forklift-controller/Containerfile index 21c49baf4..d5d4425bb 100644 --- a/build/forklift-controller/Containerfile +++ b/build/forklift-controller/Containerfile @@ -14,14 +14,14 @@ COPY --from=builder /app/manager /usr/local/bin/forklift-controller ENTRYPOINT ["/usr/local/bin/forklift-controller"] LABEL \ - com.redhat.component="forklift-controller-container" \ - name="forklift/forklift-controller-rhel9" \ + com.redhat.component="mtv-controller-container" \ + name="migration-toolkit-virtualization/mtv-controller-rhel9" \ license="Apache License 2.0" \ - io.k8s.display-name="Forklift" \ - io.k8s.description="Forklift - Controller" \ + io.k8s.display-name="Migration Toolkit for Virtualization" \ + io.k8s.description="Migration Toolkit for Virtualization - Controller" \ io.openshift.tags="migration,mtv,forklift" \ - summary="Forklift - Controller" \ - description="Forklift controller pod orchestrates migrations and \ - maintains an up-to-date inventory of the source providers." \ + description="Migration Toolkit for Virtualization - Controller" \ + summary="Migration Toolkit for Virtualization - Controller" \ vendor="Red Hat, Inc." \ maintainer="Migration Toolkit for Virtualization Team " + diff --git a/build/forklift-operator-bundle/Containerfile b/build/forklift-operator-bundle/Containerfile index fc3280423..c64079216 100644 --- a/build/forklift-operator-bundle/Containerfile +++ b/build/forklift-operator-bundle/Containerfile @@ -60,7 +60,7 @@ LABEL \ io.openshift.tags="migration" \ io.k8s.description="Migration Toolkit for Virtualization - Operator Bundle" \ summary="Migration Toolkit for Virtualization - Operator Bundle" \ - maintainer="Forklift by Konveyor Community " \ + maintainer="Migration Toolkit for Virtualization Team " \ description="Migration Toolkit for Virtualization - Operator Bundle" \ vendor="Red Hat, Inc." \ distribution-scope="public" \ diff --git a/build/forklift-operator/Containerfile b/build/forklift-operator/Containerfile index 695419c81..9a45a3275 100644 --- a/build/forklift-operator/Containerfile +++ b/build/forklift-operator/Containerfile @@ -12,12 +12,14 @@ COPY operator/watches.yaml watches.yaml COPY operator/roles roles LABEL \ - com.redhat.component="forklift-operator-container" \ - name="forklift/forklift-operator" \ - io.k8s.display-name="Forklift" \ - io.k8s.description="Forklift - Operator" \ + com.redhat.component="mtv-operator-container" \ + name="migration-toolkit-virtualization/mtv-rhel8-operator" \ + license="Apache License 2.0" \ + io.k8s.display-name="Migration Toolkit for Virtualization" \ + io.k8s.description="Migration Toolkit for Virtualization - Operator" \ io.openshift.tags="migration,mtv,forklift" \ - summary="Forklift - Operator" \ - description="Forklift - Operator" \ + summary="Migration Toolkit for Virtualization - Operator" \ + description="Migration Toolkit for Virtualization - Operator" \ vendor="Red Hat, Inc." \ - maintainer="Forklift by Konveyor Community " + maintainer="Migration Toolkit for Virtualization Team " + diff --git a/build/openstack-populator/Containerfile b/build/openstack-populator/Containerfile index 41429b57d..c4a24f998 100644 --- a/build/openstack-populator/Containerfile +++ b/build/openstack-populator/Containerfile @@ -12,12 +12,13 @@ RUN microdnf -y install tar && microdnf clean all COPY --from=builder /app/openstack-populator /usr/local/bin/openstack-populator ENTRYPOINT ["/usr/local/bin/openstack-populator"] LABEL \ - com.redhat.component="openstack-populator-container" \ - name="forklift/openstack-populator-rhel9" \ - io.k8s.display-name="Forklift" \ - io.k8s.description="Forklift - openstack-populator" \ - io.openshift.tags="migration,forklift,mtv" \ - summary="Forklift - openstack-populator" \ - description="Forklift - openstack-populator" \ + com.redhat.component="mtv-openstack-populator-container" \ + name="migration-toolkit-virtualization/mtv-openstack-populator-rhel9" \ + license="Apache License 2.0" \ + io.k8s.display-name="Migration Toolkit for Virtualization" \ + io.k8s.description="Migration Toolkit for Virtualization - OpenStack Populator" \ + io.openshift.tags="migration,mtv,forklift" \ + summary="Migration Toolkit for Virtualization - OpenStack Populator" \ + description="Migration Toolkit for Virtualization - OpenStack Populator" \ vendor="Red Hat, Inc." \ - maintainer="Forklift by Konveyor Community " + maintainer="Migration Toolkit for Virtualization Team " diff --git a/build/ova-provider-server/Containerfile b/build/ova-provider-server/Containerfile index 9d8d6b844..89bcca946 100644 --- a/build/ova-provider-server/Containerfile +++ b/build/ova-provider-server/Containerfile @@ -13,14 +13,16 @@ RUN microdnf -y install tar && microdnf clean all COPY --from=builder /app/ova-provider-server /usr/local/bin/ova-provider-server ENTRYPOINT ["/usr/local/bin/ova-provider-server"] + LABEL \ - com.redhat.component="forklift-ova-provider-server-container" \ - name="forklift/forklift-ova-provider-server-rhel9" \ + com.redhat.component="mtv-ova-provider-server-container" \ + name="migration-toolkit-virtualization/mtv-ova-provider-server-rhel9" \ license="Apache License 2.0" \ - io.k8s.display-name="Forklift" \ - io.k8s.description="Forklift - OVA Provider Server" \ + io.k8s.display-name="Migration Toolkit for Virtualization" \ + io.k8s.description="Migration Toolkit for Virtualization - OVA Provider Server" \ io.openshift.tags="migration,mtv,forklift" \ - summary="Forklift - OVA Provider Server" \ - description="Forklift - OVA Provider Server" \ + summary="Migration Toolkit for Virtualization - OVA Provider Server" \ + description="Migration Toolkit for Virtualization - OVA Provider Server" \ vendor="Red Hat, Inc." \ - maintainer="Forklift by Konveyor Community " + maintainer="Migration Toolkit for Virtualization Team " + diff --git a/build/ovirt-populator/Containerfile b/build/ovirt-populator/Containerfile index c77cfb2bd..5113b6eb5 100644 --- a/build/ovirt-populator/Containerfile +++ b/build/ovirt-populator/Containerfile @@ -9,20 +9,20 @@ RUN GOOS=linux GOARCH=amd64 go build -o ovirt-populator github.com/konveyor/fork FROM registry.access.redhat.com/ubi8-minimal:8.10-1086 COPY --from=builder /app/ovirt-populator /usr/local/bin/ovirt-populator -# RUN microdnf install -y python3-ovirt-engine-sdk4 ovirt-imageio-client && microdnf clean all -RUN microdnf install -y python3 python3-devel libcurl-devel gcc openssl-devel libxml2-devel - -RUN pip3 install ovirt-engine-sdk-python ovirt-imageio +RUN microdnf install -y subscription-manager +RUN subscription-manager register --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey") +RUN microdnf install -y python3-ovirt-engine-sdk4 ovirt-imageio-client && microdnf clean all ENTRYPOINT ["/usr/local/bin/ovirt-populator"] LABEL \ - com.redhat.component="forklift-ovirt-populator-container" \ - name="forklift/forklift-ovirt-populator-rhel8" \ + com.redhat.component="mtv-rhv-populator-container" \ + name="migration-toolkit-virtualization/mtv-rhv-populator-rhel8" \ license="Apache License 2.0" \ - io.k8s.display-name="Forklift" \ - io.k8s.description="oVirt populator pod facilitates data import from oVirt environments to PVCs" \ + io.k8s.display-name="Migration Toolkit for Virtualization" \ + io.k8s.description="Migration Toolkit for Virtualization - RHV Populator" \ io.openshift.tags="migration,mtv,forklift" \ - summary="Forklift - oVirt Populator" \ - description="Forklift - oVirt Populator" \ + summary="Migration Toolkit for Virtualization - RHV Populator" \ + description="Migration Toolkit for Virtualization - RHV Populator" \ vendor="Red Hat, Inc." \ - maintainer="Forklift by Konveyor Community " + maintainer="Migration Toolkit for Virtualization Team " + diff --git a/build/populator-controller/Containerfile b/build/populator-controller/Containerfile index 69440f853..d21220348 100644 --- a/build/populator-controller/Containerfile +++ b/build/populator-controller/Containerfile @@ -14,13 +14,13 @@ COPY --from=builder /app/controller /usr/local/bin/populator-controller ENTRYPOINT ["/usr/local/bin/populator-controller"] LABEL \ - com.redhat.component="forklift-populator-controller-container" \ - name="forklift/forklift-populator-controller-rhel9" \ + com.redhat.component="mtv-populator-controller-container" \ + name="migration-toolkit-virtualization/mtv-populator-controller-rhel9" \ license="Apache License 2.0" \ - io.k8s.display-name="Forklift" \ - io.k8s.description="Forklift - Populator Controller" \ + io.k8s.display-name="Migration Toolkit for Virtualization" \ + io.k8s.description="Migration Toolkit for Virtualization - Populator Controller" \ io.openshift.tags="migration,mtv,forklift" \ - summary="Forklift - Populator Controller" \ - description="Forklift - Populator Controller" \ + summary="Migration Toolkit for Virtualization - Populator Controller" \ + description="Migration Toolkit for Virtualization - Populator Controller" \ vendor="Red Hat, Inc." \ - maintainer="Forklift by Konveyor Community " + maintainer="Migration Toolkit for Virtualization Team " diff --git a/build/validation/Containerfile b/build/validation/Containerfile index 55a8b979f..4b08eac8f 100644 --- a/build/validation/Containerfile +++ b/build/validation/Containerfile @@ -6,13 +6,14 @@ COPY validation/entrypoint.sh /usr/bin/ ENTRYPOINT ["/usr/bin/entrypoint.sh"] LABEL \ - com.redhat.component="forklift-validation-container" \ - name="forklift/forklift-validation-rhel9" \ + com.redhat.component="mtv-validation-container" \ + version="$CI_VERSION" \ + name="migration-toolkit-virtualization/mtv-validation-rhel9" \ license="Apache License 2.0" \ - io.k8s.display-name="Forklift" \ - io.k8s.description="Forklift - Validation Service" \ + io.k8s.display-name="Migration Toolkit for Virtualization" \ + io.k8s.description="Migration Toolkit for Virtualization - Validation Service" \ io.openshift.tags="migration,mtv,forklift" \ - summary="Forklift - Validation Service" \ - description="Forklift - Validation Service" \ + summary="Migration Toolkit for Virtualization - Validation Service" \ + description="Migration Toolkit for Virtualization - Validation Service" \ vendor="Red Hat, Inc." \ - maintainer="Forklift by Konveyor Community " + maintainer="Migration Toolkit for Virtualization Team " diff --git a/build/virt-v2v/Containerfile b/build/virt-v2v/Containerfile index 59bef90f4..30cab9ed6 100644 --- a/build/virt-v2v/Containerfile +++ b/build/virt-v2v/Containerfile @@ -1,22 +1,40 @@ -# Build virt-v2v binary -FROM registry.access.redhat.com/ubi9/go-toolset:1.21.11-9.1726696856 AS builder +FROM registry.access.redhat.com/ubi9:9.4-1214.1726694543 AS appliance + +ENV LIBGUESTFS_BACKEND direct + +RUN subscription-manager register --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey") + +RUN dnf update -y && \ + dnf install -y --setopt=install_weak_deps=False \ + qemu-img \ + libguestfs-devel \ + libguestfs-winsupport \ + libguestfs-xfs + +# Create tarball for the appliance. +RUN mkdir -p /usr/local/lib/guestfs/appliance && \ + cd /usr/local/lib/guestfs/appliance && \ + libguestfs-make-fixed-appliance . && \ + qemu-img convert -c -O qcow2 root root.qcow2 && \ + mv -vf root.qcow2 root + +FROM registry.access.redhat.com/ubi9/go-toolset:1.21.13-2.1727893526 AS builder WORKDIR /app COPY --chown=1001:0 ./ ./ ENV GOFLAGS "-mod=vendor -tags=strictfipsruntime" ENV GOEXPERIMENT strictfipsruntime -RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o virt-v2v-monitor ./cmd/virt-v2v-monitor/virt-v2v-monitor.go -RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o image-converter ./cmd/image-converter/image-converter.go -RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o virt-v2v-wrapper ./virt-v2v/cmd/entrypoint.go +RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o virt-v2v-monitor github.com/konveyor/forklift-controller/cmd/virt-v2v-monitor +RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o image-converter github.com/konveyor/forklift-controller/cmd/image-converter +RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o virt-v2v-wrapper virt-v2v/cmd/entrypoint.go + +FROM registry.access.redhat.com/ubi9-minimal:9.4-1227.1726694542 -# Main container -FROM quay.io/centos/centos:stream9-minimal RUN rm /etc/pki/tls/fips_local.cnf && \ echo -e '[fips_sect]\ntls1-prf-ems-check = 0\nactivate = 1' > /etc/pki/tls/fips_local.cnf && \ sed -i '/^\\[ crypto_policy \\]/a Options=RHNoEnforceEMSinFIPS' /etc/pki/tls/openssl.cnf - -ENV LIBGUESTFS_BACKEND=direct LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 - +RUN mv /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt.bak && \ + ln -sf /opt/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt RUN mkdir /disks && \ source /etc/os-release && \ microdnf install -y \ @@ -24,17 +42,10 @@ RUN mkdir /disks && \ virtio-win && \ microdnf clean all -RUN ( [ "$(rpm -q glibc)" == "glibc-2.34-66.el9.x86_64" ] && microdnf -y downgrade glibc-2.34-65.el9.x86_64 || true ) && \ -microdnf -y install libguestfs libguestfs-appliance libguestfs-xfs libguestfs-winsupport qemu-img supermin && \ - depmod $(ls /lib/modules/ |tail -n1) +ENV LIBGUESTFS_BACKEND=direct -# Create tarball for the appliance. -RUN mkdir -p /usr/lib64/guestfs/appliance && \ - cd /usr/lib64/guestfs/appliance && \ - libguestfs-make-fixed-appliance . && \ - qemu-img convert -c -O qcow2 root root.qcow2 && \ - mv -vf root.qcow2 root && \ - tar -cvf /libguestfs-appliance.tar /usr/lib64/guestfs/appliance +RUN mkdir -p /usr/lib64/guestfs/appliance +COPY --from=appliance /usr/local/lib/guestfs/appliance /usr/lib64/guestfs/appliance COPY --from=builder /app/virt-v2v-monitor /usr/local/bin/virt-v2v-monitor @@ -45,17 +56,16 @@ COPY --from=builder /app/virt-v2v-wrapper /usr/bin/virt-v2v-wrapper ENTRYPOINT ["/usr/bin/virt-v2v-wrapper"] LABEL \ - com.redhat.component="forklift-virt-v2v-container" \ - name="forklift/forklift-virt-v2v-rhel9" \ + com.redhat.component="mtv-virt-v2v-container" \ + name="migration-toolkit-virtualization/mtv-virt-v2v-rhel9" \ license="Apache License 2.0" \ - io.k8s.display-name="Forklift" \ - io.k8s.description="Forklift - Virt-V2V" \ + io.k8s.display-name="Migration Toolkit for Virtualization" \ + io.k8s.description="Migration Toolkit for Virtualization - Virt-V2V" \ io.openshift.tags="migration,mtv,forklift" \ - summary="Forklift - Virt-V2V" \ - description="Forklift - Virt-V2V" \ - io.k8s.description="Forklift - Virt-V2V" \ + summary="Migration Toolkit for Virtualization - Virt-V2V" \ + description="Migration Toolkit for Virtualization - Virt-V2V" \ vendor="Red Hat, Inc." \ - maintainer="Forklift by Konveyor Community " \ + maintainer="Migration Toolkit for Virtualization Team " \ distribution-scope="public" \ release="v2.7" \ url="https://github.com/kubev2v/forklift" \ diff --git a/build/virt-v2v/Containerfile-upstream b/build/virt-v2v/Containerfile-upstream new file mode 100644 index 000000000..71ef7c2a7 --- /dev/null +++ b/build/virt-v2v/Containerfile-upstream @@ -0,0 +1,59 @@ +# Build virt-v2v binary +FROM registry.access.redhat.com/ubi9/go-toolset:1.21.11-9.1726696856 AS builder +WORKDIR /app +COPY --chown=1001:0 ./ ./ +ENV GOFLAGS "-mod=vendor -tags=strictfipsruntime" +ENV GOEXPERIMENT strictfipsruntime + +RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o virt-v2v-monitor ./cmd/virt-v2v-monitor/virt-v2v-monitor.go +RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o image-converter ./cmd/image-converter/image-converter.go +RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o virt-v2v-wrapper ./virt-v2v/cmd/entrypoint.go + +# Main container +FROM quay.io/centos/centos:stream9-minimal +RUN rm /etc/pki/tls/fips_local.cnf && \ + echo -e '[fips_sect]\ntls1-prf-ems-check = 0\nactivate = 1' > /etc/pki/tls/fips_local.cnf && \ + sed -i '/^\\[ crypto_policy \\]/a Options=RHNoEnforceEMSinFIPS' /etc/pki/tls/openssl.cnf + +ENV LIBGUESTFS_BACKEND=direct LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 + +RUN mkdir /disks && \ + source /etc/os-release && \ + microdnf install -y \ + virt-v2v \ + virtio-win && \ + microdnf clean all + +RUN ( [ "$(rpm -q glibc)" == "glibc-2.34-66.el9.x86_64" ] && microdnf -y downgrade glibc-2.34-65.el9.x86_64 || true ) && \ +microdnf -y install libguestfs libguestfs-appliance libguestfs-xfs libguestfs-winsupport qemu-img supermin && \ + depmod $(ls /lib/modules/ |tail -n1) + +# Create tarball for the appliance. +RUN mkdir -p /usr/lib64/guestfs/appliance && \ + cd /usr/lib64/guestfs/appliance && \ + libguestfs-make-fixed-appliance . && \ + qemu-img convert -c -O qcow2 root root.qcow2 && \ + mv -vf root.qcow2 root && \ + tar -cvf /libguestfs-appliance.tar /usr/lib64/guestfs/appliance + +COPY --from=builder /app/virt-v2v-monitor /usr/local/bin/virt-v2v-monitor + +COPY --from=builder /app/image-converter /usr/local/bin/image-converter + +COPY --from=builder /app/virt-v2v-wrapper /usr/bin/virt-v2v-wrapper + +ENTRYPOINT ["/usr/bin/virt-v2v-wrapper"] + +LABEL \ + com.redhat.component="forklift-virt-v2v-container" \ + name="forklift/forklift-virt-v2v-rhel9" \ + license="Apache License 2.0" \ + io.k8s.display-name="Forklift" \ + io.k8s.description="Forklift - Virt-V2V" \ + io.openshift.tags="migration,mtv,forklift" \ + summary="Forklift - Virt-V2V" \ + description="Forklift - Virt-V2V" \ + io.k8s.description="Forklift - Virt-V2V" \ + vendor="Red Hat, Inc." \ + maintainer="Forklift by Konveyor Community " +