From 946a6088923016631e870943e9b904fe821d48d6 Mon Sep 17 00:00:00 2001 From: Leonardo Amaral Date: Tue, 11 Jun 2024 18:03:33 -0300 Subject: [PATCH 1/2] docker: arm: T6474: Initial support for dynamic arch toml loading. Signed-off-by: Leonardo Amaral --- docker-vyos/Dockerfile | 8 +++--- docker-vyos/vyos_install_common.sh | 2 +- tools/container/config.boot.default | 40 +++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 tools/container/config.boot.default diff --git a/docker-vyos/Dockerfile b/docker-vyos/Dockerfile index 95fe6ee38c..0233817b5a 100644 --- a/docker-vyos/Dockerfile +++ b/docker-vyos/Dockerfile @@ -37,30 +37,32 @@ RUN apt-get update && apt-get install -y \ # Copy installer script and default build settings COPY [ "data/defaults.toml", \ - "data/architectures/amd64.toml", \ "data/live-build-config/archives/*", \ "docker-vyos/vyos_install_common.sh", \ "docker-vyos/vyos_install_stage_01.sh", \ "/tmp/"] +COPY [ "data/architectures/*", "/tmp/architectures_triage/" ] COPY [ "data/live-build-config/hooks/live/*", "/tmp/hooks/" ] # Install VyOS dependencies WORKDIR /tmp +RUN bash -c 'mv /tmp/architectures_triage/$(dpkg --print-architecture).toml /tmp && rm -rf /tmp/architectures_triage' RUN bash /tmp/vyos_install_stage_01.sh # Install VyOS specific software COPY [ "data/defaults.toml", \ - "data/architectures/amd64.toml", \ "docker-vyos/vyos_install_common.sh", \ "docker-vyos/vyos_install_stage_02.sh", "/tmp/" ] +COPY [ "data/architectures/*", "/tmp/architectures_triage/" ] +RUN bash -c 'mv /tmp/architectures_triage/$(dpkg --print-architecture).toml /tmp && rm -rf /tmp/architectures_triage' RUN bash /tmp/vyos_install_stage_02.sh # Tune system for VyOS COPY [ "docker-vyos/vyos_install_common.sh", "docker-vyos/vyos_install_stage_03.sh", "/tmp/" ] # Copy default config -COPY data/live-build-config/includes.chroot/opt/vyatta/etc/config.boot.default /opt/vyatta/etc/ +COPY tools/container/config.boot.default /opt/vyatta/etc/ RUN bash /tmp/vyos_install_stage_03.sh diff --git a/docker-vyos/vyos_install_common.sh b/docker-vyos/vyos_install_common.sh index 7d2ed7e3a9..1fa91d60cb 100644 --- a/docker-vyos/vyos_install_common.sh +++ b/docker-vyos/vyos_install_common.sh @@ -25,7 +25,7 @@ function prepare_apt() { # Add VyOS repository to the system local APT_VYOS_MIRROR=$(tomlq --raw-output .vyos_mirror /tmp/defaults.toml) local APT_VYOS_BRANCH=$(tomlq --raw-output .vyos_branch /tmp/defaults.toml) - local APT_ADDITIONAL_REPOS=$(tomlq --raw-output .additional_repositories[] /tmp/amd64.toml) + local APT_ADDITIONAL_REPOS=$(tomlq --raw-output .additional_repositories[] /tmp/$(dpkg --print-architecture).toml) local RELEASE_TRAIN=$(tomlq --raw-output .release_train /tmp/defaults.toml) echo "APT_VYOS_MIRROR : $APT_VYOS_MIRROR" diff --git a/tools/container/config.boot.default b/tools/container/config.boot.default new file mode 100644 index 0000000000..f115c4420d --- /dev/null +++ b/tools/container/config.boot.default @@ -0,0 +1,40 @@ +system { + host-name vyos + login { + user vyos { + authentication { + encrypted-password "*" + plaintext-password "" + } + level admin + } + } + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "time1.vyos.net" + server "time2.vyos.net" + server "time3.vyos.net" + } + console { + device ttyS0 { + speed 115200 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} From c0af57d68c7bfefcd65bb460ef28b79cadc5a087 Mon Sep 17 00:00:00 2001 From: Leonardo Amaral Date: Tue, 11 Jun 2024 18:04:01 -0300 Subject: [PATCH 2/2] docker: arm: T6474: Added Salt Project repo for armhf Signed-off-by: Leonardo Amaral --- data/architectures/armhf.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/architectures/armhf.toml b/data/architectures/armhf.toml index 252c85d47c..de5e62f4b0 100644 --- a/data/architectures/armhf.toml +++ b/data/architectures/armhf.toml @@ -1,2 +1,6 @@ +additional_repositories = [ + "deb [arch=armhf] https://repo.saltproject.io/py3/debian/11/armhf/3005 bullseye main" +] + # Packages included in armhf images by default packages = ["grub-efi-arm"]