Upgrading Tyk
Introduction
Follow the instructions relevant to your Tyk setup to upgrade your Tyk components. Note: Upgrading Tyk will not overwrite your configuration files. However, it is especially good practice to routinely back these files up, especially right before upgrading your software.
Tyk Cloud Classic
Tyk Cloud Classic users are automatically upgraded to the latest version as soon as it’s released.
Tyk Multi-Cloud Gateway
We recommend you upgrade your Tyk Multi-Cloud Gateway in the following way:
- Take a backup of your
tyk.conf
andstart.sh
files. This is important if you have modified your Docker Container in your current version. - Re-run the start.sh script:
For MacOS Users
From a Terminal:
curl "https://raw.githubusercontent.com/lonelycode/tyk-hybrid-docker/master/start.sh" -o "start.sh"
chmod +x start.sh
./start.sh [PORT] [TYK-SECRET] [RPC-CREDENTIALS] [API CREDENTIALS]
For Linux Users
wget https://raw.githubusercontent.com/lonelycode/tyk-hybrid-docker/master/start.sh
chmod +x start.sh
sudo ./start.sh [PORT] [TYK-SECRET] [RPC-CREDENTIALS] [API CREDENTIALS]
This command will start the Docker container and be ready to proxy traffic (you will need to check the logs of the container to make sure the login was successful).
Parameters:
PORT
: The port for Tyk to listen on (usually 8080).TYK-SECRET
: The secret key to use so you can interact with your Tyk node via the REST API.RPC-CREDENTIALS
: Your Organisation ID. This can be found from the System Management > Users section from the Dashboard. Click Edit on a User to view the Organisation ID.API-CREDENTIALS
: Your Tyk Dashboard API Access Credentials. This can be found from the System Management > Users section from the Dashboard. Click Edit on a User to view the Tyk Dashboard API Access Credentials.
Check everything is working
To check if the node has connected and logged in, use the following command:
sudo docker logs --tail=100 --follow tyk_hybrid
This will show you the log output of the Multi-Cloud container, if you don’t see any connectivity errors, and the log output ends something like this:
time="Jul 7 08:15:03" level=info msg="Gateway started (vx.x.x.x)"
time="Jul 7 08:15:03" level=info msg="--> Listening on port: 8080"
Then the Gateway has successfully re-started.
Tyk Self-Managed
In a production environment, where we recommend installing the Dashboard, Gateway and Pump on separate machines, you should upgrade components in the following sequence:
- Tyk Dashboard
- Tyk Gateway
- Tyk Pump
Tyk is compatible with a blue-green or rolling update strategy.
For a single machine installation, you should follow the instructions below for your operating system.
Our repositories will be updated at https://packagecloud.io/tyk when new versions are released. As you set up these repositories when installing Tyk to upgrade all Tyk components you can run:
For Ubuntu
sudo apt-get update && sudo apt-get upgrade
For RHEL
sudo yum update
Note
For the Tyk Gateway before v2.5 and Tyk Dashboard before v1.5 there’s a known Red Hat bug with init scripts being removed on package upgrade. In order to work around it, it’s required to force reinstall the packages, e.g.:
sudo yum reinstall tyk-gateway tyk-dashboard
Tyk Multi Data Centre Bridge
Our recommended sequence for upgrading a MDCB installation is as follows:
Master DC first in the following order:
- MDCB
- Pump (if in use)
- Dashboard
- Gateway
Then your worker DC Gateways in the following order:
- Pump (if in use)
- Gateway
We do this to be backwards compatible and upgrading MDCB first followed by the master DC then worker DC Gateways ensures that:
- It’s extremely fast to see if there are connectivity issues, but the way Gateways in worker mode work means they keep working even if disconnected
- It ensures that we don’t have forward compatibility issues (new Gateway -> old MDCB)
Tyk is compatible with a blue-green or rolling update strategy.
Tyk Go Plugins
We release a new version of our Tyk Go plugin compiler binary with each release. You will need to rebuild your Go plugins when updating to a new release. See Rebuilding Go Plugins for more details.
Migrating from MongoDB to SQL
We have a migration tool to help you manage the switch from MongoDB to SQL.
Don’t Have Tyk Yet?
Get started now, for free, or contact us with any questions.