Login 24/7 Support Community tyk.io

Ansible

Requirements

  • Ansible is required to run the following commands. Instructions on how install Tyk CE with shell is in the Shell tab.
  • Ensure port 8080 is open: this is used in this guide for Gateway traffic (the API traffic to be proxied).

Getting Started

  1. clone the tyk-ansible repositry
$ git clone https://github.com/TykTechnologies/tyk-ansible
  1. cd into the directory
$ cd tyk-ansible
  1. Run initalization script to initialize environment
$ sh scripts/init.sh
  1. Modify hosts.yml file to update ssh variables to your server(s). You can learn more about the hosts file here

  2. Run ansible-playbook to install tyk-ce

$ ansible-playbook playbook.yml -t tyk-ce -t redis

You can choose to not install Redis by removing the -t redis. However Redis is a requirment and needs to be installed for the gateway to run.

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
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