You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/05/10 13:06:08 UTC

[GitHub] [apisix-dashboard] bzp2010 opened a new issue #1884: feat: provide command line interface of Manager API

bzp2010 opened a new issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884


   # Feature request
   
   ## Please describe your feature
   
   Adding a command line interface to the Manager API, let it can operate the back-end storage in cli mode.
   It will provide commands such as `manager-api cli route` + `get\add\edit\delete`. (need discuss)
   
   ## Describe the solution you'd like
   
   The current command line uses `cobra` library to implement, which can support my simple extension of new command. The operation on `etcd` will reuse the current storage layer directly.
   It will be implemented gradually from an entity.
   
   ## Additional context
   
   [there is a issue](https://github.com/apache/apisix-control-plane/issues/42)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 edited a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-836723762


   ## Enhance CLI of Manager API
   Provides a way to operate the etcd storage of Apache APISIX by CLI.
   
   ### Significance
   The current deployment mode of dashboard is too heavy for small-scale applications such as stand-alone deployment. It may be difficult to connect to etcd when using docker deployment in stand-alone deployment. The compilation deployment needs to install some tools such as golang and nodejs, as well as their version problems.
   
   ### Goal
   The goal of the tool is to simplify the use in these scenarios, and the can be used to control the gateway just through a single binary program with CLI.
   
   ### Implement
   The current command line uses cobra library to implement, which can support my simple extension of new command. The operation on etcd will reuse the current storage layer directly.
   
   In the beginning, it will provide the simplest control like this.
   `manager-api cli route create [flags]`
   `--name`
   `--host`
   `--methods`
   It could end up like this `manager-api cli route create --name test --host example.com --methods get,post --upstream-id xxxx --etcd-endpoint 127.0.0.1:2379`
   
   **Is there any better suggestion on this part?**
   
   ### Development Plan
   0. Modify the current cli implementation to a better form.
   1. Provide configuration mode based on JSON.
   2. Provides configuration based on command line parameters. (split configuration in JSON into parameters according to entity parameters)
   3. Try to provide support for the above functions in a more extensible way, so that it can face the changes of entity attributes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837572775


   @fregie 
   I agree with you, but it seems that `apisix-control-plane` hasn't made any new progress for some time, which is why I didn't mention him in the proposal.
   I think it's a great idea to provide a data entity library, but implementing it requires some modifications to the existing code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bisakhmondal commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-840715528


   How about following a `Client-Server` architecture similar to industry standard
   for eg, 
   1. `etcd` & `etcdctl`
   2. `kube admin api` and `kubectl`
   
   As manager-api gradually will become feature rich, heavy and its functionality is more like a server. So why not a suitable lightweight client binary from our's end for communication.
   
   maybe we can consider `apisixctl` :)
   A substitute to manage everything related to manager-api and more through the command line, from login to fetch, put data everything.
   Development flow will be great and there will always be an opportunity to extend its feature. 
   
   How does it sound?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-840995522


   > I think we can place the CLI tool in a separate repo.
   > 
   > Public entities can also be placed in independent repo, so that different warehouses can be imported and maintained uniformly. It seems @tokers have already done this?
   
   @nic-chen  Do you mean project [`apisix-control-plane`](https://github.com/apache/apisix-control-plane)?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 edited a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837552492


   @starsz 
   Yes, we don't have to put this new CLI module into Manager API. But the way of putting Manager API mentioned in the proposal can help us develop reusable code quickly.
   Currently in Manager API, part of the code about the storage entity is placed in the `internal` package, which makes the code unable to be imported and used. These code needs to be modified.
   
   In my opinion, thanks to the good scalability of the `cobra` library, the code can be placed in Manager API according to the current way, and it can also be easily split in the future.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] imjoey commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-841145282


   > How about following a `Client-Server` architecture similar to industry standard
   > for eg,
   > 
   > 1. `etcd` & `etcdctl`
   > 2. `kube admin api` and `kubectl`
   > 
   > As manager-api gradually will become feature rich, heavy and its functionality is more like a server. So why not a suitable lightweight client binary from our's end for communication.
   > 
   > maybe we can consider `apisixctl` :)
   > A substitute to manage everything related to manager-api and more through the command line, from login to fetch, put data everything.
   > Development flow will be great and there will always be an opportunity to extend its feature.
   > 
   > How does it sound?
   
   +1 agreed with following the `Client-Server` architecture.
   
   In addition to directly read/write models from/into etcd,  both the Admin-API within APISIX and the Manager-API within Dashboard are also doing quite a lot of schema and data validations. This ensures only valid data could be written into etcd. So if we are going to make the CLI tool directly interact with etcd, those similar validation codes need to be rewritten which is rather redundant.
   
   I think this issue is greatly related to the upcoming job `Replacing Admin-API with Manager-API` because we need to decide which API ( Admin-API or Manager-API) will be called by the CLI tool.
   
   For now, Admin-API has more comprehensive schema validation than Manager-API, meanwhile, Manager-API has more functionality than Admin-API. So actually the replacing work means **Consolidation**.
   
   The following diagram shows the design in my mind. ( I have to admit that this is really a long-run job. 😄  )
   
   ```
                                          +-------------------------------------------------+
                                          |                                   Control-Plane |
   +------------------------------------+ |                                                 |
   | Data-Plane                         | |                                                 |
   |                                    | |  +-----+ +-------------+ +-------------+        |
   |                                    | |  | CLI | |  Dashboard  | | ingress-ctl |        |
   |                                    | |  +--+--+ +------+------+ +------+------+        |
   |                                    | |     |           |               |               |
   |                                    | |     |           |               |               |
   |                Users requests      | |  +--v-----------v---------------v------+        |
   |                                    | |  |    APISIX-api-sdk(Go/Nodejs/...)    |        |
   |                      |             | |  +-----------------+-------------------+        |
   |                      |             | |                    |                            |
   |                      |             | |                    |                            |
   |           +----------v----------+  | |  +-----------------v-------------------+        |
   |           |      APISIX(lua)    |  | |  |        APISIX-apiserver(Go)         |        |
   |           +----------^----------+  | |  +-----------------+-------------------+        |
   |                      |             | |                    |                            |
   |                      |             | |                    |                            |
   |           +----------+-------------+-+--------------------v-------------------+        |
   |           |                        | |       ETCD                             |        |
   |           +------------------------+-+----------------------------------------+        |
   |                                    | |                                                 |
   |                                    | |                                                 |
   +------------------------------------+ +-------------------------------------------------+
   ```
   
   Please let me elaborate on the above design:
   - The Data Plane only consists of the APISIX, since the previous `Admin-API` component is completely removed from the APISIX
   - Move the API layer out of Dashboard, with adding more plugin/schema validation and removing some APIs only related to UE, then we can call it APISIX-apiserver who deserves a dedicated repository
   - All the validations of data and schema will **ONLY** be performed by APISIX-apiserver
   - Perhaps the Dashboard will keep the Go backend, or maybe reimplemented in Node? 😄 
   - In order to communicate with APISIX-apiserver, we need various SDKs for developers' convenience
   - The APISIX-apiserver can add support for multiple API versions, which could be compatible with multiple version model definitions along with APISIX releases.
   
   So please let me know what do you think, any feedback is very welcome. Then we could find the step-by-step solution to build the CLI tool. 😄  Thanks.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] fregie removed a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
