first functional commit

This commit is contained in:
Pin
2022-10-02 12:31:34 -04:00
parent d367398766
commit 46d46a4e36
52 changed files with 1216 additions and 0 deletions

42
setup.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
function exitFailure() {
echo "Exiting $1"
exit 1
}
function checkDependencies {
if ! command python3 --version &>/dev/null; then
exitFailure "python3 not installed"
fi
if ! command docker &>/dev/null; then
exitFailure "docker not installed"
fi
if [[ ! -e /var/run/libvirt/libvirt-sock ]]; then
exitFailure "libvirt-socket not detected"
fi
}
function setupEnvironment {
checkDependencies
if [[ ! -d venv ]]; then
python3 -m venv venv
fi
# shellcheck disable=SC1091
. venv/bin/activate
pip3 install -r ./requierments.txt
}
function dockerImageInit {
cd ./localImages || exitFailure "change dir failed"
docker build . -t kybus:latest
}
setupEnvironment
dockerImageInit