Join DANM components into hyperdanm 20/1320/2
authorKrisztian Lengyel <krisztian.lengyel@nokia.com>
Tue, 30 Jul 2019 08:33:08 +0000 (10:33 +0200)
committerKrisztian Lengyel <krisztian.lengyel@nokia.com>
Wed, 7 Aug 2019 06:43:42 +0000 (08:43 +0200)
Join DANM components into one docker image named hyperdanm

Change-Id: Ibd777facef06d2e97c9358c5440e2bc8a3d2f930
Signed-off-by: Krisztian Lengyel <krisztian.lengyel@nokia.com>
SPECS/caas-danm-webhook.spec [deleted file]
SPECS/caas-danm.spec
SPECS/caas-hyperdanm.spec [moved from SPECS/caas-netwatcher.spec with 50% similarity]
SPECS/caas-svcwatcher.spec [deleted file]
docker-build/cni-builder/Dockerfile
docker-build/danm-builder/Dockerfile [moved from docker-build/netwatcher/Dockerfile with 61% similarity]
docker-build/danm-webhook/Dockerfile [deleted file]
docker-build/hyperdanm/Dockerfile [new file with mode: 0644]
docker-build/netwatcher/bom.json [deleted file]
docker-build/svcwatcher/Dockerfile [deleted file]
docker-build/svcwatcher/bom.json [deleted file]

diff --git a/SPECS/caas-danm-webhook.spec b/SPECS/caas-danm-webhook.spec
deleted file mode 100644 (file)
index 9b198d3..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-%define COMPONENT danm-webhook
-%define RPM_NAME caas-%{COMPONENT}
-%define RPM_MAJOR_VERSION 4.0.0
-%define RPM_MINOR_VERSION 0
-%define DANM_VERSION v%{RPM_MAJOR_VERSION}
-%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
-
-Name:           %{RPM_NAME}
-Version:        %{RPM_MAJOR_VERSION}
-Release:        %{RPM_MINOR_VERSION}%{?dist}
-Summary:        Containers as a Service svcwatcher component
-License:        %{_platform_license} and BSD 3-Clause License
-URL:            https://github.com/nokia/danm
-BuildArch:      x86_64
-Vendor:         %{_platform_vendor} and Nokia
-Source0:        %{name}-%{version}.tar.gz
-
-Requires: docker-ce >= 18.09.2, rsync
-BuildRequires: docker-ce-cli >= 18.09.2, xz
-
-%description
-This RPM contains the DANM project's webhook sub-component for CaaS subsystem.
-
-%prep
-%autosetup
-
-%build
-docker build \
-  --network=host \
-  --no-cache \
-  --force-rm \
-  --build-arg HTTP_PROXY="${http_proxy}" \
-  --build-arg HTTPS_PROXY="${https_proxy}" \
-  --build-arg NO_PROXY="${no_proxy}" \
-  --build-arg http_proxy="${http_proxy}" \
-  --build-arg https_proxy="${https_proxy}" \
-  --build-arg no_proxy="${no_proxy}" \
-  --build-arg DANM_WEBHOOK_VERSION="%{DANM_VERSION}" \
-  --tag %{COMPONENT}:%{IMAGE_TAG} \
-  %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build/%{COMPONENT}/
-
-mkdir -p %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/
-
-docker save %{COMPONENT}:%{IMAGE_TAG} | xz -z -T2 > %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/%{COMPONENT}:%{IMAGE_TAG}.tar
-
-docker rmi -f %{COMPONENT}:%{IMAGE_TAG}
-
-%install
-mkdir -p %{buildroot}/%{_caas_container_tar_path}/
-rsync -av %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/%{COMPONENT}:%{IMAGE_TAG}.tar %{buildroot}/%{_caas_container_tar_path}/
-
-%files
-%{_caas_container_tar_path}/%{COMPONENT}:%{IMAGE_TAG}.tar
-
-%preun
-
-%post
-
-%postun
-
-%clean
-rm -rf ${buildroot}
index da00774..45ae133 100644 (file)
@@ -15,7 +15,7 @@
 %define COMPONENT danm
 %define RPM_NAME caas-%{COMPONENT}
 %define RPM_MAJOR_VERSION 4.0.0
-%define RPM_MINOR_VERSION 0
+%define RPM_MINOR_VERSION 1
 %define DANM_VERSION v%{RPM_MAJOR_VERSION}
 %define CNI_VERSION 0.7.0
 %define go_version 1.12.1
@@ -25,6 +25,8 @@
 %define docker_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build
 %define build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/build
 %define built_binaries_dir /binary-save
+%define danm_components danm fakeipam
+%define cnis flannel sriov
 
 Name:           %{RPM_NAME}
 Version:        %{RPM_MAJOR_VERSION}
