From 41f57c6cfba2a5721c34e642124c4ed359450ebe Mon Sep 17 00:00:00 2001 From: mmorgan-pt <99763568+mmorgan-pt@users.noreply.github.com> Date: Wed, 5 Feb 2025 11:36:49 -0700 Subject: [PATCH] Mm/customer requests (#174) * initial tweaks * add documentation * updated documentation * updated getting started doc * updated links to internal documentation * spelling is hard * bump version --- .bumpversion.cfg | 2 +- docs/getting-started.md | 17 +++++++---------- src/_configure_plextrac.sh | 12 ++++++++++++ src/_podman.sh | 2 +- src/plextrac | 20 ++++++++++++++------ 5 files changed, 35 insertions(+), 18 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 6caed5d..bb54798 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.7.16 +current_version = 0.7.17 commit = True tag = True diff --git a/docs/getting-started.md b/docs/getting-started.md index b3b6428..661b432 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -21,18 +21,15 @@ title: Getting Started The latest release can be retrieved from GitHub: ```console -$ curl -Ls `curl -Ls https://api.github.com/repos/PlexTrac/plextrac-manager-util/releases/latest \ - | jq -r '.assets[].browser_download_url'` \ - > /tmp/plextrac -$ chmod a+x /tmp/plextrac; sudo /tmp/plextrac initialize - -______ _ _____ -| ___ \ | |_ _| -| |_/ / | _____ _| |_ __ __ _ ___ +$ wget -O /tmp/plextrac -q https://github.com/PlexTrac/plextrac-manager-util/releases/latest/download/plextrac; chmod a+x /tmp/plextrac; sudo bash /tmp/plextrac initialize -v + +______ _ _____ +| ___ \ | |_ _| +| |_/ / | _____ _| |_ __ __ _ ___ | __/| |/ _ \ \/ / | '__/ _\ |/ __| -| | | | __/> <| | | | (_| | (__ +| | | | __/> <| | | | (_| | (__ \_| |_|\___/_/\_\_/_| \__,_|\___| - + Instance Management Utility v0.1.2 diff --git a/src/_configure_plextrac.sh b/src/_configure_plextrac.sh index bd4b5ed..d17fbc2 100644 --- a/src/_configure_plextrac.sh +++ b/src/_configure_plextrac.sh @@ -25,6 +25,18 @@ function generate_default_config() { source <(echo "${existingCfg}") set +o allexport + # Check if the PLEXTRAC_HOME matches the HOME of current plextrac user + if [ ${PLEXTRAC_HOME} != ${HOME} ]; then + info "It appears you are trying to install plextrac to a different directory than default. Would you like to install to the same directory as the plextrac user home?" + info "Install directory [${HOME}]" + info "If this is not correct, please change the home directory of the plextrac user and try to install plextrac again" + if get_user_approval; then + export PLEXTRAC_HOME=${HOME} + else + die "Unable to install to a different directory than the home of the plextrac user" + fi + fi + # NOTE: we need to leave API_INTEGRATION_AUTH_CONFIG_NOTIFICATION_SERVICE until all cloud-hosted environments are no # longer running code that relies on this variable. It has been replaced by INTERNAL_API_KEY_SHARED for newer versions. diff --git a/src/_podman.sh b/src/_podman.sh index 97764b6..2140230 100644 --- a/src/_podman.sh +++ b/src/_podman.sh @@ -151,7 +151,7 @@ function plextrac_install_podman() { info "Post installation note:" log "If you wish to have access to historical logs, you can configure docker to send logs to journald." log "Please see the config steps at" - log "https://docs.plextrac.com/plextrac-documentation/product-documentation-1/on-premise-management/setting-up-historical-logs" + log "https://helpcenter.plextrac.com/s/article/Setting-Up-Historical-Logs" } function plextrac_start_podman() { diff --git a/src/plextrac b/src/plextrac index bcdfaa3..75b5c96 100755 --- a/src/plextrac +++ b/src/plextrac @@ -1,7 +1,7 @@ #!/bin/bash set -Eeuo pipefail -VERSION=0.7.16 +VERSION=0.7.17 ## Podman Global Declaration Variable declare -A svcValues @@ -125,7 +125,6 @@ function mod_help() { log "info ${DIM}display information about the current PlexTrac Instance${RESET}" log "install ${DIM}install PlexTrac (assumes previously initialized system)${RESET}" log "logs ${DIM}display logs from PlexTrac services. Usage: ${GREEN}plextrac logs [-s|--service plextracapi|plextracnginx|plextracdb|etc]${RESET}" - log "migrate ${DIM}migrate current instance from legacy management scripts${RESET}" log "reload-cert ${DIM}reload PlexTrac SSL certificates${RESET}" log "restore ${DIM}restore instance from backups${RESET}" log "start ${DIM}manually start a PlexTrac instance if normal processes did not succeed${RESET}" @@ -137,9 +136,10 @@ function mod_help() { log " -d | --debug ${DIM}enables debug output VERY NOISY${RESET}" log " -v | --verbose ${DIM}enables verbose output, helpful for troubleshooting errors${RESET}" log " -y | --assume-yes ${DIM}assumes yes to all questions in script${RESET}" - log " -uid | --user-id ${DIM}during initialization, assign a specific user ID on 'plextrac' user creation${RESET}" - log " --install-dir | --plextrac-home ${DIM}path to non-standard install directory. The default is /opt/plextrac${RESET}" + log " -uid | --user-id ${DIM}during initialization, assign a specific user ID on 'plextrac' user creation${RESET}" + log " --install-dir | --plextrac-home ${DIM}path to non-standard install directory. The default is /opt/plextrac${RESET}. Must be used during initialization." log " --install-timeout NUM ${DIM}seconds to wait for install migrations to complete. The default is 600 (10 mins)${RESET}" + log " --skip-system-updates ${DIM}skip system updates during the initialization step${RESET}" } @@ -243,6 +243,10 @@ function main() { AIRGAPPED="true" shift ;; + "--skip-system-updates") + SKIP_SYSTEM_UPDATE="true" + shift + ;; *) if declare -f mod_$1 >/dev/null 2>&1; then # enable event logging for sub commands @@ -316,7 +320,11 @@ function mod_initialize() { requires_user_root if [ "${AIRGAPPED:-false}" == "false" ]; then info "Setting up system packages" - system_packages__do_system_upgrade + if [ "${SKIP_SYSTEM_UPDATE:-false}" == "false" ]; then + system_packages__do_system_upgrade + else + info "SKIP_SYSTEM_UPDATE is set to true. Skipping system updates." + fi system_packages__install_system_dependencies if [ "$CONTAINER_RUNTIME" == "docker" ]; then install_docker "${FORCEUPGRADE-}" @@ -392,7 +400,7 @@ function mod_install() { info "Post installation note:" log "If you wish to have access to historical logs, you can configure docker to send logs to journald." log "Please see the config steps at" - log "https://docs.plextrac.com/plextrac-documentation/product-documentation-1/on-premise-management/setting-up-historical-logs" + log "https://helpcenter.plextrac.com/s/article/Setting-Up-Historical-Logs" else plextrac_install_podman "svcValues" fi