-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
installer/alpine/Dockerfile
Outdated
# remove edge when linux-vanilla is > 4.14.8 and has the nfp driver enabled, | ||
# likely alpine v3.8 | ||
apk add --no-scripts --no-cache --update --upgrade --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we see if this is no longer needed? I believe this was to get around some old packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comment doesn't make any more sense but we still want latest and greatest linux-firmare. I tried building off of the pinned aports config but it wasn't working for me yesterday. Checked again today and it looks like the dev.alpinelinux.org host is back up again. Will use that then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now installing linux-firmware from the checked out aports
rules.mk.j2
Outdated
build/osie-aarch64.tar.gz: SED=/FROM/ s|.*|FROM multiarch/ubuntu-debootstrap:arm64-xenial| | ||
build/osie-x86_64.tar.gz: SED= | ||
build/osie-x86_64.tar.gz: SED= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was on purpose for alignment ;p. Doesn't hurt.
rules.mk.j2
Outdated
build/osie-runner-aarch64.tar.gz: SED=/FROM/ s|.*|FROM multiarch/alpine:arm64-v3.7| | ||
build/osie-runner-x86_64.tar.gz: SED= | ||
build/osie-runner-x86_64.tar.gz: SED= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
rules.mk.j2
Outdated
build/osie-%.tar.gz: docker/Dockerfile ${osiesrcs} | ||
$(E)"DOCKER $@" | ||
$(Q)sed '${SED}' $< > $<.$* | ||
$(Q)docker build -t osie:$* -f $<.$* $(<D) 2>&1 | tee $@.log >/dev/$T | ||
$(Q)docker save osie:$* > $@.tmp | ||
$(Q)mv $@.tmp $@ | ||
|
||
build/osie-runner-aarch64.tar.gz: /proc/sys/fs/binfmt_misc/qemu-aarch64 | ||
build/osie-runner-aarch64.tar.gz: SED=/FROM/ s|.*|FROM multiarch/alpine:arm64-v3.7| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to wrap these in an if statement like line 180?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope because this is hard coded to aarch64, and so we don't need the if.
## Description Lift the rules from installer/alpine/Makefile into rules.mk.j2 so that the top-level make can handle building the alpine files itself. Also cleanup/fix the Dockerfile & build.sh files that are responsible for building the Alpine boot files. ## Why is this needed Extracted out of #72 for better reviewability. ## How Has This Been Tested? Builds kernel, initramfs, and modloop files as needed.
Needed to upgrade deps since `six` is a disutils package and pip was having trouble with it. I manually held `grpcio` back since it fails to build in Alpine 3.12 [1]. [1]: grpc/grpc#23742 Signed-off-by: Manuel Mendez <manny@packet.com>
Signed-off-by: Manuel Mendez <manny@packet.com>
Going to need a newer kernel for the Pensando NICs and might as well use the latest LTS release. Signed-off-by: Manuel Mendez <manny@packet.com>
Its not great for reproducibility to install from edge at any random point in time of the repo. Since we already have a checkout of aports, might as well use that. Signed-off-by: Manuel Mendez <manny@packet.com>
Similar to linux-firmware its not great for reproducibility to install from edge at any random point in time of the repo. Since we already have a checkout of aports, might as well use that. Signed-off-by: Manuel Mendez <manny@packet.com>
Signed-off-by: Manuel Mendez <manny@packet.com>
Signed-off-by: Manuel Mendez <manny@packet.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
For better caching/re-runs. There is no point in agonizing over docker layers as we do not ship this image anywhere. Signed-off-by: Manuel Mendez <manny@packet.com>
We don't really need to install kexec-tools, was being done so we can have the package cached so its embedded in the initramfs. The packages we do need installed are done at the end so we can minimize keeping track of the cache dir. Signed-off-by: Manuel Mendez <manny@packet.com>
Makes sense to build kexec-tools after the kernel has been built and installed instead of the other way around. This will also be needed to make using the build output as a local repo. Signed-off-by: Manuel Mendez <manny@packet.com>
I could not figure out how to make it so apk will recognize the kexec-tools apk files in the cache dir as valid. Luckily abuild sets up a local repo and we can copy it into the initramfs and setup a new local repo for it. Signed-off-by: Manuel Mendez <manny@packet.com>
mkintfs is installed from v3.4.5 in the Dockefile, which maps to https://gitlab.alpinelinux.org/alpine/mkinitfs/-/raw/v3.4.5/initramfs-init.in Signed-off-by: Manuel Mendez <manny@packet.com>
Fetched from https://raw.githubusercontent.com/alpinelinux/mkinitfs/v3.4.5/initramfs-init.in and replaced @Version@ with tag as is done in the Makefile. Signed-off-by: Manuel Mendez <manny@packet.com>
Makes a bunch of tools happier, shfmt, vim syntax highlighting. Signed-off-by: Manuel Mendez <manny@packet.com>
Avoids spraying console with uninteresting progress output. Signed-off-by: Manuel Mendez <manny@packet.com>
Otherwise docker won't start up. Signed-off-by: Manuel Mendez <manny@packet.com>
mkinitfs has gained similar functionality as originally implemented with packet_bootdev_mac so lets just use that and minimize the patch diff. mkinitfs also learned to not blindly use first eth device. The implementation is different that what we currently do, but seems to be fine. It doesn't really matter though since we always set packet_bootdev_mac when booting with boots which alpine always honors. Signed-off-by: Manuel Mendez <manny@packet.com>
Some servers / nics are finicky and may not be ready at this point in boot yet. Signed-off-by: Manuel Mendez <manny@packet.com>
We need this because we will be embedding packages from main and community (docker). Signed-off-by: Manuel Mendez <manny@packet.com>
Signed-off-by: Manuel Mendez <manny@packet.com>
Signed-off-by: Manuel Mendez <manny@packet.com>
Signed-off-by: Manuel Mendez <manny@packet.com>
Signed-off-by: Manuel Mendez <manny@packet.com>
Signed-off-by: Manuel Mendez <manny@packet.com>
Signed-off-by: Manuel Mendez <manny@packet.com>
apk will only use files relative to `--root` so we need the embedded cached packages and index files within $sysroot. Also need to override ALPINE_REPO otherwise apk won't use the cached packages. Signed-off-by: Manuel Mendez <manny@packet.com>
Similar to the setup needed for cached packages but for our custom built apks. Signed-off-by: Manuel Mendez <manny@packet.com>
Signed-off-by: Manuel Mendez <manny@packet.com>
This is the init used in alpine-3.12 + our changes. Signed-off-by: Manuel Mendez <manny@packet.com>
Mmmm fresh out the oven and smells delicious. Signed-off-by: Manuel Mendez <manny@packet.com>
Matches our other Dockerfiles and helps differentiate between commands in `&&` chain and args for them. Signed-off-by: Manuel Mendez <manny@packet.com>
The json output is broken on latest tagged release used in 3.12. Signed-off-by: Manuel Mendez <manny@packet.com>
…pine py3-pip brings in dependencies that conflict with our own, and don't seem to actually be needed. If those dependencies are in the system, py3-pip will be more than happy to use them. Later when we delete the build-deps virtual package those packages go away too and now we can't start up. By using a non-package pip we not only avoid competing package managers , but also don't come across issues with dependencies as pip bundles its dependencies. Signed-off-by: Manuel Mendez <manny@packet.com>
&& \ | ||
mv /etc/apk/repositories /etc/apk/repositories.old && \ | ||
apk add --no-cache --update --upgrade \ | ||
--repository=http://dl-cdn.alpinelinux.org/alpine/v3.11/main \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be changed to v3.12
(maybe do a global search and replace just to check whether this does not appear elsewhere).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no this is to get lshw from 3.11 explicitly. v3.12's lshw
doesn't output correct json. I have not been able to track down the commit that broke lshw
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its only used in tests so not a big deal imo. Looks like upstream has fixed the json output though so I'll look into PR'ing patches to aports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/11607 in case you're interested @rgl
Description
Update our x86_64 alpine to v3.12, upgrade kernel to latest lts (5.4.52) and add Pensando NIC drivers. Also lift the rules from installer/alpine/Makefile into rules.mk.j2 so that the top-level
make
can handle building the alpine files itself.Why is this needed
Fixes: #1
How Has This Been Tested?
Tested via the qemu based tests, also in production on various hardware.
How are existing users impacted? What migration steps/scripts do we need?
Newer kernel means better hardware support. A supported Alpine base means bug fixes, especially ca-certificates updates :D.