-
Notifications
You must be signed in to change notification settings - Fork 11
chore: bring images up to date #63
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| name: CAPMVM (ARM, experimental) - Build and release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| k8s_version: | ||
| description: "K8s version (major.minor). For example 1.30" | ||
| required: true | ||
| k8s_patch_version: | ||
| description: "K8s patch version" | ||
| required: true | ||
| default: "0" | ||
| containerd_version: | ||
| description: "Containerd version (major.minor.patch). For example 1.7.27" | ||
| required: true | ||
| ubuntu_version: | ||
| description: "Ubuntu version" | ||
| required: true | ||
| default: "22.04" | ||
| type: choice | ||
| options: | ||
| - "22.04" | ||
| - "24.04" | ||
| - "20.04" | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| packages: write | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: experimental/arm/capmvm/kubernetes | ||
|
|
||
| jobs: | ||
| buildandpublish: | ||
| name: Build and publish CAPMVM (ARM64) | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| REGISTRY: ghcr.io/${{ vars.REGISTRY_OWNER || github.repository_owner }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Login to container registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push ARM image | ||
| run: | | ||
| RELEASE_VERSIONS=${{ inputs.k8s_version }}.${{ inputs.k8s_patch_version }} \ | ||
| CONTAINERD_VERSION=${{ inputs.containerd_version }} \ | ||
| UBUNTU_VERSION=${{ inputs.ubuntu_version }} \ | ||
| make build-and-push |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,59 +8,98 @@ on: | |||||||||
| push: | ||||||||||
| paths: | ||||||||||
| - 'kernel/**' | ||||||||||
| branches: [main] | ||||||||||
| branches: [main, issue/*] | ||||||||||
| workflow_dispatch: | ||||||||||
|
|
||||||||||
| defaults: | ||||||||||
| run: | ||||||||||
| working-directory: kernel | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| build-firecracker: | ||||||||||
| if: github.event_name != 'push' | ||||||||||
| if: github.event_name == 'pull_request' | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| permissions: | ||||||||||
| contents: read | ||||||||||
| strategy: | ||||||||||
| fail-fast: false | ||||||||||
| matrix: | ||||||||||
| version: [ 4.19.215, 5.10.77 ] | ||||||||||
| # arm64 has configs only for 5.10.77 and 6.1.102 | ||||||||||
| include: | ||||||||||
| - arch: amd64 | ||||||||||
| version: 4.19.215 | ||||||||||
| - arch: amd64 | ||||||||||
| version: 5.10.77 | ||||||||||
| - arch: amd64 | ||||||||||
| version: 6.1.102 | ||||||||||
| - arch: arm64 | ||||||||||
| version: 5.10.77 | ||||||||||
| - arch: arm64 | ||||||||||
| version: 6.1.102 | ||||||||||
| env: | ||||||||||
| ARCH: ${{ matrix.arch }} | ||||||||||
| FC_KERNEL_VERSIONS: ${{ matrix.version }} | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v2 | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| - name: Set up QEMU (arm64) | ||||||||||
| if: matrix.arch == 'arm64' | ||||||||||
| uses: docker/setup-qemu-action@v3 | ||||||||||
| - name: Set up Docker Buildx (arm64) | ||||||||||
| if: matrix.arch == 'arm64' | ||||||||||
| uses: docker/setup-buildx-action@v3 | ||||||||||
| - name: Build kernel | ||||||||||
| run: make build-fc | ||||||||||
| build-cloudhypervisor: | ||||||||||
| if: github.event_name != 'push' | ||||||||||
| if: github.event_name == 'pull_request' | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| permissions: | ||||||||||
| contents: read | ||||||||||
| strategy: | ||||||||||
| fail-fast: false | ||||||||||
| matrix: | ||||||||||
| version: [ 5.12 ] | ||||||||||
| version: [5.12, 5.15.12] | ||||||||||
| env: | ||||||||||
| ARCH: amd64 | ||||||||||
| CH_KERNEL_VERSIONS: ${{ matrix.version }} | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v2 | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| - name: Build kernel | ||||||||||
| run: make build-ch | ||||||||||
| release-firecracker: | ||||||||||
| if: github.event_name != 'pull_request' | ||||||||||
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| permissions: | ||||||||||
| contents: read | ||||||||||
| packages: write | ||||||||||
| strategy: | ||||||||||
| fail-fast: false | ||||||||||
| matrix: | ||||||||||
| version: [ 4.19.215, 5.10.77 ] | ||||||||||
| include: | ||||||||||
| - arch: amd64 | ||||||||||
| version: 4.19.215 | ||||||||||
| - arch: amd64 | ||||||||||
| version: 5.10.77 | ||||||||||
| - arch: amd64 | ||||||||||
| version: 6.1.102 | ||||||||||
| - arch: arm64 | ||||||||||
| version: 5.10.77 | ||||||||||
| - arch: arm64 | ||||||||||
| version: 6.1.102 | ||||||||||
| env: | ||||||||||
| REGISTRY: ghcr.io/${{ vars.REGISTRY_OWNER || github.repository_owner }} | ||||||||||
| ARCH: ${{ matrix.arch }} | ||||||||||
| FC_KERNEL_VERSIONS: ${{ matrix.version }} | ||||||||||
| PUSH: --push | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v2 | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| - name: Set up QEMU (arm64) | ||||||||||
| if: matrix.arch == 'arm64' | ||||||||||
| uses: docker/setup-qemu-action@v3 | ||||||||||
| - name: Set up Docker Buildx (arm64) | ||||||||||
| if: matrix.arch == 'arm64' | ||||||||||
| uses: docker/setup-buildx-action@v3 | ||||||||||
| - name: Login to container registry | ||||||||||
| uses: docker/login-action@v1.10.0 | ||||||||||
| uses: docker/login-action@v3 | ||||||||||
| with: | ||||||||||
| registry: ghcr.io | ||||||||||
| username: ${{ github.actor }} | ||||||||||
|
|
@@ -70,21 +109,23 @@ jobs: | |||||||||
| make build-fc | ||||||||||
| make push-fc | ||||||||||
|
||||||||||
| make push-fc | |
| if [ "${{ matrix.arch }}" != "arm64" ]; then | |
| make push-fc | |
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ CONTAINERD_VERSION?=1.7.27 | |
| K8S_MAJOR_MINOR?=1.30 | ||
| K8S_FULL_VERSION?=$(K8S_MAJOR_MINOR).14 | ||
| UBUNTU_VERSION?=22.04 | ||
| IMAGE_NAME?=$(REGISTRY)/capmvm-k8s-ubuntu-$(UBUNTU_VERSION) | ||
| IMAGE_NAME?=$(REGISTRY)/capmvm-k8s-ubuntu-$(UBUNTU_VERSION)-amd64 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need the ability to overwrite the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually i see there is separate Makefile later for arm :)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @richardcase Should we merge the Makefiles?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So arm was experimental; I did not want to merge them initially as I was concerned it could break others' workflows; however, I think a single Makefile might be nicer. Let me know your thoughts.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah i think a single makefile would be easier ultimately. |
||
| IMAGE?=$(IMAGE_NAME):$(K8S_FULL_VERSION) | ||
|
|
||
| build: | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,9 +2,9 @@ ARG OS_VERSION=20.04 | |||||
| FROM ubuntu:${OS_VERSION} | ||||||
|
|
||||||
| ARG ARCH="arm64" | ||||||
| ARG CONTAINERD_VERSION=1.6.0 | ||||||
| # Kubernetes version will be used to keep the kubeadm, kubelet, and kubectl version consistent | ||||||
| ARG KUBERNETES_VERSION=1.21.8 | ||||||
| ARG CONTAINERD_VERSION=1.7.27 | ||||||
| ARG KUBERNETES_MAJOR_MINOR=1.30 | ||||||
| ARG KUBERNETES_FULL_VERSION=1.30.14 | ||||||
|
|
||||||
| RUN apt-get update && apt-get install -y \ | ||||||
| kmod \ | ||||||
|
|
@@ -51,19 +51,18 @@ kernel.panic_on_oops = 1" >> /etc/sysctl.d/99-kubernetes-cri.conf | |||||
| # Apply sysctl params without reboot | ||||||
| RUN sysctl --system | ||||||
|
|
||||||
| # Install Containerd | ||||||
| # Install Containerd (same artifact pattern as x86 capmvm) | ||||||
| RUN wget https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/cri-containerd-cni-${CONTAINERD_VERSION}-linux-${ARCH}.tar.gz | ||||||
| RUN tar --no-overwrite-dir -C / -xzf cri-containerd-cni-${CONTAINERD_VERSION}-linux-${ARCH}.tar.gz && rm -f cri-containerd-cni-${CONTAINERD_VERSION}-linux-${ARCH}.tar.gz | ||||||
|
|
||||||
| ### Add apt repos | ||||||
| # Kubeadm, Kubelet, and Kubectl | ||||||
| RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg | ||||||
| RUN echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list | ||||||
| ### Add apt repos (pkgs.k8s.io, same as x86 capmvm) | ||||||
| RUN curl -fsSL https://pkgs.k8s.io/core:/stable:/v${KUBERNETES_MAJOR_MINOR}/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg | ||||||
|
||||||
| RUN curl -fsSL https://pkgs.k8s.io/core:/stable:/v${KUBERNETES_MAJOR_MINOR}/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg | |
| RUN mkdir -p /etc/apt/keyrings && curl -fsSL https://pkgs.k8s.io/core:/stable:/v${KUBERNETES_MAJOR_MINOR}/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg |
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.
For the arm64 manual job,
PUSH=--pushmeans the build step usesdocker buildx build --pushand won’t leave local images behind. Runningmake push-fcafterwards (docker push) is likely to fail because the tags aren’t present locally. Either skipmake push-fcfor arm64, or change the build to--loadand then push, or update the Makefile push logic for buildx.