fregie removed a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-840925352


   > How about following a `Client-Server` architecture similar to industry standard
   > for eg, 
   > 1. `etcd` & `etcdctl`
   > 2. `kube admin api` and `kubectl`
   > 
   > As manager-api gradually will become feature rich, heavy and its functionality is more like a server. So why not a suitable lightweight client binary from our's end for communication.
   > 
   > maybe we can consider `apisixctl` :)
   > A substitute to manage everything related to manager-api and more through the command line, from login to fetch, put data everything.
   > Development flow will be great and there will always be an opportunity to extend its feature. 
   > 
   > How does it sound?
   
   Looks good to me


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 edited a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837572775


   @fregie 
   I agree with you, but it seems that `apisix-control-plane` hasn't made any new progress for some time, which is why I didn't mention him in the proposal. And I didn't see any plans for its next development.
   I think it's a great idea to provide a data entity library, but implementing it requires some modifications to the existing code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-840933552


   No matter what kind of way we use to install the CLI tool, it is necessary for us to share some code, such as data entities, between projects. These contents will be updated with the version of Apache APISIX, and maintaining two copies will be more complex.
   
   I think it is more appropriate to place the CLI in Manager API first, and it can be easily split out if necessary.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-838243721


   Any new suggestions here?
   If not, I'll look at separating entities from the current package. Do some preparatory work.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen edited a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
nic-chen edited a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-843041309


   hi @imjoey 
   Great design!
   Would you mind sending the proposal to the maillist for more discussion?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] imjoey commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-841922632


   > @imjoey
   > I agree with you,this is a good design.
   > I have two more suggestion
   > 
   
   @fregie 
   
   > 1. I think there should be two ways to control apisix,one is operational interface like `apisixctl add/delete/update _resource_`,the other is declarative interface like `deployment.yaml` of k8s.So I think we need two kind of api on  APISIX-apiserver too.
   
   Nice advice. It will definitely bring much convenience for API callers. Thanks.
   
   > 2. We can try to add grpc api of APISIX-apiserver,Maybe this way we don’t need to provide SDKs in multiple languages
   
   Good idea.  gRPC should be regarded as the most preferred format. For there are still some languages with no gRPC support, we could also make use of [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway) to server an HTTP/JSON proxy.
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] fregie commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
fregie commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-841187436


   @imjoey 
   I agree with you,this is a good design.
   I have two more suggestion
   1. I think there should be two ways to control apisix,one is operational interface like `apisixctl add/delete/update _resource_`,the other is declarative interface like `deployment.yaml` of k8s.So I think we need two kind of api on  APISIX-apiserver too.
   2. We can try to add grpc api of APISIX-apiserver,Maybe this way we don’t need to provide SDKs in multiple languages


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] github-actions[bot] commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-955670851


   This issue has been marked as stale due to 30 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] kasini3000 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
kasini3000 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837888614


   hi, good afternoon, I ran from apisix-control-plane.
   
   I don’t care if CLI is placed here or apisix-control-plane.
   
   This is the function I need, and I hope to realize it as soon as possible. So I suggest to put aside the question of where the cli is placed for now, and implement the function as soon as possible.
   
   Who is familiar with the cobra library?
   
   Suggested commands, and parameters: (Looking forward to your more detailed and better)
   Add_route,
   Delete_route,
   Add_listener,
   Delete_listener,
   Add_backend,
   Delete_backend
   
   If you are willing to implement related functions in powershell language, I can provide help and write most of the code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] fregie commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
fregie commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-840963465


   Maybe we can open another issues of separating of public library


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] kasini3000 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
kasini3000 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-839406554


   At the first, as few commands and parameters as possible are enough. More commands and more detailed parameters can be implemented later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837570137


   @fregie 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-841581323


   +1, agree with @imjoey 's good plan.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] imjoey commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-841922632


   > @imjoey
   > I agree with you,this is a good design.
   > I have two more suggestion
   > 
   
   @fregie 
   
   > 1. I think there should be two ways to control apisix,one is operational interface like `apisixctl add/delete/update _resource_`,the other is declarative interface like `deployment.yaml` of k8s.So I think we need two kind of api on  APISIX-apiserver too.
   
   Nice advice. It will definitely bring much convenience for API callers. Thanks.
   
   > 2. We can try to add grpc api of APISIX-apiserver,Maybe this way we don’t need to provide SDKs in multiple languages
   
   Good idea.  gRPC should be regarded as the most preferred format. For there are still some languages with no gRPC support, we could also make use of [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway) to server an HTTP/JSON proxy.
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837552492


   @starsz 
   Yes, we don't have to put this new CLI module into Manager API. But the way of putting Manager API mentioned in the proposal can help us develop reusable code quickly.
   Currently in Manager API, part of the code about the storage entity is placed in the `internal` package, which makes the code unable to be imported and used. These code needs to be modified.
   
   In my opinion, thanks to the good scalability of the `cobra` library, the code can be placed in Manager API according to the current scheme, and it can also be easily split in the future.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-843041309


   hi @imjoey 
   Very good design!
   Would you mind sending the proposal to the maillist for more discussion?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] kasini3000 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
