-
Notifications
You must be signed in to change notification settings - Fork 158
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
Merging to release-5.7: New IA - Migration to Tyk (#5823) #5886
Merging to release-5.7: New IA - Migration to Tyk (#5823) #5886
Conversation
(cherry picked from commit 8d08348)
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
Variables
Read more about Redis configuration here. Install Tyk Gateway with UbuntuThe Tyk Gateway can be installed following different installation methods including Ansible and Shell. Please select by clicking the tab with the installation path most suitable for you. Install Tyk Gateway On Ubuntu Through ShellSupported Distributions
Prerequisites
Steps for Installation
$ sudo apt-get install -y redis-server
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
From https://packagecloud.io/tyk/tyk-gateway you have the following options:
You can set up the core settings for the Tyk Gateway with a single setup script, however for more involved deployments, you will want to provide your own configuration file. {{< note success >}} You need to replace $ sudo /opt/tyk-gateway/install/setup.sh --listenport=8080 --redishost=<hostname> --redisport=6379 --domain="" What you've done here is told the setup script that:
In this example, you don't want Tyk to listen on a single domain. It is recommended to leave the Tyk Gateway domain unbounded for flexibility and ease of deployment.
The Tyk Gateway can be started now that it is configured. Use this command to start the Tyk Gateway: $ sudo service tyk-gateway start Install Tyk Gateway On Ubuntu Through AnsibleSupported Distributions
PrerequisitesBefore you begin the installation process, make sure you have the following:
Steps for Installation
$ git clone https://github.com/TykTechnologies/tyk-ansible
$ cd tyk-ansible
$ sh scripts/init.sh
$ ansible-playbook playbook.yaml -t tyk-gateway-ce -t redis {{< note success >}} Installation flavors can be specified by using the -t {tag} at the end of the ansible-playbook command. In this case we are using: Variables
Read more about Redis configuration here. Install Tyk Gateway on Red Hat (RHEL / CentOS)The Tyk Gateway can be installed following different installation methods including Shell and Ansible. Please select by clicking the tab with the installation path most suitable for you. Install Tyk Gateway Through ShellSupported Distributions
PrerequisitesBefore you begin the installation process, make sure you have the following:
Steps for Installation
Create a file named Make sure to replace [tyk_tyk-gateway]
name=tyk_tyk-gateway
baseurl=https://packagecloud.io/tyk/tyk-gateway/el/8/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/tyk/tyk-gateway/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[tyk_tyk-gateway-source]
name=tyk_tyk-gateway-source
baseurl=https://packagecloud.io/tyk/tyk-gateway/el/8/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/tyk/tyk-gateway/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300 Update your local yum cache by running: sudo yum -q makecache -y --disablerepo='*' --enablerepo='tyk_tyk-gateway'
Install the Tyk Gateway using yum: sudo yum install -y tyk-gateway {{< note success >}} You may be asked to accept the GPG key for our two repos and when the package installs, hit yes to continue.
If Redis is not running then start it using the following command: sudo service redis start
You can set up the core settings for the Tyk Gateway with a single setup script, however for more complex deployments you will want to provide your own configuration file. {{< note success >}} Replace sudo /opt/tyk-gateway/install/setup.sh --listenport=8080 --redishost=<hostname> --redisport=6379 --domain="" What you've done here is told the setup script that:
In this example, you don't want Tyk to listen on a single domain. It is recommended to leave the Tyk Gateway domain unbounded for flexibility and ease of deployment.
The Tyk Gateway can be started now that it is configured. Use this command to start the Tyk Gateway: sudo service tyk-gateway start Install Tyk Gateway Through AnsibleSupported Distributions
PrerequisitesBefore you begin the installation process, make sure you have the following:
Steps for Installation
$ git clone https://github.com/TykTechnologies/tyk-ansible
$ cd tyk-ansible
$ sh scripts/init.sh
$ ansible-playbook playbook.yaml -t tyk-gateway-ce -t redis {{< note success >}} Installation flavors can be specified by using the -t {tag} at the end of the ansible-playbook command. In this case we are using: Variables
Read more about Redis configuration here. Install Tyk Gateway on KillercodaKillercoda gives you instant access to a real Linux or Kubernetes command-line environment via your browser. Configuration Options for RedisConfigure Redis ClusterOur Gateway, Dashboard and Pump all support integration with Redis Cluster. Redis Cluster allows data to be automatically sharded across multiple Redis Nodes. To setup Redis Cluster correctly, we recommend you read the Redis Cluster Tutorial. You must use the same settings across the Gateway, Dashboard and Pump. {{< note success >}} Redis Cluster operates differently from a Redis setup where one instance serves as the primary and others as replicas. Supported Versions
Redis Cluster and Tyk GatewayTo configure the Tyk Gateway to work with your Redis Cluster, set {{< note success >}}
If you are using TLS for Redis connections, set "storage": {
"type": "redis",
"enable_cluster": true,
"addrs": [
"server1:6379",
"server2:6380",
"server3:6381"
],
"username": "",
"password": "",
"database": 0,
"optimisation_max_idle": 2000,
"optimisation_max_active": 4000,
"use_ssl": false
}, Redis Cluster and Tyk Dashboard{{< note success >}}
"redis_addrs": [
"server1:6379",
"server2:6380",
"server3:6381"
],
"redis_use_ssl": true,
"enable_cluster": true To configure the Tyk Dashboard to work with your Redis Cluster, add the Redis address information to your Redis Cluster and Tyk PumpTo configure the Tyk Pump to work with your Redis Cluster, set {{< note success >}}
"analytics_storage_config": {
"type": "redis",
"enable_cluster": true,
"addrs": [
"server1:6379",
"server2:6380",
"server3:6381"
],
"username": "",
"password": "",
"database": 0,
"optimisation_max_idle": 100,
"use_ssl": false
}, Redis Cluster with DockerFor Redis clustered mode to work with Tyk using Docker and Amazon ElastiCache, follow these two steps:
Set the environment variable
Add all the Redis Cluster endpoints into Tyk, not just the primary. If Tyk can't see the whole cluster, then it will not work. For ElastiCache Redis, you can bypass having to list all your nodes, and instead just use the configuration endpoint, If this does not work, you can still list out the hosts using an environment variable. To do so, set the environment variable:
It is important that Tyk can connect to all primary and replica instances. It is recommended to ensure that the connection pool is big enough. To do so, set the following environment variables:
{{< note success >}} These are suggested settings, please verify them by load testing. Redis Cluster with TLSIf you are using TLS for Redis connections, set
From Tyk 5.3, additional options are available for more granular control:
Setting up an Insecure TLS Connection
Setting up a Secure TLS Connection
Setting up a Mutual TLS (mTLS) Connection
Example Gateway Configuration "storage": {
"type": "redis",
"addrs": [
"server1:6379",
"server2:6380",
"server3:6381"
],
"use_ssl": true,
"ssl_secure_skip_verify": false,
"ca_file": "/path/to/ca.crt",
"cert_file": "/path/to/client.crt",
"key_file": "/path/to/client.key",
"max_version": "1.3",
"min_version": "1.2",
"enable_cluster": true,
"optimisation_max_idle": 2000,
"optimisation_max_active": 4000
} Troubleshooting Redis ClusterIf you find that Tyk components fail to initialise when using Redis clustering, for example the application does not start and the last log file entry shows a message such as
If setting to Configure Redis SentinelFrom v2.9.3 Redis Sentinel is supported. Similar to Redis Cluster, our Gateway, Dashboard and Pump all support integration with Redis Sentinel. To configure Tyk to work with Redis Sentinel, list your servers under Supported Versions
Redis Sentinel and Gateway"storage": {
"type": "redis",
"addrs": [
"server1:26379",
"server2:26379",
"server3:26379"
],
"master_name": "mymaster",
"username": "",
"password": "",
"database": 0,
"optimisation_max_idle": 2000,
"optimisation_max_active": 4000,
"use_ssl": false
}, Redis Sentinel and Dashboard"redis_addrs": [
"server1:26379",
"server2:26379",
"server3:26379"
],
"redis_master_name": "mymaster" Redis Sentinel and Pump"analytics_storage_config": {
"type": "redis",
"addrs": [
"server1:26379",
"server2:26379",
"server3:26379"
],
"master_name": "mymaster",
"username": "",
"password": "",
"database": 0,
"optimisation_max_idle": 100,
"use_ssl": false
}, {{< warning success >}} When using Bitnami charts to install Redis Sentinel in k8s, a Redis service is exposed, which means that standard Redis config is required instead of the above setup, i.e. a single server in {{< /warning >}} Support for Redis Sentinel AUTHTo support the use of Redis Sentinel AUTH (introduced in Redis 5.0.1) we have added the following global config settings in Tyk v3.0.2:
These settings allow you to support Sentinel password-only authentication in Redis version 5.0.1 and above. See the Redis and Sentinel authentication section of the Redis Sentinel docs for more details. Configure Redis TLS EncryptionRedis supports SSL/TLS encryption from version 6 as an optional feature, enhancing the security of data in transit. To configure TLS or mTLS connections between an application and Redis, consider the following settings in Tyk's configuration files:
From Tyk 5.3, additional options are available for more granular control:
Setting up an Insecure TLS Connection
Setting up a Secure TLS Connection
Setting up a Mutual TLS (mTLS) Connection
Example Gateway Configuration "storage": {
"type": "redis",
"addrs": [
"server1:6379",
"server2:6380",
"server3:6381"
],
"use_ssl": true,
"ssl_secure_skip_verify": false,
"ca_file": "/path/to/ca.crt",
"cert_file": "/path/to/client.crt",
"key_file": "/path/to/client.key",
"max_version": "1.3",
"min_version": "1.2",
"optimisation_max_idle": 2000,
"optimisation_max_active": 4000
}
Database Compatibility
|
✅ PS. Pls add /docs/nightly to the end of url
To edit notification comments on pull requests, go to your Netlify site configuration. |
1 similar comment
✅ PS. Pls add /docs/nightly to the end of url
To edit notification comments on pull requests, go to your Netlify site configuration. |
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
New IA - Migration to Tyk (#5823)
PR Type
Documentation
Description
Introduced a comprehensive guide for Tyk Open Source installation.
Consolidated and streamlined menu structure for better navigation.
Updated references and links to align with new documentation structure.
Enhanced Redis and database configuration instructions for clarity.
Changes walkthrough 📝
6 files
Added comprehensive guide for Tyk Open Source installation
Restructured menu for improved navigation
Updated database compatibility and migration references
Added and updated aliases for new documentation structure
Updated links to align with new structure
Enhanced Redis and database configuration instructions
101 files