apache / apisix-control-plane

The Control-Plane for APISIX
https://apisix.apache.org/
33 stars 15 forks source link

feat:Use curl to encapsulate the Admin API into a script #42

Open kasini3000 opened 3 years ago

kasini3000 commented 3 years ago

Use curl to encapsulate the Admin API into a script. Encapsulated into several functions. For example: add monitor, add route, add backend, etc. several functions. It can be called by script name plus parameters.

kasini3000 commented 3 years ago

从命令行,用脚本和参数控制apisix

功能需求: 从命令行 添加路由, 删除路由, 添加监听, 删除监听, 添加后端, 删除后端。

需求说明: 用户界面=命令行,参数。(类似于istioctl,kubectl) 我用webui,或dashboard去添加后端。是手动的,是http的。 我希望能通过命令行,实现这些功能。这样我可以不用安装ui。和能自动化。 程序内部,用脚本,用go语言的二进制程序,用其他语言的二进制程序,用curl把http转到命令行,我不关心。

我猜: 有一个命令接口,把网关,路由,后端这些信息,插入etcd数据库,对吗? 能否把接口封装好后,暴露出来给用户? 或对用户提供脚本,和参数。脚本内部通过curl,调用http://127.0.0.1/admin接口, 最终实现,上述【功能需求】。

如果,,,近期不考虑开发这个功能,也希望能够告知下,不要杳无音信。

membphis commented 3 years ago

@gxthrj do you have time to look at this issue?

juzhiyuan commented 3 years ago

Please take a look at this one, if we are going to support this?

gxthrj commented 3 years ago

@kasini3000 Sorry for the late reply. According to the stated configuration, calling APISIX admin-api is already supported, but the command line function still needs to be developed. I will list this in the plan, and I can first expose the functionality through the command line. Because some functions overlap with other projects, I am doing this refactoring.

gxthrj commented 3 years ago

@kasini3000 Please take a look at https://github.com/apache/apisix-dashboard/issues/1884, maybe what you want.

Apisix-control-plane hopes to make a yaml declarative configuration, and of course there will be command line tools.