Skip to content

Commit

Permalink
v0.50 release (#1221)
Browse files Browse the repository at this point in the history
* Replace logo path and replace CI badge with GitHub Actions

Signed-off-by: Wilson E. Husin <[email protected]>

* Update docs with Hugo paths

Signed-off-by: Wilson E. Husin <[email protected]>

* v0.50.0 docs

Signed-off-by: Wilson E. Husin <[email protected]>

* Add blogpost for Sonobuoy v0.50

Co-authored-by: Vladimir Vivien <[email protected]>
Signed-off-by: Vladimir Vivien <[email protected]>
Signed-off-by: Wilson E. Husin <[email protected]>

* Fix logo referencing on Markdown

Signed-off-by: Wilson E. Husin <[email protected]>

* List out reliability scanner in plugin page

Signed-off-by: Wilson E. Husin <[email protected]>

Co-authored-by: Vladimir Vivien <[email protected]>
  • Loading branch information
wilsonehusin and vladimirvivien authored Mar 18, 2021
1 parent da8d5d3 commit d9ec0c1
Show file tree
Hide file tree
Showing 33 changed files with 1,490 additions and 25 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# <img src="site/docs/master/img/sonobuoy-logo.png" width="400px" alt="Sonobuoy logo" > [![CircleCI](https://circleci.com/gh/vmware-tanzu/sonobuoy.svg?style=svg)](https://circleci.com/gh/vmware-tanzu/sonobuoy)
# ![Sonobuoy Logo](site/themes/sonobuoy/static/img/sonobuoy-logo.png)

[![Test](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-test.yaml/badge.svg)](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-test.yaml/badge.svg)
[![Lint](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-lint.yaml/badge.svg)](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-lint.yaml/badge.svg)

## [Overview][oview]

Expand Down
10 changes: 7 additions & 3 deletions scripts/sync_readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ set -x
SCRIPTS_DIR="$( cd "$( dirname "$0" )" >/dev/null 2>&1 && pwd )"
DIR=$(cd $SCRIPTS_DIR; cd ..; pwd)
ROOT_README=$DIR/README.md
MASTER_SITE_README=$DIR/site/docs/master/README.md
MASTER_SITE_README=$DIR/site/content/docs/master/_index.md
MODIFIED_README=/tmp/sonobuoy-readme-sync.md
FRONTMATTER=$DIR/site/content/docs/master/index-frontmatter.yaml

# Users should update the README.md in the root of the repo and
# run this script to sync the README.md in the master docs. The reason
Expand All @@ -17,6 +19,8 @@ MASTER_SITE_README=$DIR/site/docs/master/README.md
# - use relative path to images
# - use relative path to other pages (e.g. foo instead of sonobuoy.io/docs/foo)
# - link to master docs instead of "docs" (which will go to the latest tagged version)
sed 's/img src="site\/docs\/master\/img/img src="img/' $ROOT_README |
sed 's/site\/themes\/sonobuoy\/static\/img/img/' $ROOT_README |
sed 's/https:\/\/sonobuoy.io\/docs\///' |
sed 's/sonobuoy.io\/docs/sonobuoy.io\/docs\/master/' > $MASTER_SITE_README
sed 's/sonobuoy.io\/docs/sonobuoy.io\/docs\/master/' > $MODIFIED_README

cat $FRONTMATTER $MODIFIED_README > $MASTER_SITE_README
57 changes: 38 additions & 19 deletions scripts/update_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ VERSION=$1
TOC_NAME=$(echo ${VERSION}toc|sed s/\\./-/g)

read -r -d '' CONFIG_VERSION_BLOCK << EOM
latest: v.*
versions:
- master
docs_latest: v.*
docs_versions:
- master
EOM

read -r -d '' NEW_VERSION_BLOCK << EOM
latest: ${VERSION}
versions:
- master
- ${VERSION}
docs_latest: ${VERSION}
docs_versions:
- master
- ${VERSION}
EOM

read -r -d '' OLD_SCOPE_BLOCK << EOM
Expand All @@ -44,6 +44,24 @@ read -r -d '' NEW_SCOPE_BLOCK << EOM
layout: \"docs\"
EOM

read -r -d '' MASTER_FRONTMATTER << EOM
---
version: master
cascade:
layout: docs
gh: https:\/\/github.com\/vmware-tanzu\/sonobuoy\/tree\/.*
---
EOM

read -r -d '' RELEASE_FRONTMATTER << EOM
---
version: ${VERSION}
cascade:
layout: docs
gh: https:\/\/github.com\/vmware-tanzu\/sonobuoy\/tree\/${VERSION}
---
EOM

OLD_TOC_BLOCK="master: master-toc"
read -r -d '' NEW_TOC_BLOCK << EOM
master: master-toc
Expand All @@ -61,16 +79,17 @@ else
-v ${DIR}:/root \
debian:stretch-slim \
/bin/sh -c \
"rm -rf /root/site/docs/${VERSION} && \
cp -r /root/site/docs/master /root/site/docs/${VERSION} && \
sed -i 's/site\/docs\/master\///g' /root/site/docs/${VERSION}/README.md && \
sed -i 's/docs\/img/img/g' /root/site/docs/${VERSION}/README.md && \
sed -i 's/sonobuoy\/tree\/master/sonobuoy\/tree\/${VERSION}/g' /root/site/docs/${VERSION}/README.md && \
sed -i 's/sonobuoy.io\/docs\/master/sonobuoy.io\/docs\/${VERSION}/g' /root/site/docs/${VERSION}/README.md && \
cp /root/site/_data/master-toc.yml /root/site/_data/${TOC_NAME}.yml && \
perl -i -0pe 's/${CONFIG_VERSION_BLOCK}/${NEW_VERSION_BLOCK}/' /root/site/_config.yml && \
perl -i -0pe 's/${OLD_SCOPE_BLOCK}/${NEW_SCOPE_BLOCK}/' /root/site/_config.yml && \
perl -i -0pe 's/${OLD_TOC_BLOCK}/${NEW_TOC_BLOCK}/' /root/site/_data/toc-mapping.yml && \
sed -i 's/\/docs\/v.*\"/\/docs\/${VERSION}\"/' /root/site/_includes/site-header.html && \
sed -i 's/${OLD_FOOTER_BLOCK}/${NEW_FOOTER_BLOCK}/' /root/site/_config.yml"
"rm -rf /root/site/content/docs/${VERSION} && \
cp -r /root/site/content/docs/master /root/site/content/docs/${VERSION} && \
sed -i 's/site\/docs\/master\///g' /root/site/content/docs/${VERSION}/_index.md && \
sed -i 's/docs\/img/img/g' /root/site/content/docs/${VERSION}/_index.md && \
sed -i 's/sonobuoy\/tree\/master/sonobuoy\/tree\/${VERSION}/g' /root/site/content/docs/${VERSION}/_index.md && \
sed -i 's/sonobuoy.io\/docs\/master/sonobuoy.io\/docs\/${VERSION}/g' /root/site/content/docs/${VERSION}/_index.md && \
cp /root/site/data/docs/master-toc.yml /root/site/data/docs/${TOC_NAME}.yml && \
perl -i -0pe 's/${CONFIG_VERSION_BLOCK}/${NEW_VERSION_BLOCK}/' /root/site/config.yaml && \
perl -i -0pe 's/${OLD_SCOPE_BLOCK}/${NEW_SCOPE_BLOCK}/' /root/site/config.yaml && \
perl -i -0pe 's/${OLD_TOC_BLOCK}/${NEW_TOC_BLOCK}/' /root/site/data/docs/toc-mapping.yml && \
perl -i -0pe 's/${MASTER_FRONTMATTER}/${RELEASE_FRONTMATTER}/' /root/site/content/docs/${VERSION}/index-frontmatter.yaml && \
perl -i -0pe 's/${MASTER_FRONTMATTER}/${RELEASE_FRONTMATTER}/' /root/site/content/docs/${VERSION}/_index.md && \
sed -i 's/${OLD_FOOTER_BLOCK}/${NEW_FOOTER_BLOCK}/' /root/site/config.yaml"
fi
3 changes: 2 additions & 1 deletion site/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ params:
docs_search_index_name: index_name
docs_search_api_key: api_key
docs_versioning: true
docs_latest: v0.20.0
docs_latest: v0.50.0
docs_versions:
- master
- v0.50.0
- v0.20.0
- v0.19.0
- v0.18.5
Expand Down
5 changes: 4 additions & 1 deletion site/content/docs/master/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ cascade:
layout: docs
gh: https://github.com/vmware-tanzu/sonobuoy/tree/master
---
# ![Sonobuoy logo](img/sonobuoy-logo.png) [![CircleCI](https://circleci.com/gh/vmware-tanzu/sonobuoy.svg?style=svg)](https://circleci.com/gh/vmware-tanzu/sonobuoy)
# ![Sonobuoy Logo](img/sonobuoy-logo.png)

[![Test](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-test.yaml/badge.svg)](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-test.yaml/badge.svg)
[![Lint](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-lint.yaml/badge.svg)](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-lint.yaml/badge.svg)

## [Overview][oview]

Expand Down
6 changes: 6 additions & 0 deletions site/content/docs/master/index-frontmatter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
version: master
cascade:
layout: docs
gh: https://github.com/vmware-tanzu/sonobuoy/tree/master
---
213 changes: 213 additions & 0 deletions site/content/docs/v0.50.0/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
---
version: v0.50.0
cascade:
layout: docs
gh: https://github.com/vmware-tanzu/sonobuoy/tree/v0.50.0
---
# ![Sonobuoy Logo](img/sonobuoy-logo.png)

[![Test](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-test.yaml/badge.svg)](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-test.yaml/badge.svg)
[![Lint](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-lint.yaml/badge.svg)](https://github.com/vmware-tanzu/sonobuoy/actions/workflows/ci-lint.yaml/badge.svg)

## [Overview][oview]

Sonobuoy is a diagnostic tool that makes it easier to understand the
state of a Kubernetes cluster by running a set of plugins (including [Kubernetes][k8s] conformance
tests) in an accessible and non-destructive manner. It is a customizable,
extendable, and cluster-agnostic way to generate clear, informative reports
about your cluster.

Its selective data dumps of Kubernetes resource objects and cluster nodes allow
for the following use cases:

* Integrated end-to-end (e2e) [conformance-testing][e2ePlugin]
* Workload debugging
* Custom data collection via extensible plugins

Starting v0.20, Sonobuoy supports Kubernetes v1.17 or later.
Sonobuoy releases will be independent of Kubernetes release, while ensuring that new releases continue to work functionally across different versions of Kubernetes.
Read more about the new release cycles in [our blog][decoupling-sonobuoy-k8s].

> Note: You can skip this version enforcement by running Sonobuoy with the `--skip-preflight` flag.
## Prerequisites

* Access to an up-and-running Kubernetes cluster. If you do not have a cluster,
we recommend following the [AWS Quickstart for Kubernetes][quickstart] instructions.

* An admin `kubeconfig` file, and the KUBECONFIG environment variable set.

* For some advanced workflows it may be required to have `kubectl` installed. See [installing via Homebrew (MacOS)][brew] or [building
the binary (Linux)][linux].

* The `sonobuoy images` subcommand requires [Docker](https://www.docker.com) to be installed. See [installing Docker][docker].

## Installation

1. Download the [latest release][releases] for your client platform.
2. Extract the tarball:

```
tar -xvf <RELEASE_TARBALL_NAME>.tar.gz
```

Move the extracted `sonobuoy` executable to somewhere on your `PATH`.

## Getting Started

To launch conformance tests (ensuring [CNCF][cncf] conformance) and wait until they are finished run:

```bash
sonobuoy run --wait
```

> Note: Using `--mode quick` will significantly shorten the runtime of Sonobuoy. It runs just a single test, helping to quickly validate your Sonobuoy and Kubernetes configuration.
Get the results from the plugins (e.g. e2e test results):

```bash
results=$(sonobuoy retrieve)
```

Inspect results for test failures. This will list the number of tests failed and their names:

```bash
sonobuoy results $results
```

> Note: The `results` command has lots of useful options for various situations. See the [results page][results] for more details.
You can also extract the entire contents of the file to get much more [detailed data][snapshot] about your cluster.

Sonobuoy creates a few resources in order to run and expects to run within its
own namespace.

Deleting Sonobuoy entails removing its namespace as well as a few cluster
scoped resources.

```bash
sonobuoy delete --wait
```

> Note: The --wait option ensures the Kubernetes namespace is deleted, avoiding conflicts if another Sonobuoy run is started quickly.
### Other Tests

By default, `sonobuoy run` runs the Kubernetes conformance tests but this can easily be configured. The same plugin that has the conformance tests has all the Kubernetes end-to-end tests which include other tests such as:

* tests for specific storage features
* performance tests
* scaling tests
* provider specific tests
* and many more

To modify which tests you want to run, checkout our page on the [e2e plugin][e2ePlugin].

If you want to run other tests or tools which are not a part of the Kubernetes end-to-end suite, refer to our documentation on [custom plugins][customPlugins].

### Monitoring Sonobuoy during a run

You can check on the status of each of the plugins running with:

```bash
sonobuoy status
```

You can also inspect the logs of all Sonobuoy containers:

```bash
sonobuoy logs
```

## Troubleshooting

If you encounter any problems that the documentation does not address, [file an
issue][issue].

## Docker Hub rate limit

This year, Docker has started rate limiting image pulls from Docker Hub. We're planning a future release with a better user interface to work around this. Until then, this is the recommended approach.

### Sonobuoy Pod

Sonobuoy by default pulls from Docker Hub for [`sonobuoy/sonobuoy` image](https://hub.docker.com/r/sonobuoy/sonobuoy). If you're encountering rate limit on this, you can use VMware-provided mirror with:

```bash
sonobuoy run --sonobuoy-image projects.registry.vmware.com/sonobuoy/sonobuoy:v0.20.0
```

### Conformance

Kubernetes end-to-end conformance test pulls several images from Docker Hub as part of testing. To override this, you will need to create a registry manifest file locally (e.g. `conformance-image-config.yaml`) containing the following:

```yaml
dockerLibraryRegistry: mirror.gcr.io/library
```
Then on running conformance:
```bash
sonobuoy run --sonobuoy-image projects.registry.vmware.com/sonobuoy/sonobuoy:v0.20.0 --e2e-repo-config conformance-image-config.yaml
```

Technically `dockerGluster` is also a registry pulling from Docker Hub, but it's not part of Conformance test suite at the moment, so overriding `dockerLibraryRegistry` should be enough.

## Known Issues

### Leaked End-to-end namespaces

There are some Kubernetes e2e tests that may leak resources. Sonobuoy can
help clean those up as well by deleting all namespaces prefixed with `e2e`:

```bash
sonobuoy delete --all
```

### Run on Google Cloud Platform (GCP)

Sonobuoy requires admin permissions which won't be automatic if you are running via Google Kubernetes Engine (GKE) cluster. You must first create an admin role for the user under which you run Sonobuoy:

```bash
kubectl create clusterrolebinding <your-user-cluster-admin-binding> --clusterrole=cluster-admin --user=<[email protected]>
```

## Contributing

Thanks for taking the time to join our community and start contributing! We
welcome pull requests. Feel free to dig through the [issues][issue] and jump in.

### Before you start

* Please familiarize yourself with the [Code of Conduct][coc] before
contributing.
* See [CONTRIBUTING.md][contrib] for instructions on the developer certificate
of origin that we require.
* There is a [Slack channel][slack] if you want to
interact with other members of the community

## Changelog

See [the list of releases][releases] to find out about feature changes.

[decoupling-sonobuoy-k8s]: https://sonobuoy.io/decoupling-sonobuoy-and-kubernetes
[airgap]: airgap
[brew]: https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-with-homebrew-on-macos
[cncf]: https://github.com/cncf/k8s-conformance#certified-kubernetes
[coc]: https://github.com/vmware-tanzu/sonobuoy/blob/master/CODE_OF_CONDUCT.md
[contrib]: https://github.com/vmware-tanzu/sonobuoy/blob/master/CONTRIBUTING.md
[docker]: https://docs.docker.com/get-docker/
[docs]: https://sonobuoy.io/docs/v0.50.0
[e2ePlugin]: e2eplugin
[customPlugins]: plugins
[gen]: gen
[issue]: https://github.com/vmware-tanzu/sonobuoy/issues
[k8s]: https://github.com/kubernetes/kubernetes
[linux]: https://kubernetes.io/docs/tasks/tools/install-kubectl/#tabset-1
[oview]: https://youtu.be/8QK-Hg2yUd4
[plugins]: plugins
[quickstart]: https://aws.amazon.com/quickstart/architecture/vmware-kubernetes/
[releases]: https://github.com/vmware-tanzu/sonobuoy/releases
[results]: results
[slack]: https://kubernetes.slack.com/messages/sonobuoy
[snapshot]:snapshot
[sonobuoyconfig]: sonobuoy-config
Loading

0 comments on commit d9ec0c1

Please sign in to comment.