Skip to content

Commit

Permalink
docs(install-deploy): improves Deployment and Getting Started pages (#…
Browse files Browse the repository at this point in the history
…2567)

* docs(deployment): clean up formatting

* docs(detailed-install): improved explanation, added link to Helm docs
  • Loading branch information
adnanrahic authored May 23, 2023
1 parent 196a086 commit 34fd59f
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 19 deletions.
10 changes: 1 addition & 9 deletions docs/docs/deployment/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,21 @@ How do you want to run TraceTest? [type to search]:
Using Kubernetes
```

<!-- ![Installer using docker compose](../img/installer/1_docker-compose_0.7.0.png) -->

Select `Using Docker Compose` and follow the instructions.

**Tools required (installed if missing)**:

- Docker
- Docker Compose

**Requirements**:

- Jaeger or other compatible backend. If missing, the installer will help you configure one.
- OpenTelemetry Collector. If missing, the installer will help you configure one.
- A `docker-compose.yaml` (configurable) file in the project directory. If missing, the installer will create an empty file.

**Optionals**:

- [PokeShop demo app](https://github.com/kubeshop/pokeshop/). A sample microservice app to test your Tracetest installation.
- [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/). A trace collector, that receives telemetry of other applications and sent it to Tracetest.

**Result**:

- `tracetest/` directory (configurable) with a `docker-compose.yaml` and other config files.
- [Jaeger](https://www.jaegertracing.io/) instance, if selected.
- [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/), if selected.
- [PokeShop demo app](https://github.com/kubeshop/pokeshop/), if selected.

Expand Down
15 changes: 10 additions & 5 deletions docs/docs/deployment/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@ import TabItem from '@theme/TabItem';

<!-- Docusaurus imports end -->

This guide walks you through using the Tracetest CLI to deploy Tracetest with Kubernetes.
This guide walks you through deploying Tracetest with Kubernetes.

:::note
This is an example of a production-ready deployment, but real-world deployments can vary significantly depending on desired performance and scale.
This setup is ideal for CI/CD environments and QA teams working in shared environments. You can use a remote or local ([minikube](https://minikube.sigs.k8s.io/docs/start/), [kind](https://kind.sigs.k8s.io/), [k3d](https://k3d.io/), etc) cluster.
:::

This setup is ideal for CI/CD environments and QA teams working in shared environments. You can use a remote or local ([minikube](https://minikube.sigs.k8s.io/docs/start/), [kind](https://kind.sigs.k8s.io/), [k3d](https://k3d.io/), etc) cluster.
You have two options to install Tracetest on Kubernetes:

You have two options to install Tracetest on Kubernetes, one is using the Tracetest CLI to guide your installation, another one is using directly our [Helm chart](https://github.com/kubeshop/helm-charts/tree/main/charts/tracetest).
- Using the [Tracetest CLI](../getting-started/installation) to guide your installation
- Using the official [Helm chart](https://github.com/kubeshop/helm-charts/tree/main/charts/tracetest)

<Tabs groupId="kubernetes-installation">
<TabItem value="cli" label="Using Tracetest CLI" default>
<TabItem value="cli" label="Tracetest CLI" default>

First, install Tracetest CLI following the instructions on [Getting Started](../getting-started/installation#install-the-tracetest-cli).

After installing the CLI, run:
Expand Down Expand Up @@ -59,8 +62,10 @@ kubectl port-forward svc/tracetest 11633
```