@@ -52,6 +54,7 @@ This RPM contains the DANM and related CNI binaries for CaaS subsystem.
 mkdir -p %{binary_build_dir}/cni
 curl -fsSL -k https://github.com/containernetworking/plugins/releases/download/v%{CNI_VERSION}/cni-plugins-amd64-v%{CNI_VERSION}.tgz  | tar zx --strip-components=1 -C %{binary_build_dir}/cni
 
+# Build DANM binaries
 docker build \
   --network=host \
   --no-cache \
@@ -64,19 +67,41 @@ docker build \
   --build-arg no_proxy="${no_proxy}" \
   --build-arg DANM_VERSION="%{DANM_VERSION}" \
   --build-arg go_version="%{go_version}" \
+  --build-arg binaries="%{built_binaries_dir}" \
+  --build-arg components="%{danm_components}" \
+  --tag danm-builder:%{IMAGE_TAG} \
+  %{docker_build_dir}/danm-builder/
+
+builder_container=$(docker run -id --rm --network=none --entrypoint=/bin/sh danm-builder:%{IMAGE_TAG})
+mkdir -p %{binary_build_dir}/danm
+for component in %{danm_components}; do
+  docker cp ${builder_container}:%{built_binaries_dir}/${component} %{binary_build_dir}/danm/
+done
+docker rm -f ${builder_container}
+docker rmi danm-builder:%{IMAGE_TAG}
+
+# Build CNI binaries
+docker build \
+  --network=host \
+  --no-cache \
+  --force-rm \
+  --build-arg HTTP_PROXY="${http_proxy}" \
+  --build-arg HTTPS_PROXY="${https_proxy}" \
+  --build-arg NO_PROXY="${no_proxy}" \
+  --build-arg http_proxy="${http_proxy}" \
+  --build-arg https_proxy="${https_proxy}" \
+  --build-arg no_proxy="${no_proxy}" \
+  --build-arg go_version="%{go_version}" \
   --build-arg SRIOV_VERSION="%{SRIOV_VERSION}" \
   --build-arg binaries="%{built_binaries_dir}" \
   --tag cni-builder:%{IMAGE_TAG} \
   %{docker_build_dir}/cni-builder/
 
 builder_container=$(docker run -id --rm --network=none --entrypoint=/bin/sh cni-builder:%{IMAGE_TAG})
-mkdir -p %{binary_build_dir}/danm
-docker cp ${builder_container}:%{built_binaries_dir}/danm %{binary_build_dir}/
-mkdir -p %{binary_build_dir}/flannel
-docker cp ${builder_container}:%{built_binaries_dir}/flannel %{binary_build_dir}/
-mkdir -p %{binary_build_dir}/sriov
-docker cp ${builder_container}:%{built_binaries_dir}/sriov %{binary_build_dir}/
-
+mkdir -p %{binary_build_dir}/built_cnis
+for cni in %{cnis}; do
+  docker cp ${builder_container}:%{built_binaries_dir}/${cni} %{binary_build_dir}/built_cnis/
+done
 docker rm -f ${builder_container}
 docker rmi cni-builder:%{IMAGE_TAG}
 
@@ -100,13 +125,15 @@ rsync -av \
       --exclude=portmap \
        %{binary_build_dir}/cni/* %{buildroot}/opt/cni/bin
 # DANM
-install -D -m 0755 %{binary_build_dir}/danm/danm %{buildroot}/opt/cni/bin/danm
-install -D -m 0755 %{binary_build_dir}/danm/fakeipam %{buildroot}/opt/cni/bin/fakeipam
-# FLANNEL
-install -D -m 0755 %{binary_build_dir}/flannel/flannel %{buildroot}/opt/cni/bin/flannel
-# SRIOV
-install -D -m 0755 %{binary_build_dir}/sriov/sriov %{buildroot}/opt/cni/bin/sriov
+for component in %{danm_components}; do
+  install -D -m 0755 %{binary_build_dir}/danm/${component} %{buildroot}/opt/cni/bin/${component}
+done
+# Other CNIs
+for cni in %{cnis}; do
+  install -D -m 0755 %{binary_build_dir}/built_cnis/${cni} %{buildroot}/opt/cni/bin/${cni}
+done
 
+# DANM CRDs
 mkdir -p %{buildroot}/%{_caas_danm_crd_path}
 rsync -av %{build_dir}/danm/integration/crds/production/ %{buildroot}/%{_caas_danm_crd_path}
 
similarity index 50%
rename from SPECS/caas-netwatcher.spec
rename to SPECS/caas-hyperdanm.spec
index 65f82fb..91d02a0 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-%define COMPONENT netwatcher
+%define COMPONENT hyperdanm
 %define RPM_NAME caas-%{COMPONENT}
 %define RPM_MAJOR_VERSION 4.0.0
 %define RPM_MINOR_VERSION 0
 %define DANM_VERSION v%{RPM_MAJOR_VERSION}
+%define go_version 1.12.1
 %define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
+%define danm_components netwatcher svcwatcher webhook
+%define docker_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build
+%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
 
 Name:           %{RPM_NAME}
 Version:        %{RPM_MAJOR_VERSION}
 Release:        %{RPM_MINOR_VERSION}%{?dist}
-Summary:        Containers as a Service netwatcher component
+Summary:        Containers as a Service %{COMPONENT} component
 License:        %{_platform_license} and BSD 3-Clause License
 URL:            https://github.com/nokia/danm
 BuildArch:      x86_64
 Vendor:         %{_platform_vendor} and Nokia
 Source0:        %{name}-%{version}.tar.gz
 
-Requires: docker-ce >= 18.09.2, rsync
-BuildRequires: docker-ce-cli >= 18.09.2, xz
+Requires:       docker-ce >= 18.09.2, rsync
+BuildRequires:  docker-ce-cli >= 18.09.2, xz
+Obsoletes:      caas-danm-webhook <= 4.0.0, caas-netwatcher <= 4.0.0, caas-svcwatcher <= 4.0.0
 
 %description
-This RPM contains the netwatcher container image, and related deployment artifacts for the CaaS subsystem.
+This RPM contains the %{COMPONENT} container image, and related deployment artifacts for the CaaS subsystem.
 
 %prep
 %autosetup
 
 %build
+# Build DANM binaries
+docker build \
+  --network=host \
+  --no-cache \
+  --force-rm \
+  --build-arg HTTP_PROXY="${http_proxy}" \
+  --build-arg HTTPS_PROXY="${https_proxy}" \
+  --build-arg NO_PROXY="${no_proxy}" \
+  --build-arg http_proxy="${http_proxy}" \
+  --build-arg https_proxy="${https_proxy}" \
+  --build-arg no_proxy="${no_proxy}" \
+  --build-arg DANM_VERSION="%{DANM_VERSION}" \
+  --build-arg go_version="%{go_version}" \
+  --build-arg binaries="%{built_binaries_dir}" \
+  --build-arg components="%{danm_components}" \
+  --tag danm-builder:%{IMAGE_TAG} \
+  %{docker_build_dir}/danm-builder/
+
+builder_container=$(docker run -id --rm --network=none --entrypoint=/bin/sh danm-builder:%{IMAGE_TAG})
+for component in %{danm_components}; do
+  mkdir -p %{binary_build_dir}/
+  docker cp ${builder_container}:%{built_binaries_dir}/${component} %{binary_build_dir}/
+done
+docker rm -f ${builder_container}
+docker rmi danm-builder:%{IMAGE_TAG}
+
+# Build hyperdanm container image
+mkdir -p %{docker_build_dir}/%{COMPONENT}/danm_binaries
+rsync -av %{binary_build_dir}/* %{docker_build_dir}/%{COMPONENT}/danm_binaries
 docker build \
   --network=host \
   --no-cache \
@@ -49,19 +85,16 @@ docker build \
   --build-arg http_proxy="${http_proxy}" \
   --build-arg https_proxy="${https_proxy}" \
   --build-arg no_proxy="${no_proxy}" \
-  --build-arg NETWATCHER="%{DANM_VERSION}" \
   --tag %{COMPONENT}:%{IMAGE_TAG} \
-  %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build/%{COMPONENT}/
-
-mkdir -p %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/
-
-docker save %{COMPONENT}:%{IMAGE_TAG} | xz -z -T2 > %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/%{COMPONENT}:%{IMAGE_TAG}.tar
+  %{docker_build_dir}/%{COMPONENT}/
 
+mkdir -p %{docker_save_dir}/
+docker save %{COMPONENT}:%{IMAGE_TAG} | xz -z -T2 > %{docker_save_dir}/%{COMPONENT}:%{IMAGE_TAG}.tar
 docker rmi -f %{COMPONENT}:%{IMAGE_TAG}
 
 %install
 mkdir -p %{buildroot}/%{_caas_container_tar_path}/
-rsync -av %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/%{COMPONENT}:%{IMAGE_TAG}.tar %{buildroot}/%{_caas_container_tar_path}/
+rsync -av %{docker_save_dir}/%{COMPONENT}:%{IMAGE_TAG}.tar %{buildroot}/%{_caas_container_tar_path}/
 
 mkdir -p %{buildroot}/%{_playbooks_path}/
 rsync -av ansible/playbooks/danm_setup.yaml %{buildroot}/%{_playbooks_path}/
diff --git a/SPECS/caas-svcwatcher.spec b/SPECS/caas-svcwatcher.spec
deleted file mode 100644 (file)
index 7c932b1..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-%define COMPONENT svcwatcher
-%define RPM_NAME caas-%{COMPONENT}
-%define RPM_MAJOR_VERSION 4.0.0
-%define RPM_MINOR_VERSION 0
-%define DANM_VERSION v%{RPM_MAJOR_VERSION}
-%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
-
-Name:           %{RPM_NAME}
-Version:        %{RPM_MAJOR_VERSION}
-Release:        %{RPM_MINOR_VERSION}%{?dist}
-Summary:        Containers as a Service svcwatcher component
-License:        %{_platform_license} and BSD 3-Clause License
-URL:            https://github.com/nokia/danm
-BuildArch:      x86_64
-Vendor:         %{_platform_vendor} and Nokia
-Source0:        %{name}-%{version}.tar.gz
-
-Requires: docker-ce >= 18.09.2, rsync
-BuildRequires: docker-ce-cli >= 18.09.2, xz
-
-%description
-This RPM contains the DANM project's Service watcher sub-component for CaaS subsystem.
-
-%prep
-%autosetup
-
-%build
-docker build \
-  --network=host \
-  --no-cache \
-  --force-rm \
-  --build-arg HTTP_PROXY="${http_proxy}" \
-  --build-arg HTTPS_PROXY="${https_proxy}" \
-  --build-arg NO_PROXY="${no_proxy}" \
-  --build-arg http_proxy="${http_proxy}" \
-  --build-arg https_proxy="${https_proxy}" \
-  --build-arg no_proxy="${no_proxy}" \
-  --build-arg SVCWATCHER="%{DANM_VERSION}" \
-  --tag %{COMPONENT}:%{IMAGE_TAG} \
-  %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build/%{COMPONENT}/
-
-mkdir -p %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/
-
-docker save %{COMPONENT}:%{IMAGE_TAG} | xz -z -T2 > %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/%{COMPONENT}:%{IMAGE_TAG}.tar
-
-docker rmi -f %{COMPONENT}:%{IMAGE_TAG}
-
-%install
-mkdir -p %{buildroot}/%{_caas_container_tar_path}/
-rsync -av %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/%{COMPONENT}:%{IMAGE_TAG}.tar %{buildroot}/%{_caas_container_tar_path}/
-
-%files
-%{_caas_container_tar_path}/%{COMPONENT}:%{IMAGE_TAG}.tar
-
-%preun
-
-%post
-
-%postun
-
-%clean
-rm -rf ${buildroot}
index c00d157..a9d13e8 100644 (file)
 FROM centos:7.6.1810
 MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
 
-ARG DANM_VERSION
 ARG SRIOV_VERSION
 ARG go_version
 ARG binaries
 ENV GOPATH /go
 ARG go_install_dir="/usr/local/go"
 ARG glide_install_dir="/usr/local/glide"
-ENV PATH $GOPATH/bin:$go_install_dir/bin:$glide_install_dir:$PATH
+ENV PATH="$GOPATH/bin:$go_install_dir/bin:$glide_install_dir:$PATH"
 ENV CGO_ENABLED=0
 ENV GOOS=linux
-ARG code_generator_version="kubernetes-1.13.4"
-ARG build_packages="gcc gcc-c++ glibc-devel make autoconf git which libtool"
-ARG danm_dependencies="iptables socat grep findutils curl conntrack-tools iputils"
+ARG build_packages="gcc gcc-c++ glibc-devel make autoconf git which libtool curl"
 
 WORKDIR /
 
@@ -46,43 +43,19 @@ RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n
 &&  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} \
-&&  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 \
-&&  git fetch --tags \
-&&  git checkout ${DANM_VERSION} \
-&&  glide install --strip-vendor \
-&&  go get -d github.com/vishvananda/netlink \
-&&  go get github.com/containernetworking/plugins/pkg/ns \
-&&  go get github.com/golang/groupcache/lru \
-&&  rm -rf $GOPATH/src/k8s.io/code-generator \
-&&  git clone -b ${code_generator_version} --depth 1 https://github.com/kubernetes/code-generator.git $GOPATH/src/k8s.io/code-generator \
-&&  go install k8s.io/code-generator/cmd/deepcopy-gen \
-&&  go install k8s.io/code-generator/cmd/client-gen \
-&&  go install k8s.io/code-generator/cmd/lister-gen \
-&&  go install k8s.io/code-generator/cmd/informer-gen \
-&&  deepcopy-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 -O zz_generated.deepcopy --bounding-dirs github.com/nokia/danm/crd/apis \
-&&  client-gen --alsologtostderr --clientset-name versioned --input-base "" --input github.com/nokia/danm/crd/apis/danm/v1 --clientset-path github.com/nokia/danm/crd/client/clientset \
-&&  lister-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 --output-package github.com/nokia/danm/crd/client/listers \
-&&  informer-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 --versioned-clientset-package github.com/nokia/danm/crd/client/clientset/versioned --listers-package github.com/nokia/danm/crd/client/listers --output-package github.com/nokia/danm/crd/client/informers \
-&&  go install -a -ldflags '-extldflags "-static"' github.com/nokia/danm/cmd/danm \
-&&  go install -a -ldflags '-extldflags "-static"' github.com/nokia/danm/cmd/fakeipam \
-&&  mkdir -p ${binaries}/danm \
-&&  cp $GOPATH/bin/{danm,fakeipam} ${binaries}/danm \
+&&  mkdir -p ${binaries} \
 #
 # Get Flannel
 #
-&&  mkdir -p ${binaries}/flannel \
 &&  go get -v github.com/containernetworking/plugins/plugins/meta/flannel \
-&&  cp ${GOPATH}/bin/flannel ${binaries}/flannel/flannel \
+&&  cp ${GOPATH}/bin/flannel ${binaries} \
 #
 # Build sriov-cni
 #
-&&  mkdir -p ${binaries}/sriov \
 &&  mkdir -p ${GOPATH}/src/github.com/intel/ \
 &&  cd ${GOPATH}/src/github.com/intel/ \
 &&  git clone https://github.com/intel/sriov-cni.git \
 &&  cd ${GOPATH}/src/github.com/intel/sriov-cni \
 &&  git checkout ${SRIOV_VERSION} \
 &&  make \
-&&  cp $GOPATH/src/github.com/intel/sriov-cni/build/sriov ${binaries}/sriov/sriov
+&&  cp $GOPATH/src/github.com/intel/sriov-cni/build/sriov ${binaries}
similarity index 61%
rename from docker-build/netwatcher/Dockerfile
rename to docker-build/danm-builder/Dockerfile
index 85168a7..7b27c45 100644 (file)
@@ -1,41 +1,56 @@
 # Copyright 2019 Nokia
-# 
+#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-# 
+#
 #     http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM alpine:3.9
-MAINTAINER Levente Kale <levente.kale@nokia.com>
+FROM centos:7.6.1810
+MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
 
-ARG NETWATCHER
-ENV NETWATCHER_VERSION=$NETWATCHER
+ARG DANM_VERSION
+ARG components="danm fakeipam"
+ARG go_version
+ARG binaries
 ENV GOPATH /go
-ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
+ARG go_install_dir="/usr/local/go"
+ARG glide_install_dir="/usr/local/glide"
+ENV PATH $GOPATH/bin:$go_install_dir/bin:$glide_install_dir:$PATH
 ENV CGO_ENABLED=0
 ENV GOOS=linux
 ARG code_generator_version="kubernetes-1.13.4"
+ARG build_packages="gcc gcc-c++ glibc-devel make autoconf git which libtool"
+ARG danm_dependencies="iptables socat grep findutils curl conntrack-tools iputils"
 
 WORKDIR /
 
 RUN mkdir -p $GOPATH/bin \
 &&  mkdir -p $GOPATH/src
 
-RUN apk add --no-cache curl libcap iputils
-
-RUN apk add --no-cache --virtual .tools ca-certificates gcc musl-dev go glide git \
+RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
+&&  yum install -y --setopt=skip_missing_names_on_install=False \
+      ${build_packages} \
+      ${danm_dependencies} \
+      bash \
+      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} \
+&&  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} \
 &&  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 \
 &&  git fetch --tags \
-&&  git checkout ${NETWATCHER_VERSION} \
+&&  git checkout ${DANM_VERSION} \
 &&  glide install --strip-vendor \
 &&  go get -d github.com/vishvananda/netlink \
 &&  go get github.com/containernetworking/plugins/pkg/ns \
@@ -50,22 +65,8 @@ RUN apk add --no-cache --virtual .tools ca-certificates gcc musl-dev go glide gi
 &&  client-gen --alsologtostderr --clientset-name versioned --input-base "" --input github.com/nokia/danm/crd/apis/danm/v1 --clientset-path github.com/nokia/danm/crd/client/clientset \
 &&  lister-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 --output-package github.com/nokia/danm/crd/client/listers \
 &&  informer-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 --versioned-clientset-package github.com/nokia/danm/crd/client/clientset/versioned --listers-package github.com/nokia/danm/crd/client/listers --output-package github.com/nokia/danm/crd/client/informers \
-&&  go install -a -ldflags '-extldflags "-static"' github.com/nokia/danm/cmd/netwatcher \
-&&  cp $GOPATH/bin/netwatcher /usr/local/bin/netwatcher \
-&&  rm -rf $GOPATH/src \
-&&  rm -rf $GOPATH/bin \
-&&  apk del .tools \
-&&  rm -rf /var/cache/apk/* \
-&&  rm -rf /var/lib/apt/lists/* \
-&&  rm -rf /tmp/* \
-&&  rm -rf ~/.glide
-
-RUN adduser -u 147 -D -H -s /sbin/nologin danm \
-&&  chown root:danm /usr/local/bin/netwatcher \
-&&  chmod 750 /usr/local/bin/netwatcher \
-&&  setcap cap_sys_ptrace,cap_sys_admin,cap_net_admin=eip /usr/local/bin/netwatcher \
-&&  setcap cap_net_raw=eip /usr/sbin/arping
-
-USER danm
-
-ENTRYPOINT ["/usr/local/bin/netwatcher"]
+&&  mkdir -p ${binaries} \
+&&  for component in $components; do \
+      go install -a -ldflags '-extldflags "-static"' github.com/nokia/danm/cmd/${component}; \
+      cp $GOPATH/bin/${component} ${binaries}/${component}; \
+    done
diff --git a/docker-build/danm-webhook/Dockerfile b/docker-build/danm-webhook/Dockerfile
deleted file mode 100644 (file)
index fa9ec09..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM alpine:3.9
-MAINTAINER Levente Kale <levente.kale@nokia.com>
-
-ARG DANM_WEBHOOK_VERSION
-
-ENV GOPATH /go
-ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
-ENV GOOS=linux
-ARG code_generator_version="kubernetes-1.13.4"
-
-WORKDIR /
-
-RUN mkdir -p $GOPATH/bin \
-&&  mkdir -p $GOPATH/src
-
-RUN apk add --no-cache libcap iputils
-
-RUN apk add --no-cache --virtual .tools ca-certificates gcc musl-dev go glide git tar curl \
-&&  mkdir -p $GOPATH/src/github.com/nokia/danm \
-&&  git clone https://github.com/nokia/danm.git $GOPATH/src/github.com/nokia/danm \
-&&  cd $GOPATH/src/github.com/nokia/danm \
-&&  git fetch --tags \
-&&  git checkout ${DANM_WEBHOOK_VERSION} \
-&&  glide install --strip-vendor \
-&&  go get -d github.com/vishvananda/netlink \
-&&  go get github.com/containernetworking/plugins/pkg/ns \
-&&  go get github.com/golang/groupcache/lru \
-&&  rm -rf $GOPATH/src/k8s.io/code-generator \
-&&  git clone -b ${code_generator_version} --depth 1 https://github.com/kubernetes/code-generator.git $GOPATH/src/k8s.io/code-generator \
-&&  go install k8s.io/code-generator/cmd/deepcopy-gen \
-&&  go install k8s.io/code-generator/cmd/client-gen \
-&&  go install k8s.io/code-generator/cmd/lister-gen \
-&&  go install k8s.io/code-generator/cmd/informer-gen \
-&&  deepcopy-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 -O zz_generated.deepcopy --bounding-dirs github.com/nokia/danm/crd/apis \
-&&  client-gen --alsologtostderr --clientset-name versioned --input-base "" --input github.com/nokia/danm/crd/apis/danm/v1 --clientset-path github.com/nokia/danm/crd/client/clientset \
-&&  lister-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 --output-package github.com/nokia/danm/crd/client/listers \
-&&  informer-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 --versioned-clientset-package github.com/nokia/danm/crd/client/clientset/versioned --listers-package github.com/nokia/danm/crd/client/listers --output-package github.com/nokia/danm/crd/client/informers \
-&&  go install -a -ldflags '-extldflags "-static"' github.com/nokia/danm/cmd/webhook \
-&&  cp $GOPATH/bin/webhook /usr/local/bin/webhook \
-&&  rm -rf $GOPATH/src \
-&&  rm -rf $GOPATH/bin \
-&&  apk del .tools \
-&&  rm -rf /var/cache/apk/* \
-&&  rm -rf /var/lib/apt/lists/* \
-&&  rm -rf /tmp/* \
-&&  rm -rf ~/.glide
-
-RUN adduser -u 147 -D -H -s /sbin/nologin danm \
-&&  chown root:danm /usr/local/bin/webhook \
-&&  chmod 750 /usr/local/bin/webhook
-
-USER danm
-
-ENTRYPOINT ["/usr/local/bin/webhook"]
diff --git a/docker-build/hyperdanm/Dockerfile b/docker-build/hyperdanm/Dockerfile
new file mode 100644 (file)
index 0000000..45e8905
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM alpine:3.9
+MAINTAINER Levente Kale <levente.kale@nokia.com>
+
+ARG danm_binaries="netwatcher svcwatcher webhook"
+
+COPY danm_binaries/ /usr/local/bin/
+
+WORKDIR /
+
+RUN apk add --no-cache curl libcap iputils
+
+RUN set -x \
+&&  env \
+&&  adduser -u 147 -D -H -s /sbin/nologin danm \
+&&  for component in $danm_binaries; do \
+      chown root:danm /usr/local/bin/${component}; \
+      chmod 750 /usr/local/bin/${component}; \
+    done \
+&&  rm -rf /var/cache/apk/* \
+&&  rm -rf /var/lib/apt/lists/* \
+&&  rm -rf /tmp/* \
+&&  setcap cap_sys_ptrace,cap_sys_admin,cap_net_admin=eip /usr/local/bin/netwatcher \
+&&  setcap cap_net_raw=eip /usr/sbin/arping
+
+USER danm
diff --git a/docker-build/netwatcher/bom.json b/docker-build/netwatcher/bom.json
deleted file mode 100644 (file)
index 18b911c..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-{
-  "bom": [
-    {
-      "name": "alpine-linux-container",
-      "version": "3.9",
-      "source-url": "https://github.com/gliderlabs/docker-alpine/archive/c4f4c7a6e14d6efeb9a160da464717e03d2cc3ee.tar.gz",
-      "foss": "yes"
-    },
-    {
-      "name": "musl",
-      "version": "1.1.20-r3",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/musl/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "busybox",
-      "version": "1.29.3-r10",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/busybox/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "alpine-baselayout",
-      "version": "3.1.0-r3",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/alpine-baselayout/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "alpine-keys",
-      "version": "2.1-r1",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/alpine-keys/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libcrypto1.1",
-      "version": "1.1.1a-r1",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/openssl/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libssl1.1",
-      "version": "1.1.1a-r1",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/openssl/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "ca-certificates-cacert",
-      "version": "20190108-r0",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/ca-certificates/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libtls-standalone",
-      "version": "2.7.4-r6",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/libtls-standalone/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "ssl_client",
-      "version": "1.29.3-r10",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/busybox/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "zlib",
-      "version": "1.2.11-r1",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/zlib/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "apk-tools",
-      "version": "2.10.3-r1",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/apk-tools/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "scanelf",
-      "version": "1.2.3-r0",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/pax-utils/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "musl-utils",
-      "version": "1.1.20-r3",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/musl/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libc-utils",
-      "version": "0.7.1-r0",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libc-dev/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libbz2",
-      "version": "1.0.6-r6",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/bzip2/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "expat",
-      "version": "2.2.6-r0",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/expat/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libffi",
-      "version": "3.2.1-r6",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libffi/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "gdbm",
-      "version": "1.13-r1",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/gdbm/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "ncurses-terminfo-base",
-      "version": "6.1_p20190105-r0",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/ncurses/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "ncurses-terminfo",
-      "version": "6.1_p20190105-r0",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/ncurses/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "ncurses-libs",
-      "version": "6.1_p20190105-r0",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/ncurses/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "readline",
-      "version": "7.0.003-r1",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/readline/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "sqlite-libs",
-      "version": "3.26.0-r3",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/sqlite/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "python2",
-      "version": "2.7.15-r3",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/python2/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "py-setuptools",
-      "version": "40.6.3-r0",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/py-setuptools/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "py2-pip",
-      "version": "18.1-r0",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/py2-pip/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "pip",
-      "version": "19.0.2",
-      "source-url": "https://github.com/pypa/pip/archive/19.0.2.tar.gz",
-      "foss": "yes"
-    },
-    {
-      "name": "setuptools",
-      "version": "40.6.3.post20190116",
-      "source-url": "https://github.com/pypa/setuptools/archive/v40.6.3.tar.gz",
-      "foss": "yes"
-    },
-    {
-      "name": "danm",
-      "version": "3.1.1",
-      "source-url": "https://github.com/nokia/danm/archive/v3.1.1.tar.gz",
-      "foss": "yes"
-    }
-  ]
-}
diff --git a/docker-build/svcwatcher/Dockerfile b/docker-build/svcwatcher/Dockerfile
deleted file mode 100644 (file)
index 03cdc28..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 2019 Nokia
-# 
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM alpine:3.9
-MAINTAINER Levente Kale <levente.kale@nokia.com>
-
-ARG SVCWATCHER
-ENV SVCWATCHER_VERSION=$SVCWATCHER
-ENV GOPATH /go
-ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
-ENV CGO_ENABLED=0
-ENV GOOS=linux
-ARG code_generator_version="kubernetes-1.13.4"
-
-WORKDIR /
-
-RUN mkdir -p $GOPATH/bin \
-&&  mkdir -p $GOPATH/src
-
-RUN apk add --no-cache curl libcap iputils
-
-RUN apk add --no-cache --virtual .tools ca-certificates gcc musl-dev go glide git \
-&&  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 \
-&&  git fetch --tags \
-&&  git checkout ${SVCWATCHER_VERSION} \
-&&  glide install --strip-vendor \
-&&  go get -d github.com/vishvananda/netlink \
-&&  go get github.com/containernetworking/plugins/pkg/ns \
-&&  go get github.com/golang/groupcache/lru \
-&&  rm -rf $GOPATH/src/k8s.io/code-generator \
-&&  git clone -b ${code_generator_version} --depth 1 https://github.com/kubernetes/code-generator.git $GOPATH/src/k8s.io/code-generator \
-&&  go install k8s.io/code-generator/cmd/deepcopy-gen \
-&&  go install k8s.io/code-generator/cmd/client-gen \
-&&  go install k8s.io/code-generator/cmd/lister-gen \
-&&  go install k8s.io/code-generator/cmd/informer-gen \
-&&  deepcopy-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 -O zz_generated.deepcopy --bounding-dirs github.com/nokia/danm/crd/apis \
-&&  client-gen --alsologtostderr --clientset-name versioned --input-base "" --input github.com/nokia/danm/crd/apis/danm/v1 --clientset-path github.com/nokia/danm/crd/client/clientset \
-&&  lister-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 --output-package github.com/nokia/danm/crd/client/listers \
-&&  informer-gen --alsologtostderr --input-dirs github.com/nokia/danm/crd/apis/danm/v1 --versioned-clientset-package github.com/nokia/danm/crd/client/clientset/versioned --listers-package github.com/nokia/danm/crd/client/listers --output-package github.com/nokia/danm/crd/client/informers \
-&&  go install -a -ldflags '-extldflags "-static"' github.com/nokia/danm/cmd/svcwatcher \
-&&  cp $GOPATH/bin/svcwatcher /usr/local/bin/svcwatcher \
-&&  rm -rf $GOPATH/src \
-&&  rm -rf $GOPATH/bin \
-&&  apk del .tools \
-&&  rm -rf /var/cache/apk/* \
-&&  rm -rf /var/lib/apt/lists/* \
-&&  rm -rf /tmp/* \
-&&  rm -rf ~/.glide
-
-RUN adduser -u 147 -D -H -s /sbin/nologin danm \
-&&  chown root:danm /usr/local/bin/svcwatcher \
-&&  chmod 750 /usr/local/bin/svcwatcher
-
-USER danm
-
-ENTRYPOINT ["/usr/local/bin/svcwatcher"]
diff --git a/docker-build/svcwatcher/bom.json b/docker-build/svcwatcher/bom.json
deleted file mode 100644 (file)
index e74a830..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-{
-  "bom": [
-    {
-      "name": "alpine-linux-container",
-      "version": "3.9",
-      "source-url": "https://github.com/gliderlabs/docker-alpine/archive/c4f4c7a6e14d6efeb9a160da464717e03d2cc3ee.tar.gz",
-      "foss": "yes"
-    },
-    {
-      "name": "musl",
-      "version": "1.1.20-r3",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/musl/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "busybox",
-      "version": "1.29.3-r10",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/busybox/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "alpine-baselayout",
-      "version": "3.1.0-r3",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/alpine-baselayout/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "alpine-keys",
-      "version": "2.1-r1",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/alpine-keys/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libcrypto1.1",
-      "version": "1.1.1a-r1",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/openssl/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libssl1.1",
-      "version": "1.1.1a-r1",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/openssl/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "ca-certificates-cacert",
-      "version": "20190108-r0",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/ca-certificates/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libtls-standalone",
-      "version": "2.7.4-r6",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/libtls-standalone/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "alpine-keys",
-      "version": "2.1-r1",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/alpine-keys/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "ssl_client",
-      "version": "1.29.3-r10",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/busybox/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "zlib",
-      "version": "1.2.11-r1",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/zlib/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "apk-tools",
-      "version": "2.10.3-r1",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/apk-tools/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "scanelf",
-      "version": "1.2.3-r0",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/pax-utils/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "musl-utils",
-      "version": "1.1.20-r3",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/musl/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libc-utils",
-      "version": "0.7.1-r0",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libc-dev/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libbz2",
-      "version": "1.0.6-r6",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/bzip2/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "expat",
-      "version": "2.2.6-r0",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/expat/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "libffi",
-      "version": "3.2.1-r6",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libffi/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "gdbm",
-      "version": "1.13-r1",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/gdbm/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "ncurses-terminfo-base",
-      "version": "6.1_p20190105-r0",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/ncurses/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "ncurses-terminfo",
-      "version": "6.1_p20190105-r0",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/ncurses/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "ncurses-libs",
-      "version": "6.1_p20190105-r0",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/ncurses/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "readline",
-      "version": "7.0.003-r1",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/readline/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "sqlite-libs",
-      "version": "3.26.0-r3",
-      "source-url": "https://git.alpinelinux.org/aports/tree/main/sqlite/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "python2",
-      "version": "2.7.15-r3",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/python2/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "py-setuptools",
-      "version": "40.6.3-r0",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/py-setuptools/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "py2-pip",
-      "version": "18.1-r0",
-      "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/py2-pip/APKBUILD?h=3.9-stable",
-      "foss": "yes"
-    },
-    {
-      "name": "pip",
-      "version": "19.0.2",
-      "source-url": "https://github.com/pypa/pip/archive/19.0.2.tar.gz",
-      "foss": "yes"
-    },
-    {
-      "name": "setuptools",
-      "version": "40.6.3.post20190116",
-      "source-url": "https://github.com/pypa/setuptools/archive/v40.6.3.tar.gz",
-      "foss": "yes"
-    },
-    {
-      "name": "danm",
-      "version": "3.1.1",
-      "source-url": "https://github.com/nokia/danm/archive/v3.1.1.tar.gz",
-      "foss": "yes"
-    }
-  ]
-}