Skip to content

Commit

Permalink
Update README.md (#248)
Browse files Browse the repository at this point in the history
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md
  • Loading branch information
caroltyk authored Apr 5, 2024
1 parent 088ba88 commit 1fd9f69
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 157 deletions.
12 changes: 12 additions & 0 deletions tyk-control-plane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ helm show values tyk-helm/tyk-control-plane --devel > values.yaml
You can update any value in your local `values.yaml` file and use `-f [filename]` flag to override default values during installation.
Alternatively, you can use `--set` flag to set it in Tyk installation. See [Using Helm](https://helm.sh/docs/intro/using_helm/) for examples.

To configure Tyk components, users can utilize both config files and [environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/). Notably, environment variables take precedence over config files. To maintain simplicity and consistency, the Tyk Helm Charts deploy components with an empty config file while setting container environment variables based on user-defined [values](https://helm.sh/docs/chart_best_practices/values/). This approach ensures seamless integration with Kubernetes practices, allowing for efficient management of configurations. For a comprehensive overview of available configurations, please refer to the [configuration documentation](https://tyk.io/docs/tyk-environment-variables/). Additionally, should any environment variables not be set by the Helm Chart, users can easily add them under the `extraEnvs` section within the charts for further customization. Values set under `extraEnvs` would take precedence over all configurations.

Example of setting extra environment variable to gateway:
```yaml
tyk-gateway:
gateway:
extraEnvs:
- name: TYK_GW_LOGLEVEL
value: debug
```
### Set Redis connection details (Required)
Tyk uses Redis for distributed rate-limiting and token storage. You may set `global.redis.addr` and `global.redis.pass` with redis connection
Expand Down
47 changes: 13 additions & 34 deletions tyk-data-plane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,7 @@ You could find the list of version tags available from [Docker hub](https://hub.
* Connection details to remote control plane. See [Quick Start](#obtain-your-remote-control-plane-connection-details) on how to obtain them from Tyk Cloud.

## Quick Start

Quick start using `tyk-data-plane` and Bitnami Redis chart:

```bash
NAMESPACE=tyk
APISecret=foo
MDCB_UserKey=9d20907430e440655f15b851e41xxxxx
MDCB_OrgId=64cadf60173be900017xxxxx
MDCB_ConnString=mere-xxxxxxx-hyb.aws-euw2.cloud-ara.tyk.io:443
MDCB_GroupId=dc-uk-south

helm repo add tyk-helm https://helm.tyk.io/public/helm/charts/
helm repo update

helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --set image.tag=6.2.13

helm upgrade hybrid-dp tyk-helm/tyk-data-plane -n $NAMESPACE --create-namespace \
--install \
--set global.remoteControlPlane.enabled=true \
--set global.remoteControlPlane.userApiKey=$MDCB_UserKey \
--set global.remoteControlPlane.orgId=$MDCB_OrgId \
--set global.remoteControlPlane.connectionString=$MDCB_ConnString \
--set global.remoteControlPlane.groupID=$MDCB_GroupId \
--set global.remoteControlPlane.useSSL=true \
--set global.remoteControlPlane.sslInsecureSkipVerify=true \
--set global.secrets.APISecret="$APISecret" \
--set global.redis.addrs="{tyk-redis-master.$NAMESPACE.svc:6379}" \
--set global.redis.passSecret.name=tyk-redis \
--set global.redis.passSecret.keyName=redis-password
```

Gateway is now accessible through service `gateway-svc-hybrid-dp-tyk-gateway` at port `8080`.

Pump is also configured with Hybrid Pump which sends aggregated analytics to MDCB or Tyk Cloud, and Prometheus Pump which expose metrics locally at `:9090/metrics`.
Please visit tyk.io for [Quick Start guide for deploying data planes in Kubernetes with Helm Chart](https://tyk.io/docs/tyk-cloud/environments-deployments/hybrid-gateways/#deploy-in-kubernetes-with-helm-chart).

### Obtain your Remote Control Plane Connection Details

Expand Down Expand Up @@ -117,6 +84,18 @@ helm show values tyk-helm/tyk-data-plane > values-data-plane.yaml
You can update any value in your local ` values-data-plane.yaml` file and use `-f [filename]` flag to override default values during installation.
Alternatively, you can use `--set` flag to set it in Tyk installation.

To configure Tyk components, users can utilize both config files and [environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/). Notably, environment variables take precedence over config files. To maintain simplicity and consistency, the Tyk Helm Charts deploy components with an empty config file while setting container environment variables based on user-defined [values](https://helm.sh/docs/chart_best_practices/values/). This approach ensures seamless integration with Kubernetes practices, allowing for efficient management of configurations. For a comprehensive overview of available configurations, please refer to the [configuration documentation](https://tyk.io/docs/tyk-environment-variables/). Additionally, should any environment variables not be set by the Helm Chart, users can easily add them under the `extraEnvs` section within the charts for further customization. Values set under `extraEnvs` would take precedence over all configurations.

Example of setting extra environment variable to gateway:
```yaml
tyk-gateway:
gateway:
extraEnvs:
- name: TYK_GW_LOGLEVEL
value: debug
```
### Tyk MDCB Synchroniser (Optional)
If Tyk MDCB is deployed with the Synchroniser feature enabled, Tyk Gateway(s), worker gateway(s), in the data plane has to be
Expand Down
32 changes: 12 additions & 20 deletions tyk-oss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,7 @@ Also, you can set the version of each component through `image.tag`. You could f
* Redis should already be installed or accessible by the gateway. For Redis installations instruction, follow the [Redis installation](#set-redis-connection-details-required) guide below.

## Quick Start
Quick start using `tyk-oss` and Bitnami Redis chart

```bash
NAMESPACE=tyk-oss
APISecret=foo

helm repo add tyk-helm https://helm.tyk.io/public/helm/charts/
helm repo update

helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --set image.tag=6.2.13

helm upgrade tyk-oss tyk-helm/tyk-oss -n $NAMESPACE --create-namespace \
--install \
--set global.secrets.APISecret="$APISecret" \
--set global.redis.addrs="{tyk-redis-master.$NAMESPACE.svc:6379}" \
--set global.redis.passSecret.name=tyk-redis \
--set global.redis.passSecret.keyName=redis-password
```

Gateway is now accessible through service `gateway-svc-tyk-oss-tyk-gateway` at port `8080`.
Please visit tyk.io for [Quick Start with Tyk OSS Helm Chart](https://tyk.io/docs/tyk-oss/ce-helm-chart-new/)

## Installing the Chart

Expand Down Expand Up @@ -89,6 +70,17 @@ helm show values tyk-helm/tyk-oss > values.yaml
You can update any value in your local `values.yaml` file and use `-f [filename]` flag to override default values during installation.
Alternatively, you can use `--set` flag to set it in Tyk installation.

To configure Tyk components, users can utilize both config files and [environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/). Notably, environment variables take precedence over config files. To maintain simplicity and consistency, the Tyk Helm Charts deploy components with an empty config file while setting container environment variables based on user-defined [values](https://helm.sh/docs/chart_best_practices/values/). This approach ensures seamless integration with Kubernetes practices, allowing for efficient management of configurations. For a comprehensive overview of available configurations, please refer to the [configuration documentation](https://tyk.io/docs/tyk-environment-variables/). Additionally, should any environment variables not be set by the Helm Chart, users can easily add them under the `extraEnvs` section within the charts for further customization. Values set under `extraEnvs` would take precedence over all configurations.

Example of setting extra environment variable to gateway:
```yaml
tyk-gateway:
gateway:
extraEnvs:
- name: TYK_GW_LOGLEVEL
value: debug
```
### Set Redis Connection Details (Required)
Tyk uses Redis for distributed rate-limiting and token storage. You may use the Bitnami chart to install or Tyk's `simple-redis` chart for POC purpose.
Expand Down
117 changes: 14 additions & 103 deletions tyk-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,111 +31,10 @@ Also, you can set the version of each component through `image.tag`. You could f
* [MongoDB](https://www.mongodb.com) or [PostgreSQL](https://www.postgresql.org) should already be installed or accessible by the gateway.

## Quick Start with PostgreSQL
The following quick start guide explains how to use the Tyk Stack Helm chart to configure a Dashboard that includes:
- Redis for key storage
- PostgreSQL for app config
- Tyk Pump to send analytics to PostgreSQL and Prometheus

At the end of this quickstart Tyk Dashboard should be accessible through service `dashboard-svc-tyk-tyk-dashboard` at port `3000`. You can login to Dashboard using the admin email and password to start managing APIs. Tyk Gateway will be accessible through service `gateway-svc-tyk-tyk-gateway.tyk.svc` at port `8080`.

```bash
NAMESPACE=tyk
API_SECRET=changeit
ADMIN_KEY=changeit
TYK_LICENSE=changeit
[email protected]
ADMIN_PASSWORD=changeit

kubectl create namespace $NAMESPACE

kubectl create secret generic my-secrets -n $NAMESPACE \
--from-literal=APISecret=$API_SECRET \
--from-literal=AdminSecret=$ADMIN_KEY \
--from-literal=DashLicense=$TYK_LICENSE

kubectl create secret generic admin-secrets -n $NAMESPACE \
--from-literal=adminUserFirstName=Admin \
--from-literal=adminUserLastName=User \
--from-literal=adminUserEmail=$ADMIN_EMAIL \
--from-literal=adminUserPassword=$ADMIN_PASSWORD


helm repo add tyk-helm https://helm.tyk.io/public/helm/charts/
helm repo update

helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --install --set image.tag=6.2.13

helm upgrade tyk-postgres oci://registry-1.docker.io/bitnamicharts/postgresql --set "auth.database=tyk_analytics" -n $NAMESPACE --install

POSTGRESQLURL=host=tyk-postgres-postgresql.$NAMESPACE.svc\ port=5432\ user=postgres\ password=$(kubectl get secret --namespace $NAMESPACE tyk-postgres-postgresql -o jsonpath="{.data.postgres-password}" | base64 -d)\ database=tyk_analytics\ sslmode=disable

kubectl create secret generic postgres-secrets -n $NAMESPACE --from-literal=postgresUrl=$POSTGRESQLURL

helm upgrade tyk tyk-helm/tyk-stack -n $NAMESPACE \
--install \
--set global.adminUser.useSecretName=admin-secrets \
--set global.secrets.useSecretName=my-secrets \
--set global.redis.addrs="{tyk-redis-master.$NAMESPACE.svc:6379}" \
--set global.redis.passSecret.name=tyk-redis \
--set global.redis.passSecret.keyName=redis-password \
--set global.postgres.connectionStringSecret.name=postgres-secrets \
--set global.postgres.connectionStringSecret.keyName=postgresUrl
```
Please visit tyk.io for [Quick Start with Helm Chart and PostgreSQL](https://tyk.io/docs/deployment-and-operations/tyk-self-managed/deployment-lifecycle/installations/kubernetes/tyk-helm-tyk-stack-postgresql/)

## Quick Start with MongoDB
The following quick start guide explains how to use the Tyk Stack Helm chart to configure a Dashboard that includes:
- Redis for key storage
- MongoDB for app config
- Tyk Pump to send analytics to MongoDB and Prometheus

At the end of this quickstart Tyk Dashboard should be accessible through service `dashboard-svc-tyk-tyk-dashboard` at port `3000`. You can login to Dashboard using the admin email and password to start managing APIs. Tyk Gateway will be accessible through service `gateway-svc-tyk-tyk-gateway.tyk.svc` at port `8080`.

```bash
NAMESPACE=tyk
API_SECRET=changeit
ADMIN_KEY=changeit
TYK_LICENSE=changeit
[email protected]
ADMIN_PASSWORD=changeit

kubectl create namespace $NAMESPACE

kubectl create secret generic my-secrets -n $NAMESPACE \
--from-literal=APISecret=$API_SECRET \
--from-literal=AdminSecret=$ADMIN_KEY \
--from-literal=DashLicense=$TYK_LICENSE

kubectl create secret generic admin-secrets -n $NAMESPACE \
--from-literal=adminUserFirstName=Admin \
--from-literal=adminUserLastName=User \
--from-literal=adminUserEmail=$ADMIN_EMAIL \
--from-literal=adminUserPassword=$ADMIN_PASSWORD


helm repo add tyk-helm https://helm.tyk.io/public/helm/charts/
helm repo update

helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --install --set image.tag=6.2.13

helm upgrade tyk-mongo oci://registry-1.docker.io/bitnamicharts/mongodb -n $NAMESPACE --install

MONGOURL=mongodb://root:$(kubectl get secret --namespace $NAMESPACE tyk-mongo-mongodb -o jsonpath="{.data.mongodb-root-password}" | base64 -d)@tyk-mongo-mongodb.$NAMESPACE.svc:27017/tyk_analytics?authSource=admin

kubectl create secret generic mongourl-secrets --from-literal=mongoUrl=$MONGOURL -n $NAMESPACE

helm upgrade tyk tyk-helm/tyk-stack -n $NAMESPACE \
--install \
--set global.adminUser.useSecretName=admin-secrets \
--set global.secrets.useSecretName=my-secrets \
--set global.redis.addrs="{tyk-redis-master.$NAMESPACE.svc:6379}" \
--set global.redis.passSecret.name=tyk-redis \
--set global.redis.passSecret.keyName=redis-password \
--set global.mongo.driver=mongo-go \
--set global.mongo.connectionURLSecret.name=mongourl-secrets \
--set global.mongo.connectionURLSecret.keyName=mongoUrl \
--set global.storageType=mongo \
--set tyk-pump.pump.backend='{prometheus,mongo}'
```
Please visit tyk.io for [Quick Start with Helm Chart and PostgreSQL](https://tyk.io/docs/deployment-and-operations/tyk-self-managed/deployment-lifecycle/installations/kubernetes/tyk-helm-tyk-stack-mongodb/)

## Installing the Chart

Expand Down Expand Up @@ -188,6 +87,18 @@ helm show values tyk-helm/tyk-stack > values.yaml
You can update any value in your local `values.yaml` file and use `-f [filename]` flag to override default values during installation.
Alternatively, you can use `--set` flag to set it in Tyk installation. See [Using Helm](https://helm.sh/docs/intro/using_helm/) for examples.

To configure Tyk components, users can utilize both config files and [environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/). Notably, environment variables take precedence over config files. To maintain simplicity and consistency, the Tyk Helm Charts deploy components with an empty config file while setting container environment variables based on user-defined [values](https://helm.sh/docs/chart_best_practices/values/). This approach ensures seamless integration with Kubernetes practices, allowing for efficient management of configurations. For a comprehensive overview of available configurations, please refer to the [configuration documentation](https://tyk.io/docs/tyk-environment-variables/). Additionally, should any environment variables not be set by the Helm Chart, users can easily add them under the `extraEnvs` section within the charts for further customization. Values set under `extraEnvs` would take precedence over all configurations.

Example of setting extra environment variable to gateway:
```yaml
tyk-gateway:
gateway:
extraEnvs:
- name: TYK_GW_LOGLEVEL
value: debug
```
### Set Redis connection details (Required)
Tyk uses Redis for distributed rate-limiting and token storage. You may set `global.redis.addr` and `global.redis.pass` with redis connection
Expand Down

0 comments on commit 1fd9f69

Please sign in to comment.