Then launch a browser to [http://localhost:11633/](http://localhost:11633/).

</TabItem>
<TabItem value="helm" label="Using Helm Chart">
<TabItem value="helm" label="Helm Chart">

First, be sure that you have [Helm](https://helm.sh/) installed in your machine.

The Tracetest Helm charts are located [here](https://github.com/kubeshop/helm-charts/tree/main/charts/tracetest).
Expand Down
142 changes: 137 additions & 5 deletions docs/docs/getting-started/detailed-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Tracetest has a command line interface (CLI) which includes an **install wizard** that helps to install the Tracetest server into Docker or Kubernetes. The CLI can also be used to run tests, download or upload tests, and manage much of the capability of Tracetest.

:::note
To read about deploying Tracetest with Helm, view the [Kubernetes Deployment docs](../deployment/kubernetes.mdx).
:::

## Installing the Tracetest Server via the CLI

Use the CLI's install wizard to install a Tracetest server locally using Docker Compose or to a local or remote Kubernetes cluster.
Expand Down Expand Up @@ -61,6 +65,7 @@ sudo yum install tracetest --refresh
```

### Windows

Download one of the files from the latest tag, extract to your machine, and then [add the tracetest binary to your PATH variable](https://stackoverflow.com/a/41895179)

## Install a Tracetest Server for Development with the CLI
Expand All @@ -77,7 +82,12 @@ Make sure you have [Docker](https://docs.docker.com/get-docker/) and [Docker Com
In this quick start, OpenTelemetry Collector is used to send traces directly to Tracetest. If you have an existing trace data source, [read here](../configuration/overview.md).
:::

## Docker Compose

This guide showcases using the Docker Compose option in the Tracetest CLI.

### 1. Run the `server install` Command

Once you've installed the CLI you can install a Tracetest server by running:

```bash
Expand Down Expand Up @@ -136,7 +146,7 @@ Do you have OpenTelemetry based tracing already set up, or would you like us to

After choosing this option, the installer will check if your Docker installation is ok on your machine and will proceed to the next step.

### 3. Select a default installation or an installation with sample app.
### 3. Select a default installation or an installation with sample app

In this step, you can choose to install just Tracetest alone or install it with a sample app. By seeing the following options:

Expand All @@ -147,11 +157,11 @@ Do you have OpenTelemetry based tracing already set up, or would you like us to
```

By choosing any option, this installer will create a `tracetest` directory in the current directory and will add a `docker-compose.yaml` file to it.
If you choose the first one, the `docker-compose.yaml` will have only Tracetest and its dependencies. By choosing the second, a sample app called [Pokeshop](../live-examples/pokeshop/overview.md) will be installed with Tracetest, allowing you to create some tests against it in the future.
If you choose the first one, the `docker-compose.yaml` will have only Tracetest and its dependencies. By choosing the second, a sample app called [Pokeshop](../live-examples/pokeshop/overview.md) will be installed with Tracetest, allowing you to create some tests against it in the future.

For demonstration purposes, we will choose `Just learning tracing! Install Tracetest, OpenTelemetry Collector and the sample app.` option.

### 4. Finish the installation.
### 4. Finish the installation

Tracetest will proceed with the installation and show how to start it.

Expand All @@ -171,7 +181,7 @@ Then, use your browser to navigate to:
Happy TraceTesting =)
```

### 5. Start Docker Compose.
### 5. Start Docker Compose

```bash
docker compose -f tracetest/docker-compose.yaml up -d
Expand All @@ -184,7 +194,129 @@ Starting tracetest ...
...
```

### 8. Open the Tracetest Web UI
### 6. Open the Tracetest Web UI

Open [`http://localhost:11633`](http://localhost:11633) in your browser.

Create a [test](../web-ui/creating-tests.md).

:::info
Running a test against `localhost` will resolve as `127.0.0.1` inside the Tracetest container. To run tests against apps running on your local machine, add them to the same network and use service name mapping instead. Example: Instead of running an app on `localhost:8080`, add it to your Docker Compose file, connect it to the same network as your Tracetest service, and use `service-name:8080` in the URL field when creating an app.

You can reach services running on your local machine using:

- Linux (docker version < 20.10.0): `172.17.0.1:8080`
- MacOS (docker version >= 18.03) and Linux (docker version >= 20.10.0): `host.docker.internal:8080`
:::

## Kubernetes

This guide showcases using the Kubernetes option in the Tracetest CLI.

### 1. Run the `server install` Command

Once you've installed the CLI you can install a Tracetest server by running:

```bash
tracetest server install
```

```text title="Expected output:"
████████ ██████ █████ ██████ ███████ ████████ ███████ ███████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██████ ███████ ██ █████ ██ █████ ███████ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██████ ███████ ██ ███████ ███████ ██
Version: v0.10.1
Hi! Welcome to the TraceTest server installer. I'll help you set up your TraceTest server by asking you a few questions
and configuring your system with all the requirements, so you can start TraceTesting right away!
To get more info about TraceTest, you can check our docs at https://kubeshop.github.io/tracetest/
If you have any issues, please let us know by creating an issue (https://github.com/kubeshop/tracetest/issues/new/choose)
or reach us on Discord https://discord.gg/6zupCZFQbe
How do you want to run TraceTest? [type to search]:
Using Docker Compose
> Using Kubernetes
```

### 2. Select Kubernetes

This prompts you to select if you want to get either a Docker Compose or Kubernetes setup generated for you.

Select `Using Kubernetes`.

```text title="Expected output:"
...
How do you want to run TraceTest?:
> Using Kubernetes
-> Let's check if your system has everything we need
✔ kubectl already installed
✔ helm already installed
-> Your system is ready! Now, let's configure TraceTest
Do you have OpenTelemetry based tracing already set up, or would you like us to install a demo tracing environment and app? [type to search]:
> I have a tracing environment already. Just install Tracetest
Just learning tracing! Install Tracetest, OpenTelemetry Collector and the sample app.
```

After choosing this option, the installer will check if your kubectl and Helm installations are okay on your machine and will proceed to the next step.

### 3. Select a default installation or an installation with sample app

In this step, you can choose to install just Tracetest alone or install it with a sample app. By seeing the following options:

```text title="Expected output:"
Do you have OpenTelemetry based tracing already set up, or would you like us to install a demo tracing environment and app? [type to search]:
I have a tracing environment already. Just install Tracetest
> Just learning tracing! Install Tracetest, OpenTelemetry Collector and the sample app.
```

By choosing any option, this installer will create a `tracetest` namespace with all Tracetest related containers.
If you choose the first one, the `tracetest` namespace will have only Tracetest and its dependencies. By choosing the second, two things will be added. First, a sample app called [Pokeshop](../live-examples/pokeshop/overview.md) will be installed in a `demo` namespace, allowing you to create some tests against it. Second, an OpenTelemetry Collector will be installed in the `tracetest` namespace to receive traces from the demo app and forward them to Tracetest.

For demonstration purposes, we will choose `Just learning tracing! Install Tracetest, OpenTelemetry Collector and the sample app.` option.

### 4. Finish the installation

Tracetest will proceed with the installation and show how to start it.

```text title="Expected output:"
SUCCESS Install successful!
To access tracetest:
kubectl --kubeconfig ${HOME}/.kube/config --context kind-kind --namespace tracetest port-forward svc/tracetest 11633
Then, use your browser to navigate to:
http://localhost:11633
Happy TraceTesting =)
```

### 5. Port forward the Tracetest service

```bash
kubectl --kubeconfig ${HOME}/.kube/config --context kind-kind --namespace tracetest port-forward svc/tracetest 11633
```

```bash title="Expected output..."
Forwarding from 127.0.0.1:11633 -> 11633
Forwarding from [::1]:11633 -> 11633
```

### 6. Open the Tracetest Web UI

Open [`http://localhost:11633`](http://localhost:11633) in your browser.

Expand Down

0 comments on commit 34fd59f

Please sign in to comment.