From 8e53059aed6a7fdde34149893f05552aca3ed89a Mon Sep 17 00:00:00 2001 From: "Szekeres, Balazs (Nokia - HU/Budapest)" Date: Thu, 2 May 2019 13:24:10 +0200 Subject: [PATCH] Added seed code for caas-danm. Added seed code for caas-danm. Change-Id: Ie4d4d5688ec569deb6549ff51e4179f19cc48221 Signed-off-by: Szekeres, Balazs (Nokia - HU/Budapest) --- LICENSE | 177 ++++++++++++ SPECS/caas-danm.spec | 118 ++++++++ SPECS/caas-flannel.spec | 89 ++++++ SPECS/caas-netwatcher.spec | 89 ++++++ SPECS/caas-sriovdp.spec | 75 +++++ SPECS/caas-svcwatcher.spec | 76 +++++ ansible/playbooks/danm_setup.yaml | 20 ++ ansible/playbooks/flannel.yaml | 22 ++ ansible/roles/danm_setup/meta/main.yaml | 17 ++ ansible/roles/danm_setup/tasks/main.yaml | 46 +++ .../danm_setup/templates/danmep_crd_schema.yaml | 31 +++ .../danm_setup/templates/danmnet_crd_schema.yaml | 83 ++++++ ansible/roles/flannel/meta/main.yaml | 37 +++ ansible/roles/flannel/tasks/main.yaml | 51 ++++ ansible/roles/flannel/templates/flannel-cm.yaml | 32 +++ ansible/roles/flannel/templates/flannel-ds.yaml | 77 +++++ ansible/roles/flannel/templates/flannel_dnet.yaml | 24 ++ cni-config/00-danm.conf | 5 + cni-config/flannel.conf | 8 + docker-build/cni-builder/Dockerfile | 87 ++++++ docker-build/flannel/Dockerfile | 31 +++ docker-build/flannel/bom.json | 310 +++++++++++++++++++++ docker-build/netwatcher/Dockerfile | 70 +++++ docker-build/netwatcher/bom.json | 184 ++++++++++++ docker-build/sriovdp/Dockerfile | 44 +++ docker-build/sriovdp/bom.json | 214 ++++++++++++++ docker-build/svcwatcher/Dockerfile | 68 +++++ docker-build/svcwatcher/bom.json | 190 +++++++++++++ 28 files changed, 2275 insertions(+) create mode 100644 LICENSE create mode 100644 SPECS/caas-danm.spec create mode 100644 SPECS/caas-flannel.spec create mode 100644 SPECS/caas-netwatcher.spec create mode 100644 SPECS/caas-sriovdp.spec create mode 100644 SPECS/caas-svcwatcher.spec create mode 100644 ansible/playbooks/danm_setup.yaml create mode 100644 ansible/playbooks/flannel.yaml create mode 100644 ansible/roles/danm_setup/meta/main.yaml create mode 100644 ansible/roles/danm_setup/tasks/main.yaml create mode 100644 ansible/roles/danm_setup/templates/danmep_crd_schema.yaml create mode 100644 ansible/roles/danm_setup/templates/danmnet_crd_schema.yaml create mode 100644 ansible/roles/flannel/meta/main.yaml create mode 100644 ansible/roles/flannel/tasks/main.yaml create mode 100644 ansible/roles/flannel/templates/flannel-cm.yaml create mode 100644 ansible/roles/flannel/templates/flannel-ds.yaml create mode 100644 ansible/roles/flannel/templates/flannel_dnet.yaml create mode 100644 cni-config/00-danm.conf create mode 100644 cni-config/flannel.conf create mode 100644 docker-build/cni-builder/Dockerfile create mode 100644 docker-build/flannel/Dockerfile create mode 100644 docker-build/flannel/bom.json create mode 100644 docker-build/netwatcher/Dockerfile create mode 100644 docker-build/netwatcher/bom.json create mode 100644 docker-build/sriovdp/Dockerfile create mode 100644 docker-build/sriovdp/bom.json create mode 100644 docker-build/svcwatcher/Dockerfile create mode 100644 docker-build/svcwatcher/bom.json diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f433b1a --- /dev/null +++ b/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/SPECS/caas-danm.spec b/SPECS/caas-danm.spec new file mode 100644 index 0000000..42ab482 --- /dev/null +++ b/SPECS/caas-danm.spec @@ -0,0 +1,118 @@ +# 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 +%define RPM_NAME caas-%{COMPONENT} +%define RPM_MAJOR_VERSION 3.2.0 +%define RPM_MINOR_VERSION 1 +%define CNI_VERSION 0.7.0 +%define DANM_VERSION b48eb154a7f81fcafb0ff9e5b7d3ca6b54e6565a +%define go_version 1.12.1 +%define SRIOV_VERSION 6b53446e5781570c44e399cccb1fcdfa417f43a1 +%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION} +%define binary_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/binary-save +%define docker_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build +%define built_binaries_dir /binary-save + +Name: %{RPM_NAME} +Version: %{RPM_MAJOR_VERSION} +Release: %{RPM_MINOR_VERSION}%{?dist} +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, iputils +BuildRequires: docker-ce >= 18.09.2, git + +# more info at: https://fedoraproject.org/wiki/Packaging:Debuginfo No build ID note in Flannel +%global debug_package %{nil} + +%description +This RPM contains the DANM and related CNI binaries for CaaS subsystem. + +%prep +%autosetup + +%build +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 + +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 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}/ + +docker rm -f ${builder_container} +docker rmi cni-builder:%{IMAGE_TAG} + +%install +mkdir -p %{buildroot}/etc/cni/net.d/ +rsync -av cni-config/00-danm.conf %{buildroot}/etc/cni/net.d/00-danm.conf +rsync -av cni-config/flannel.conf %{buildroot}/etc/cni/net.d/flannel.conf + +mkdir -p %{buildroot}/opt/cni/bin/ +# Generic CNI plugins +# Don't use the standard ipvlan binary \ +# Dont't use portmap, quick fix for CVE-2019-9946 \ +rsync -av \ + --chmod=go+rx,u+rwx \ + --exclude=ipvlan \ + --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 + +%files +# CONFIG +/etc/cni/net.d/00-danm.conf +/etc/cni/net.d/flannel.conf +# CNI binaries +/opt/cni/bin + +%preun + +%post + +%postun + +%clean +rm -rf ${buildroot} diff --git a/SPECS/caas-flannel.spec b/SPECS/caas-flannel.spec new file mode 100644 index 0000000..fe09afa --- /dev/null +++ b/SPECS/caas-flannel.spec @@ -0,0 +1,89 @@ +# 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 flannel +%define RPM_NAME caas-%{COMPONENT} +%define RPM_MAJOR_VERSION 0.11.0 +%define RPM_MINOR_VERSION 1 +%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 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 +Vendor: %{_platform_vendor} and coreos/flannel unmodified +Source0: %{name}-%{version}.tar.gz + +Requires: docker-ce >= 18.09.2 +BuildRequires: docker-ce >= 18.09.2 + +%description +This RPM contains the Flannel container image, and related deployment artifacts for the 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 FLANNEL="%{RPM_MAJOR_VERSION}" \ + --build-arg FLANNEL_ARCHITECTURE="amd64" \ + --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} | gzip -c > %{_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}/ + +mkdir -p %{buildroot}/%{_playbooks_path} +rsync -av ansible/playbooks/flannel.yaml %{buildroot}/%{_playbooks_path}/ + +mkdir -p %{buildroot}/%{_roles_path} +rsync -av ansible/roles/flannel %{buildroot}/%{_roles_path}/ + +%files +%{_caas_container_tar_path}/%{COMPONENT}:%{IMAGE_TAG}.tar +%{_playbooks_path}/flannel.yaml +%{_roles_path}/flannel + +%preun + +%post +mkdir -p %{_postconfig_path} +ln -sf %{_playbooks_path}/flannel.yaml %{_postconfig_path}/ + +%postun +if [ $1 -eq 0 ]; then + rm -f %{_postconfig_path}/flannel.yaml +fi + +%clean +rm -rf ${buildroot} diff --git a/SPECS/caas-netwatcher.spec b/SPECS/caas-netwatcher.spec new file mode 100644 index 0000000..70f7151 --- /dev/null +++ b/SPECS/caas-netwatcher.spec @@ -0,0 +1,89 @@ +# 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 netwatcher +%define RPM_NAME caas-%{COMPONENT} +%define RPM_MAJOR_VERSION 3.2.0 +%define RPM_MINOR_VERSION 1 +%define DANM_VERSION b48eb154a7f81fcafb0ff9e5b7d3ca6b54e6565a +%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 netwatcher 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 +BuildRequires: docker-ce >= 18.09.2 + +%description +This RPM contains the netwatcher container image, and related deployment artifacts for the 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 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} | gzip -c > %{_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}/ + +mkdir -p %{buildroot}/%{_playbooks_path}/ +rsync -av ansible/playbooks/danm_setup.yaml %{buildroot}/%{_playbooks_path}/ + +mkdir -p %{buildroot}/%{_roles_path}/ +rsync -av ansible/roles/danm_setup %{buildroot}/%{_roles_path}/ + +%files +%{_caas_container_tar_path}/%{COMPONENT}:%{IMAGE_TAG}.tar +%{_playbooks_path}/danm_setup.yaml +%{_roles_path}/danm_setup + +%preun + +%post +mkdir -p %{_postconfig_path}/ +ln -sf %{_playbooks_path}/danm_setup.yaml %{_postconfig_path}/ + +%postun +if [ $1 -eq 0 ]; then + rm -f %{_postconfig_path}/danm_setup.yaml +fi + +%clean +rm -rf ${buildroot} diff --git a/SPECS/caas-sriovdp.spec b/SPECS/caas-sriovdp.spec new file mode 100644 index 0000000..498f3d4 --- /dev/null +++ b/SPECS/caas-sriovdp.spec @@ -0,0 +1,75 @@ +# 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 sriovdp +%define RPM_NAME caas-%{COMPONENT} +%define RPM_MAJOR_VERSION 2.0.0 +%define RPM_MINOR_VERSION 1 +%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 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 +Vendor: %{_platform_vendor} and intel/sriov-network-device-plugin unmodified +Source0: %{name}-%{version}.tar.gz + +Requires: docker-ce >= 18.09.2 +BuildRequires: docker-ce >= 18.09.2 + +%description +This RPM contains the sriov network device plugin container 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 SRIOV="%{RPM_MAJOR_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} | gzip -c > %{_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} diff --git a/SPECS/caas-svcwatcher.spec b/SPECS/caas-svcwatcher.spec new file mode 100644 index 0000000..f7a244d --- /dev/null +++ b/SPECS/caas-svcwatcher.spec @@ -0,0 +1,76 @@ +# 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 3.2.0 +%define RPM_MINOR_VERSION 1 +%define DANM_VERSION b48eb154a7f81fcafb0ff9e5b7d3ca6b54e6565a +%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 +BuildRequires: docker-ce >= 18.09.2 + +%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} | gzip -c > %{_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} diff --git a/ansible/playbooks/danm_setup.yaml b/ansible/playbooks/danm_setup.yaml new file mode 100644 index 0000000..60eff13 --- /dev/null +++ b/ansible/playbooks/danm_setup.yaml @@ -0,0 +1,20 @@ +--- +# 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. + +# cmframework.requires: bootstrap_kube_proxy.yaml +- hosts: caas_master + strategy: linear + roles: + - role: danm_setup diff --git a/ansible/playbooks/flannel.yaml b/ansible/playbooks/flannel.yaml new file mode 100644 index 0000000..b5885c7 --- /dev/null +++ b/ansible/playbooks/flannel.yaml @@ -0,0 +1,22 @@ +--- +# 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. + +# cmframework.requires: danm_setup.yaml +- hosts: caas_nodes + strategy: free + become: true + become_user: "{{ users.admin_user_name }}" + roles: + - flannel diff --git a/ansible/roles/danm_setup/meta/main.yaml b/ansible/roles/danm_setup/meta/main.yaml new file mode 100644 index 0000000..7b0250c --- /dev/null +++ b/ansible/roles/danm_setup/meta/main.yaml @@ -0,0 +1,17 @@ +--- +# 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. + +dependencies: + - role: manifests diff --git a/ansible/roles/danm_setup/tasks/main.yaml b/ansible/roles/danm_setup/tasks/main.yaml new file mode 100644 index 0000000..65b289c --- /dev/null +++ b/ansible/roles/danm_setup/tasks/main.yaml @@ -0,0 +1,46 @@ +--- +# 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. + +- name: copy DANM CRD templates to infra template directory + template: + src: "{{ item }}" + dest: "{{ caas.manifests_directory }}/{{ item }}" + with_items: + - danmep_crd_schema.yaml + - danmnet_crd_schema.yaml + +- name: create DanmEp CRD API in K8s + kubectl: + manifest: "{{ caas.manifests_directory }}/danmep_crd_schema.yaml" + state: present + +- name: wait and check DanmEp API availability + shell: "kubectl get crd --all-namespaces | grep danmeps | wc -l" + register: ep_result + until: ep_result.stdout == "1" + retries: 60 + delay: 6 + +- name: create DanmNet CRD API in K8s + kubectl: + manifest: "{{ caas.manifests_directory }}/danmnet_crd_schema.yaml" + state: present + +- name: wait and check DanmNet API availability + shell: "kubectl get crd --all-namespaces | grep danmnets | wc -l" + register: net_result + until: net_result.stdout == "1" + retries: 60 + delay: 6 diff --git a/ansible/roles/danm_setup/templates/danmep_crd_schema.yaml b/ansible/roles/danm_setup/templates/danmep_crd_schema.yaml new file mode 100644 index 0000000..054d686 --- /dev/null +++ b/ansible/roles/danm_setup/templates/danmep_crd_schema.yaml @@ -0,0 +1,31 @@ +{# +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. +#} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: danmeps.danm.k8s.io +spec: + scope: Namespaced + group: danm.k8s.io + version: v1 + names: + kind: DanmEp + plural: danmeps + singular: danmep + shortNames: + - de + - dep diff --git a/ansible/roles/danm_setup/templates/danmnet_crd_schema.yaml b/ansible/roles/danm_setup/templates/danmnet_crd_schema.yaml new file mode 100644 index 0000000..9c07dbe --- /dev/null +++ b/ansible/roles/danm_setup/templates/danmnet_crd_schema.yaml @@ -0,0 +1,83 @@ +{# +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. +#} +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: danmnets.danm.k8s.io +spec: + scope: Namespaced + group: danm.k8s.io + version: v1 + names: + kind: DanmNet + plural: danmnets + singular: danmnet + shortNames: + - dn + - dnet + validation: + openAPIV3Schema: + properties: + spec: + required: + - NetworkID + properties: + NetworkID: + type: string + NetworkType: + type: string + Options: + properties: + cidr: + type: string + pattern: '^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))$' + allocation_pool: + properties: + start: + type: string + pattern: '(^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$)?' + end: + type: string + pattern: '(^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$)?' + container_prefix: + type: string + host_device: + type: string + device_pool: + type: string + vxlan: + type: integer + format: int32 + minimum: 1 + maximum: 16777214 + vlan: + type: integer + format: int32 + minimum: 1 + maximum: 4094 + rt_tables: + type: integer + format: int32 + net6: + type: string + pattern: '^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))$' + routes: + type: object + additionalProperties: + routes6: + type: object + additionalProperties: diff --git a/ansible/roles/flannel/meta/main.yaml b/ansible/roles/flannel/meta/main.yaml new file mode 100644 index 0000000..40766c9 --- /dev/null +++ b/ansible/roles/flannel/meta/main.yaml @@ -0,0 +1,37 @@ +--- +# 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. + +dependencies: + - role: docker_image_load + images: + - flannel + + - role: creategroup + _name: flannel + _gid: "{{ caas.uid.flannel }}" + become: true + become_user: "root" + + - role: createuser + _name: flannel + _group: flannel + _groups: '' + _shell: /sbin/nologin + _home: /home/flannel + _uid: "{{ caas.uid.flannel }}" + become: true + become_user: "root" + + - role: manifests diff --git a/ansible/roles/flannel/tasks/main.yaml b/ansible/roles/flannel/tasks/main.yaml new file mode 100644 index 0000000..0a3fd33 --- /dev/null +++ b/ansible/roles/flannel/tasks/main.yaml @@ -0,0 +1,51 @@ +--- +# 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. + +- name: template Flannel DaemonSet file + template: + src: flannel-ds.yaml + dest: "{{ caas.manifests_directory }}/flannel-ds.yaml" + +- name: template Flannel ConfigMap file + template: + src: flannel-cm.yaml + dest: "{{ caas.manifests_directory }}/flannel-cm.yaml" + +- name: create Flannel ConfigMap + kubectl: + manifest: "{{ caas.manifests_directory }}/flannel-cm.yaml" + state: present + +- name: create Flannel DS + kubectl: + manifest: "{{ caas.manifests_directory }}/flannel-ds.yaml" + state: present + +- name: template DanmNet file for Flannel network for kube-system namespace + template: + src: flannel_dnet.yaml + dest: "{{ caas.manifests_directory }}/flannel-danm_net_kube_system_ns.yaml" + +- name: wait for DanmNet to be available + command: "kubectl api-resources" + register: kube_api_resources + until: kube_api_resources.stdout | search('danmnets') + retries: 10 + delay: 1 + +- name: create Flannel DanmNet within kube-system namespace + kubectl: + manifest: "{{ caas.manifests_directory }}/flannel-danm_net_kube_system_ns.yaml" + state: present diff --git a/ansible/roles/flannel/templates/flannel-cm.yaml b/ansible/roles/flannel/templates/flannel-cm.yaml new file mode 100644 index 0000000..840d093 --- /dev/null +++ b/ansible/roles/flannel/templates/flannel-cm.yaml @@ -0,0 +1,32 @@ +{# +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. +#} +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: flannel-cm + namespace: kube-system + labels: + tier: node + app: flannel +data: + net-conf.json: | + { + "Network": "10.244.0.0/16", + "Backend": { + "Type": "vxlan" + } + } diff --git a/ansible/roles/flannel/templates/flannel-ds.yaml b/ansible/roles/flannel/templates/flannel-ds.yaml new file mode 100644 index 0000000..90e7386 --- /dev/null +++ b/ansible/roles/flannel/templates/flannel-ds.yaml @@ -0,0 +1,77 @@ +{# +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. +#} +--- +apiVersion: apps/v1beta2 +kind: DaemonSet +metadata: + name: flannel-ds + namespace: kube-system + labels: + tier: node + {{ caas.kubernetes_component_label }}: flannel +spec: + selector: + matchLabels: + {{ caas.kubernetes_component_label }}: flannel + template: + metadata: + labels: + tier: node + {{ caas.kubernetes_component_label }}: flannel + spec: + hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet + # TODO: figure out why flannel needs to run with root to modify network settings on the host + # Some setcap calls might be missing on its binary? + #securityContext: + # runAsUser: {{ caas.uid.flannel }} + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule + containers: + - name: kube-flannel + image: {{ container_image_names | select('search', '/flannel') | list | last }} + command: + - /opt/bin/flanneld + args: + - --ip-masq + - --kube-subnet-mgr + - --iface={{ networking.infra_internal.interface }} + securityContext: + privileged: true + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + volumeMounts: + - name: run + mountPath: /run + - name: flannel-cfg + mountPath: /etc/kube-flannel/ + volumes: + - name: run + hostPath: + path: /run + - name: flannel-cfg + configMap: + name: flannel-cm + serviceAccountName: flannel diff --git a/ansible/roles/flannel/templates/flannel_dnet.yaml b/ansible/roles/flannel/templates/flannel_dnet.yaml new file mode 100644 index 0000000..dab9150 --- /dev/null +++ b/ansible/roles/flannel/templates/flannel_dnet.yaml @@ -0,0 +1,24 @@ +{# +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. +#} +--- +apiVersion: danm.k8s.io/v1 +kind: DanmNet +metadata: + name: {{ caas.danmnet_default_name }} + namespace: {{ caas.danmnet_default_namespace }} +spec: + NetworkID: {{ caas.danmnet_default_network_id }} + NetworkType: {{ caas.danmnet_default_network_type }} diff --git a/cni-config/00-danm.conf b/cni-config/00-danm.conf new file mode 100644 index 0000000..647853f --- /dev/null +++ b/cni-config/00-danm.conf @@ -0,0 +1,5 @@ +{ + "name": "meta_cni", + "type": "danm", + "kubeconfig": "/etc/kubernetes/kubeconfig/danmc.yml" +} diff --git a/cni-config/flannel.conf b/cni-config/flannel.conf new file mode 100644 index 0000000..1e842d3 --- /dev/null +++ b/cni-config/flannel.conf @@ -0,0 +1,8 @@ +{ + "name": "cbr0", + "type": "flannel", + "delegate": { + "hairpinMode": true, + "isDefaultGateway": true + } +} \ No newline at end of file diff --git a/docker-build/cni-builder/Dockerfile b/docker-build/cni-builder/Dockerfile new file mode 100644 index 0000000..d6cb0d7 --- /dev/null +++ b/docker-build/cni-builder/Dockerfile @@ -0,0 +1,87 @@ +# 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 centos:7.6.1810 +MAINTAINER Krisztian Lengyel + +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 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 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 checkout ${NETWATCHER_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 \ +# +# Get Flannel +# +&& mkdir -p ${binaries}/flannel \ +&& go get -v github.com/containernetworking/plugins/plugins/meta/flannel \ +&& cp ${GOPATH}/bin/flannel ${binaries}/flannel/flannel \ +# +# 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 diff --git a/docker-build/flannel/Dockerfile b/docker-build/flannel/Dockerfile new file mode 100644 index 0000000..f447bdb --- /dev/null +++ b/docker-build/flannel/Dockerfile @@ -0,0 +1,31 @@ +# 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 + +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/testing + +RUN mkdir -p /opt/bin && \ + wget -O /opt/bin/flanneld https://github.com/coreos/flannel/releases/download/v${FLANNEL_VERSION}/flanneld-${FLANNEL_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 + +ENTRYPOINT ["/opt/bin/flanneld"] diff --git a/docker-build/flannel/bom.json b/docker-build/flannel/bom.json new file mode 100644 index 0000000..dad4950 --- /dev/null +++ b/docker-build/flannel/bom.json @@ -0,0 +1,310 @@ +{ + "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": "ca-certificates", + "version": "20190108-r0", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/ca-certificates/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "libelf", + "version": "0.8.13-r3", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libelf/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "libmnl", + "version": "1.0.4-r0", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libmnl/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "jansson", + "version": "2.11-r0", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/jansson/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "libnftnl-libs", + "version": "1.1.1-r0", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libnftnl-libs/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "iptables", + "version": "1.6.2-r1", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/iptables/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "iproute2", + "version": "4.19.0-r0", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/iproute2/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "mii-tool", + "version": "1.60_git20140218-r2", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/net-tool/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "net-tools", + "version": "1.60_git20140218-r2", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/net-tools/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "libcap", + "version": "2.26-r0", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libcap/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "nghttp2-libs", + "version": "1.35.1-r0", + "source-url": "https://git.alpinelinux.org/aports/tree/main/nghttp2/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "libssh2", + "version": "1.8.0-r4", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libssh2/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "libcurl", + "version": "7.63.0-r0", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/curl/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "gmp", + "version": "6.1.2-r1", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/gmp/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "strongswan", + "version": "5.7.2-r0", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/strongswan/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "wget", + "version": "1.20.1-r0", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/wget/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "wireguard-tools-wg", + "version": "0.0.20190123-r2", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/testing/wireguard-tools/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "wireguard-tools-wg-quick", + "version": "0.0.20190123-r2", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/testing/wireguard-tools/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "wireguard-tools", + "version": "0.0.20190123-r2", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/testing/wireguard-tools/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "bash", + "version": "4.4.19-r1", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/bash/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "openresolv", + "version": "3.9.0-r0", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/bash/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": "flannel", + "version": "0.11.0", + "source-url": "https://github.com/coreos/flannel/archive/v0.11.0.tar.gz", + "foss": "yes" + } + ] +} diff --git a/docker-build/netwatcher/Dockerfile b/docker-build/netwatcher/Dockerfile new file mode 100644 index 0000000..45343e6 --- /dev/null +++ b/docker-build/netwatcher/Dockerfile @@ -0,0 +1,70 @@ +# 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 + +ARG NETWATCHER +ENV NETWATCHER_VERSION=$NETWATCHER +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 checkout ${NETWATCHER_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/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"] diff --git a/docker-build/netwatcher/bom.json b/docker-build/netwatcher/bom.json new file mode 100644 index 0000000..18b911c --- /dev/null +++ b/docker-build/netwatcher/bom.json @@ -0,0 +1,184 @@ +{ + "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/sriovdp/Dockerfile b/docker-build/sriovdp/Dockerfile new file mode 100644 index 0000000..7fc7b68 --- /dev/null +++ b/docker-build/sriovdp/Dockerfile @@ -0,0 +1,44 @@ +# 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 + +ARG SRIOV +ENV SRIOV_VERSION=$SRIOV +ENV GOPATH /go +ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH +ENV GOOS=linux + +WORKDIR / + +RUN apk add --no-cache --virtual .tools ca-certificates gcc musl-dev go glide git \ +&& mkdir -p $GOPATH/src/github.com/intel \ +&& git clone https://github.com/intel/sriov-network-device-plugin.git $GOPATH/src/github.com/intel/sriov-network-device-plugin --branch=v${SRIOV_VERSION} \ +&& cd $GOPATH/src/github.com/intel/sriov-network-device-plugin \ +&& glide --quiet install -v \ +&& go install -a -ldflags '-extldflags "-static"' github.com/intel/sriov-network-device-plugin/cmd/sriovdp \ +&& cp $GOPATH/bin/sriovdp /usr/local/bin/sriovdp \ +&& 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 chmod 700 /usr/local/bin/sriovdp + +LABEL io.k8s.display-name="SRIOV Network Device Plugin" +ENTRYPOINT ["/usr/local/bin/sriovdp"] diff --git a/docker-build/sriovdp/bom.json b/docker-build/sriovdp/bom.json new file mode 100644 index 0000000..37f0a95 --- /dev/null +++ b/docker-build/sriovdp/bom.json @@ -0,0 +1,214 @@ +{ + "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": "ca-certificates", + "version": "20190108-r0", + "source-url": "https://git.alpinelinux.org/aports/tree/main/ca-certificates/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "nghttp2-libs", + "version": "1.35.1-r0", + "source-url": "https://git.alpinelinux.org/aports/tree/main/nghttp2/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "libssh2", + "version": "1.8.0-r4", + "source-url": "https://git.alpinelinux.org/aports/tree/main/libssh2/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "libcurl", + "version": "7.63.0-r0", + "source-url": "https://git.alpinelinux.org/aports/tree/main/curl/APKBUILD?h=3.9-stable", + "foss": "yes" + }, + { + "name": "curl", + "version": "7.63.0-r0", + "source-url": "https://git.alpinelinux.org/aports/tree/main/curl/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": "sriovdp", + "version": "2.0.0", + "source-url": "https://github.com/intel/sriov-network-device-plugin/archive/v2.0.0.tar.gz", + "foss": "yes" + } + ] +} diff --git a/docker-build/svcwatcher/Dockerfile b/docker-build/svcwatcher/Dockerfile new file mode 100644 index 0000000..aefaae6 --- /dev/null +++ b/docker-build/svcwatcher/Dockerfile @@ -0,0 +1,68 @@ +# 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 + +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 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 new file mode 100644 index 0000000..e74a830 --- /dev/null +++ b/docker-build/svcwatcher/bom.json @@ -0,0 +1,190 @@ +{ + "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" + } + ] +} -- 2.16.6