Skip to content

Commit

Permalink
feat: adjust testkube naming (#941)
Browse files Browse the repository at this point in the history
  • Loading branch information
haneabogdan authored Nov 23, 2023
1 parent 4d4781c commit 3f539b4
Show file tree
Hide file tree
Showing 8 changed files with 216 additions and 170 deletions.
215 changes: 123 additions & 92 deletions CONTRIBUTING.md

Large diffs are not rendered by default.

125 changes: 70 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@

Dashboard to manage your [**Testkube**](https://testkube.io) cluster and monitor its real-time results.

The Dashboard is deployed as an application in the cluster.
It runs in a browser, and it communicates with the [**Testkube API Server**](https://github.com/kubeshop/testkube) via Ingress Controller (either provided or bundled).
The Dashboard is deployed as an application in the cluster. It runs in a browser, and it communicates with the
[**Testkube API Server**](https://github.com/kubeshop/testkube) via Ingress Controller (either provided or bundled).

## Table of Contents

1. [Running Dashboard](#running-dashboard)
1. [Bundled](#bundled)
1. [Bundled](#bundled)
2. [Repository](#repository)
3. [Docker](#docker)
2. [Configuring Application](#configuring-application)
Expand All @@ -55,61 +55,72 @@ It runs in a browser, and it communicates with the [**Testkube API Server**](htt

By default, Dashboard is installed in your cluster along with your Testkube system.

To use the bundled Dashboard, run `testkube dashboard` command with [**Testkube CLI**](https://docs.testkube.io/articles/install-cli/),
to forward the UI and API ports from the Kubernetes cluster.
To use the bundled Dashboard, run `testkube dashboard` command with
[**Testkube CLI**](https://docs.testkube.io/articles/install-cli/), to forward the UI and API ports from the Kubernetes
cluster.

> <details>
> <summary>:warning: <strong>Testkube Cloud and Enterprise</strong></summary>
> <summary>:warning: <strong>Testkube Pro and Enterprise</strong></summary>
> <br>
>
> This Dashboard works only for the Testkube Open Source installations.
> To manage the Testkube in Enterprise or Cloud offering, use their corresponding dashboards:
> * [**cloud.testkube.io**](https://cloud.testkube.io?utm_source=github-dashboard) for Testkube Cloud
> * Your Enterprise URL for Testkube Enterprise
>
> This Dashboard works only for the Testkube Open Source installations. To manage the Testkube in Enterprise or Pro
> offering, use their corresponding dashboards:
>
> - [**app.testkube.io**](https://app.testkube.io?utm_source=github-dashboard) for Testkube Pro
> - Your Enterprise URL for Testkube Enterprise
> </details>
> <details>
> <summary>:eight_spoked_asterisk: <strong>Disable bundling dashboard</strong></summary>
> <br>
>
> To disable Dashboard installation with the Testkube system, you may use `testkube-dashboard.enabled=false` value in the [**Helm chart**](https://github.com/kubeshop/helm-charts/tree/main/charts/testkube).
>
> To disable Dashboard installation with the Testkube system, you may use `testkube-dashboard.enabled=false` value in
> the [**Helm chart**](https://github.com/kubeshop/helm-charts/tree/main/charts/testkube).
>
> </details>
### Repository

To run the Testkube Dashboard for development:
* Install Node 20.x
* Fork the repository and clone it (or just clone it, if you are Testkube member or want to read it only)
* Install NPM dependencies
* Run `npm start` command

- Install Node 20.x
- Fork the repository and clone it (or just clone it, if you are Testkube member or want to read it only)
- Install NPM dependencies
- Run `npm start` command

```bash
git clone git@github.com:kubeshop/testkube-dashboard.git && cd testkube-dashboard
npm install
npm start
```

To learn more about the Testkube Dashboard development and architecture, see the [**Contribution manual**](CONTRIBUTING.md).
To learn more about the Testkube Dashboard development and architecture, see the
[**Contribution manual**](CONTRIBUTING.md).

> <details>
> <summary>:eight_spoked_asterisk: <strong>Environment variables</strong></summary>
> <br>
>
>
> To configure your [**environment variables**](#environment-variables), either:
> * create `.env` file in the repository, or
> * export the environment variables globally
>
>
> - create `.env` file in the repository, or
> - export the environment variables globally
>
> You may use both [**build time**](#build-time-variables) and [**dynamic variables**](#dynamic-variables) here.
>
> Please note, that you may want to use [**Create React App's variables**](https://create-react-app.dev/docs/advanced-configuration/) too,
> i.e. `BROWSER=none` to avoid opening the browser.
> Please note, that you may want to use
> [**Create React App's variables**](https://create-react-app.dev/docs/advanced-configuration/) too, i.e. `BROWSER=none`
> to avoid opening the browser.
>
> </details>
### Docker

The Docker images for the Testkube Dashboard are deployed to the Docker Hub as [**kubeshop/testkube-dashboard**](https://hub.docker.com/r/kubeshop/testkube-dashboard).
The Docker images for the Testkube Dashboard are deployed to the Docker Hub as
[**kubeshop/testkube-dashboard**](https://hub.docker.com/r/kubeshop/testkube-dashboard).

To start Dashboard using Docker, run the image with the [**dynamic environment variables**](#dynamic-variables) you would like to pass, i.e.:
To start Dashboard using Docker, run the image with the [**dynamic environment variables**](#dynamic-variables) you
would like to pass, i.e.:

```bash
docker run --rm \
Expand All @@ -121,8 +132,10 @@ docker run --rm \
> <details>
> <summary>:warning: <strong>Environment variables</strong></summary>
> <br>
>
> To override the [**build time environment variables**](#build-time-variables) too, you need to [**build the Docker image**](#building-docker-image) on your own.
>
> To override the [**build time environment variables**](#build-time-variables) too, you need to
> [**build the Docker image**](#building-docker-image) on your own.
>
> </details>
## Configuring Application
Expand All @@ -131,32 +144,32 @@ docker run --rm \

All the Dashboard is configured with the environment variables.

Part of them is included directly in the production build,
while the rest may be modified for the running application.
Part of them is included directly in the production build, while the rest may be modified for the running application.

The latest variables are listed in [**env.ts**](packages/web/src/env.ts) file,
but for simplicity we keep them documented below too.
The latest variables are listed in [**env.ts**](packages/web/src/env.ts) file, but for simplicity we keep them
documented below too.

> <details>
> <summary>:eight_spoked_asterisk: <strong>Deep-linking overrides</strong></summary>
> <br>
>
> You may temporarily override the variables in the running application using the query string.
> The Dashboard seeks for query params starting with `~` and try to override any matching known variable.
>
> The query param name should be a variable name,
> but for simplicity it may omit `REACT_APP_` prefix and is case-insensitive.
> Short name from the tables above may be used.
>
> As an example, to change the API endpoint, you may use `https://demo.testkube.io?~api_server_endpoint=http://localhost:8088`.
>
> You may temporarily override the variables in the running application using the query string. The Dashboard seeks for
> query params starting with `~` and try to override any matching known variable.
>
> The query param name should be a variable name, but for simplicity it may omit `REACT_APP_` prefix and is
> case-insensitive. Short name from the tables above may be used.
>
> As an example, to change the API endpoint, you may use
> `https://demo.testkube.io?~api_server_endpoint=http://localhost:8088`.
>
> </details>
#### Build Time Variables

The build time environments are loaded from `process.env` during build time.

| Name | Short Name | Description |
|------------------------|--------------|---------------------------------------------------------------------------|
| ---------------------- | ------------ | ------------------------------------------------------------------------- |
| `REACT_APP_SENTRY_DSN` | `sentry_dsn` | [**Sentry**](https://sentry.io/) DSN for error reporting |
| `REACT_APP_GTM_ID` | `gtm_id` | [**Google Tag Manager**](https://tagmanager.google.com/) ID for telemetry |
| `REACT_APP_VERSION` | `version` | Dashboard version used for reporting and displaying |
Expand All @@ -166,7 +179,7 @@ The build time environments are loaded from `process.env` during build time.
The dynamic variables are loaded from automatically generated `env-config.js` file.

| Name | Short Name | Description |
|-----------------------------------|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| --------------------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `REACT_APP_API_SERVER_ENDPOINT` | `api_server_endpoint` | URL for the Testkube API Server |
| `REACT_APP_DISABLE_TELEMETRY` | `disable_telemetry` | Force disabling telemetry in the Dashboard |
| `REACT_APP_DEBUG_TELEMETRY` | `debug_telemetry` | Display debugging information about telemetry in the console log |
Expand All @@ -175,8 +188,8 @@ The dynamic variables are loaded from automatically generated `env-config.js` fi

### Building Docker Image

To build the Docker image of Testkube Dashboard locally,
simply build the [**Dockerfile**](Dockerfile), optionally with the [**environment variables**](#environment-variables) from above.
To build the Docker image of Testkube Dashboard locally, simply build the [**Dockerfile**](Dockerfile), optionally with
the [**environment variables**](#environment-variables) from above.

```bash
docker build \
Expand All @@ -187,27 +200,29 @@ docker build \
> <details>
> <summary>:eight_spoked_asterisk: <strong>Environment variables</strong></summary>
> <br>
>
> When you are building images with `docker build`, you may either both set the [**build time variables**](#build-time-variables),
> and set defaults for the [**dynamic variables**](#dynamic-variables).
>
> When you are building images with `docker build`, you may either both set the
> [**build time variables**](#build-time-variables), and set defaults for the
> [**dynamic variables**](#dynamic-variables).
>
> </details>
## Learn more

### Contributing and Architecture

To learn more about the Testkube Dashboard development and architecture, see the [**Contribution manual**](CONTRIBUTING.md).
To learn more about the Testkube Dashboard development and architecture, see the
[**Contribution manual**](CONTRIBUTING.md).

### Telemetry

To learn more about what custom events we expose to [**Google Tag Manager**](https://tagmanager.google.com/),
see [**Telemetry**](telemetry.md) document.
To learn more about what custom events we expose to [**Google Tag Manager**](https://tagmanager.google.com/), see
[**Telemetry**](telemetry.md) document.

### Testkube

* For the documentation of the Testkube system, see [**docs.testkube.io**](https://docs.testkube.io).
* To see the live demo, you may take a look at [**demo.testkube.io**](https://demo.testkube.io) *(some API endpoints are disabled there though, to avoid modifications)*
- For the documentation of the Testkube system, see [**docs.testkube.io**](https://docs.testkube.io).
- To see the live demo, you may take a look at [**demo.testkube.io**](https://demo.testkube.io) _(some API endpoints are
disabled there though, to avoid modifications)_

> **Unleash the power of cloud native testing in Kubernetes with Testkube.**
>
> Consider [**Testkube Cloud**](https://cloud.testkube.io?utm_source=github-dashboard) for simpler integration and more features!
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import {externalLinks} from '@utils/externalLinks';
const ConnectCloud: React.FC = () => {
return (
<ConfigurationCard
title="Connect to Testkube Cloud"
description="Connect your current Testkube instance to Testkube Cloud. You can always safely disconnect."
title="Connect to Testkube Pro"
description="Connect your current Testkube instance to Testkube Pro. You can always safely disconnect."
name="connect-cloud-card"
footer={
<Text className="regular middle" color={Colors.slate400}>
Learn more about{' '}
<ExternalLink href={externalLinks.transitionFromOSS}>connecting to Testkube Cloud</ExternalLink>
<ExternalLink href={externalLinks.transitionFromOSS}>connecting to Testkube Pro</ExternalLink>
</Text>
}
readOnly
Expand All @@ -32,11 +32,11 @@ const ConnectCloud: React.FC = () => {
<Text className="regular middle" color={Colors.slate400}>
Multiple environments, Teams, RBAC and unique collaboration features.
</Text>
<ExternalLink href={externalLinks.cloudIntro}>Learn more about Testkube Cloud</ExternalLink>
<ExternalLink href={externalLinks.cloudIntro}>Learn more about Testkube Pro</ExternalLink>
</FullWidthSpace>
</FullWidthSpace>
<Button $customType="primary" onClick={() => window.open(externalLinks.OSStoCloudMigration, '_self')}>
Connect your Testkube Cloud account
Connect your Testkube Pro account
</Button>
</FullWidthSpace>
</ConfigurationCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ describe('AiInsightsTab', () => {
expect(ossAiTab).toBeInTheDocument();
});

it('should render the "This feature is available only in Testkube Cloud." text', () => {
it('should render the "This feature is available only in Testkube Pro." text', () => {
render(<AiInsightsTab />);
const text = screen.getByText(/This feature is available only in Testkube Cloud./i);
const text = screen.getByText(/This feature is available only in Testkube Pro./i);
expect(text).toBeInTheDocument();
});

it('should render the "Start using Testkube Cloud to get AI insights for your test executions, as well as other exclusive features." text', () => {
it('should render the "Start using Testkube Pro to get AI insights for your test executions, as well as other exclusive features." text', () => {
render(<AiInsightsTab />);
const text = screen.getByText(
/Start using Testkube Cloud to get AI insights for your test executions, as well as other exclusive features./i
/Start using Testkube Pro to get AI insights for your test executions, as well as other exclusive features./i
);
expect(text).toBeInTheDocument();
});

it('should render the "Go to Testkube Cloud" button', () => {
it('should render the "Go to Testkube Pro" button', () => {
render(<AiInsightsTab />);
const button = screen.getByTestId('cloud-cta-button');
expect(button).toBeInTheDocument();
expect(button).toHaveTextContent('Go to Testkube Cloud');
expect(button).toHaveTextContent('Go to Testkube Pro');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const AiInsightsTab = () => (
<AiInsightContainer>
<AiInsightContent data-testid="ai-insights-tab-oss">
<LockedIcon />
<Text className="big bold"> This feature is available only in Testkube Cloud.</Text>
<Text className="big bold"> This feature is available only in Testkube Pro.</Text>
<Text color={Colors.slate400}>
Start using Testkube Cloud to get AI insights for your test executions, as well as other exclusive features.
Start using Testkube Pro to get AI insights for your test executions, as well as other exclusive features.
<ExternalLink href={externalLinks.testkubeCloud}> Learn more</ExternalLink>
</Text>
<Button
Expand All @@ -26,7 +26,7 @@ const AiInsightsTab = () => (
window.open(externalLinks.testkubeCloud, '_blank');
}}
>
Go to Testkube Cloud
Go to Testkube Pro
</Button>
</AiInsightContent>
</AiInsightContainer>
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/plugins/sider-cloud-migrate/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default createPlugin('oss/sider-cloud-migrate')
.init(tk => {
tk.slots.siderOtherItems.add({
icon: 'cloudMigrate',
title: 'Connect to Testkube Cloud',
title: 'Connect to Testkube Pro',
size: 32,
onClick: () => window.open(externalLinks.OSStoCloudMigration),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const StatusPagesPromoPage = () => (
</Text>

<Text className="regular middle text-center" color={Colors.slate400}>
Status pages work only on Testkube Cloud.
Status pages work only on Testkube Pro.
</Text>

<Button
Expand Down
14 changes: 7 additions & 7 deletions packages/web/src/utils/externalLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export enum externalLinks {
sourcesApi = 'https://docs.testkube.io/openapi/#tag/test-sources',
sourcesDocumentation = 'https://docs.testkube.io/articles/creating-tests/#test-source',
testSources = 'https://docs.testkube.io/articles/test-sources',
testkubeCloud = 'https://cloud.testkube.io',
OSStoCloudMigration = 'https://cloud.testkube.io/system-init?cloudMigrate=true',
testkubeCloud = 'https://app.testkube.io',
OSStoCloudMigration = 'https://app.testkube.io/system-init?cloudMigrate=true',
apiEndpoint = 'https://docs.testkube.io/articles/testkube-dashboard-api-endpoint',
createTestSuite = 'https://docs.testkube.io/articles/creating-test-suites',
createTest = 'https://docs.testkube.io/articles/creating-tests',
Expand All @@ -21,15 +21,15 @@ export enum externalLinks {
variables = 'https://docs.testkube.io/articles/adding-tests-variables/',
customExecutor = 'https://docs.testkube.io/test-types/container-executor#creating-a-custom-executor',
dashboardNotWorking = 'https://docs.testkube.io/articles/common-issues/#why-is-the-testkube-dashboard-not-working-or-does-not-return-results',
transitionFromOSS = 'https://docs.testkube.io/testkube-cloud/articles/transition-from-oss',
cloudIntro = 'https://docs.testkube.io/testkube-cloud/articles/intro',
transitionFromOSS = 'https://docs.testkube.io/testkube-pro/articles/transition-from-oss',
cloudIntro = 'https://docs.testkube.io/testkube-pro/articles/intro',
testTriggers = 'https://docs.testkube.io/articles/test-triggers',
addingTimeout = 'https://docs.testkube.io/articles/adding-timeout/',
contactUs = 'https://calendly.com/bruno-at-kubeshop/15-minute-meeting',
organizationMembers = 'https://docs.testkube.io/testkube-cloud/articles/organization-management#members',
environmentMembers = 'https://docs.testkube.io/testkube-cloud/articles/environment-management#managing-environment-member-roles',
organizationMembers = 'https://docs.testkube.io/testkube-pro/articles/organization-management#members',
environmentMembers = 'https://docs.testkube.io/testkube-pro/articles/environment-management#managing-environment-member-roles',
notificationsAndWebhooks = 'https://docs.testkube.io/articles/webhooks',
statusPages = 'https://docs.testkube.io/testkube-cloud/articles/status-pages',
statusPages = 'https://docs.testkube.io/testkube-pro/articles/status-pages',
integrationWithGithubActions = 'https://docs.testkube.io/articles/github-actions',
integrationWithGitlabCI = 'https://docs.testkube.io/articles/gitlab',
integrationWithJenkins = 'https://docs.testkube.io/articles/jenkins',
Expand Down

0 comments on commit 3f539b4

Please sign in to comment.