From dc0c1916ffcfe38bc9a3998f5219af3e2ddbb1f9 Mon Sep 17 00:00:00 2001 From: Lilla Vass Date: Mon, 19 Jun 2023 17:43:43 +0200 Subject: [PATCH 1/2] docs: Testkube CLI docker --- docs/docs/articles/testkube-cli-docker.md | 67 +++++++++++++++++++++++ docs/sidebars.js | 1 + 2 files changed, 68 insertions(+) create mode 100644 docs/docs/articles/testkube-cli-docker.md diff --git a/docs/docs/articles/testkube-cli-docker.md b/docs/docs/articles/testkube-cli-docker.md new file mode 100644 index 00000000000..e62bd076ef2 --- /dev/null +++ b/docs/docs/articles/testkube-cli-docker.md @@ -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. + +## 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 (). + +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: + +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: + +```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. + +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. diff --git a/docs/sidebars.js b/docs/sidebars.js index 561b4144678..aa02af7091f 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -108,6 +108,7 @@ const sidebars = { items: [ "articles/github-actions", "articles/run-tests-with-github-actions", + "articles/testkube-cli-docker", { type: "category", label: "GitOps", From a70163382212dd4a7d3c92be48346f2ca9bae91a Mon Sep 17 00:00:00 2001 From: Lilla Vass Date: Mon, 19 Jun 2023 23:09:34 +0200 Subject: [PATCH 2/2] docs: Apply suggestions from code review Co-authored-by: Julianne Fermi --- docs/docs/articles/testkube-cli-docker.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/articles/testkube-cli-docker.md b/docs/docs/articles/testkube-cli-docker.md index e62bd076ef2..beae780c73d 100644 --- a/docs/docs/articles/testkube-cli-docker.md +++ b/docs/docs/articles/testkube-cli-docker.md @@ -1,6 +1,6 @@ # 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. +Starting with Testkube version 1.13, the easiest way to start managing your team's tests on a remote Testkube server is to run the Testkube CLI using the official Docker image. The Testkube CLI Docker image is a self-contained environment that allows you to run Testkube commands in a consistent and isolated manner. ## Prerequisites @@ -26,7 +26,7 @@ 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: +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: 1. Clone the Testkube CLI repository: @@ -42,13 +42,13 @@ make docker-build-cli DOCKER_BUILDX_CACHE_FROM=type=registry,ref=docker.io/kubes ## Running the Testkube CLI Docker Image -Once you have the image, try running the following command pointing to Testkube demo: +Once you have the image, run the following command pointing to the Testkube demo: ```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. +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. There are multiple *client types* you can set for the Testkube CLI: