Updates to ip addressing of VMs on bridge.

This commit is contained in:
Derek Smith 2022-08-20 17:42:38 -04:00
parent 968b39df79
commit 207d88e90b
Signed by: farscapian
GPG Key ID: 8F1CD799CCA516CC
2 changed files with 24 additions and 9 deletions

View File

@ -101,7 +101,7 @@ EOL
ssh "ubuntu@$FQDN" ip link ssh "ubuntu@$FQDN" ip link
echo "Please enter the network interface that's dedicated to the Sovereign Stack data plane: " echo "Please enter the network interface that's dedicated to the Sovereign Stack data plane: "
read DATA_PLANE_MACVLAN_INTERFACE read -r DATA_PLANE_MACVLAN_INTERFACE
fi fi
@ -113,7 +113,7 @@ EOL
USER_DISK= USER_DISK=
echo "Please enter the disk or partition that Sovereign Stack will use to store data (default: loop): " echo "Please enter the disk or partition that Sovereign Stack will use to store data (default: loop): "
read USER_DISK read -r USER_DISK
fi fi
@ -200,14 +200,13 @@ networks:
- name: lxdbrSS - name: lxdbrSS
type: bridge type: bridge
config: config:
ipv4.nat: "true" ipv4.nat: "false"
ipv6.address: "none" ipv6.address: "none"
dns.mode: "dynamic"
managed: true managed: true
description: ss-config,${DATA_PLANE_MACVLAN_INTERFACE:-},${DISK_TO_USE:-} description: ss-config,${DATA_PLANE_MACVLAN_INTERFACE:-},${DISK_TO_USE:-}
# lxdbrSS is an isolated bridge; no Internet access.
storage_pools: []
projects: []
cluster: cluster:
server_name: ${CLUSTER_NAME} server_name: ${CLUSTER_NAME}
enabled: true enabled: true

View File

@ -191,10 +191,26 @@ else
set-name: enp5s0 set-name: enp5s0
enp6s0: enp6s0:
dhcp4: true dhcp4: false
EOF EOF
if [[ "$LXD_HOSTNAME" = www-* ]]; then
cat >> "$YAML_PATH" <<EOF
addresses: [10.139.144.5/24]
nameservers:
addresses: [10.139.144.1]
EOF
fi
if [[ "$LXD_HOSTNAME" = btcpay-* ]]; then
cat >> "$YAML_PATH" <<EOF
addresses: [10.139.144.10/24]
nameservers:
addresses: [10.139.144.1]
EOF
fi
fi fi
# If we are deploying the www, we attach the vm to the underlay via macvlan. # If we are deploying the www, we attach the vm to the underlay via macvlan.
@ -213,7 +229,7 @@ EOF
# TODO get the sovereign-stack lxc profile OFF the lxdbrSS bridge network. # TODO get the sovereign-stack lxc profile OFF the lxdbrSS bridge network.
echo "DATA_PLANE_MACVLAN_INTERFACE: $DATA_PLANE_MACVLAN_INTERFACE" echo "DATA_PLANE_MACVLAN_INTERFACE: $DATA_PLANE_MACVLAN_INTERFACE"
if [ "$VIRTUAL_MACHINE" = sovereign-stack ] ; then if [ "$LXD_HOSTNAME" = sovereign-stack ] ; then
# If we are deploying the www, we attach the vm to the underlay via macvlan. # If we are deploying the www, we attach the vm to the underlay via macvlan.
cat >> "$YAML_PATH" <<EOF cat >> "$YAML_PATH" <<EOF