virtual-deployment/libvirt/set_defaults.sh
Bailey Henry 02f67a5746 libvirt: Add override variable for DISK variables
Add an override variable for the DISK file location for each node in a
virtual lab. Introduced the ability to set disk file location for all
nodes in a config file. (was hardcoded to /var/lib/libvirt/images)

This enhancement enables better utilization of the host's disk
resources, allowing for more complex deployments such as
'Distributed Cloud'.

Test plan:
PASS: pylint, flake8, bashate
PASS: Regression for default and madcloud examples
PASS: Able to change what is storage and how many are applied
PASS: Copy default.yaml and modify values of disk directories for nodes
      and compare to default.yaml

Story: 2010816
Task: 48397

Change-Id: If19404ed151739c4abcbd5f2c3b9fb62132ed6fe
Signed-off-by: Bailey Henry <Henry.Bailey@windriver.com>
2023-08-09 12:04:03 -04:00

26 lines
837 B
Bash

#!/usr/bin/env bash
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2023 Wind River Systems, Inc.
#
# This script specifies default values for lab configuration,
# these environment variables are meant to be overridden by the
# user if they choose. The default values in this file will be
# used if not specified by the user.
export BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
export EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-10.10.10.0/24}
export EXTERNAL_IP=${EXTERNAL_IP:-10.10.10.1/24}
export CONTROLLER=${CONTROLLER:-controller}
export WORKER=${WORKER:-worker}
export STORAGE=${STORAGE:-storage}
export WORKER_NODES_NUMBER=${WORKER_NODES_NUMBER:-1}
export STORAGE_NODES_NUMBER=${STORAGE_NODES_NUMBER:-1}
export DOMAIN_DIRECTORY=${DOMAIN_DIRECTORY:-vms}
export DEFAULT_DISK_DIR=${DEFAULT_DISK_DIR:-/var/lib/libvirt/images}