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

Add docs for CRI validation test suites #725

Merged
merged 1 commit into from
Jun 22, 2017

Conversation

feiskyer
Copy link
Member

Reference features: kubernetes/enhancements#292.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 15, 2017
@feiskyer
Copy link
Member Author

/cc @Random-Liu @mrunalp @kubernetes/sig-node-pr-reviews

@@ -0,0 +1,50 @@
# CRI Validation Testing

CRI validation testing provides a serial of common validation test suites for Kubelet CRI (_Container Runtime Interface_).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/serial/series

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrunalp Thanks. Fixed.

@@ -0,0 +1,50 @@
# CRI Validation Testing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spell out the full name at the title:
Container Runtime Interface (CRI)

@@ -0,0 +1,50 @@
# CRI Validation Testing

CRI validation testing provides a series of common validation test suites for Kubelet CRI (_Container Runtime Interface_).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"provides a test framework and a suite of tests to validate that the Container Runtime Interface (CRI) server implementation meets all the requirements. This allows the CRI runtime developers to verify that their runtime conforms to CRI, without needing to set up Kubernetes components or run Kubernetes end-to-end tests."


CRI validation testing provides a series of common validation test suites for Kubelet CRI (_Container Runtime Interface_).

It helps container runtime maintainers to validate their runtime when integrating with kubelet CRI.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove


It helps container runtime maintainers to validate their runtime when integrating with kubelet CRI.

*Note: No kubelet is running. The test suites run directly targeting the shim of container runtime.*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove. I think this will be covered by the paragraph in my comment.


*Note: No kubelet is running. The test suites run directly targeting the shim of container runtime.*

*Note: CRI validation testing is alpha and maintained at [cri-tools](https://github.com/kubernetes-incubator/cri-tools) repo.*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove *Note

Suggestion:
"CRI validation testing is currently Alpha and is hosted at the cri-tools repository. We encourage the CRI developers to report bugs or help extend the test coverage by adding more tests."

Please modify it according to your knowledge on the current test coverage and the limitation of the test suite.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention that performance benchmarking will be added in the future?


## Install

The test suites could be installed easily via `go get` command:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/could/can


## Running tests

Before running the tests, ensure the shim of CRI container runtime is running and kubelet is stopped.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
"
Prerequisite

Before running the test, you need to ensure that the CRI server under test is running and listening on a Unix
socket. Because the validation tests are designed to request changes (e.g., create/delete) to the containers and verify that correct status is reported, it expects to be the only user of the CRI server. Please make sure that 1) there are no existing CRI-managed containers running on the node, and 2) no other processes (e.g., Kubelet) will interfere with the tests.
"

@feiskyer
Copy link
Member Author

@yujuhong Thanks. Addressed comments, PTAL.

@yujuhong yujuhong added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jun 21, 2017
@yujuhong
Copy link
Contributor

@feiskyer the content LGTM, but I just noticed that this is in the community repository. Shouldn't we move the doc to cri-tools instead?

Copy link
Contributor

@chenopis chenopis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nits. Docs LGTM otherwise.


CRI validation testing provides a test framework and a suite of tests to validate that the Container Runtime Interface (CRI) server implementation meets all the requirements. This allows the CRI runtime developers to verify that their runtime conforms to CRI, without needing to set up Kubernetes components or run Kubernetes end-to-end tests.

CRI validation testing is currently Alpha and is hosted at the [cri-tools](https://github.com/kubernetes-incubator/cri-tools) repository. And performance benchmarking will be added in the future. We encourage the CRI developers to report bugs or help extend the test coverage by adding more tests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove "And": "...repository. Performance benchmarking..."

go get github.com/kubernetes-incubator/cri-tools/cmd/critest
```

Then `critest` binary could be found in `$GOPATH/bin`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"could" -> "can"


### Prerequisite

Before running the test, you need to ensure that the CRI server under test is running and listening on a Unix socket. Because the validation tests are designed to request changes (e.g., create/delete) to the containers and verify that correct status is reported, it expects to be the only user of the CRI server. Please make sure that 1) there are no existing CRI-managed containers running on the node, and 2) no other processes (e.g., Kubelet) will interfere with the tests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you referring to a specific test when you say, "...ensure that the CRI server under test is running and listening..."? If so, you might want to italicize it.

- Run the tests using `ginkgo`
- Output the test results to STDOUT

critest connects to `/var/run/dockershim.sock` by default. For other runtimes, the endpoint could be set in two ways:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"could" -> "can"

Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
@feiskyer
Copy link
Member Author

@chenopis @yujuhong Thanks. Addressed comments, PTAL.

@feiskyer
Copy link
Member Author

@feiskyer the content LGTM, but I just noticed that this is in the community repository. Shouldn't we move the doc to cri-tools instead?

A doc in community repository could help for a wide scope. We will also add more detailed docs in cri-tools repository.

Copy link
Contributor

@chenopis chenopis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@yujuhong yujuhong merged commit f1f1171 into kubernetes:master Jun 22, 2017
@feiskyer feiskyer deleted the cri-validate branch June 22, 2017 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants