debian-forge-composer/test/cases/libvirt.sh
Tomas Hozza a4b0efb278 provision.sh: add none authentication method for on-premise scenario
`tools/provision.sh` is provisioning SUT always in the same way for
both, the Service scenario and the on-premise scenario. While this is
not causing any issues, it does not realistically represent how we
expect osbuild-composer and worker to be used in these scenarios.

The script currently supports the following authentication options:
- `none`
  - Intended for the on-premise scenario with Weldr API.
  - NO certificates are generated.
  - NO osbuild-composer configuration file is created.
  - NO osbuild-worker configuration file is created. This means that no
    cloud provider credentials are configured directly in the worker.
  - Only the local worker is started and used.
  - Only the Weldr API socker is started.
  - Appropriate repository definitions are copied to
    `/etc/osbuild-composer/repositories/`.
- `jwt`
  - Intended for the Service scenario with Cloud API.
  - Should be the only method supported in the Service scenario in the
    future.
  - Certificates are generated and copied to `/etc/osbuild-composer`.
  - osbuild-composer configuration file is created and configured for
    JWT authentication.
  - osbuild-worker configuration file is created, configured for JWT
    authentication and with appropriate cloud provider credentials.
  - Local worker unit is masked. Only the remote worker is used (the
    socket is started and one remote-worker instance is created).
  - Only the Cloud API socket is started (Weldr API socket is stopped).
  - NO repository definitions are copied to
    `/etc/osbuild-composer/repositories/`.
- `tls`
  - Intended for the Service scenario with Cloud API.
  - Should eventually go away.
  - Certificates are generated and copied to `/etc/osbuild-composer`.
  - osbuild-composer configuration file is created and configured for
    TLS client cert authentication.
  - osbuild-worker configuration file is created, configured for TLS
    authentication and with appropriate cloud provider credentials.
  - Services and sockets are started as they used to be originally:
    - Both local and remote worker sockets are started.
    - Both Weldr and Cloud API sockets are started.
    - Only the local worker unit will be started automatically.
  - NO repository definitions are copied to
    `/etc/osbuild-composer/repositories/`.
2022-08-04 11:55:43 +02:00

23 lines
703 B
Bash

#!/bin/bash
set -euo pipefail
#
# Helper script that executes `tools/libvirt_test.sh` with the appropiate image type and boot type
#
# Get OS data.
source /usr/libexec/osbuild-composer-test/set-env-variables.sh
# Provision the software under test.
/usr/libexec/osbuild-composer-test/provision.sh none
# Test the images
/usr/libexec/osbuild-composer-test/libvirt_test.sh qcow2
/usr/libexec/osbuild-composer-test/libvirt_test.sh openstack
# RHEL 8.4+ and Centos Stream 8+ images also supports uefi, check that
if [[ "$ID" == "rhel" || "$ID" == "centos" ]] ; then
echo "🐄 Booting qcow2 image in UEFI mode on RHEL/Centos Stream"
/usr/libexec/osbuild-composer-test/libvirt_test.sh qcow2 uefi
fi