-B PXE Bridge for booting Daisy Master, optional
-d Configuration yaml file of DHA, optional, will be deleted later
-D Dry-run, does not perform deployment, will be deleted later
+ -L Securelab repo dir
-l LAB name, necessary
-p POD name, necessary
-r Remote workspace in target server, optional
############################################################################
# BEGIN of main
#
-while getopts "b:B:Dd:n:l:p:r:w:s:Sh" OPTION
+while getopts "b:B:Dd:n:L:l:p:r:w:s:Sh" OPTION
do
case $OPTION in
b)
D)
DRY_RUN=1
;;
+ L)
+ SECURELABDIR=${OPTARG}
+ ;;
l)
LAB_NAME=${OPTARG}
;;
# set temporay workdir
WORKDIR=${WORKDIR:-/tmp/workdir/daisy}
+SECURELABDIR=${SECURELABDIR:-./securedlab}
+
[[ $POD_NAME =~ (virtual) ]] && IS_BARE=0
# set extra ssh paramters
function update_dha_by_pdf()
{
- local pdf_yaml=securedlab/labs/$LAB_NAME/${POD_NAME}.yaml
- local jinja2_template=securedlab/installers/daisy/pod_config.yaml.j2
- local generate_config=securedlab/utils/generate_config.py
+ local pdf_yaml=${SECURELABDIR}/labs/$LAB_NAME/${POD_NAME}.yaml
+ local jinja2_template=${SECURELABDIR}/installers/daisy/pod_config.yaml.j2
+ local generate_config=${SECURELABDIR}/utils/generate_config.py
if [ ! -f ${generate_config} ] || [ ! -f ${pdf_yaml} ] || [ ! -f ${jinja2_template} ]; then
return
fi