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] Add K8s Builder Step #22035

Merged
merged 26 commits into from
Feb 24, 2022
Merged

[CI] Add K8s Builder Step #22035

merged 26 commits into from
Feb 24, 2022

Conversation

simon-mo
Copy link
Contributor

@simon-mo simon-mo commented Feb 1, 2022

Why are these changes needed?

This PR bring in a kind cluster with our current CI infra and verify it works.

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@simon-mo simon-mo changed the title [CI] Add K8s Builder [CI] Add K8s Builder Step Feb 24, 2022
@simon-mo simon-mo marked this pull request as ready for review February 24, 2022 18:00
@DmitriGekhtman
Copy link
Contributor

DmitriGekhtman commented Feb 24, 2022

Hey, this is great!

Some stupid questions:

  • Any particular reasons for choice of kind vs minikube for this
  • Does this build step itself happen in a containerized environment (and if so is there any trouble running kind in a container)
  • Is it possible to get an indication of the CPU and memory capacity of the single Kubernetes node set up here (and pointers for how to configure that in the future)?

@simon-mo
Copy link
Contributor Author

The build step run inside a container. So we can't use minikube directly, minikube relies on virtual machine. We have already setup a docker-in-docker environment inside a separate container (hence the mentioning of dind). This PR runs kind inside that environment and allow the host container (where build steps run) talk to the the K8s api server.

It's a bit crazy but basically we have the following architecture
image

The kind cluster should be able to use containers from that dind nodes if we configure local registry https://kind.sigs.k8s.io/docs/user/local-registry/, I'll probably do it in a separate PR.

There isn't any limit for the CPU or memory capacity, but in the end the whole thing is running on a single VM. We can run it on a bigger box though.

@simon-mo
Copy link
Contributor Author

Actually we can use kind load docker-images: https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster

@DmitriGekhtman
Copy link
Contributor

Cool, got it (mostly). Which container does the test code run in?
Say, for example, I have a test that wants to start a Ray-on-K8s cluster and connect to it "from outside" via port-forwarding and Ray client. How does it work?

@simon-mo
Copy link
Contributor Author

simon-mo commented Feb 24, 2022

Which container does the test code run in?

The left hand side host container

Say, for example, I have a test that wants to start a Ray-on-K8s cluster and connect to it "from outside" via port-forwarding and Ray client. How does it work?

Node port should work as long as you use docker as DNS name.

@simon-mo simon-mo merged commit 3d3218d into ray-project:master Feb 24, 2022
simonsays1980 pushed a commit to simonsays1980/ray that referenced this pull request Feb 27, 2022
architkulkarni added a commit to ray-project/kuberay that referenced this pull request Aug 9, 2023
This PR configures kind to allow kubectl to connect to it. This is a prerequisite for testing sample YAML files end-to-end in Buildkite. The configuration is copied from @simon-mo's work in ray-project/ray#22035.

---------

Signed-off-by: Archit Kulkarni <[email protected]>
blublinsky pushed a commit to blublinsky/kuberay that referenced this pull request Aug 15, 2023
This PR configures kind to allow kubectl to connect to it. This is a prerequisite for testing sample YAML files end-to-end in Buildkite. The configuration is copied from @simon-mo's work in ray-project/ray#22035.

---------

Signed-off-by: Archit Kulkarni <[email protected]>
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
This PR configures kind to allow kubectl to connect to it. This is a prerequisite for testing sample YAML files end-to-end in Buildkite. The configuration is copied from @simon-mo's work in ray-project/ray#22035.

---------

Signed-off-by: Archit Kulkarni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants