Developer Portal Customization

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:30:26 +0000.
Sender:Jad Ghanem.
Date:Tuesday, 6 October 2015 14:24:44 UTC+1.

Hi everyone,

I have setup Tyk locally and got things up and running.

I would like to jump into the second step which is the developer Portal Look and Feel customization as well as adding pages other than the Hone page.

Could you please advise how to do so?

Also I would like to know the physical location of the “portal-assets” folder to replace images and modify the css files.

Your help is much appreciated.

Regards,

1 Like

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 6 October 2015 18:42:44 UTC+1.

Hi Jad,

To customise the Tyk portal you really just need to edit the files under portal/templates in the container (or tarball), the assets are located under portal/portal-assets, you should be able to completely customise the portal using these.

To add new pages you will need to add them in the (very rudimentary) page builder in the portal, all pages other than the home page use the page.html template.

You can use more templates by setting the template name in the content editor.

Cheers,
Martin

  • show quoted text -

Imported Google Group message.
Sender:Jad Ghanem.
Date:Tuesday, 6 October 2015 18:54:38 UTC+1.

Thanks for your reply Martin,
Somehow i am unable to find the portal folder.
The setup was done on ubuntu but I am unable to find the physical location of the the portal folder in the file system.
I know it is somewhere there but can’t find it somehow.
Please advise how can i reach to that folder.
I’m new to ubuntu and having hard time in locating folders.

Many thanks for the help.

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 6 October 2015 19:01:56 UTC+1.

Hi Jad,

Are you using the docker installation? If so you will need to mount and override the folders in the docker container (suggest you grab a copy of the files from a tarball on GH).

Cheers,
Martin

  • show quoted text -

Imported Google Group message.
Sender:Jad Ghanem.
Date:Tuesday, 6 October 2015 19:06:06 UTC+1.

Hi Martin,
Yes, the installation was done with docker.
So i would really appreciate some guidance here as i am unable to find helpful steps online.
Or in case you know of any link i can follow.
Many thanks for your cooperation.

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 6 October 2015 19:10:43 UTC+1.

Hi Jad,

I’d suggest you take a look to get familiar with Docker first (http://docker.com) :slight_smile:

It’s a bit of a large topic to cover in a forum…

Cheers,
Martin

  • show quoted text -

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/a40d5125-946b-451b-b28e-b036412455e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Imported Google Group message.
Sender:Jad Ghanem.
Date:Thursday, 8 October 2015 08:56:55 UTC+1.

Thanks Martin,

I gave it a second thought and decided to go with the manual instalation as I believe that would be more convenient once I move to a production environment.

So I have installed:
Redis
MongoDB
Tyk
and Tyk Dashboard and everything seems to be working ok.

Nevertheless I have noticed something weird which is when browsing for the developer portal from the dashboard, the working link is:
http://localhost:3000/561523a03fd2284798000001/portal/

I am not sure where did the long digit come from?
Although from the portal when I wanna browse to different sections such as API Catalogue, the link http://localhost:3000/portal/apis/ won’t open unless I add this long digit as part of the url http://localhost:3000/561523a03fd2284798000001/portal/apis

Not sure if it is related to something in the configuration file or so.

Please advise.

Many thanks

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 8 October 2015 09:13:05 UTC+1.

Hi Jad,

You’ll need to get the host manager running as well to get everything to play nice, the host manager provides the ability to assign hostnames to APIs managed by Tyk, this includes the portal.

When you do the docker quickstart you’ll notice that everything sits on tyk.docker and you had to modify your hosts file to get it to run properly? If you have a hosted install (maybe on a VM or running natively), you will need to again assign a host to the IP, and get the host manager up and running so it can proxy requests for you via a domain.

Once you have the host manager set up, add a “hostname”: “domain.com” value to your tyk_analytics.conf file so that the dashboard auto-generates the correct domain name for you, otherwise it tries to give you the equivalent raw URL (the one that Tyk actually uses).

Cheers,
Martin

Imported Google Group message.
Sender:[email protected].
Date:Thursday, 5 November 2015 12:53:02 UTC.

Hi Martin,

I have a similar issue

when trying for developer portal, the working link is:
http://localhost:3000/561523a03fd2284798000001/portal/apis

http://localhost:3000/561523a03fd2284798000001/portal/ is not working it says home page not found

when i try to browse other options like register/ login, the link http://localhost:3000/portal/login won’t open unless I add api id part of the url http://localhost:3000/561523a03fd2284798000001/portal/login

I have added “hostname” : “localhost” in tyk_analytics.conf
and my host manager is also running fine

i have also tried with other hostname s but unfortunately anything didnt work :frowning:

can you please look into it and provide a solution for it.
Thanking you in advance…

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 5 November 2015 13:02:35 UTC.

Hi,

If you are accessing the developer portal via a link like that then the host manager must not be working, if your host manger is running properly, then you should be able to access the portal via:

And all the links will work.

In the host manager, have you edited the nginx templates to listen for your domain? You need to let NginX know what domain it is meant to be listening for when the templates for your APIs and organisations is generated by the host manager. I would really not recommend using localhost as the domain name, make something up and use your hosts file to mask 127.0.0.1.

Look at the host_manager/templates folder, there are some configuration files there that are templates for the host manager, it uses these templates to manage NginX, if you look at the templates, you can see what variables are used to generate the domain names, alternatively you can just hard code them to use your chosen domain. Remember to restart the host manager if you are editing these files.

Here’s the relevant docs:
https://tyk.io/v1.8/host-manager/

And:
https://tyk.io/v1.8/tyk-routing/

And:
https://tyk.io/v1.8/setup/installation-nginx/

Cheers,
Martin

Imported Google Group message.
Sender:[email protected].
Date:Friday, 6 November 2015 11:13:33 UTC.

Thanks for the reply…

finally it seems to be working when i have hard coded server name to the templates in host-manager.
even now the ‘/portal’ isn’t opening it says ‘Home page is not found’,
but i can able to access ‘/portal/apis’ through it other portals like ‘/portal/register’ or ‘/portal/login’…
can you please guide me to overcome this…

Thanking you in advance

  • show quoted text -

Imported Google Group message.
Sender:[email protected].
Date:Monday, 9 November 2015 10:33:04 UTC.

Thanks for reply
The portal is working fine… after i have added a ‘home page’ of ‘/’ via dashboard
before that the ‘/portal’ isn’t opening it says ‘Home page is not found’,

but i can able to access ‘/portal/apis’ through it other portals like ‘/portal/register’ or ‘/portal/login’…

finally portal is working well :slight_smile:

On Thursday, November 5, 2015 at 6:32:35 PM UTC+5:30, Martin Buhr wrote:

  • show quoted text -