Merge "Install and run sushy-tools within a virtualenv"
This commit is contained in:
@@ -1169,6 +1169,8 @@ function cleanup_redfish {
|
|||||||
function install_redfish {
|
function install_redfish {
|
||||||
# TODO(lucasagomes): Use Apache WSGI instead of gunicorn
|
# TODO(lucasagomes): Use Apache WSGI instead of gunicorn
|
||||||
|
|
||||||
|
. /opt/stack/data/venv/bin/activate
|
||||||
|
|
||||||
if is_fedora; then
|
if is_fedora; then
|
||||||
install_package python3-gunicorn
|
install_package python3-gunicorn
|
||||||
else
|
else
|
||||||
@@ -1196,8 +1198,15 @@ function install_redfish {
|
|||||||
# NOTE(dtantsur): log all accesses to stdout
|
# NOTE(dtantsur): log all accesses to stdout
|
||||||
cmd+=" --access-logfile=- --error-logfile=-"
|
cmd+=" --access-logfile=- --error-logfile=-"
|
||||||
|
|
||||||
|
# Exit virtualenv once installation is complete
|
||||||
|
deactivate
|
||||||
|
|
||||||
write_user_unit_file $IRONIC_REDFISH_EMULATOR_SYSTEMD_SERVICE "$cmd" "" "$STACK_USER"
|
write_user_unit_file $IRONIC_REDFISH_EMULATOR_SYSTEMD_SERVICE "$cmd" "" "$STACK_USER"
|
||||||
|
|
||||||
|
# update unit file reference
|
||||||
|
local unitfile="$SYSTEMD_DIR/$IRONIC_REDFISH_EMULATOR_SYSTEMD_SERVICE"
|
||||||
|
iniset -sudo $unitfile "Service" "Environment" "PATH=/opt/stack/data/venv/bin:$PATH"
|
||||||
|
|
||||||
enable_service $IRONIC_REDFISH_EMULATOR_SYSTEMD_SERVICE
|
enable_service $IRONIC_REDFISH_EMULATOR_SYSTEMD_SERVICE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user