separated bootstrap bridge...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-10-19 13:59:43 +03:00
parent 73b4a27b9d
commit c659f54563
8 changed files with 19 additions and 18 deletions

View File

@ -110,11 +110,14 @@ gate: gate-traefik
.PHONY: bootstrap .PHONY: bootstrap
bootstrap: host-bootstrap gate-bootstrap \ bootstrap: host-bootstrap gate-bootstrap \
ns \ ns \
ssh \
wireguard \ wireguard \
bootstrap-clean bootstrap-clean
# NOTE: host-bootstrap-clean will drop all connections to the server...
.PHONY: bootstrap-clean .PHONY: bootstrap-clean
bootstrap-clean: gate-bootstrap-clean host-bootstrap-clean bootstrap-clean: gate-bootstrap-clean #host-bootstrap-clean

View File

@ -23,19 +23,20 @@
# These are set to the bridge number (the number in 'vmbr#') used for # These are set to the bridge number (the number in 'vmbr#') used for
# a specific network. # a specific network.
# #
# Example:
# WAN_BRIDGE=0
# LAN_BRIDGE=1
# ADMIN_BRIDGE=2
#
# NOTE: on a clean Proxmox install ADMIN is pre-setup, we will use it # NOTE: on a clean Proxmox install ADMIN is pre-setup, we will use it
# for bootstrapping and reconfigure it later. # for bootstrapping and reconfigure it later.
# NOTE: to make things simpler it is recommmended to number bridges # NOTE: to make things simpler it is recommmended to number bridges
# connecting to physical ports the same as ports and virtual # connecting to physical ports the same as ports and virtual
# bridges with numbers greater than X (10 in the example below) # bridges with numbers greater than X (10 in the example below)
# #
ADMIN_BRIDGE=0 # Example:
WAN_BRIDGE=3 # WAN_BRIDGE=0
# ADMIN_BRIDGE=3
# LAN_BRIDGE=10
#
BOOTSTRAP_BRIDGE=0
ADMIN_BRIDGE=00
WAN_BRIDGE=03
LAN_BRIDGE=10 LAN_BRIDGE=10

View File

@ -47,10 +47,7 @@ if ! [ -z $BOOTSTRAP_CLEAN ] ; then
xread "ID: " ID xread "ID: " ID
readBridgeVars readBridgeVars
# XXX update WAN ip... (???) echo "# Reverting gate's WAN bridge to: vmbr${WAN_BRIDGE}..."
# XXX
echo "# Reverting gate's WAN bridge to vmbr${WAN_BRIDGE}..."
@ sed -i \ @ sed -i \
-e 's/^\(net0.*vmbr\)'${ADMIN_BRIDGE}'/\1'${WAN_BRIDGE}'/' \ -e 's/^\(net0.*vmbr\)'${ADMIN_BRIDGE}'/\1'${WAN_BRIDGE}'/' \
/etc/pve/lxc/${ID}.conf /etc/pve/lxc/${ID}.conf
@ -63,8 +60,7 @@ fi
if ! [ -z $BOOTSTRAP ] ; then if ! [ -z $BOOTSTRAP ] ; then
# this will allow the bootstrapped CTs to access the network... # this will allow the bootstrapped CTs to access the network...
WAN_BRIDGE=$ADMIN_BRIDGE WAN_BRIDGE=${ADMIN_BRIDGE}
#DFL_CTHOSTNAME=${DFL_CTHOSTNAME}-bootstrap
fi fi

View File

@ -16,7 +16,7 @@ iface vmbr${WAN_BRIDGE} inet manual
auto vmbr${ADMIN_BRIDGE} auto vmbr${ADMIN_BRIDGE}
iface vmbr${ADMIN_BRIDGE} inet static iface vmbr${ADMIN_BRIDGE} inet static
address ${HOST_ADMIN_IP} address ${HOST_ADMIN_IP}
gateway ${GATE_ADMIN_IPn} #gateway ${GATE_ADMIN_IPn}
bridge-ports ${ADMIN_PORT} bridge-ports ${ADMIN_PORT}
bridge-stp off bridge-stp off
bridge-fd 0 bridge-fd 0

View File

@ -48,6 +48,7 @@ BRIDGES_TPL=bootstrap-bridges.tpl
if ! [ -z $BOOTSTRAP_CLEAN ] ; then if ! [ -z $BOOTSTRAP_CLEAN ] ; then
# XXX switch admin interface IP and Gateway to admin net... # XXX switch admin interface IP and Gateway to admin net...
# current ip -> $HOST_ADMIN_IP
# XXX # XXX
exit exit
fi fi

View File

@ -21,7 +21,7 @@ readConfig
#---------------------------------------------------------------------- #----------------------------------------------------------------------
DFL_ID=${DFL_ID:=102} DFL_ID=${DFL_ID:=120}
DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=ssh} DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=ssh}
DFL_CORES=${DFL_CORES:=1} DFL_CORES=${DFL_CORES:=1}

View File

@ -17,7 +17,7 @@ readConfig
#---------------------------------------------------------------------- #----------------------------------------------------------------------
DFL_ID=${DFL_ID:=1001} DFL_ID=${DFL_ID:=1010}
DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=syncthing} DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=syncthing}
DFL_CORES=${DFL_CORES:=1} DFL_CORES=${DFL_CORES:=1}

View File

@ -21,7 +21,7 @@ would-like dig #qrencode
readConfig readConfig
DFL_ID=${DFL_ID:=103} DFL_ID=${DFL_ID:=130}
DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=wireguard} DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=wireguard}
DFL_CORES=${DFL_CORES:=1} DFL_CORES=${DFL_CORES:=1}