mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-30 17:52:54 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c9e3eb898b | |||
| f4a3ed1ec8 |
@@ -0,0 +1,6 @@
|
||||
____ _ ____ __
|
||||
/ __ \____ ___ ____ (_) __ \____ __ __/ /____
|
||||
/ / / / __ `__ \/ __ \/ / /_/ / __ \/ / / / __/ _ \
|
||||
/ /_/ / / / / / / / / / / _, _/ /_/ / /_/ / /_/ __/
|
||||
\____/_/ /_/ /_/_/ /_/_/_/ |_|\____/\__,_/\__/\___/
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
____ ____
|
||||
/ __ \___ ____ _____ _/ __ \_________ _ __
|
||||
/ /_/ / _ \/ __ `/ __ `/ /_/ / ___/ __ \| |/_/
|
||||
/ ____/ __/ /_/ / /_/ / ____/ / / /_/ /> <
|
||||
/_/ \___/\__, /\__,_/_/ /_/ \____/_/|_|
|
||||
/____/
|
||||
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/diegosouzapw/OmniRoute
|
||||
|
||||
APP="OmniRoute"
|
||||
var_tags="${var_tags:-ai;gateway;llm}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-no}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/omniroute ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Checking for Updates"
|
||||
local LATEST
|
||||
LATEST=$(npm view omniroute version 2>/dev/null)
|
||||
if [[ -z "$LATEST" ]]; then
|
||||
msg_error "Could not determine latest OmniRoute version"
|
||||
exit
|
||||
fi
|
||||
if [[ "$LATEST" == "$(omniroute --version 2>/dev/null)" ]]; then
|
||||
msg_ok "Already up to date (${LATEST})"
|
||||
exit
|
||||
fi
|
||||
msg_ok "New version available: ${LATEST}"
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop omniroute
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating OmniRoute to ${LATEST}"
|
||||
$STD npm install -g omniroute@latest
|
||||
msg_ok "Updated OmniRoute to ${LATEST}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start omniroute
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:20128${CL}"
|
||||
echo -e "${INFO}${YW} The admin password is stored in /opt/omniroute/.env (INITIAL_PASSWORD)${CL}"
|
||||
@@ -1,64 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/PegaProx/project-pegaprox
|
||||
|
||||
APP="PegaProx"
|
||||
var_tags="${var_tags:-proxmox;management}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-no}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/pegaprox ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "pegaprox" "PegaProx/project-pegaprox"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop pegaprox
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
create_backup /opt/pegaprox/config /etc/pegaprox/secret.key
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pegaprox" "PegaProx/project-pegaprox" "tarball"
|
||||
|
||||
msg_info "Updating Python Environment"
|
||||
$STD uv venv --python 3.12 /opt/pegaprox/venv
|
||||
$STD uv pip install --python /opt/pegaprox/venv/bin/python -r /opt/pegaprox/requirements.txt
|
||||
msg_ok "Updated Python Environment"
|
||||
|
||||
restore_backup
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start pegaprox
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:5000${CL}"
|
||||
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/diegosouzapw/OmniRoute
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Installing OmniRoute"
|
||||
$STD npm install -g omniroute@latest
|
||||
msg_ok "Installed OmniRoute"
|
||||
|
||||
msg_info "Configuring OmniRoute"
|
||||
mkdir -p /opt/omniroute
|
||||
cat <<EOF >/opt/omniroute/.env
|
||||
JWT_SECRET=$(openssl rand -base64 48)
|
||||
API_KEY_SECRET=$(openssl rand -hex 32)
|
||||
STORAGE_ENCRYPTION_KEY=$(openssl rand -hex 32)
|
||||
STORAGE_ENCRYPTION_KEY_VERSION=v1
|
||||
INITIAL_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-20)
|
||||
PORT=20128
|
||||
OMNIROUTE_SERVER_HOST=0.0.0.0
|
||||
EOF
|
||||
chmod 600 /opt/omniroute/.env
|
||||
msg_ok "Configured OmniRoute"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/omniroute.service
|
||||
[Unit]
|
||||
Description=OmniRoute AI Gateway
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/omniroute
|
||||
Environment=DATA_DIR=/opt/omniroute
|
||||
ExecStart=/usr/bin/omniroute
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now omniroute
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,60 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/PegaProx/project-pegaprox
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y sshpass
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
fetch_and_deploy_gh_release "pegaprox" "PegaProx/project-pegaprox" "tarball"
|
||||
|
||||
msg_info "Setting up Python Environment"
|
||||
$STD uv venv --python 3.12 /opt/pegaprox/venv
|
||||
$STD uv pip install --python /opt/pegaprox/venv/bin/python -r /opt/pegaprox/requirements.txt
|
||||
msg_ok "Set up Python Environment"
|
||||
|
||||
msg_info "Generating Master Key"
|
||||
mkdir -p /etc/pegaprox
|
||||
cat <<EOF >/etc/pegaprox/secret.key
|
||||
$(openssl rand -base64 32 | tr '+/' '-_')
|
||||
EOF
|
||||
chmod 600 /etc/pegaprox/secret.key
|
||||
msg_ok "Generated Master Key"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/pegaprox.service
|
||||
[Unit]
|
||||
Description=PegaProx - Multi-Cluster Proxmox VE Management
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/pegaprox
|
||||
ExecStart=/opt/pegaprox/venv/bin/python /opt/pegaprox/pegaprox_multi_cluster.py
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now pegaprox
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user