mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-29 18:55:01 +02:00
03963b5193
* Add host-migrate.sh Proxmox VE tool Add tools/pve/host-migrate.sh — an interactive Proxmox VE host migration utility. The script (whiptail UI) can export host configuration, /etc tarball, SSH keys, APT state and LXC/QEMU guests (vzdump or config-only) into a timestamped bundle, with optional on-demand NFS mounting. It also supports importing bundles to restore guests and selective host components (storage, users, SSH, APT, hosts, network, hostname) with explicit warnings for dangerous operations (network/hostname). Implements preflight checks, manifest creation, storage mapping checks, cleanup trap for NFS, and integrates helper functions loaded from the project's core scripts. * Improve storage prep & mounting in host-migrate Add interactive storage preparation and safer mount handling for host-migrate. - Track and clean up on-demand mounts via TEMP_MOUNTS and extend cleanup handler. - Add helpers: _new_mountpoint, _offer_fstab, mount_existing_fs, format_and_mount, create_lv_and_mount to mount, format, or create LVs and optionally persist to /etc/fstab. - Enhance browse_mounts to list unmounted block devices and LVM VGs, offer mount/format/LV creation, and return prepared mount via BROWSE_RESULT. - Integrate prepared target into choose_location and do_export; show free-space warning before export. - Improve vzdump output detection to pick the newest non-log file. - Minor UX/message tweaks and quoting fixes for backup filenames when restoring storage.cfg and /etc/hosts. These changes let users pick or prepare target storage (mount existing FS, format disks, create LVs) interactively and ensures temporary mounts are cleaned up. * fixes for npm, loki, omada, wishlist Remove promtail from loki/alpine-loki Replace node execstart in npm during update add user agent to omada download use pnpm 11 for wishlist * remove Host migrate --------- Co-authored-by: MickLesk <mickey.leskowitz@gmail.com> Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
77 lines
1.8 KiB
Bash
77 lines
1.8 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021-2025 community-scripts ORG
|
|
# Author: hoholms
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://github.com/grafana/loki
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
color
|
|
verb_ip6
|
|
catch_errors
|
|
setting_up_container
|
|
network_check
|
|
update_os
|
|
|
|
msg_info "Installing Loki"
|
|
$STD apk add loki
|
|
$STD sed -i '/http_addr/s/127.0.0.1/0.0.0.0/g' /etc/conf.d/loki
|
|
mkdir -p /var/lib/loki/{chunks,boltdb-shipper-active,boltdb-shipper-cache}
|
|
chown -R loki:grafana /var/lib/loki
|
|
mkdir -p /var/log/loki
|
|
chown -R loki:grafana /var/log/loki
|
|
cat <<EOF >/etc/loki/loki-local-config.yaml
|
|
auth_enabled: false
|
|
|
|
server:
|
|
http_listen_port: 3100
|
|
log_level: info
|
|
|
|
common:
|
|
instance_addr: 127.0.0.1
|
|
path_prefix: /var/lib/loki
|
|
storage:
|
|
filesystem:
|
|
chunks_directory: /var/lib/loki/chunks
|
|
rules_directory: /var/lib/loki/rules
|
|
replication_factor: 1
|
|
ring:
|
|
kvstore:
|
|
store: inmemory
|
|
|
|
schema_config:
|
|
configs:
|
|
- from: 2020-10-24
|
|
store: tsdb
|
|
object_store: filesystem
|
|
schema: v13
|
|
index:
|
|
prefix: index_
|
|
period: 24h
|
|
|
|
query_range:
|
|
results_cache:
|
|
cache:
|
|
embedded_cache:
|
|
enabled: true
|
|
max_size_mb: 100
|
|
|
|
limits_config:
|
|
metric_aggregation_enabled: true
|
|
|
|
ruler:
|
|
alertmanager_url: http://localhost:9093
|
|
EOF
|
|
chown loki:grafana /etc/loki/loki-local-config.yaml
|
|
chmod 644 /etc/loki/loki-local-config.yaml
|
|
echo "output_log=\"\${output_log:-/var/log/loki/output.log}\"" >> /etc/init.d/loki
|
|
echo "error_log=\"\${error_log:-/var/log/loki/error.log}\"" >> /etc/init.d/loki
|
|
echo "start_stop_daemon_args=\"\${SSD_OPTS} -1 \${output_log} -2 \${error_log}\"" >> /etc/init.d/loki
|
|
$STD rc-update add loki default
|
|
$STD rc-service loki start
|
|
msg_ok "Installed Loki"
|
|
|
|
motd_ssh
|
|
customize
|
|
cleanup_lxc
|