Ansible
Requirements
Ansible is required to run the following commands.
Getting Started
- clone the tyk-ansible repositry
$ git clone https://github.com/TykTechnologies/tyk-ansible
cd
into the directory
$ cd tyk-ansible
- Run initalization script to initialize environment
$ sh scripts/init.sh
-
Modify
hosts.yml
file to update ssh variables to your server(s). You can learn more about the hosts file here -
Run ansible-playbook to install the following:
- Redis
- MongoDB
- Tyk Dashboard
- Tyk Gateway
- Tyk Pump
$ ansible-playbook playbook.yml -t tyk-pro -t redis -t mongodb
You can choose to not install Redis or MongoDB by removing the -t redis
or -t mongodb
respectively. However Redis and MongoDB are a requirment and need to be installed for the Tyk Pro to run.
Note
For a production environment, we recommend that the Gateway, Dashboard and Pump are installed on separate machines. If installing multiple Gateways, you should install each on a separate machine. See Planning for Production For more details.
Supported Distributions
Distribution | Version | Supported |
---|---|---|
Amazon Linux | 2 | ✅ |
CentOS | 8 | ⚠️ |
CentOS | 7 | ✅ |
CentOS | 6 | ❌ |
Debian | 10 | ✅ |
Debian | 9 | ✅ |
Debian | 8 | ❌ |
RHEL | 8 | ⚠️ |
RHEL | 7 | ✅ |
RHEL | 6 | ❌ |
Ubuntu | 20 | ✅ |
Ubuntu | 18 | ✅ |
Ubuntu | 16 | ✅ |
Ubuntu | 14 | ❌ |
Symbol | Description |
---|---|
✅ | Tested / Supported |
⚠️ | Tested / Not officially supported by Tyk |
❌️ | Untested / Not supported by tool |
Variables
vars/mongodb.yml
Variable | default value | Comments |
---|---|---|
bind_ip | 0.0.0.0 |
Binding address of MongoDB |
mongodb_version | 4.4 |
MongoDB version |
Read more about MongoDB configuration here.
vars/redis.yml
Variable | default value | Comments |
---|---|---|
redis_bind_interface | 0.0.0.0 |
Binding address of Redis |
Read more about Redis configuration here.
vars/tyk.yml
Variable | Default | Comments |
---|---|---|
dashboard_protocol | http |
Dashboard server protocol |
dashboard_host | Dashboard server host if different than the hosts url | |
dashboard_port | 3000 |
Dashboard server listening port |
gateway_protocol | http |
Gateway server protocol |
gateway_host | Gateway server host if different than the hosts url | |
gateway_port | 8080 |
Gateway server listening port |
redis_host | Redis server host if different than the hosts url | |
redis_port | 6379 |
Redis server listening port |
redis_enable_cluster | false |
Enable if redis is running in cluster mode |
redis_enable_ssl | false |
Enable if redis connection is secured with SSL |
mongodb_host | MongoDB server host if different than the hosts url | |
mongodb_port | 27017 |
MongoDB server listening port |