Docker Tyk on Openshift Origin installation

Hi All,
we tried to install a development environment based with the docker images provided by Tyk on our Openshift Origin instance. We add all the container running but we have to create a new organization and define all the router for dashboard and portal API.

Could we adjust and use the setup.sh script present into the docker github repo?

Thanks,
Marcello

1 Like

hi Marcello,

I’m not sure I follow what yu are trying to do - do you want to build tyk from Master yourself or are you having trouble with our pre-built official containers?

If you are losing the org Data and Api routes it’s probably because your mongo DB is being recreated each time - you will need a persistent redis and MongoDB to ensure that keys and configs are retained across deployments.

M.

Hi Martin,
we installed these parts:

  • persistent redis instance with empty data
  • persistent mongodb instance with empty data
  • single container tyk-gateway
  • single container tyk-pump
  • single container tyk-dashboard

We used the bootstrap.sh script present into the tyk-dashboard-docker github project and we configured the organization with the admin user. After that the dashboard was fine but the portal didn’t work correctly because if we click on “Open your Portal” we have been redirected to the CNAME field on port 3000 but it was exposed on port 80. We tried to remove the port 3000 but we noticed an “404 page not found”.

The service are exposed in this way:

  • api-dashboard-dev.devapps.test.local port 443 --> Docker tyk_dashboard port 3000
  • api-gateway-dev.devapps.test.local port 80 --> Docker tyk_gateway port 8080

Marcello

@Martin : we tried to upgrade the developer portal but the port :3000 is hardcoded to the link. Is it normal?

Thanks,
Marcello

The port is set by the port setting in your tyk_)analytics.conf, since the portal runs on the same instance as the dashboard. I’d suggest running your dashboard on 443 (or 80).

@Martin We changed the port and added the EXPOSE into the Dockerfile and it woks correctly.

Could you confirm if the dashboard and developer portal are delivered via tyk-dashboard instance?

Do we have also to create a VIP for the tyk-gateway calls?

Thanks,
Marcello

They are indeed the same instance

Could you clarify?

@Martin we configured these 3 routes on our environment:

  • api-dashboard-dev.devapps.test.local : used for the dashboard only and balanced to tyk_dashboard docker image
  • api-portal-dev.devapps.test.local : used for the developer portal only and balanced to tyk_dashboard docker image. We have configured it via bootstrap.sh into cname value
  • api-gateway-dev.devapps.test.local : used for the API traffic and balanced to tyk_gateway docker image. We have configured it into the hostname parameter on tyk-gateway.conf file.

If we trie to call http://pi-gateway-dev.devapps.test.local we received a 404 not found as the domain is not recognized from tyk-gateway instance.

Marcello

Unless you specify a domain name for the gateway in the tyk.conf, the gateway will listen to any inbound traffic on it’s port - i.e. you shouldn’t need to specify a domain name for the gateway at all.

@Martin thanks for the tip. Actually we completed the installation with 3 different endpoints and the docker images configured with a reverse proxy instance.

Marcello