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/`.
This commit is contained in:
parent
31b1a383f0
commit
a4b0efb278
28 changed files with 129 additions and 109 deletions
|
|
@ -29,7 +29,7 @@ function get_build_info() {
|
|||
CONTAINER_IMAGE_CLOUD_TOOLS="quay.io/osbuild/cloud-tools:latest"
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Check available container runtime
|
||||
if which podman 2>/dev/null >&2; then
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ set -euo pipefail
|
|||
CONTAINER_IMAGE_CLOUD_TOOLS="quay.io/osbuild/cloud-tools:latest"
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Check available container runtime
|
||||
if which podman 2>/dev/null >&2; then
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ function get_build_info() {
|
|||
CONTAINER_IMAGE_CLOUD_TOOLS="quay.io/osbuild/cloud-tools:latest"
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Check available container runtime
|
||||
if which podman 2>/dev/null >&2; then
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ run_test_case () {
|
|||
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Change to the working directory.
|
||||
cd $WORKING_DIRECTORY
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ source /usr/libexec/osbuild-composer-test/set-env-variables.sh
|
|||
# Provision the software under test.
|
||||
#
|
||||
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
TEMPDIR=$(mktemp -d)
|
||||
function cleanup() {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ source /usr/libexec/osbuild-composer-test/set-env-variables.sh
|
|||
# Provision the software under test.
|
||||
#
|
||||
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
ARTIFACTS="${ARTIFACTS:-/tmp/artifacts}"
|
||||
TEMPDIR=$(mktemp -d)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ esac
|
|||
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
echo "====> Finished Provisioning system"
|
||||
echo "====> Starting $(basename "$0")"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ set -euo pipefail
|
|||
source /etc/os-release
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Colorful output.
|
||||
function greenprint {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ function get_build_info() {
|
|||
CONTAINER_IMAGE_CLOUD_TOOLS="quay.io/osbuild/cloud-tools:latest"
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Check available container runtime
|
||||
if which podman 2>/dev/null >&2; then
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ CONTAINER_MINIO_CLIENT="quay.io/minio/mc:latest"
|
|||
CONTAINER_MINIO_SERVER="quay.io/minio/minio:latest"
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Check available container runtime
|
||||
if which podman 2>/dev/null >&2; then
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ run_test_case () {
|
|||
}
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Change to the working directory.
|
||||
cd $WORKING_DIRECTORY
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ set -euo pipefail
|
|||
#
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Get OS data.
|
||||
source /usr/libexec/osbuild-composer-test/set-env-variables.sh
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ set -euo pipefail
|
|||
source /usr/libexec/osbuild-composer-test/set-env-variables.sh
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Test the images
|
||||
/usr/libexec/osbuild-composer-test/libvirt_test.sh qcow2
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ test_divider () {
|
|||
}
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Change to the working directory.
|
||||
cd $WORKING_DIRECTORY
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Get OS data.
|
||||
source /usr/libexec/osbuild-composer-test/set-env-variables.sh
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Get OS data.
|
||||
source /etc/os-release
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ if [[ ${ID} == "rhel" ]] && ! sudo subscription-manager status; then
|
|||
fi
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Colorful output.
|
||||
function greenprint {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Get OS data.
|
||||
source /etc/os-release
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ if [[ ${ID} == "rhel" ]] && ! sudo subscription-manager status; then
|
|||
fi
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Set os-variant and boot location used by virt-install.
|
||||
case "${ID}-${VERSION_ID}" in
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function get_build_info() {
|
|||
}
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
BLUEPRINT_FILE=/tmp/blueprint.toml
|
||||
COMPOSE_START=/tmp/compose-start.json
|
||||
COMPOSE_INFO=/tmp/compose-info.json
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ if [[ "$ID" == rhel ]] && sudo subscription-manager status; then
|
|||
fi
|
||||
|
||||
# Provision the software under tet.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Discover what system is installed on the runner
|
||||
case "${ID}" in
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ if [[ "$ID" == rhel ]] && sudo subscription-manager status; then
|
|||
fi
|
||||
|
||||
# Provision the software under tet.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
# Discover what system is installed on the runner
|
||||
case "${ID}" in
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ function get_build_info() {
|
|||
}
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
BLUEPRINT_FILE=/tmp/blueprint.toml
|
||||
COMPOSE_START=/tmp/compose-start.json
|
||||
COMPOSE_INFO=/tmp/compose-info.json
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ if [[ "${ID}" == "fedora" ]]; then
|
|||
fi
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
BLUEPRINT_FILE=/tmp/blueprint.toml
|
||||
COMPOSE_START=/tmp/compose-start.json
|
||||
COMPOSE_INFO=/tmp/compose-info.json
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ function greenprint {
|
|||
source /usr/libexec/osbuild-composer-test/set-env-variables.sh
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
greenprint "Registering clean ups"
|
||||
kill_pids=()
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ esac
|
|||
set -xeuo pipefail
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
|
||||
function get_build_info() {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ if [ "$ID" != "rhel" ]; then
|
|||
fi
|
||||
|
||||
# Provision the software under test.
|
||||
/usr/libexec/osbuild-composer-test/provision.sh
|
||||
/usr/libexec/osbuild-composer-test/provision.sh none
|
||||
|
||||
GOVC_CMD=/tmp/govc
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue