microgateway-proxies-and-multiple-environments

Hi,

I am trying to implement microgateway-proxies-and-multiple-environments with the help of the below solution :

https://github.com/srinandan/router

But having some issues and need answers.

1) The proxy which has to be created in edge which is fetching info from KVM, do we need to rename it with edgemicro_* or any name would be good and do we need to deploy this code in all env.

2) in the plugin folder of MG, we need to create this folder router and place these index.js, package.json and package-lock.json file over there and run the npm install command. but do we need to modify this index with respect to any name of the proxies.

3) And this below configuration mentioned in github, I think it should be in default.yaml file. and what is this url about.

router:

lookupEndpoint: http://xxxxx/edgemicro-router/endpoint

0 5 219
5 REPLIES 5

Former Community Member
Not applicable

For item #1: you don’t have to name the proxy edgemicro_*. In fact it is preferred that you don’t., since this proxy is not exposed via MG

For item #2: you don’t have to change the index.js. Also you most likely don’t have to run npm install because all the dependencies should already be there. So give it a shot without it.

For item #3: that last configuration goes into your {org}-{env}-config.yaml file. Create a new stanza (called router).

Thanks, I didn't get the last answer, regarding the url, can you please explain what is this url about. Is this the url for the proxy which we have created in the first point?

Secondly in the first point the proxy which are creating, how MG is using it.

Former Community Member
Not applicable

That’s right, on item #3, use the proxy endpoint created in item #1. Since this endpoint is in the config file MG’s plugin will read it.

Thanks Srinandans...I will try the same..Thanks once again.

Hi Srinandans,

I have tried all the steps, but it is still showing me "error": "access_denied" error while hitting my api. I have created my api without any target end points.

Below are the steps I have taken

1) created the KVM and assign the api name with revision and target end point as values.

2) created the proxy for fetching the KVM

3) created the plugin folder and added index.js, package.json and package-lock.json. Also done the npm install.

4) both configurations added in {org}-{env}-config.yaml file.

5) restarted the MG

Is there any step I missed.