Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: arm: T6474: Initial support for dynamic arch toml loading #653

Merged
merged 2 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions data/architectures/armhf.toml
Original file line number Diff line number Diff line change
@@ -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"]
8 changes: 5 additions & 3 deletions docker-vyos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docker-vyos/vyos_install_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
40 changes: 40 additions & 0 deletions tools/container/config.boot.default
Original file line number Diff line number Diff line change
@@ -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 {
}
}
Loading