Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:44:22 +0000. Sender:Angus Tse. Date:Tuesday, 19 January 2016 03:44:25 UTC.
using v1.9 with vagrant setup
I copy and pasted this Definition file (link) and store as /etc/tyk/apps/test.json
vagrant@precise64:/opt/tyk-gateway/apps$ ls -al /etc/tyk/apps/
total 12
-rw-r–r-- 1 root root 729 Jan 19 03:04 test.json
{
“name”: “Tyk Test API”,
“api_id”: “1”,
“org_id”: “569c53ca56c02c0f5c000001”,
…}
restart services
vagrant@precise64:/opt/tyk-gateway/apps$ sudo service tyk-gateway restart
tyk-gateway stop/waiting
tyk-gateway start/running, process 1871
Imported Google Group message. Sender:Angus Tse. Date:Tuesday, 19 January 2016 08:08:02 UTC.
Hi Martin
Thanks for your response. very appreciate your works.
I just know that I can add API on either FILE / Dashboard.
Q1. Is it means Analytic tracking also disabled if remove this option --dashboard=1 from setup.sh ?
Q2. For my use case, I am considering how to manage API definition version using Github and automate deployment. The dashboard quite useful for me, I may consider to use /api/apis/ to update / create API with my Github source. Any thoughts ?
BTW, sorry that, I may submit duplicated topics about “Failed to load Middleware JS”. Feel free to ignore either one.
Imported Google Group message. Sender:Martin Buhr. Date:Tuesday, 19 January 2016 09:57:42 UTC.
Hi Angus,
No problem
Yes basically if you want to use the dashboard, you’ll need to use the DB and the Advanced API to manage your definitions. If you leave out the dashboard=1 parameter, then a different base configuration will be used for your setup (one that is geared towards file-based deployment).
You would need to manually modify the tyk.conf file to get it to collect analytics for you but not manage APIs (whole swathes of the dashboard UI would be useless, like key management).
You could do something tricky by mirroring the API definitions (importing) them into the dashboard, then you could mange keys too since the api IDs would match up with what is on disk.
If I would like to use file based API definition then I would
/opt/tyk-gateway/install/setup.sh without dashboard options
run /opt/tyk-dashboard/install/setup.sh as document so that I can make use the Advanced Management API
create ORG & API Key via Advanced Management API
create API Definitions and Policies using file basesd
If i want to check my API definition created by File, I should use: GET 127.0.0.1:8080/tyk/apis/ to check it instead of Advanced Management API / Dashboard
No: Advanced API is useless with gateways that are not listening to the DB
Redundant
Redundant
Basically, if you want to use the Dashboard, you need gateways to be DB backed, not file based. They are not mixable, it’s either one or the other type of isntallation. Gateway only vs. DB Backed with dashboard.
You can try and mix and match, but then you need to duplicate APIs in Dashboard AND file. As I said, it’s really not recommended.
In your tyk.conf you need to disable use_db_app_configs, then duplicate everything in the dashboard manually, after that, it’s unknown territory as you’re using the stack in a way that we don’t endorse, test or support - so it’s all supposition from here on on my part