-
Notifications
You must be signed in to change notification settings - Fork 12
wip: l2 images #42
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
base: main
Are you sure you want to change the base?
wip: l2 images #42
Conversation
e58ab4b to
447a823
Compare
d26faee to
145218b
Compare
0e37839 to
e85b24d
Compare
1127cde to
dbaeecc
Compare
dbaeecc to
427002a
Compare
Prior to this commit, env_wrapper's 'setup_lima' command would only work for Linux because it uses the 'nproc' and 'free' shell commands, which do not exist on Mac. Now, the script detects the platform and uses the appropriate shell commands
…mands fix: fix setup_lima when run on a mac
| cd "$build_dir" | ||
| cp "$config_file" .config | ||
| export KBUILD_BUILD_TIMESTAMP="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%s)})" | ||
| export KBUILD_BUILD_TIMESTAMP="$(date -u -d @$(git log -1 --pretty=%ct))" |
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.
We should probably just hard code it to zero
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 believe pinning the timestamps to the commit one is a standard practice
| mkosi-chroot --chdir "/build/kernel-${KERNEL_VERSION}" make -j "$(nproc 2>/dev/null || echo 2)" bzImage ARCH=x86_64 CONFIG_EFI_STUB=y | ||
|
|
||
| echo "# kernel config:" | ||
| mkosi-chroot --chdir "/build/kernel-${KERNEL_VERSION}" cat .config |
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.
Too verbose
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.
this snippet was necessary to understand what's going on with non-reproducible builds of the kernel under ubuntu kernel config.
can be removed now, I guess.
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.
What's the purpose of this?
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.
to make sure that /etc/sysconfig directory is always present (vault-agent renders some of the secrets into the envs of the systemd services)
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.
@ilyaluk any idea why this file was moved?
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.
We don't need this in buildernet/l2 stuff at the moment, AFAIU, defer question to @0x416e746f6e
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.
They both have their own persistent mounting specifics
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.
it's not in use in l2
| @@ -0,0 +1,14 @@ | |||
| rust: | |||
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.
When we just grab rust from debian backports this wont be necessary. I'll take care of it.
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.
we would still need a way to pin rust version somehow per image type (backports or not).
|
|
||
| BuildPackages=golang | ||
| libssl-dev | ||
| rustup |
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.
Switch to backports rust, I'll take care of this
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.
yes, just pls make it possible to use different versions of rust on different image kinds.
| # | ||
| # rendered by vault-agent/gomplate | ||
| # | ||
| [[- range ( ( gcp.Meta "attributes/ssh-keys" ) | strings.Split "\n" ) ]] |
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.
Isn't allowing ppl to SSH in a security risk?
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.
it is.
however this line makes sure that the keys are rendered only on the image built with dev profile. so, we are ok on prod images.
and on dev images, well we already allow anyone with console access in + use predefined root password. I don't think that (secret and non public) ssh keys added by vault-agent are making it any worse security-wise here.
|
|
||
| # Limit root filesystem size to 4GB | ||
|
|
||
| mkosi-chroot sed -i '1a mount -o remount,size=4G /' /init |
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 feel like this should be an L2 or op_rbuilder postinst thing, not a GCP postinst thing
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.
why?
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.
since some images may have filesystems larger than 4GB
(move snippets around to the right places)
62da9c3 to
e7954c7
Compare
(cherry picked from commit ea20da4)
ea20da4 to
cf2f4b2
Compare
L2 nondeterminism fixes
implement scripts for l2 workloads building