%define COMPONENT danm
%define RPM_NAME caas-%{COMPONENT}
%define RPM_MAJOR_VERSION 4.1.0
-%define RPM_MINOR_VERSION 0
+%define RPM_MINOR_VERSION 1
%define DANM_VERSION 93b46c01682b492efec9c4661990d89976d2e3e5
%define CNI_VERSION 0.8.1
%define go_version 1.12.10
%define built_binaries_dir /binary-save
%define danm_components danm fakeipam
%define cnis flannel sriov
+%define centos_build 191001
+%ifarch aarch64
+%define CNI_PLUGINS_ARCH arm64
+%else
+%define CNI_PLUGINS_ARCH amd64
+%endif
Name: %{RPM_NAME}
Version: %{RPM_MAJOR_VERSION}
Summary: Containers as a Service %{COMPONENT} component
License: %{_platform_license} and BSD 3-Clause License
URL: https://github.com/nokia/danm
-BuildArch: x86_64
+BuildArch: %{_arch}
Vendor: %{_platform_vendor} and Nokia and Others unmodified
Source0: %{name}-%{version}.tar.gz
Requires: docker-ce >= 18.09.2, iputils, rsync
-BuildRequires: docker-ce-cli >= 18.09.2, curl
+BuildRequires: docker-ce-cli >= 18.09.2, curl, wget
# more info at: https://fedoraproject.org/wiki/Packaging:Debuginfo No build ID note in Flannel
%global debug_package %{nil}
%build
mkdir -p %{binary_build_dir}/cni
-curl -fsSL -k https://github.com/containernetworking/plugins/releases/download/v%{CNI_VERSION}/cni-plugins-linux-amd64-v%{CNI_VERSION}.tgz | tar zx --strip-components=1 -C %{binary_build_dir}/cni
+curl -fsSL -k https://github.com/containernetworking/plugins/releases/download/v%{CNI_VERSION}/cni-plugins-linux-%{CNI_PLUGINS_ARCH}-v%{CNI_VERSION}.tgz | tar zx --strip-components=1 -C %{binary_build_dir}/cni
# Build DANM binaries
+wget --progress=dot:giga http://artifacts.ci.centos.org/sig-cloudinstance/centos-7-%{centos_build}/%{_arch}/centos-7-%{_arch}-docker.tar.xz -O %{docker_build_dir}/danm-builder/centos-7-docker.tar.xz
docker build \
--network=host \
--no-cache \
docker rmi danm-builder:%{IMAGE_TAG}
# Build CNI binaries
+wget --progress=dot:giga http://artifacts.ci.centos.org/sig-cloudinstance/centos-7-%{centos_build}/%{_arch}/centos-7-%{_arch}-docker.tar.xz -O %{docker_build_dir}/cni-builder/centos-7-docker.tar.xz
docker build \
--network=host \
--no-cache \
%define COMPONENT flannel
%define RPM_NAME caas-%{COMPONENT}
%define RPM_MAJOR_VERSION 0.11.0
-%define RPM_MINOR_VERSION 9
+%define RPM_MINOR_VERSION 10
%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
Name: %{RPM_NAME}
Summary: Containers as a Service flannel component
License: %{_platform_license} and MIT license and BSD and Apache License and ISC License and COMMON DEVELOPMENT AND DISTRIBUTION LICENSE and GNU Lesser General Public License v3.0 only
URL: https://github.com/coreos/flannel
-BuildArch: x86_64
+BuildArch: %{_arch}
Vendor: %{_platform_vendor} and coreos/flannel unmodified
Source0: %{name}-%{version}.tar.gz
--build-arg https_proxy="${https_proxy}" \
--build-arg no_proxy="${no_proxy}" \
--build-arg FLANNEL="%{RPM_MAJOR_VERSION}" \
- --build-arg FLANNEL_ARCHITECTURE="amd64" \
--tag %{COMPONENT}:%{IMAGE_TAG} \
%{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build/%{COMPONENT}/
%define COMPONENT hyperdanm
%define RPM_NAME caas-%{COMPONENT}
%define RPM_MAJOR_VERSION 4.1.0
-%define RPM_MINOR_VERSION 0
+%define RPM_MINOR_VERSION 1
%define DANM_VERSION 93b46c01682b492efec9c4661990d89976d2e3e5
%define go_version 1.12.10
%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
%define docker_save_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save
%define binary_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/binary-save
%define built_binaries_dir /binary-save
+%define centos_build 191001
Name: %{RPM_NAME}
Version: %{RPM_MAJOR_VERSION}
Summary: Containers as a Service %{COMPONENT} component
License: %{_platform_license} and BSD 3-Clause License
URL: https://github.com/nokia/danm
-BuildArch: x86_64
+BuildArch: %{_arch}
Vendor: %{_platform_vendor} and Nokia and Others unmodified
Source0: %{name}-%{version}.tar.gz
Requires: docker-ce >= 18.09.2, rsync
-BuildRequires: docker-ce-cli >= 18.09.2, xz
+BuildRequires: docker-ce-cli >= 18.09.2, xz, wget
Obsoletes: caas-danm-webhook <= 4.0.0, caas-netwatcher <= 4.0.0, caas-svcwatcher <= 4.0.0
%description
%autosetup
%build
+wget --progress=dot:giga http://artifacts.ci.centos.org/sig-cloudinstance/centos-7-%{centos_build}/%{_arch}/centos-7-%{_arch}-docker.tar.xz -O %{docker_build_dir}/danm-builder/centos-7-docker.tar.xz
# Build DANM binaries
docker build \
--network=host \
%define COMPONENT sriovdp
%define RPM_NAME caas-%{COMPONENT}
%define RPM_MAJOR_VERSION 3.0.0
-%define RPM_MINOR_VERSION 1
+%define RPM_MINOR_VERSION 2
%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
%define go_version 1.12.10
%define SRIOVDP_HASH a015e56ae715e2b6dae15e42827e4e8f43eeceac
Summary: Containers as a Service sriov network device plugin component
License: %{_platform_license} and Apache License 2.0
URL: https://github.com/intel/sriov-network-device-plugin/
-BuildArch: x86_64
+BuildArch: %{_arch}
Vendor: %{_platform_vendor} and intel/sriov-network-device-plugin unmodified
Source0: %{name}-%{version}.tar.gz
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM centos:7.6.1810
+FROM scratch
+ADD centos-7-docker.tar.xz /
+CMD ["/bin/bash"]
MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
ARG SRIOV_VERSION
golang \
&& set -x \
&& mkdir -p ${go_install_dir} \
-&& curl -fsSL -k https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz | tar zx --strip-components=1 -C ${go_install_dir} \
+&& if [ $(uname -m) == 'aarch64' ]; then HOST_ARCH=arm64; else HOST_ARCH=amd64; fi \
+&& curl -fsSL -k https://dl.google.com/go/go${go_version}.linux-${HOST_ARCH}.tar.gz | tar zx --strip-components=1 -C ${go_install_dir} \
&& glide_version="$(curl -sSLf https://glide.sh/version)" \
&& mkdir -p ${glide_install_dir} \
-&& curl -fsSL https://github.com/Masterminds/glide/releases/download/${glide_version}/glide-${glide_version}-linux-amd64.tar.gz | tar zx --strip-components=1 -C ${glide_install_dir} \
+&& curl -fsSL https://github.com/Masterminds/glide/releases/download/${glide_version}/glide-${glide_version}-linux-${HOST_ARCH}.tar.gz | tar zx --strip-components=1 -C ${glide_install_dir} \
&& mkdir -p ${binaries} \
#
# Get Flannel
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM centos:7.6.1810
+FROM scratch
+ADD centos-7-docker.tar.xz /
+CMD ["/bin/bash"]
MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
ARG DANM_VERSION
golang \
&& set -x \
&& mkdir -p ${go_install_dir} \
-&& curl -fsSL -k https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz | tar zx --strip-components=1 -C ${go_install_dir} \
+&& if [ $(uname -m) == 'aarch64' ]; then HOST_ARCH=arm64; else HOST_ARCH=amd64; fi \
+&& curl -fsSL -k https://dl.google.com/go/go${go_version}.linux-${HOST_ARCH}.tar.gz | tar zx --strip-components=1 -C ${go_install_dir} \
&& glide_version="$(curl -sSLf https://glide.sh/version)" \
&& mkdir -p ${glide_install_dir} \
-&& curl -fsSL https://github.com/Masterminds/glide/releases/download/${glide_version}/glide-${glide_version}-linux-amd64.tar.gz | tar zx --strip-components=1 -C ${glide_install_dir} \
+&& curl -fsSL https://github.com/Masterminds/glide/releases/download/${glide_version}/glide-${glide_version}-linux-${HOST_ARCH}.tar.gz | tar zx --strip-components=1 -C ${glide_install_dir} \
&& mkdir -p $GOPATH/src/github.com/nokia \
&& git clone https://github.com/nokia/danm.git $GOPATH/src/github.com/nokia/danm \
&& cd $GOPATH/src/github.com/nokia/danm \
ARG FLANNEL
ENV FLANNEL_VERSION=$FLANNEL
-ARG FLANNEL_ARCHITECTURE
-ENV FLANNEL_ARCH=$FLANNEL_ARCHITECTURE
RUN apk add --no-cache wget iproute2 net-tools ca-certificates iptables strongswan && update-ca-certificates && \
apk add wireguard-tools --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community
RUN mkdir -p /opt/bin && \
- wget -O /opt/bin/flanneld https://github.com/coreos/flannel/releases/download/v${FLANNEL_VERSION}/flanneld-${FLANNEL_ARCH} && \
+ if [ $(uname -m) == 'aarch64' ]; then HOST_ARCH=arm64; else HOST_ARCH=amd64; fi && \
+ wget -O /opt/bin/flanneld https://github.com/coreos/flannel/releases/download/v${FLANNEL_VERSION}/flanneld-${HOST_ARCH} && \
chmod +x /opt/bin/flanneld && \
wget -O /opt/bin/mk-docker-opts.sh https://github.com/coreos/flannel/blob/v${FLANNEL_VERSION}/dist/mk-docker-opts.sh