Project

General

Profile

Actions

action #129958

closed

coordination #127031: [saga][epic] openQA for SUSE customers

coordination #80150: [epic] Scale out openQA: Easier openQA setup

Ensure openSUSE container best practices are followed for our container images in devel: openQA size:M

Added by okurz 11 months ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2023-05-28
Due date:
% Done:

0%

Estimated time:

Description

Motivation

We have some containers in devel: openQA but they don't follow a clear standard. We should follow openSUSE best practices for containers

Acceptance criteria

  • AC1: current openSUSE container best practices are known
  • AC2: all container images in devel: openQA follow the tumbleweed container template definitions
  • A|C3 no build warnings show up in OBS container builds (if possible)

Suggestions


Related issues 2 (0 open2 closed)

Copied from openQA Project - action #129883: all-in-one openQA container solutionResolvedokurz

Actions
Copied to openQA Project - action #138440: devel:openQA container files follow cha.obs.supported_formats#id-1.5.10.8.5 and set BuildVersion+BuildName consistently size:SResolvedjbaier_cz

Actions
Actions #1

Updated by okurz 11 months ago

  • Copied from action #129883: all-in-one openQA container solution added
Actions #2

Updated by okurz 11 months ago

  • Description updated (diff)
Actions #3

Updated by osukup 11 months ago

all openSUSE containers packages have naming scheme name-container or name-image if is used kiwi

Template:

# Specify the license of the container build description (see also the LICENSE file)
# SPDX-License-Identifier: MIT
# Define the names/tags of the container
#!BuildTag: opensuse/example:latest opensuse/example:%PKG_VERSION% opensuse/example:%PKG_VERSION%.%RELEASE%

FROM opensuse/tumbleweed

# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=org.opensuse.example
LABEL org.opencontainers.image.title="Example container"
LABEL org.opencontainers.image.description="This contains nano %PKG_VERSION%"
LABEL org.opencontainers.image.version="%PKG_VERSION%.%RELEASE%"
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/example:%PKG_VERSION%.%RELEASE%"
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opencontainers.image.created="%BUILDTIME%"
# endlabelprefix

# Fill the image with content and clean the cache(s)
RUN zypper --non-interactive in nano && zypper clean -a

Service:

<services>
    <service mode="buildtime" name="kiwi_metainfo_helper"/>
    <service mode="buildtime" name="replace_using_package_version">
        <param name="file">Dockerfile</param>
        <param name="regex">%PKG_VERSION%</param>
        <param name="parse-version">patch</param>
        <!-- Fill with the main package of the container.
             It determines the version of the container image. -->
        <param name="package">nano</param>
    </service>
    <service mode="buildtime" name="docker_label_helper"/>
</services>
Actions #4

Updated by livdywan 11 months ago

  • Subject changed from Ensure openSUSE container best practices are followed for our container images in devel: openQA to Ensure openSUSE container best practices are followed for our container images in devel: openQA size:M
  • Description updated (diff)
  • Status changed from New to Workable
Actions #5

Updated by tinita 11 months ago

  • Description updated (diff)
Actions #6

Updated by jbaier_cz 10 months ago

  • Status changed from Workable to In Progress
  • Assignee set to jbaier_cz
Actions #7

Updated by openqa_review 10 months ago

  • Due date set to 2023-07-08

Setting due date based on mean cycle time of SUSE QE Tools

Actions #9

Updated by jbaier_cz 10 months ago

As mentioned in the pull request, at this point we are breaking AC3 with:

Warning: Using manually defined repositories (https://download.opensuse.org/repositories/devel:/openQA/openSUSE_Tumbleweed, obsrepositories:/) in the image. Only obsrepositories:/ is allowed.
Actions #10

Updated by okurz 10 months ago

As I would like to keep the Dockerfile buildable without OBS keep the full repo URLs

Actions #11

Updated by jbaier_cz 10 months ago

okurz wrote:

As I would like to keep the Dockerfile buildable without OBS keep the full repo URLs

I did for the very same reason. If needed in the future (for submitting images into official non-devel repository), we can solve the issue by creating another set of images or maybe the need for external repo will be already solved.

Actions #12

Updated by jbaier_cz 10 months ago

I added similar PR for os-autoinst based containers: https://github.com/os-autoinst/os-autoinst/pull/2335

Actions #13

Updated by okurz 10 months ago

https://build.opensuse.org/package/live_build_log/devel:openQA/os-autoinst_dev/containers/x86_64 shows

[   20s] Building image os-autoinst_dev:latest opensuse/os-autoinst-dev:latest opensuse/os-autoinst-dev:%PKG_VERSION% opensuse/os-autoinst-dev:%PKG_VERSION%.%RELEASE%
[   20s] Unsharing environment
[   20s] Error: tag opensuse/os-autoinst-dev:%PKG_VERSION%: invalid reference format
[   20s] podman build command failed
Actions #14

Updated by jbaier_cz 10 months ago

The _service file was not yet updated to provide that variable. I fixed that so the image should be build again in a while.

Actions #15

Updated by jbaier_cz 10 months ago

  • Status changed from In Progress to Resolved

Most of the recommendations were implemented (where it made sense). I did not change the name of the containers (nor the packages) to prevent failures as we already use it on multiple places. In the current state, those containers cannot be submitted anyway (we are not using obsrepositories:/), we can rename / create new compatible container packages in the future. All Leap based containers were updated to 15.5 in the process.

Actions #16

Updated by okurz 10 months ago

  • Due date deleted (2023-07-08)
Actions #17

Updated by okurz 6 months ago

  • Copied to action #138440: devel:openQA container files follow cha.obs.supported_formats#id-1.5.10.8.5 and set BuildVersion+BuildName consistently size:S added
Actions

Also available in: Atom PDF