Confusing Tyk On-Premises Installation Instructions for Ubuntu

I found the Tyk On-Premises installation instructions for Ubuntu to be a bit confusing. The installation instructions at this link

https://tyk.io/docs/get-started/with-tyk-on-premise/installation/on-ubuntu/

suggest this order:

  1. Tyk Dashboard
  2. Tyk Pump
  3. Tyk Gateway

However, the Tyk Dashboard installation instructions assumes that the Tyk Gateway is already installed, and the Tyk Gateway instructions assumes that the Tyk Dashboard is already installed.

What is the proper way to decouple these dependencies during during installation? I have installed Tyk On-Premises several times, and it is hit-or-miss whether I can get it working with these instructions.

For Pro, you kind of need to know where each service is. I always install the dashboard first.

I am not understanding why the Dashboard instructions (Step 3) prompt me to restart the Dashboard and start the Gateway when the Gateway hasn’t even be installed yet? Should I install and start the Gateway at that time before bootstrapping the Dashboard in Step 4?

https://tyk.io/docs/get-started/with-tyk-on-premise/installation/on-ubuntu/dashboard/

All of this is really new and interesting to me. If you could point me to any architectural documents on how Tyk is engineered, that would also be helpful.

Gateway and dashboard are in cot at with each other (both ways), so you can install either first, but the gateway won’t start properly until the dashboard is bootstrapped and ready with a license.

The structure is all documented in this section and sub pages:

https://www.tyk.io/docs/concepts/tyk-components/

We’ve now updated the docs to remove the confusion. For clarity we recommend installing in the following order:

  1. Dashboard
  2. Pump
  3. Gateway

I am still having difficulty with the Tyk On-Premises Ubuntu documentation:

The last line of Step 4 in the Dashboard Installation instructions ( https://tyk.io/docs/get-started/with-tyk-on-premise/installation/on-ubuntu/dashboard/ ) says that “You will now be able to log into and test your Tyk instance with the values given to you by the bootstrap script.” However, when I attempt to log into the Dashboard with my newly generated Admin credentials at that time, I get a “Credentials are incorrect, please try again” message."

When I run the bootstrap script again after following the Gateway Installation instructions ( //tyk.io/docs/tyk-on-premises/debian-ubuntu/gateway/ ), then I am able to log into the Dashboard with the generated Admin credentials. Is this the expected behavior?

This would be a lot easier to help you with if yu could provide the bootstrap command yunused and the output generated by the script.

When I closely follow the Dashboard installation instructions at https://tyk.io/docs/get-started/with-tyk-on-premise/installation/on-ubuntu/dashboard/ , I get this script output after running the boostrap command with my public IP:

sudo /opt/tyk-dashboard/install/bootstrap.sh XXX.XXX.XXX.XXX

Creating Organisation
ORGID: 5997904a1485770dd1dbae07
Adding new user
USER AUTH: edb660d9df3742ee70c6db9a4d2f9e7d
Traceback (most recent call last):
File “”, line 1, in
KeyError: ‘users’
NEW ID:
Setting password

DONE

Login at http://XXX.XXX.XXX.XXX:3000/
User: [email protected]
Pass: test123

Any idea what the KeyError is all about in the bootstrap script output? When I attempt to log into the Dashboard as [email protected], I get a “Credentials are incorrect, please try again” message.

Later, when I complete the Gateway installation intructions at //tyk.io/docs/tyk-on-premises/debian-ubuntu/gateway/ , I get this script output after running the same boostrap command again with my public IP:

sudo /opt/tyk-dashboard/install/bootstrap.sh XXX.XXX.XXX.XXX

Creating Organisation
ORGID: 5997933c1485770dd1dbae08
Adding new user
USER AUTH: f0c9eea9bf334fb469122afbfaeb784d
NEW ID: 5997933c2072e32c94552f06
Setting password

DONE

Login at http://XXX.XXX.XXX.XXX:3000/
User: [email protected]
Pass: test123

Notice that there is no KeyError this time. When I log into the Dashboard as [email protected], everthing is wonderful, and I can proceed with creating my APIs. However, I can only run these APIs after restarting my Dashboard and Gateway services.

Any idea why the bootstrap command is not successful after the Dashboard installation, but is successful after the Gateway installation? The Dashboard installation instructions seem to indicate that I should be able to log into my Dashboard immediately after running the bootstrap command.

Perhaps there was no redis available in the dashboard install? This error is usually associated with Redis not being available.

Thanks, Martin! That’s exactly what was happening. Redis was installed later as part of the Gateway installation. It seems then that this be a more correct order for installation of Tyk On-Premises:

  1. MongoDB
  2. Redis
  3. Dashboard
  4. Pump
  5. Gateway

Originally, I was thinking that the Dashboard connected to MongoDB, and the Gateway connected to Redis. My primitive understanding of the Pump is that it pumps data from Redis to MongoDB. But why does the Dashboard also connect to Redis?

I’ve flagged this to our documentation team so hopefully it won’t trip up anyone else :slight_smile: