-
Notifications
You must be signed in to change notification settings - Fork 17
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
Pr/jrajahalme/arm64 multipass 1.11.0 rebase #352
Draft
jrajahalme
wants to merge
21
commits into
master
Choose a base branch
from
pr/jrajahalme/arm64-multipass-1.11.0-rebase
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jrajahalme
requested review from
qmonnet and
nebril
and removed request for
a team
January 4, 2023 18:13
jrajahalme
force-pushed
the
pr/jrajahalme/arm64-multipass-1.11.0-rebase
branch
2 times, most recently
from
January 4, 2023 22:11
1054131
to
823d593
Compare
jrajahalme
force-pushed
the
pr/jrajahalme/arm64-multipass-1.11.0-rebase
branch
from
February 19, 2023 11:54
823d593
to
14ed4ec
Compare
Apply kernel-patches if they exist. This way the kernel compile script does not need to be changed when kernel patches are added or the last one is removed. Signed-off-by: Jarno Rajahalme <[email protected]>
Use versions that have arm64 images available. Signed-off-by: Jarno Rajahalme <[email protected]>
Default to "amd64", but support "arm64" as well. Remove install of gcc-multilib, as it is not available for arm64, and apparently not deeded with amd64 either. Signed-off-by: Jarno Rajahalme <[email protected]>
Use $HOME_DIR exclusively instead of $HOME to refer to the target user home directory, as sudo can override $HOME with 'root' depending on the execution context. Signed-off-by: Jarno Rajahalme <[email protected]>
Pass the install user name via $USERNAME, so that same scripts can be used for different default user names (e.g., 'ubuntu' in addition to 'vagrant'). Signed-off-by: Jarno Rajahalme <[email protected]>
Make sure the home directory is owned by the target ${USERNAME} before trying to create the 'go' directory on it. Not sure if needed still, but failed due to this at one point. Signed-off-by: Jarno Rajahalme <[email protected]>
Add export for GOPATH in .profile so that make targets that depend on it being set work as expected (e.g., 'make generate-k8s-api'). Signed-off-by: Jarno Rajahalme <[email protected]>
Add -f to 'ln -s' commands so that they do not fail if executed again. This is helpful when improving the provisioning scripts. Signed-off-by: Jarno Rajahalme <[email protected]>
Append to SSH authorized keys instead of overwriting them to keep any authorized keys set previously. This allows building of local images that have local users public key as an authorized key for local testing. Signed-off-by: Jarno Rajahalme <[email protected]>
Only install VirtualBox guest additions if VirtualBox is detected via "$HOME_DIR/.vbox_version". Signed-off-by: Jarno Rajahalme <[email protected]>
Install docker only if not already installed. This allows building on top of image stages that already install docker before these provisioning steps. Signed-off-by: Jarno Rajahalme <[email protected]>
Pull from sayboras/netperf that has the multiple definitions fix (HewlettPackard/netperf#46). Signed-off-by: Jarno Rajahalme <[email protected]>
This allows install of, say, 5.11. Signed-off-by: Jarno Rajahalme <[email protected]>
Add an exception for the cilium repo for to fix the "fatal: detected dubious ownership in repository at '/home/ubuntu/go/src/github.com/cilium/packer-ci-build'" error condition when using the repo via an NFS mount as a normal user Signed-off-by: Jarno Rajahalme <[email protected]>
Echo "Rebooting kernel" when a new kernel is about to be rebooted do that we can scan for it from the console output. Signed-off-by: Jarno Rajahalme <[email protected]>
…the rest Add script provision/provision-kernel.sh for provisioning an old or new kernel, and provision/provision.sh for provisioning everything after the kernel reboot. Add kernel modules needed by kube-proxy 1.19.11 to provision/ubuntu/kernel-next.sh. Signed-off-by: Jarno Rajahalme <[email protected]>
Signed-off-by: Jarno Rajahalme <[email protected]>
Remove also bpftool directory after install so that provioning can be rerun without erroring out due to non-empty directory existing when `git clone`. Do not fail if /usr/bin/ip has already been removed. Signed-off-by: Jarno Rajahalme <[email protected]>
Signed-off-by: Jarno Rajahalme <[email protected]>
Add 'multipass' target for creating Cilium Development VMs with Canonical Multipass. Example use: $ VM_NAME=dev make multipass or the same with the script: $ VM_CPUS=8 VM_MEMORY=16G VM_DISK=100G ./provision/multipass.sh dev Note: VM_NAME defaults to "dev". This will launch a new Linux 5.4 VM with Ubuntu 22.04 and run the standard Cilium VM provisioning scripts on it, followed by mounting the Cilium repos from the host to the VM (at /home/ubuntu/go/src/github.com/cilium) using NFS. See the Makefile and provision/multipass.sh for all the supported environment variables. This has been tested on MacOS on Apple Silicon (arm64), but should also work on the Intel models (amd64). Multipass should also work on Linux, but that has not been tested. Install the package needed (nfs-common) for mounting NFS shares to the dev VM. Cilium directory will be mounted with NFS, define environement variable 'MOUNT=default' to use an sshfs mount instead. Signed-off-by: Jarno Rajahalme <[email protected]>
Updates for Multipass 1.11: - add support for MOUNT=native - use '--recursive' option for 'multipass transfer' - use '--memory' instead of the deprecated '--mem' Signed-off-by: Jarno Rajahalme <[email protected]>
jrajahalme
force-pushed
the
pr/jrajahalme/arm64-multipass-1.11.0-rebase
branch
from
February 19, 2023 12:00
14ed4ec
to
68d1112
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for creating and configuring VMs with Canonical multipass, mainly to be able to run Cilium CI VMs on macOS on Apple Silicon.
Example use:
cilium/cilium
(cloned from https://github.com/cilium/cilium.git)cilium/packer-ci-build
(cloned from https://github.com/cilium/packer-ci-build.git)cilium/packer-ci-build
and check out this branch:dev
using anative
mount (NFS
is the default mount type):