VS code plugin and emulator for Apigee Edge

Hello Team,

I read in Apigee documentation/guide about VS code plugin and Apigee emulator for local development of API proxies and verify the functionality. However this was mentioned in Apigee X guide.

Is the VS code plugin and emulator available for Apigee edge as well ? If so, will the same version be compatible with Edge as well ?

Thanks.

@dchiesa1 

Solved Solved
1 6 2,770
1 ACCEPTED SOLUTION

Is the VS code plugin and emulator available for Apigee edge as well ? If so, will the same version be compatible with Edge as well ?

No, I wouldn't say the plugin and emulator is "available" for Apigee Edge.  There's just one version of the plugin and emulator.  The functionality of the emulator is based on the Apigee X / Apigee hybrid runtime.  This includes all the existing policies from Edge, plus some new ones (like the CORS policy, DataCapture, GraphQL, AssertCondition, the dialogflow stuff, and so on), minus some that are dropped (eg, StatisticsCollector).  

You will be able to use the VSCode + Apigee emulator to test  your proxies, products, OAuth, JWT, Quota, and so on.  There will be some gaps between what you can build in the tool, and what you can deploy to Edge, due to the difference in the set of supported policies.  The skeleton - the proxyendpoint and targetendpoint and the basic policies and sharedflows etc, I expect will be directly compatible. (Though Google is not offering a statement of official support!)

There are two exception cases that I can think of now, though there may be others I am not thinking of. 

  • There is a feature in the VSCode plugin to allow direct deployment of an environment bundle to an external instance of Apigee X; that won't be possible with Edge as the target. You'll need to export the stuff you built, then import it into Edge. 
  • There are some changes in libraries and implementations in X and hybrid, as compared to Edge. For example the SpikeArrest works slightly differently.  The JSONPath library is different (current).  We updated the Java runtime (to JDK 11), which means Java callouts may behave differently.  All of these will result in differences in behavior, between the emulator and Edge. In fact the emulator is not an emulator, it's just a containerized runtime, THE X/hybrid runtime .  And that is slightly different than the runtime for Edge. 

In sum, there is no official support for using the plugin and emulator to build Edge proxies. But, it will work for some cases. The experience will not be 100% ideal, but you might find value in it. 

View solution in original post

6 REPLIES 6

Hi, @iamasim04 

I'm currently having VS Code Apigee plugin & Apigee Emulator installed.

So far so good. Everything's OK. Even though that I'm currently focusing on Hybrid,

however, I could not see any impediments to use plugin & emulator for Edge also.

Because once you have tested things in emulator locally & ready to deploy to Edge or Hybrid, 

it is not the emulator's job to deploy to Edge or Hybrid. Emulator's work is done & you switch to Maven Apigee Deploy Plugin or any other deploy methods.

 

Hi @optimism ,

Can you please help me in installing Apigee Emulator on my local machine by means of suitable advice on the same? The Google Cloud documentation pon the same is returning a Page Not Found 404 error at the following link: https://cloud.google.com/apigee/docs/api-platform/local-development/setup#apigee-ui

I have otherwise installed all the other pre-requisites to set up Apigee X for VS Code local development.

Cheers,

Kaushik 

The output file for the proxy is in a different extension (not .zip), so it can be used only on Apigee X I think

Is the VS code plugin and emulator available for Apigee edge as well ? If so, will the same version be compatible with Edge as well ?

No, I wouldn't say the plugin and emulator is "available" for Apigee Edge.  There's just one version of the plugin and emulator.  The functionality of the emulator is based on the Apigee X / Apigee hybrid runtime.  This includes all the existing policies from Edge, plus some new ones (like the CORS policy, DataCapture, GraphQL, AssertCondition, the dialogflow stuff, and so on), minus some that are dropped (eg, StatisticsCollector).  

You will be able to use the VSCode + Apigee emulator to test  your proxies, products, OAuth, JWT, Quota, and so on.  There will be some gaps between what you can build in the tool, and what you can deploy to Edge, due to the difference in the set of supported policies.  The skeleton - the proxyendpoint and targetendpoint and the basic policies and sharedflows etc, I expect will be directly compatible. (Though Google is not offering a statement of official support!)

There are two exception cases that I can think of now, though there may be others I am not thinking of. 

  • There is a feature in the VSCode plugin to allow direct deployment of an environment bundle to an external instance of Apigee X; that won't be possible with Edge as the target. You'll need to export the stuff you built, then import it into Edge. 
  • There are some changes in libraries and implementations in X and hybrid, as compared to Edge. For example the SpikeArrest works slightly differently.  The JSONPath library is different (current).  We updated the Java runtime (to JDK 11), which means Java callouts may behave differently.  All of these will result in differences in behavior, between the emulator and Edge. In fact the emulator is not an emulator, it's just a containerized runtime, THE X/hybrid runtime .  And that is slightly different than the runtime for Edge. 

In sum, there is no official support for using the plugin and emulator to build Edge proxies. But, it will work for some cases. The experience will not be 100% ideal, but you might find value in it. 

is there a way to show print() value in docker logs or anywhere?

I'd like to know that!