f-87: deploy: vxlan-public sur br-public, --public_vni (1), lab au VNI 1 #87
bootstrap_kvm.sh crée vxlan-public (VTEP = IPv4 du bridge principal, nolearning) esclave du bridge public, recréé si le VNI ou le VTEP change. Lab : bordures au VNI 1 (MAC 02:01:00:00:00:01) ; build.sh copie bootstrap_kvm.sh, que hypervisor.sh appelle après la release 0.2.0. Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
5061e773df
commit
7535e068b9
10 changed files with 90 additions and 27 deletions
|
|
@ -1,16 +1,16 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
VNI=66001
|
||||
VNI=1
|
||||
GATEWAY=240.0.0.1/24
|
||||
GATEWAY_MAC=02:01:00:01:01:d1
|
||||
GATEWAY_MAC=02:01:00:00:00:01
|
||||
DESTINATION=240.255.0.1/32
|
||||
VTEP=$(ip -4 -o addr show dev "${LAB_UPLINK}" scope global | awk 'NR == 1 {sub("/.*", "", $4); print $4}')
|
||||
[ -n "${VTEP}" ] || { echo "border: no IPv4 on ${LAB_UPLINK}" >&2; exit 1; }
|
||||
ip link add br-public type bridge
|
||||
ip link set br-public address "${GATEWAY_MAC}"
|
||||
ip link add "vxlan-${VNI}" type vxlan id "${VNI}" local "${VTEP}" dstport 4789 nolearning
|
||||
ip link set "vxlan-${VNI}" mtu 1500 master br-public
|
||||
ip link set "vxlan-${VNI}" up
|
||||
ip link add vxlan-public type vxlan id "${VNI}" local "${VTEP}" dstport 4789 nolearning
|
||||
ip link set vxlan-public mtu 1500 master br-public
|
||||
ip link set vxlan-public up
|
||||
ip link set br-public up
|
||||
ip addr add "${GATEWAY}" dev br-public
|
||||
ip link add internet type dummy
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
RELEASE=0.2.0
|
||||
PUBLIC_VNI=1
|
||||
GIT_SERVER=https://git.g3e.fr/
|
||||
REPO=syonad/two
|
||||
n=0
|
||||
|
|
@ -29,6 +30,11 @@ done
|
|||
chmod 0755 deploy.sh bootstrap_kvm.sh
|
||||
bash ./deploy.sh --noup_script -i -u "${LAB_UPLINK}" -t "${RELEASE}"
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends nftables
|
||||
if [ -f "${LAB_FILES}/scripts/bootstrap_kvm.sh" ]; then
|
||||
bash -c 'FLAGS_TRUE=0; FLAGS_FALSE=1; . ./deploy.sh && . "$1" && kvm_public_segment "${FLAGS_FALSE}" "${FLAGS_TRUE}" br-000000 br-public "$2"' \
|
||||
lab "${LAB_FILES}/scripts/bootstrap_kvm.sh" "${PUBLIC_VNI}"
|
||||
echo "lab: segment public posé par le bootstrap_kvm.sh de l'arbre courant (VNI ${PUBLIC_VNI})"
|
||||
fi
|
||||
for binary in "${LAB_FILES}"/bin/*; do
|
||||
[ -f "${binary}" ] || continue
|
||||
name=$(basename "${binary}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue