Initialize /config from /etc, except for existing files (like bind-mounts). Move to using /config in VPP, even though there is a backwards compat symlink from /etc/{frr,bird,vpp} to /config
This commit is contained in:
@@ -10,7 +10,7 @@ ARG REPO=release
|
||||
EXPOSE 22/tcp
|
||||
RUN apt-get update && apt-get -y install curl procps tcpdump iproute2 iptables \
|
||||
iputils-ping net-tools git python3 python3-pip vim-tiny openssh-server \
|
||||
mtr-tiny traceroute && apt-get clean
|
||||
mtr-tiny traceroute rsync && apt-get clean
|
||||
|
||||
# Install VPP - sideload from local debs if --build-context vppdebs=<path> is provided,
|
||||
# otherwise install from packagecloud. Debs are bind-mounted and never stored in a layer.
|
||||
@@ -47,8 +47,6 @@ RUN curl -s -o /usr/share/keyrings/cznic-labs-pkg.gpg https://pkg.labs.nic.cz/gp
|
||||
|
||||
# Config files
|
||||
COPY files/etc/ /etc/
|
||||
RUN mkdir /config \
|
||||
&& for i in vpp bird frr; do mv /etc/$i /config/$i; ln -sf /config/$i /etc/$i; done
|
||||
COPY files/init-container.sh /sbin/
|
||||
RUN chmod 755 /sbin/init-container.sh
|
||||
CMD ["/sbin/init-container.sh"]
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
mpls table add 0
|
||||
set ip neighbor-config ip4 age 900
|
||||
set ip neighbor-config ip6 age 900
|
||||
lcp lcp-auto-subint off
|
||||
lcp default netns dataplane
|
||||
lcp lcp-sync on
|
||||
lcp lcp-sync-unnumbered on
|
||||
lcp param del-static-on-link-down on
|
||||
lcp param del-dynamic-on-link-down on
|
||||
exec /etc/vpp/config/manual-pre.vpp
|
||||
exec /etc/vpp/config/clab.vpp
|
||||
exec /etc/vpp/config/vppcfg.vpp
|
||||
exec /etc/vpp/config/manual-post.vpp
|
||||
lcp lcp-auto-subint off
|
||||
exec /config/vpp/config/manual-pre.vpp
|
||||
exec /config/vpp/config/clab.vpp
|
||||
exec /config/vpp/config/vppcfg.vpp
|
||||
exec /config/vpp/config/manual-post.vpp
|
||||
|
||||
@@ -9,7 +9,7 @@ unix {
|
||||
cli-prompt vpp-clab#
|
||||
cli-no-pager
|
||||
poll-sleep-usec 100
|
||||
exec /etc/vpp/bootstrap.vpp
|
||||
exec /config/vpp/bootstrap.vpp
|
||||
}
|
||||
|
||||
api-trace {
|
||||
|
||||
@@ -19,6 +19,13 @@ sed -i -e 's,^#PermitRootLogin prohibit-password,PermitRootLogin yes,' /etc/ssh/
|
||||
sed -i -e 's,^root:.*,root:$y$j9T$kG8pyZEVmwLXEtXekQCRK.$9iJxq/bEx5buni1hrC8VmvkDHRy7ZMsw9wYvwrzexID:20211::::::,' /etc/shadow
|
||||
/etc/init.d/ssh start
|
||||
|
||||
echo "Initializing /config"
|
||||
for dir in vpp bird frr; do
|
||||
rsync -av --ignore-existing /etc/$dir/ /config/$dir/
|
||||
rm -rf /etc/$dir/
|
||||
ln -s /config/$dir /etc/$dir
|
||||
done
|
||||
|
||||
if [ "$BIRD_ENABLED" == "true" ]; then
|
||||
echo "Starting Bird in $NETNS"
|
||||
mkdir -p /run/bird /var/log/bird
|
||||
|
||||
@@ -7,7 +7,7 @@ topology:
|
||||
image: git.ipng.ch/ipng/vpp-containerlab:latest
|
||||
startup-config: config/__clabNodeName__/vppcfg.yaml
|
||||
binds:
|
||||
- config/__clabNodeName__/bird-local.conf:/etc/bird/bird-local.conf:ro
|
||||
- config/__clabNodeName__/bird-local.conf:/config/bird/bird-local.conf:ro
|
||||
linux:
|
||||
image: ghcr.io/srl-labs/network-multitool:latest
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ topology:
|
||||
image: git.ipng.ch/ipng/vpp-containerlab:latest
|
||||
startup-config: config/__clabNodeName__/vppcfg.yaml
|
||||
binds:
|
||||
- config/__clabNodeName__/frr.conf:/etc/frr/frr.conf
|
||||
- config/__clabNodeName__/frr.conf:/config/frr/frr.conf
|
||||
env-files:
|
||||
- config/lab-frr.env
|
||||
linux:
|
||||
|
||||
Reference in New Issue
Block a user