kasini3000 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-841058717


   Can these issues be prioritized?
   
   Q:What is the name of the program?
   A:apisixcli, apisixctl, or other
   
   Q:How does the program work?
   A:Control etcd by sending etcdctl commands?  --- in my guess
   
   Q:What are the subcommands of the program?
   A:
   
   Q:What are the parameters for each command?
   A:


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] gxthrj commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-840648918


   > @fregie
   > 
   > > I think we can separate the store and storege module at the same time.
   > 
   > In project `apisix-dashboard`?
   > 
   > > Usage: `#go.mod# require github.com/apisix/apisix-dashboard` + `#go code# import "github.com/apisix/apisix-dashboard/api/model"`
   > 
   > It doesn't look elegant.
   > 
   > Do others have any suggestions about that? Thx! ping to @gxthrj @nic-chen @starsz @ShiningRush
   
   `manager-api` provides the basic management interface of APISIX and needs to ensure compatibility with the existing admin API (implement by lua). 
   
   Just like the title of this issue, manager-api can provide a command-line interaction method, and the behavior is consistent with the current http interface.
   
   But `separate the store and storege module` should be another thing. I hope do not do at the same time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-841029458


   > @nic-chen Do you mean project apisix-control-plane? Or the other one. XD
   
   Independent repo, not apisix-control-plane. We could discuss this whole thing in maillist first.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] imjoey commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-845820403


   > hi @imjoey
   > Great design!
   > Would you mind sending the proposal to the maillist for more discussion?
   
   @nic-chen sure, very glad to.  These days, prior to this, I'm doing some in-depth research on the design to make it more practical. Then I will send a detailed proposal for that soon.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] fregie commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
fregie commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837578486


   > I think it's a great idea to provide a data entity library, but implementing it requires some modifications to the existing code.
   I think it worth to do,Let's listen to other's opinions.
   Ping @starsz @nic-chen 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-840993013


   I think we can place the CLI tool in a separate repo.
   
   Public entities can also be placed in independent repo, so that different warehouses can be imported and maintained uniformly. It seems @tokers have already done this?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bisakhmondal commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-841681937


   +1 :+1:  Impressive thoughts. Really awesome😄


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 closed issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 closed issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] fregie commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
fregie commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-838266342


   I think we can separate the store and storege module at the same time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] starsz edited a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
starsz edited a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-836894338


   The idea sounds pretty good.
   But is it needed to do on manager-api?
   Maybe you can create another project like `apisix-cli`.That would be better. Just in my opinion.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 edited a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-840995522


   > I think we can place the CLI tool in a separate repo.
   > 
   > Public entities can also be placed in independent repo, so that different warehouses can be imported and maintained uniformly. It seems @tokers have already done this?
   
   @nic-chen  Do you mean project [`apisix-control-plane`](https://github.com/apache/apisix-control-plane)? Or the other one. XD


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 removed a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 removed a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837570137


   @fregie 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-836723762


   ## Enhance CLI of Manager API
   Provides a way to operate the etcd storage of Apache APISIX by CLI.
   
   ### Significance
   The current deployment mode of dashboard is too heavy for small-scale applications such as stand-alone deployment. It may be difficult to connect to etcd when using docker deployment in stand-alone deployment. The compilation deployment needs to install some tools such as golang and nodejs, as well as their version problems.
   
   ### Goal
   The goal of the tool is to simplify the use in these scenarios, and the can be used to control the gateway just through a single binary program with CLI.
   
   ### Implement
   The current command line uses cobra library to implement, which can support my simple extension of new command. The operation on etcd will reuse the current storage layer directly.
   
   In the beginning, it will provide the simplest control like this.
   `manager-api cli route create [flags]`
   `--name`
   `--host`
   `--methods`
   It could end up like this `manager-api cli route create --name test --host example.com --methods get,post --upstream-id xxxx --etcd-endpoint 127.0.0.1:2379`
   
   **Is there any better suggestion on this part?**
   
   ### Development Plan
   1. Provide configuration mode based on JSON.
   2. Provides configuration based on command line parameters. (split configuration in JSON into parameters according to entity parameters)
   3. Try to provide support for the above functions in a more extensible way, so that it can face the changes of entity attributes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 edited a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-840933552


   No matter what kind of way we use to install the CLI tool, it is necessary for us to share some code, such as data entities, between projects. These contents will be updated with the version of Apache APISIX, and maintaining two copies will be more complex.
   
   I think it is more appropriate to place the CLI in Manager API now, and it can be easily split out if necessary.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] starsz commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
