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

docs: Testkube CLI docker #4064

Merged
merged 2 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions docs/docs/articles/testkube-cli-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Testkube Docker CLI

The easiest way to start managing the tests of your team on a remote Testkube server is to run the Testkube CLI using the official Docker image available starting from Testkube version 1.13. The Testkube CLI Docker image is a self-contained environment that allows you to run Testkube commands in a consistent and isolated manner.
vLia marked this conversation as resolved.
Show resolved Hide resolved

## Prerequisites

Before using the Testkube CLI Docker image, ensure that you have Docker installed and running on your system. You can download and install Docker from the official Docker website (<https://www.docker.com/>).

To pull the image, run:

```bash
docker pull kubeshop/testkube-cli:latest
```

## Obtaining the Testkube CLI Docker Image

To obtain the Testkube CLI Docker image, you have two options:

### 1. Pulling from Docker Hub

The Testkube CLI Docker image is available on Docker Hub. You can pull it using the following command:

```bash
docker pull testkube/cli:latest
```

### 2. Building from Source

If you prefer to build the Docker image from source, you can clone the Testkube CLI repository from GitHub and build it locally using goreleaser, the provided Dockerfile and the Makefile. Follow these steps:
vLia marked this conversation as resolved.
Show resolved Hide resolved

1. Clone the Testkube CLI repository:

```bash
git clone https://github.com/kubeshop/testkube.git
```

2. Build the Docker image:

```bash
make docker-build-cli DOCKER_BUILDX_CACHE_FROM=type=registry,ref=docker.io/kubeshop/testkube-cli:latest ALPINE_IMAGE=alpine:3.18.0 DOCKER_IMAGE_TAG=local ANALYTICS_TRACKING_ID="" ANALYTICS_API_KEY=""
```

## Running the Testkube CLI Docker Image

Once you have the image, try running the following command pointing to Testkube demo:
vLia marked this conversation as resolved.
Show resolved Hide resolved

```bash
docker run kubeshop/testkube-cli:latest version --namespace testkube --api-uri https://demo.testkube.io/results --client direct
```

This command starts a new Docker container with the Testkube CLI image and executes the command `testkube version` pointing to the api-server running on the Testkube demo environment.
vLia marked this conversation as resolved.
Show resolved Hide resolved

There are multiple *client types* you can set for the Testkube CLI:

* direct - for connecting to a remotely deployed environment
* proxy - for connecting to local environments, not relevant in the case of a Docker container
* cloud - for connecting to Testkube Cloud

You can also use your existing `kubectl` configuration file as a volume:

```bash
docker run -v ~/.testkube:/.testkube kubeshop/testkube-cli:1.11.13-SNAPSHOT-5f34248fd-arm64v8 --api-uri https://demo.testkube.io/results --client direct version
```

## Conclusion

This user documentation has provided an overview of the Testkube CLI Docker image and guided you through the process of obtaining, running, and using the Testkube CLI within the Docker container. With the Testkube CLI, you can conveniently manage your Testkube deployments and perform various operations with ease.
1 change: 1 addition & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const sidebars = {
items: [
"articles/github-actions",
"articles/run-tests-with-github-actions",
"articles/testkube-cli-docker",
{
type: "category",
label: "GitOps",
Expand Down