virtual-deployment/libvirt/set_defaults.sh
Bailey Henry 2066a90fa5 Libvirt: CPU and Memory value configurable
Add the ability for the user to change how many cores and memory are
allocated per node. Each node may have any number of cores or memory
set, with which their values are used by sourcing the file:
'source readconfig.sh <yaml file>'

Test plan:
PASS: regression tests passed
PASS: sanity tests passed
PASS: no tox, flake8 or pylint errors
PASS: value succesfully set from config file
PASS: defaults used when no config file is sourced

Story: 2010816
Task: 48398
Task: 48586

Change-Id: Ia2f7df44c872fac41ac6376ef3fb00062624ac22
Signed-off-by: Bailey Henry <Henry.Bailey@windriver.com>
2023-08-16 08:54:23 -04:00

32 lines
1005 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 DEFAULT_CPU=${DEFAULT_CPU:-4}
export DEFAULT_MEM=${DEFAULT_MEM:-16}
export AIO_DEFAULT_CPU=${AIO_DEFAULT_CPU:-6}
export AIO_DEFAULT_MEM=${AIO_DEFAULT_MEM:-18}
export DOMAIN_DIRECTORY=${DOMAIN_DIRECTORY:-vms}
export DEFAULT_DISK_DIR=${DEFAULT_DISK_DIR:-/var/lib/libvirt/images}