From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 442D2A0584 for ; Wed, 19 Oct 2022 14:53:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD44A410D1; Wed, 19 Oct 2022 14:53:13 +0200 (CEST) Received: from mail-pj1-f99.google.com (mail-pj1-f99.google.com [209.85.216.99]) by mails.dpdk.org (Postfix) with ESMTP id 99CFD427F4 for ; Wed, 19 Oct 2022 14:53:11 +0200 (CEST) Received: by mail-pj1-f99.google.com with SMTP id t10-20020a17090a4e4a00b0020af4bcae10so16680714pjl.3 for ; Wed, 19 Oct 2022 05:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pHnAaW2lw8ZqftPwI0WQ3Onn8OnLXGiXhbw3igPfLp0=; b=hNWUp8leUvuybbjoXe0m35RRYvewMf4J54+J2xYdp0YLEPwtZQX3dXprwAIP3xEn8H JPPo8b4BievztBg1t8RldNdV1DwEqknYn4Toq9IKGCogF3AwD2jpRi7AB5Na4oWevXLs rks2zjgvHKKm45xNLtH0xn1EFBv2VSa8l+CXg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pHnAaW2lw8ZqftPwI0WQ3Onn8OnLXGiXhbw3igPfLp0=; b=mJ1KLF92xVJWdW3g6fFD6hLWqeFWdyI8dSsX2NsQU8zSmrwb1J4JgymeQ6U2v3YzgA ZRiXjKeQw6a8HFPxoGVz0rI+wlNm+O/bAxGaOB5p9WiO1IZifXSdav0rOet68z7BfnRL Op0XYb7g5UrmECi7GfJQRF2lwPLMotYEVbTpCDvbAGT+moVwd9WRL5fTlW3FZ1t8vtlq XZ65KkG23A5YRa1qkGhLfy5vQFOdX80D0krjpmmHgnYqnsSSloxIETkVdF/+dGTI5+zP GecVvxF+XoDo/Lzvk0rK+n27fdoE+fXSp6/SynozXVEd0qA0fJpkHIGdtL1PXNS5tYZy gisA== X-Gm-Message-State: ACrzQf01lv6qHXCDNPTRxLQb62yosHLYFH3DEP1E0AZqOdsqTaaz/Nx5 M4U99UXPChyluB+WKx0Yagzy2wiZcUlul9u2Lkz1QHDxU2cLUWnI3YOxAHyiRWTvOfFecBfs62d i7Zz/knq/WEPTe6UyzwLZ+OB5h93wXyB60A7Tos6Q0JmDTFIXfVCVYmzOKYl6KGCezChAWnlZRB H+1L68Gilz3BnA X-Google-Smtp-Source: AMsMyM5tvN7koO0MR6mdxYYt4ezE27pUaKUsBcO9RKsBxtAwaoRHNt3t+VWoeIqmzdwKPZ8yGIsIvIN+7EBh X-Received: by 2002:a17:90a:ba90:b0:20d:3434:7f56 with SMTP id t16-20020a17090aba9000b0020d34347f56mr9721446pjr.105.1666183990696; Wed, 19 Oct 2022 05:53:10 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id y6-20020a1709029b8600b0017f59ebafdcsm646772plp.91.2022.10.19.05.53.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2022 05:53:10 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::105d]) by postal.iol.unh.edu (Postfix) with ESMTP id DB84A60524E6; Wed, 19 Oct 2022 08:53:09 -0400 (EDT) From: ohilyard@iol.unh.edu To: ci@dpdk.org Cc: aconole@redhat.com, alialnu@nvidia.com, Owen Hilyard Subject: [PATCH v2 2/6] containers/inventory: Add inventory for container builder Date: Wed, 19 Oct 2022 08:53:03 -0400 Message-Id: <20221019125307.258582-3-ohilyard@iol.unh.edu> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221019125307.258582-1-ohilyard@iol.unh.edu> References: <20221019125307.258582-1-ohilyard@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org From: Owen Hilyard Adds a yaml file used to define what containers should be built, what packages the containers should have, what platforms to build for and how they should be tagged. Also adds a JSON schema, which can be used to validate that the inventory file is well-formed. Signed-off-by: Owen Hilyard --- containers/template_engine/inventory.yaml | 356 ++++++++++++++++++ .../template_engine/inventory_schema.json | 153 ++++++++ 2 files changed, 509 insertions(+) create mode 100644 containers/template_engine/inventory.yaml create mode 100644 containers/template_engine/inventory_schema.json diff --git a/containers/template_engine/inventory.yaml b/containers/template_engine/inventory.yaml new file mode 100644 index 0000000..fc06641 --- /dev/null +++ b/containers/template_engine/inventory.yaml @@ -0,0 +1,356 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (c) 2022 University of New Hampshire +--- +abi: + # versions should also include the abi versions for all stable ABIs. + versions: + - major: 20 # oldest supported lts + minor: 11 + git_tag: v20.11 + - major: 21 # most recent lts + minor: 11 + git_tag: v21.11 + # - major: 22 # current abi + # minor: 07 + # git_tag: v22.07 + +dockerfiles: + groups: + all: + package_manager_command: "NO_INSTALL_COMMAND_SET" + parent: "NONE" + packages: + - gcc + - make + - git + - sudo + - curl + - automake + - autoconf + - flex + - bison + - bc + rpm: + parent: "all" + package_manager_command: yum install -y + packages: + - diffutils + - pkg-config + - python3 + - python3-pip + - librdmacm + - rdma-core-devel + - libmnl-devel + - ccache + - zip + - autoconf + redhat_family: + parent: "rpm" + packages: [] + fedora: + parent: "redhat_family" + packages: + - python3-pyelftools + - zip + - clang + - ninja-build + - elfutils-libelf-devel + - jansson-devel + - libatomic + - libpcap-devel + - numactl-devel + - findutils + - libtool + - elfutils-devel + - libxml2-devel + - libabigail + centos8: + parent: "redhat_family" + packages: + - elfutils-libelf-devel + - jansson-devel + - libatomic + - libpcap-devel + - numactl-devel + - libabigail + centos9: + parent: "redhat_family" + package_manager_command: "yum install --allowerasing -y" + packages: + - elfutils-libelf-devel + - jansson-devel + - libatomic + - libpcap-devel + - numactl-devel + - libtool + - g++ + - elfutils-devel + - libxml2-devel + rhel: + parent: "redhat_family" + package_manager_command: "yum --disableplugin=subscription-manager install -y" + packages: + - elfutils-libelf-devel + - jansson-devel + - libatomic + - libpcap-devel + - numactl-devel + rhel7: + parent: "rhel" + packages: + - libabigail + - ninja-build + rhel8: + parent: "rhel" + package_manager_command: "yum --allowerasing --disableplugin=subscription-manager install -y" + packages: + - libabigail + - ninja-build + - libxml2-devel + rhel9: + parent: "rhel" + package_manager_command: "yum --allowerasing --disableplugin=subscription-manager install -y" + packages: + - libxml2-devel + opensuse: + parent: "rpm" + package_manager_command: "zypper install -y" + packages: + - python3-pyelftools + - ninja + - gzip + - libelf-devel + - libjansson-devel + - librdmacm1 + - libatomic1 + - libnuma-devel + - libabigail-tools + - tar + alpine: + parent: 'all' + package_manager_command: 'apk add' + packages: + - python3 + - py3-pip + - alpine-sdk + - ccache + - cmake + - bash + - autoconf + - automake + - libtool + - elfutils-dev + - libxml2-dev + - fts-dev + - fts + - numactl-dev + - libc-dev + - bsd-compat-headers + - libexecinfo-dev + - linux-headers + - libatomic + - zip + - pkgconfig + arch: + parent: 'all' + package_manager_command: 'pacman -Syu --noconfirm' + packages: + - glibc + - cmake + - ninja + - pandoc + - python + - python-docutils + - ethtool + - file + - fakeroot + - pkg-config + - numactl + - elfutils + - gawk + - diffutils + - python-pip + - libabigail + debian: + parent: 'all' + package_manager_command: 'apt-get update && apt-get install --no-install-recommends -y' + packages: + - libnuma-dev + - zip + - librdmacm1 + - libcrypto++-dev + - python3-pyelftools + - libxml2-dev + - libelf-dev + - libpcap-dev + - libjansson-dev + - python3-setuptools + - autoconf + - pkg-config + - libtool + - ccache + - libatomic1 + - python3-wheel + - libdw-dev + - rdma-core + - ninja-build + - automake + - librdmacm-dev + - libmnl-dev + - python3-pip + - build-essential + - aspell-en + - parallel + - python3-grpcio + - lcov + debian10: + parent: 'debian' + packages: [] + debian11: + parent: 'debian' + packages: [] + ubuntu: + parent: 'debian' + packages: [] + ubuntu18.04: + parent: 'ubuntu' + packages: [] + ubuntu20.04: + parent: 'ubuntu' + packages: + - python3-grpcio + - lcov + - jq + - default-jre + - nodejs + ubuntu22.04: + parent: 'ubuntu' + packages: + - python3-grpcio + - lcov + - abigail-tools + - jq + ubuntu_cross: # x86 -> ARM + parent: 'ubuntu20.04' + packages: + - clang + - llvm + - llvm-dev + - llvm-runtime + - lld + - gcc-aarch64-linux-gnu + - libgcc-9-dev-arm64-cross + - libatomic1-arm64-cross + - libc6-dev-arm64-cross + - pkg-config-aarch64-linux-gnu + - dpkg-dev + - gcc-arm-linux-gnueabihf + - libc6-dev-armhf-cross + - pkg-config-arm-linux-gnueabihf + ubuntu_sve: + parent: 'ubuntu20.04' + packages: + - gcc-10 + targets: + +# Alpine + - name: alpine_compile + group: 'alpine' + base_image: alpine + platforms: [linux/amd64] + extra_information: + environment_id: 45 + +# Arch + - name: arch_compile + group: 'arch' + base_image: archlinux:base + platforms: [linux/amd64] + +# Fedora + - name: fedora35_compile + group: "fedora" + base_image: fedora:35 + platforms: [linux/amd64] + - name: fedora36_compile + group: "fedora" + base_image: fedora:36 + platforms: [linux/amd64] + - name: fedora36_clang + group: "fedora" + base_image: fedora:36 + platforms: [linux/amd64] + +# CentOs + - name: centosstream8_compile + group: "centos8" + base_image: quay.io/centos/centos:stream8 + platforms: [linux/amd64] + + - name: centosstream9_compile + group: "centos9" + base_image: quay.io/centos/centos:stream9 + platforms: [linux/amd64] + +# RHEL + - name: rhel7_compile + group: "rhel7" + base_image: registry.access.redhat.com/ubi7/ubi + platforms: [linux/amd64] + + - name: rhel8_compile + group: "rhel8" + base_image: registry.access.redhat.com/ubi8/ubi + platforms: [linux/amd64] + + - name: rhel9_compile + group: "rhel9" + base_image: registry.access.redhat.com/ubi9/ubi + platforms: [linux/amd64] + +# OpenSuse + - name: opensuse-leap15_compile + group: "opensuse" + base_image: opensuse/leap:15 + platforms: [linux/amd64] + +# Debian + - name: debian10_compile # debian 10 + group: 'debian10' + base_image: 'debian:buster' + platforms: [linux/amd64] + + - name: debian11_compile # debian 11 + group: 'debian11' + base_image: 'debian:bullseye' + platforms: [linux/amd64] + +# Ubuntu + - name: ubuntu20.04_compile + group: 'ubuntu20.04' + base_image: 'ubuntu:20.04' + platforms: [linux/amd64] + extra_tags: + - $R/ubuntu20.04_libabigail:latest + - $R/ubuntu20.04_libabigail:$T + - $R/ubuntu20.04_spell-check:latest + - $R/ubuntu20.04_spell-check:$T + - $R/ubuntu20.04_sonarscanner:latest + - $R/ubuntu20.04_sonarscanner:$T + + # x86 -> ARM cross compile + - name: ubuntu20.04_cross + group: 'ubuntu_cross' + base_image: 'ubuntu:20.04' + platforms: [linux/amd64] + cross_file: "config/arm/arm64_armv8_linux_gcc" + + - name: ubuntu20.04_sve_compile + group: 'ubuntu_sve' + base_image: 'arm64v8/ubuntu:20.04' + platforms: [linux/arm64] + + - name: ubuntu22.04_compile + group: 'ubuntu22.04' + base_image: 'ubuntu:22.04' + platforms: [linux/amd64] \ No newline at end of file diff --git a/containers/template_engine/inventory_schema.json b/containers/template_engine/inventory_schema.json new file mode 100644 index 0000000..0e641b7 --- /dev/null +++ b/containers/template_engine/inventory_schema.json @@ -0,0 +1,153 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema", + "title": "dpdklab-ci container inventory schema", + "$comment": "SPDX-License-Identifier: BSD-3-Clause\nCopyright (c) 2022 University of New Hampshire", + "definitions": {}, + "type": "object", + "properties": { + "abi": { + "type": "object", + "properties": { + "versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "major": { + "type": "integer", + "description": "The major version number (usually the year of release)" + }, + "minor": { + "type": "integer", + "description": "The minor version number (usually the month of release)" + }, + "git_tag": { + "type": "string", + "description": "The git tag to check out to get this ABI version" + } + }, + "required": [ + "major", + "minor", + "git_tag" + ], + "additionalProperties": false + }, + "minItems": 0 + } + }, + "required": [ + "versions" + ], + "additionalProperties": false + }, + "dockerfiles": { + "type": "object", + "properties": { + "groups": { + "type": "object", + "patternProperties": { + "^[a-z][a-z_0-9\\.]+$": { + "type": "object", + "properties": { + "package_manager_command": { + "type": "string", + "description": "The command to install packages without user input." + }, + "parent": { + "type": "string", + "description": "Which group to inherit from, or NONE if no parent exists" + }, + "packages": { + "type": "array", + "description": "A list of package names to install", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "parent", + "packages" + ], + "additionalProperties": false + } + }, + "minProperties": 1 + }, + "targets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the docker container" + }, + "group": { + "type": "string", + "description": "Which group the target is a member of" + }, + "base_image": { + "type": "string", + "description": "The base docker image." + }, + "platforms": { + "type": "array", + "description": "What platforms to build for", + "items": { + "type": "string", + "enum": [ + "linux/amd64", + "linux/arm64", + "linux/riscv64", + "linux/ppc64le", + "linux/arm/v7", + "linux/arm/v6" + ] + }, + "minItems": 1 + }, + "cross_file": { + "type": "string", + "description": "A cross file to compile meson with. If not present, meson's automatic behavior will be used." + }, + "extra_tags": { + "type": "array", + "description": "Tags to apply to this image", + "items": { + "type": "string", + "description": "$R will be replaced with the 'registry_hostname' variable in this file. $T will be replaced with a timestamp in the form of '%Y-%m-%d'. $N will be replaced by the name of the target.. The tags '$R/$N:latest' and '$R/$N:$T' will always be present" + } + }, + "extra_information": { + "type": "object", + "description": "Extra information to be stored as a JSON file at /container_info.json", + "additionalProperties": true + } + }, + "required": [ + "name", + "group", + "base_image", + "platforms" + ], + "additionalProperties": false + }, + "minItems": 1 + } + }, + "required": [ + "groups", + "targets" + ], + "additionalProperties": false + } + }, + "required": [ + "abi", + "dockerfiles" + ], + "additionalProperties": false +} \ No newline at end of file -- 2.34.1