starsz commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837895672


   > > I think it's a great idea to provide a data entity library, but implementing it requires some modifications to the existing code.
   > 
   > I think it worth to do,Let's listen to other's opinions.
   > Ping @starsz @nic-chen
   
   Great idea! 👍


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] fregie commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
fregie commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837568998


   I don't think it's a good idea put the cli feature in manager-api.Maybe it's better put it in [apisix-control-plane](https://github.com/apache/apisix-control-plane).
   We can use yaml or cli declarative definition method to define complete rules.
   
   On the other hand,I think we can abstract a library of managing data in etcd for the other project to use.Like _apisix-control-plane_ and _apisix-ingress-controller_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 edited a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-836723762


   ## Enhance CLI of Manager API
   Provides a way to operate the etcd storage of Apache APISIX by CLI.
   
   ### Significance
   The current deployment mode of dashboard is too heavy for small-scale applications such as stand-alone deployment. It may be difficult to connect to etcd when using docker deployment in stand-alone deployment. The compilation deployment needs to install some tools such as golang and nodejs, as well as their version problems.
   
   ### Goal
   The goal of the tool is to simplify the use in these scenarios, and the can be used to control the gateway just through a single binary program with CLI.
   
   ### Implement
   The current command line uses cobra library to implement, which can support my simple extension of new command. The operation on etcd will reuse the current storage layer directly.
   
   In the beginning, it will provide the simplest control like this.
   `manager-api cli route create [flags]`
   `--name`
   `--host`
   `--methods`
   It could end up like this `manager-api cli route create --name test --host example.com --methods get,post --upstream-id xxxx --etcd-endpoint 127.0.0.1:2379`
   
   ### Development Plan
   0. Modify the current cli implementation to a better form.
   1. Provide configuration mode based on JSON.
   2. Provides configuration based on command line parameters. (split configuration in JSON into parameters according to entity parameters)
   3. Try to provide support for the above functions in a more extensible way, so that it can face the changes of entity attributes.
   
   **Is there any better suggestion on this part?**


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] fregie commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
fregie commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-840925324






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] fregie edited a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
fregie edited a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837578486


   > I think it's a great idea to provide a data entity library, but implementing it requires some modifications to the existing code.
   
   I think it worth to do,Let's listen to other's opinions.
   Ping @starsz @nic-chen 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] kasini3000 edited a comment on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
kasini3000 edited a comment on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-837888614


   hi, good afternoon, I ran from apisix-control-plane.
   
   I don’t care if CLI is placed here or apisix-control-plane.
   
   This is the function I need, and I hope to realize it as soon as possible. So I suggest to put aside the question of where the cli is placed for now, and implement the function as soon as possible.
   
   Who is familiar with the cobra library?
   
   Suggested commands, and parameters: (Looking forward to your more detailed and better)
   Add_route,
   Delete_route,
   Add_listener,
   Delete_listener,
   Add_backend,
   Delete_backend
   
   急 急 急 ! ~
   
   If you are willing to implement related functions in powershell language, I can provide help and write most of the code.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] starsz commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
starsz commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-836894338


   The idea sounds pretty good.
   But is it needed to do on manager-api?
   Maybe you can create another project like `apisix-cli`.That would be better.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] bzp2010 commented on issue #1884: feat: provide command line interface of Manager API

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #1884:
URL: https://github.com/apache/apisix-dashboard/issues/1884#issuecomment-838291444


   @fregie 
   > I think we can separate the store and storege module at the same time.
   
   In project `apisix-dashboard`?
   
   > Usage: `#go.mod# require github.com/apisix/apisix-dashboard` + `#go code# import "github.com/apisix/apisix-dashboard/api/model"`
   
   It doesn't look elegant.
   
   Do others have any suggestions about that? Thx! ping to @gxthrj @nic-chen @starsz @ShiningRush 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org