docs and name changes

This commit is contained in:
Pin
2022-12-18 22:08:58 -05:00
parent 4da71c9291
commit e901e374a8
4 changed files with 54 additions and 6 deletions

42
setup 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