apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.5k stars 1.16k forks source link

Decouple the api gateway integration out from core repo #1959

Open csantanapr opened 7 years ago

csantanapr commented 7 years ago

The CLI integration with API gateway is function that can be split into it's own repository.

I envision having a repo that contains the api integration i.e. openwhisk-cli-apigateway

This repo can contain the routemgt web actions, go code to implement the $ wsk api command, and any tests to validate that functionality of the integration is always healthy using CI Travis.

This can be the repo that tests the integration between the two component repos openwhisk and openwhisk-apigateway

csantanapr commented 7 years ago

@rabbah @markusthoemmes @jeremiaswerner @mdeuser This is the issue we discussed on direction to remove from openwhisk core the apigateway integration.

The reason it was on this repo was because at the time of initial work for wsk api-experimental apigateway was the only way to expose an action as a public api.

Now with webaction in place, and apigateway serving as a add on in front of webactions, apigateway becomes a plugin/extension add on on top of openwhisk core.

rabbah commented 6 years ago

@ServoKvd FYI. @csantanapr should we close this a duplicate of https://github.com/apache/incubator-openwhisk/issues/2911.

ServoKvd commented 6 years ago

Hi rr, csantanapr Perhaps we can solve this new repo and then add a link to it in https://github.com/apache/incubator-openwhisk/issues/2911?

I can submit a patch with the new repo moving following files from OpenWhisk repo: core/routemanagement ansible/routemgmt.yml, ansible/tasks/routemgmt

One link between the OpenWhisk repo and this new one would be properties.yml
I was wondering if there is a config repo corresponding to something like properties.yml? If not perhaps, it will be useful to create one?

ServoKvd commented 6 years ago

Looks like https://github.com/apache/incubator-openwhisk-catalog maybe a good place to add route-mgmt. ? , with package name "whisk.system/routemgmt", inline with the way WSK_CLI calls it now.

csantanapr commented 6 years ago

Hi we don’t need a repo for configuration. packages can easily be installed with a install script that we pass down from ansible top level configuration What need to happen is that current script needs to be refactor to not grab values from whisk.properties and instead have ansible pass down all the values.

ServoKvd commented 6 years ago

Ah! That should work- In general I was just wondering if properties.yml ( default ENV) itself need some special consideration than as a helper object in the main repo - I guess its alright to leave them to ENV to be passed by ansible or some other shell.

csantanapr commented 6 years ago

Now that CLI is in new repo https://github.com/apache/incubator-openwhisk-cli The apigw actions located here https://github.com/apache/incubator-openwhisk/tree/master/core/routemgmt should be move to CLI repo, since the only purpose of these actions are now helper backend actions only for CLI usage.

This CLI and actions are together in source and tests.

Any other client should be interacting with apigw managegment v2 API https://github.com/apache/incubator-openwhisk-apigateway/blob/master/doc/v2/management_interface_v2.md