Commit 83147598 authored by Ophélie Gagnard's avatar Ophélie Gagnard

installation/automation-script.sh: Redirect all the output to a log file (append mode).

parent 9945632b
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
# It automates the process of installing MCA on a KVM. # It automates the process of installing MCA on a KVM.
# It then scans some desired directories. No need to reboot to get a scan. # It then scans some desired directories. No need to reboot to get a scan.
LOG_FILE=/var/log/test-script-deployment.log
# redirect stdout and stderr to $LOG_FILE
exec >> $LOG_FILE 2>&1
### INSTALL DEPENDENCIES ### INSTALL DEPENDENCIES
WENDELIN_REFERENCE=test-suite-001 WENDELIN_REFERENCE=test-suite-001
...@@ -27,13 +31,16 @@ FLB_PATH=/opt/${FLUENTBIT_NAME_AND_VERSION} ...@@ -27,13 +31,16 @@ FLB_PATH=/opt/${FLUENTBIT_NAME_AND_VERSION}
MCA_PATH=/opt/${MCA_NAME_AND_VERSION} MCA_PATH=/opt/${MCA_NAME_AND_VERSION}
MCA_CONF_PATH=${MCA_PATH}/etc/ MCA_CONF_PATH=${MCA_PATH}/etc/
echo -e "\nInstalling packages from Debian repositories...\n"
# utility packages # utility packages
apt -y install ${APT_UTILITY_PACKAGES} apt -y install ${APT_UTILITY_PACKAGES}
# specific packages # specific packages
apt -y install ${APT_SPECIFIC_PACKAGES} apt -y install ${APT_SPECIFIC_PACKAGES}
# our own packages # our own packages
echo -e "\nDownloading packages from OBS repositories...\n"
wget ${MCA_PACKAGE_URL} wget ${MCA_PACKAGE_URL}
wget ${FLUENTBIT_PACKAGE_URL} wget ${FLUENTBIT_PACKAGE_URL}
echo -e "\nInstalling packages from OBS repositories...\n"
apt -y install ./${MCA_PACKAGE_FILE} apt -y install ./${MCA_PACKAGE_FILE}
apt -y install ./${FLUENTBIT_PACKAGE_FILE} apt -y install ./${FLUENTBIT_PACKAGE_FILE}
...@@ -71,7 +78,11 @@ FLB_CONF=${MCA_PATH}/etc/flb.conf ...@@ -71,7 +78,11 @@ FLB_CONF=${MCA_PATH}/etc/flb.conf
LOG=/var/log/metadata_collect.log LOG=/var/log/metadata_collect.log
PATH_TO_SCAN=/bin PATH_TO_SCAN=/bin
echo -e "\nScanning and sending content in $PATH_TO_SCAN ...\n"
${BINARY} ${PATH_TO_SCAN} ${FLB} ${FLB_PLUGIN} ${FLB_CONF} ${LOG} ${BINARY} ${PATH_TO_SCAN} ${FLB} ${FLB_PLUGIN} ${FLB_CONF} ${LOG}
PATH_TO_SCAN=/sbin PATH_TO_SCAN=/sbin
echo -e "\nScanning and sending content in $PATH_TO_SCAN ...\n"
${BINARY} ${PATH_TO_SCAN} ${FLB} ${FLB_PLUGIN} ${FLB_CONF} ${LOG} ${BINARY} ${PATH_TO_SCAN} ${FLB} ${FLB_PLUGIN} ${FLB_CONF} ${LOG}
echo -e "\nBuild successful, connect to:\n"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment