Skip to content
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

ci: make minikube.sh work on macOS M1 with the qemu2 driver #4368

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

zjx20
Copy link
Contributor

@zjx20 zjx20 commented Jan 11, 2024

Describe what this PR does

This PR makes scripts/minikube.sh work on macOS M1 with the qemu2 driver.

To utilize minikube on macOS M1, the qemu2 VM driver is currently the only viable option. Therefore, the following modifications have been implemented:

  • the RESOLV_CONF variable has been made configurable because it needs to be overridden as /etc/resolv.conf when using the qemu2 driver.
  • adding additional disks when using the qemu2 driver.

Also, the GNU sed should be used.

Here is the usage example:

export KUBE_VERSION=v1.28.3    # it's the latest version supported by minikube v1.32.0.
export MINIKUBE_ARCH=arm64
export VM_DRIVER=qemu2         # hyperkit is unavailable for arm64, so qemu2 is the only option for macOS M1
export CNI=auto
export RESOLV_CONF=/etc/resolv.conf
export CPUS=4                  # "nproc" is unavailable on macOS, so explicitly set a number
export MEMORY=4096
export DISK_SIZE=20

./scripts/minikube.sh up
./scripts/minikube.sh deploy-rook

Related issues

No.

Future concerns

List items that are not part of the PR and do not impact it's
functionality, but are work items that can be taken up subsequently.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow
    guidelines in the developer
    guide
    .
  • Reviewed the developer guide on Submitting a Pull
    Request
  • Pending release
    notes

    updated with breaking and/or notable changes for the next major release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

Show available bot commands

These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

  • /retest ci/centos/<job-name>: retest the <job-name> after unrelated
    failure (please report the failure too!)

@riya-singhal31
Copy link
Contributor

riya-singhal31 commented Jan 11, 2024

Please update commit message type from scripts to ci and reduce the length of body's line to max 80 chars by splitting into a new line, to make the checks passed.

@riya-singhal31
Copy link
Contributor

Have you tested this out?

@zjx20
Copy link
Contributor Author

zjx20 commented Jan 11, 2024

Have you tested this out?

It works for my MBP M1 with macOS Monterey and minikube v1.32.0, but I haven't tested it on linux systems.

@zjx20 zjx20 changed the title scripts: make minikube.sh work on macOS M1 with the qemu2 driver ci: make minikube.sh work on macOS M1 with the qemu2 driver Jan 11, 2024
@mergify mergify bot added the component/testing Additional test cases or CI work label Jan 11, 2024
@nixpanic
Copy link
Member

/test ci/centos/k8s-e2e-external-storage/1.29

@nixpanic
Copy link
Member

/test ci/centos/k8s-e2e-external-storage/1.29

Deploying in the CI still works 👍

I can not test this on a Mac, ideally someone else tries it out before this gets merged.

@zjx20
Copy link
Contributor Author

zjx20 commented Jan 17, 2024

Thank you @nixpanic. I hope someone will kindly try this branch on macOS M1 and give some feedback.

Here are the instructions:

export KUBE_VERSION=v1.28.3    # it's the latest version supported by minikube v1.32.0.
export MINIKUBE_ARCH=arm64
export VM_DRIVER=qemu2         # hyperkit is unavailable for arm64, so qemu2 is the only option for macOS M1
export CNI=auto
export RESOLV_CONF=/etc/resolv.conf
export CPUS=4                  # "nproc" is unavailable on macOS, so explicitly set a number
export MEMORY=4096
export DISK_SIZE=20

./scripts/minikube.sh up
./scripts/minikube.sh deploy-rook

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 16, 2024
@nixpanic nixpanic added keepalive This label can be used to disable stale bot activiity in the repo and removed stale labels Feb 19, 2024
@black-dragon74
Copy link
Member

@zjx20 Please use GNU sed on macOS. It will ensure compatibility of the script and will avoid the macOS specific changes (like adding extensions for inline replacements)

And then update this PR with sed specific changes removed?

Regards

@zjx20 zjx20 force-pushed the devel branch 2 times, most recently from 25dc921 to e2d2a63 Compare August 30, 2024 02:11
@zjx20
Copy link
Contributor Author

zjx20 commented Aug 30, 2024

@zjx20 Please use GNU sed on macOS. It will ensure compatibility of the script and will avoid the macOS specific changes (like adding extensions for inline replacements)

And then update this PR with sed specific changes removed?

Regards

Hi @black-dragon74, I have reverted the changes related to the sed command and updated the PR description. Please take a look.

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Aug 30, 2024

/test ci/centos/k8s-e2e-external-storage/1.29

@black-dragon74
Copy link
Member

Hi @black-dragon74, I have reverted the changes related to the sed command and updated the PR description. Please take a look.

Thank you! Looks good to me.

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Sep 10, 2024

@Mergifyio rebase

To utilize minikube on macOS M1, the qemu2 VM driver is currently the
only viable option. Therefore, the following modifications have been
implemented:
* the RESOLV_CONF variable has been made configurable because it needs
to be overridden as /etc/resolv.conf when using the qemu2 driver.
* adding additional disks when using the qemu2 driver.

Signed-off-by: zjx20 <zhoujianxiong2@gmail.com>
Copy link
Contributor

mergify bot commented Sep 10, 2024

rebase

✅ Branch has been successfully rebased

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Sep 10, 2024

@Mergifyio queue

Copy link
Contributor

mergify bot commented Sep 10, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 4992644

@mergify mergify bot added the ok-to-test Label to trigger E2E tests label Sep 10, 2024
@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.29

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.29

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.29

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.31

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.31

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.31

@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label Sep 10, 2024
@mergify mergify bot merged commit 4992644 into ceph:devel Sep 10, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/testing Additional test cases or CI work keepalive This label can be used to disable stale bot activiity in the repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants