Sync workspace: config, docs, scripts, CI, operator rules, and submodule pointers.
- Update dbis_core, cross-chain-pmm-lps, explorer-monorepo, metamask-integration, pr-workspace/chains - Omit embedded publish git dirs and empty placeholders from index Made-with: Cursor
This commit is contained in:
@@ -20,6 +20,7 @@ fi
|
||||
|
||||
PRIMARY_HOST="${PRIMARY_HOST:-192.168.11.11}"
|
||||
SECONDARY_HOST="${SECONDARY_HOST:-192.168.11.12}"
|
||||
REMOTE_PROJECT_ROOT="${REMOTE_PROJECT_ROOT:-$PROJECT_ROOT}"
|
||||
|
||||
# Colors
|
||||
GREEN='\033[0;32m'
|
||||
@@ -41,14 +42,21 @@ bash "$SCRIPT_DIR/sync-certificates.sh" || {
|
||||
|
||||
# Set up cron job on primary
|
||||
log_info "Setting up automated certificate sync (cron job)..."
|
||||
CRON_CMD="*/5 * * * * $PROJECT_ROOT/scripts/npmplus/sync-certificates.sh >> /var/log/npmplus-cert-sync.log 2>&1"
|
||||
|
||||
# Check if cron job already exists
|
||||
if ssh -o StrictHostKeyChecking=no root@"$PRIMARY_HOST" "crontab -l 2>/dev/null | grep -q 'sync-certificates.sh'"; then
|
||||
log_info "Cron job already exists"
|
||||
else
|
||||
ssh -o StrictHostKeyChecking=no root@"$PRIMARY_HOST" "(crontab -l 2>/dev/null; echo '$CRON_CMD') | crontab -"
|
||||
log_success "Cron job added to primary host"
|
||||
if [[ "$REMOTE_PROJECT_ROOT" == /tmp/* ]]; then
|
||||
log_warn "Refusing to install cron from ephemeral remote path: $REMOTE_PROJECT_ROOT"
|
||||
log_warn "Set REMOTE_PROJECT_ROOT to a persistent checkout on the target host."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! ssh -o StrictHostKeyChecking=no root@"$PRIMARY_HOST" "test -f '$REMOTE_PROJECT_ROOT/scripts/npmplus/sync-certificates.sh'"; then
|
||||
log_warn "Remote project root missing on $PRIMARY_HOST: $REMOTE_PROJECT_ROOT"
|
||||
log_warn "Skipping cron install to avoid a broken host path."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
CRON_CMD="*/5 * * * * cd $REMOTE_PROJECT_ROOT && bash $REMOTE_PROJECT_ROOT/scripts/npmplus/sync-certificates.sh >> /var/log/npmplus-cert-sync.log 2>&1"
|
||||
|
||||
ssh -o StrictHostKeyChecking=no root@"$PRIMARY_HOST" "{ crontab -l 2>/dev/null | grep -v 'sync-certificates.sh' || true; echo '$CRON_CMD'; } | crontab -"
|
||||
log_success "Cron job installed on primary host"
|
||||
|
||||
log_success "Phase 2 complete: Certificate sync configured"
|
||||
|
||||
@@ -19,6 +19,7 @@ if [ -f "$PROJECT_ROOT/.env" ]; then
|
||||
fi
|
||||
|
||||
PRIMARY_HOST="${PRIMARY_HOST:-192.168.11.11}"
|
||||
REMOTE_PROJECT_ROOT="${REMOTE_PROJECT_ROOT:-$PROJECT_ROOT}"
|
||||
|
||||
log_info() { echo -e "\033[0;34m[INFO]\033[0m $1"; }
|
||||
log_success() { echo -e "\033[0;32m[✓]\033[0m $1"; }
|
||||
@@ -26,13 +27,21 @@ log_success() { echo -e "\033[0;32m[✓]\033[0m $1"; }
|
||||
log_info "Setting up monitoring..."
|
||||
|
||||
# Set up HA status monitoring cron job
|
||||
CRON_CMD="*/5 * * * * $PROJECT_ROOT/scripts/npmplus/monitor-ha-status.sh >> /var/log/npmplus-ha-monitor.log 2>&1"
|
||||
|
||||
if ssh -o StrictHostKeyChecking=no root@"$PRIMARY_HOST" "crontab -l 2>/dev/null | grep -q 'monitor-ha-status.sh'"; then
|
||||
log_info "HA monitoring cron job already exists"
|
||||
else
|
||||
ssh -o StrictHostKeyChecking=no root@"$PRIMARY_HOST" "(crontab -l 2>/dev/null; echo '$CRON_CMD') | crontab -"
|
||||
log_success "HA monitoring cron job added"
|
||||
if [[ "$REMOTE_PROJECT_ROOT" == /tmp/* ]]; then
|
||||
log_info "Refusing to install cron from ephemeral remote path: $REMOTE_PROJECT_ROOT"
|
||||
log_info "Set REMOTE_PROJECT_ROOT to a persistent checkout on the target host."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! ssh -o StrictHostKeyChecking=no root@"$PRIMARY_HOST" "test -f '$REMOTE_PROJECT_ROOT/scripts/npmplus/monitor-ha-status.sh'"; then
|
||||
log_info "Remote project root missing on $PRIMARY_HOST: $REMOTE_PROJECT_ROOT"
|
||||
log_info "Skipping cron install to avoid a broken host path."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
CRON_CMD="*/5 * * * * cd $REMOTE_PROJECT_ROOT && bash $REMOTE_PROJECT_ROOT/scripts/npmplus/monitor-ha-status.sh >> /var/log/npmplus-ha-monitor.log 2>&1"
|
||||
|
||||
ssh -o StrictHostKeyChecking=no root@"$PRIMARY_HOST" "{ crontab -l 2>/dev/null | grep -v 'monitor-ha-status.sh' || true; echo '$CRON_CMD'; } | crontab -"
|
||||
log_success "HA monitoring cron job installed"
|
||||
|
||||
log_success "Phase 5 complete: Monitoring configured"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Fix NPMplus (VMID 10233) network: set correct IP and gateway, then start container.
|
||||
# Fix NPMplus (VMID 10233) network: restore the correct LAN gateway and preserve the
|
||||
# documented dual-address layout when present (.166 for admin, .167 for UDM Pro/public ingress).
|
||||
# Run on Proxmox host r630-01 or: ssh root@192.168.11.11 'bash -s' < scripts/npmplus/fix-npmplus-ip-and-gateway.sh
|
||||
# Uses: IP 192.168.11.167 (UDM Pro), gateway 192.168.11.1.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
@@ -10,6 +10,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
[ -f "${PROJECT_ROOT}/config/ip-addresses.conf" ] && source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
|
||||
|
||||
VMID="${NPMPLUS_VMID:-10233}"
|
||||
NPM_IP_ETH0="${IP_NPMPLUS_ETH0:-192.168.11.166}"
|
||||
NPM_IP="${IP_NPMPLUS:-192.168.11.167}"
|
||||
GATEWAY="${NETWORK_GATEWAY:-192.168.11.1}"
|
||||
|
||||
@@ -18,8 +19,21 @@ if ! command -v pct &>/dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "NPMplus VMID $VMID: set IP=$NPM_IP gateway=$GATEWAY and start"
|
||||
pct set "$VMID" --net0 name=eth0,bridge=vmbr0,ip="${NPM_IP}/24",gw="${GATEWAY}" 2>/dev/null || true
|
||||
CURRENT_CFG="$(pct config "$VMID" 2>/dev/null || true)"
|
||||
HAS_NET1=0
|
||||
if grep -q '^net1:' <<<"$CURRENT_CFG"; then
|
||||
HAS_NET1=1
|
||||
fi
|
||||
|
||||
echo "NPMplus VMID $VMID: restore gateway=$GATEWAY and start"
|
||||
if [[ "$HAS_NET1" == "1" ]]; then
|
||||
echo "Preserving dual-interface layout: eth0=${NPM_IP_ETH0}, eth1=${NPM_IP}"
|
||||
pct set "$VMID" -net0 "name=eth0,bridge=vmbr0,ip=${NPM_IP_ETH0}/24"
|
||||
pct set "$VMID" -net1 "name=eth1,bridge=vmbr0,ip=${NPM_IP}/24,gw=${GATEWAY}"
|
||||
else
|
||||
echo "Single-interface layout detected: eth0=${NPM_IP}"
|
||||
pct set "$VMID" -net0 "name=eth0,bridge=vmbr0,ip=${NPM_IP}/24,gw=${GATEWAY}"
|
||||
fi
|
||||
pct stop "$VMID" 2>/dev/null || true
|
||||
sleep 2
|
||||
pct start "$VMID"
|
||||
|
||||
Reference in New Issue
Block a user