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: new information architecture #3791

Merged
merged 8 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ cover:
@go test -failfast -count=1 -v -tags test -coverprofile=./testCoverage.txt ./... && go tool cover -html=./testCoverage.txt -o testCoverage.html && rm ./testCoverage.txt
open testCoverage.html

diagrams:
plantuml ./docs/puml/*.puml -o ../img/

version-bump: version-bump-patch

version-bump-patch:
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<p align="center">
<a href="https://testkube.io">Website</a>&nbsp;|&nbsp;
<a href="https://kubeshop.github.io/testkube">Documentation</a>&nbsp;|&nbsp;
<a href="https://docs.testkube.io">Documentation</a>&nbsp;|&nbsp;
<a href="https://twitter.com/testkube_io">Twitter</a>&nbsp;|&nbsp;
<a href="https://discord.gg/hfq44wtR6Q">Discord</a>&nbsp;|&nbsp;
<a href="https://kubeshop.io/category/testkube">Blog</a>
Expand Down Expand Up @@ -75,25 +75,25 @@ Main Testkube components are:
- [Postman Executor](https://github.com/kubeshop/testkube-executor-postman) - runs Postman Collections
- [Cypress Executor](https://github.com/kubeshop/testkube-executor-cypress) - runs Cypress Tests
- [K6 Executor](https://github.com/kubeshop/testkube-executor-k6) - runs K6 performance tests ([@lreimer](https://github.com/lreimer))
- [SoapUI](https://kubeshop.github.io/testkube/test-types/executor-soapui/) - runs SoapUI tests
- [Kubepug](https://kubeshop.github.io/testkube/test-types/executor-kubepug/) - runs Kubepug tests
- [Artillery.io](https://kubeshop.github.io/testkube/test-types/executor-artillery/) - runs Artillery tests
- [Curl Executor](https://kubeshop.github.io/testkube/test-types/curl) - runs simple Curl commands
- [Maven](https://kubeshop.github.io/testkube/test-types/executor-maven/) - Runs tests written in Java using Maven ([@lreimer](https://github.com/lreimer))
- [Gradle](https://kubeshop.github.io/testkube/test-types/executor-gradle/) - Runs tests written in Java using Gradle ([@lreimer](https://github.com/lreimer))
- [Ginkgo](https://kubeshop.github.io/testkube/test-types/executor-ginkgo/) - Runs tests written in Go using Ginkgo ([@jdborneman-terminus](https://github.com/jdborneman-terminus))
- [SoapUI](https://docs.testkube.io/test-types/executor-soapui/) - runs SoapUI tests
- [Kubepug](https://docs.testkube.io/test-types/executor-kubepug/) - runs Kubepug tests
- [Artillery.io](https://docs.testkube.io/test-types/executor-artillery/) - runs Artillery tests
- [Curl Executor](https://docs.testkube.io/test-types/curl) - runs simple Curl commands
- [Maven](https://docs.testkube.io/test-types/executor-maven/) - Runs tests written in Java using Maven ([@lreimer](https://github.com/lreimer))
- [Gradle](https://docs.testkube.io/test-types/executor-gradle/) - Runs tests written in Java using Gradle ([@lreimer](https://github.com/lreimer))
- [Ginkgo](https://docs.testkube.io/test-types/executor-ginkgo/) - Runs tests written in Go using Ginkgo ([@jdborneman-terminus](https://github.com/jdborneman-terminus))
- [Executor Template](https://github.com/kubeshop/testkube-executor-template) - for creating your own executors
- Results DB - for centralized test results aggregation and analysis
- [Testkube Dashboard](https://github.com/kubeshop/testkube-dashboard) - standalone web application for viewing real-time Testkube test results


## Getting Started

Checkout the [Getting Started](https://kubeshop.github.io/testkube/getting-started/) guides to set up Testkube and run your first tests!
Checkout the [Getting Started](docs.testkube.io/getting-started/) guides to set up Testkube and run your first tests!

# Documentation

Is available at [https://kubeshop.github.io/testkube](https://kubeshop.github.io/testkube)
Is available at [docs.testkube.io](docs.testkube.io)

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion cmd/kubectl-testkube/commands/generate/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func NewDocsCmd() *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
root := cmd.Root()
root.DisableAutoGenTag = true
return doc.GenMarkdownTree(root, "docs/docs/reference/cli")
return doc.GenMarkdownTree(root, "docs/docs/cli")
},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

To synchronize Testkube's feature set between the Testkube CLI and the Testkube Dashboard, Test Variables can be defined in the Testkube Dashboard. On the Tests screen, select a Test and click on the **Settings** tab and select **Variables & Secrets**:

![Variable Tab](../../img/variable-tab-1.9.png)
![Variable Tab](../img/variable-tab-1.9.png)

Any variables already existing for that Test will be shown. To create a Test variable, click **Add Variable** and provide desired values.

![Add Variable](../../img/add-variable-1.9.png)
![Add Variable](../img/add-variable-1.9.png)

![Variable Type](../../img/variable-type-1.9.png)
![Variable Type](../img/variable-type-1.9.png)

The types available for Test variables are Basic, Secret and Secret Reference.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This diagram was made with the C4 diagram technique

![testkube container diagram](../img/containers.png)

See also [Dependencies for Testkube](../concepts/dependencies.md) describing NATS, MinIO and MongoDB dependencies.
See also [Dependencies for Testkube](../articles/testkube-dependencies.md) describing NATS, MinIO and MongoDB dependencies.

### Components

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Let’s start with setting things up for our GitOps-powered testing machine!

### 1. Make sure you have Testkube installed in your cluster.

If you haven't installed Testkube in your cluster yet, visit the [Getting Started guide](../../../getting-started/index.md) for a walkthrough on installing Testkube.
If you haven't installed Testkube in your cluster yet, visit the [Getting Started guide](./getting-started-overview) for a walkthrough on installing Testkube.

### 2. Install ArgoCD.

Expand All @@ -18,7 +18,7 @@ Note: For step 3 in the guide, “Access The Argo CD API Server”, choose the

### 3. Install Testkube.

Follow the installation guide for Testkube [here](https://docs.testkube.io/getting-started/overview). Make sure to install the CLI client and the components in your cluster.
Follow the installation guide for Testkube [here](./getting-started-overview). Make sure to install the CLI client and the components in your cluster.

### 4. Install a “Hello Kubernetes!” application in your cluster.

Expand Down Expand Up @@ -205,15 +205,15 @@ kubectl apply -f testkube-application.yaml

On ArgoCD’s dashboard, we will now see the newly created application. Let’s click to get into it and sync our tests.

![ArgoCD Testkube Tests](../../../img/ArgoCD-testkube-tests.png)
![ArgoCD Testkube Tests](../img/ArgoCD-testkube-tests.png)

And now click on Sync to see your tests created.

![Sync Testing](../../../img/sync-testing.png)
![Sync Testing](../img/sync-testing.png)

Voilà! Our test collection is created and managed by ArgoCD with every new test created and updated in the GitHub repository containing the tests!

![Test Management with ArgoCD](../../../img/test-management-with-ArgoCD.png)
![Test Management with ArgoCD](../img/test-management-with-ArgoCD.png)

### 10. Run ad-hoc tests from the CLI.

Expand All @@ -225,7 +225,7 @@ testkube get tests

You should see your deployed test artifacts:

![Deployed Artifacts](../../../img/test-artifacts.png)
![Deployed Artifacts](../img/test-artifacts.png)

To run those tests execute the following command:

Expand All @@ -236,15 +236,15 @@ testkube tests run hello-kubernetes
The test execution will start in the background. Copy the command from the image below to check the result of the execution of the test:

![Cluster ID in CLI](../../../img/cluster-id-in-CLI.png)
![Cluster ID in CLI](../img/cluster-id-in-CLI.png)

```sh
$ testkube tests execution EXECUTION_ID
```

‍You should see that the tests have run successfully, as in the image below.

![Viewing Executed Tests](../../../img/viewing-executed-tests.png)
![Viewing Executed Tests](../img/viewing-executed-tests.png)

### 11. See test results in the Testkube dashboard.

Expand All @@ -256,7 +256,7 @@ testkube dashboard

And you will be able to see the results of the execution in the Executions tab as seen in the image below:

![Test Execution Dashboard](../../../img/test-execution-dashboard-1.9.png)
![Test Execution Dashboard](../img/test-execution-dashboard-1.9.png)

### 12. Test the flow; update the test and deploy the updated test with ArgoCD.

Expand Down Expand Up @@ -308,11 +308,11 @@ As you can see, we have added a request status check. Now commit this change to

If you now go to ArgoCD’s dashboard you’ll see that your tests are out of sync with the deployed artifacts.

![Warnings](../../../img/warnings.png)
![Warnings](../img/warnings.png)

Click on **Sync** again and apply the changes. With that, your test artifacts are back in sync!

![Applying Changes to CD](../../../img/applying-changes-to-CD.png)
![Applying Changes to CD](../img/applying-changes-to-CD.png)

We now have an automated test deployment and execution pipeline based on GitOps principles!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ You can trigger tests in Testkube from your CI/CD pipeline. This practice decoup
We have different tutorials for the options of being CI driven or using GitOps approaches. Check out the following tutorials:

- [Github Actions](./github-actions.md)
- [GitOps Testing](./gitops/index.md)
- [Flux](./gitops/flux.md)
- [ArgoCD](./gitops/argocd.md)
- [GitOps Testing](./gitops-overview.md)
- [Flux](./flux-integration.md)
- [ArgoCD](./argocd-integration.md)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

To expose Testkube to the Internet, you will need to create an Ingress for both the Testkube API and the Testkube dashboard.

Check the guides [here](../guides/going-to-production/exposing-testkube/overview.md) for different configurations.
Check the guides [here](./going-to-production.md) for different configurations.

## Why is the Testkube Dashboard not working or does not return results?

Expand Down Expand Up @@ -162,4 +162,4 @@ metadata:

## Observability

There are two types of storage Mongo and Minio, read more details [here](../guides/logging.md).
There are two types of storage Mongo and Minio, read more details [here](./logging.md).
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
If you are new to the open source community, use this guide to start contributing to projects:
<https://github.com/firstcontributions/first-contributions>.

Checkout the [development document](development/index.md) for more details about how to develop and run testkube on your machine.
Checkout the [development document](./development.md) for more details about how to develop and run testkube on your machine.

## General Guidance for Contributing to a Testkube Project

Expand All @@ -21,32 +21,4 @@ We would like to limit technical debt from the beginning, so we have defined sim
### For Infrastructure/Kubernetes Based Components

- Put in comments for non-obvious decisions.
- Use current Helm/Kubernetes versions.

## Building Diagrams

To build diagrams, install PlantUML:

```sh
brew install plantuml # on mac
```

```sh
sudo apt-get install -y plantuml # on ubuntu linux
```

```sh
pacman -S plantuml # on arch linux
```

Then run:

```sh
make diagrams
```

This generates png files from puml files.

:::tip
If using vscode, there is a nice extension for the live preview of PlantUML files.
:::
- Use current Helm/Kubernetes versions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ To create your first Postman collection in Testkube, export your collection into

Right click on your collection name:

![create postman collection step 1](../../img/test-create-1.png)
![create postman collection step 1](../img/test-create-1.png)

Click the **Export** button:

![create postman collection step 2](../../img/test-create-2.png)
![create postman collection step 2](../img/test-create-2.png)

Save in a convenient location. In this example, we are using `~/Downloads/TODO.postman_collection.json` path.

![create postman collection step 3](../../img/test-create-3.png)
![create postman collection step 3](../img/test-create-3.png)

Create a Testkube test using the exported JSON and give it a unique and fitting name. For simplicity's sake we used `test` in this example.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Once the cluster is up and running we need to deploy the AWS Load Balancer Contr

Another important point is [ExternalDNS](https://github.com/kubernetes-sigs/external-dns). It is not compulsory to deploy it into your cluster, but it helps you dynamically manage your DNS records via k8s resources.

And last, but not least - install the Testkube CLI. You can download a binary file from our [installation](https://kubeshop.github.io/testkube/getting-started/installing-cli) page. For how to deploy Testkube to your cluster with all the necessary changes, please see the next section.
And last, but not least - install the Testkube CLI. You can download a binary file from our [installation](./step1-installing-cli.md) page. For how to deploy Testkube to your cluster with all the necessary changes, please see the next section.

## Ingress and Service Resources Configuration

Expand Down Expand Up @@ -87,11 +87,11 @@ helm install --create-namespace testkube kubeshop/testkube --namespace testkube

After the installation command is complete, you will see the following resources created into your AWS Console.

![AWS Console](../../img/aws-resource-console.png)
![AWS Console](../img/aws-resource-console.png)

![AWS Console2](../../img/aws-resource-console-2.png)
![AWS Console2](../img/aws-resource-console-2.png)

![AWS Console3](../../img/aws-resource-console-3.png)
![AWS Console3](../img/aws-resource-console-3.png)

Please note that the annotations may vary, depending on your Load Balancer schema type, backend-protocols (you may use http only), target-type, etc. However, this is the bare minimum that should be applied to your configuration.

Expand Down Expand Up @@ -169,7 +169,7 @@ Do not forget to add `apiServerEndpoint` to the values.yaml for `testkube-dashbo

This way we will have 1 Load Balancer with two listener rules pointing on corresponding paths:

![One Load Balancer](../../img/one-load-balancer.png)
![One Load Balancer](../img/one-load-balancer.png)

## Give it a go!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ flux create kustomization testkube-test \

### 6. Install Testkube in the cluster.

If you don't have the Testkube CLI, follow the instructions [here](../../../getting-started/step1-installing-cli.md) to install it.
If you don't have the Testkube CLI, follow the instructions [here](./step1-installing-cli.md) to install it.

Run the following command to install Testkube and its components in the cluster:

Expand All @@ -87,11 +87,11 @@ To create a Kubernetes CRD for the test, run:
testkube generate tests-crds img/server/tests/postman-collection.json > cluster/testkube/server-postman-test.yaml
```

Note: You can [run Testkube from your CI/CD pipeline](https://docs.testkube.io/integrations/testkube-automation/) if you want to automate the creation of the Test CRDs.
Note: You can [run Testkube from your CI/CD pipeline](./cicd-overview.md) if you want to automate the creation of the Test CRDs.

### 8. Add the generated test to the Kustomize file.

The name of the test file created in the previous step is **server-postman-test.yaml**. Add that to the Kustomize file located in [cluster/testkube/kustomization.yaml](https://docs.testkube.io/integrations/testkube-automation/):
The name of the test file created in the previous step is **server-postman-test.yaml**. Add that to the Kustomize file located in `cluster/testkube/kustomization.yaml`:

```diff
apiVersion: kustomize.config.k8s.io/v1beta1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
In this section you will:

1. [Install the Testkube CLI](./step1-installing-cli.md).
2. [Install the Testkube Server components in your cluster](./step2-installing-cluster-components.md). [Alternatively you can use Helm](../reference/helm-chart.md) to do that.
2. [Install the Testkube Server components in your cluster](./step2-installing-cluster-components.md). [Alternatively you can use Helm](./helm-chart.md) to do that.
3. [Creating your first Test](./step3-creating-first-test.md).

You can also see the full installation video from our product experts: [Testkube Installation Video](https://www.youtube.com/watch?v=bjQboi3Etys):
Expand All @@ -15,5 +15,5 @@ In summary, you now have Testkube setup in your Kubernetes cluster, ready to dis
- The Testkube CLI allows you to interact with the Testkube server components through k8s CRs or REST API calls made through the [kube apiserver proxy](https://kubernetes.io/docs/concepts/cluster-administration/proxies/).

As usage of Testkube grows within your team, you may choose to:
* Leverage [managed Testkube cloud](../testkube-cloud/intro.md).
* [Move to production](../guides/going-to-production) with your own Testkube installation.
* Leverage [managed Testkube cloud](../testkube-cloud/articles/intro.md).
* [Move to production](./going-to-production.md) with your own Testkube installation.
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Testkube is the first GitOps-friendly Cloud-native test orchestration/execution

Conceptually, this can be illustrated as follows:

![GitOps CLoud Testing](../../../img/GitOps-cloud-testing.jpeg)
![GitOps CLoud Testing](../img/GitOps-cloud-testing.jpeg)
7 changes: 7 additions & 0 deletions docs/docs/articles/going-to-production.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Overview

This section provides guidance to get Testkube to production, in particular to enable access to Testkube without requiring k8s privileges to the Testkube k8s namespace and workloads:
1. Exposing Testkube Dashboard [externally with ingresses](./exposing-testkube.md).
2. Overall [Testkube deployment on AWS](./deploying-in-aws.md).
3. Add [OAuth authentication to the Testkube dashboard](./oauth-dashboard.md).
4. Add [OAuth authentication to the Testkube api-server used by the CLI](./oauth-cli.md) as an alternative to default `proxy` mode leveraging [kube apiserver proxy](https://kubernetes.io/docs/concepts/cluster-administration/proxies/).
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ In [OAuth terminology](https://www.rfc-editor.org/rfc/rfc6749#section-1.1):

Register a new Github OAuth application for your personal or organization account.

![Register new App](../../../img/github_app_request_cli.png)
![Register new App](../img/github_app_request_cli.png)

Pay attention to the usage of the scheme (http or https) in URIs.
The homepage URL should be the Testkube Dashboard home page http://127.0.0.1:13254.

The authorization callback URL should be a prebuilt page at the Testkube Dashboard website http://127.0.0.1:13254/oauth/callback.

![View created App](../../../img/github_app_response_cli.png)
![View created App](../img/github_app_response_cli.png)

Make note of the generated Client ID and Client Secret.

Expand All @@ -63,10 +63,10 @@ Authentication will be cancelled in 60 seconds
```

Authorization for the GitHub application will be requested and access will need to be confirmed.
![Confirm App authorization](../../../img/github_app_authorize_cli.png)
![Confirm App authorization](../img/github_app_authorize_cli.png)

If authorization is successful, you will see the success page.
![Success Page](../../../img/github_app_success_cli.png)
![Success Page](../img/github_app_success_cli.png)

Output:

Expand Down
Loading