This repository was archived by the owner on Aug 20, 2025. It is now read-only.
Pr/jrajahalme/arm64 multipass 1.11.0 rebase#352
Draft
jrajahalme wants to merge 21 commits into
Draft
Conversation
1054131 to
823d593
Compare
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 <jarno@isovalent.com>
Use versions that have arm64 images available. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
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 <jarno@isovalent.com>
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 <jarno@isovalent.com>
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 <jarno@isovalent.com>
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 <jarno@isovalent.com>
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 <jarno@isovalent.com>
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 <jarno@isovalent.com>
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 <jarno@isovalent.com>
Only install VirtualBox guest additions if VirtualBox is detected via "$HOME_DIR/.vbox_version". Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
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 <jarno@isovalent.com>
Pull from sayboras/netperf that has the multiple definitions fix (HewlettPackard/netperf#46). Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
This allows install of, say, 5.11. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
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 <jarno@isovalent.com>
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 <jarno@isovalent.com>
…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 <jarno@isovalent.com>
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
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 <jarno@isovalent.com>
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
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 <jarno@isovalent.com>
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 <jarno@isovalent.com>
14ed4ec to
68d1112
Compare
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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-buildand check out this branch:devusing anativemount (NFSis the default mount type):