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/02/03 14:17:40 UTC

[GitHub] [apisix-dashboard] starsz edited a comment on issue #1406: ManagerAPI should support -c to set the config file.

starsz edited a comment on issue #1406:
URL: https://github.com/apache/apisix-dashboard/issues/1406#issuecomment-772542324


   > Can you guide me on how can i interact with the cli?
   
   @vinayaksh42 .Of course.
   
   First, `make api-run` is used for `dry-run` as you can see.
   So we wouldn't use it in a production environment.
   We should do `./api/build.sh` to build the binary of manger-api. Like this:
   
   ```
   ./api/build.sh
   + export ENV=local
   + ENV=local
   ++ pwd
   + pwd=/Users/peter/Work/project/apisix-dashboard
   + rm -rf output
   + mkdir -p output/conf
   + mkdir -p output/dag-to-lua
   + [[ ! -f dag-to-lua-1.1/lib/dag-to-lua.lua ]]
   ....
   + cp -r /tmp/dag-to-lua-1.1/lib/cli.lua /tmp/dag-to-lua-1.1/lib/dag-to-lua.lua /tmp/dag-to-lua-1.1/lib/json.lua ./output/dag-to-lua
   + cd ./api
   + go build -o ../output/manager-api -ldflags '-X github.com/apisix/manager-api/cmd.Version=master -X github.com/apisix/manager-api/cmd.GitHash=0a0a42a' ./cmd/manager
   + cd ..
   + cp ./api/conf/schema.json ./output/conf/schema.json
   + cp ./api/conf/conf.yaml ./output/conf/conf.yaml
   + echo 'Build the Manager API successfully'
   Build the Manager API successfully
   
   ```
   Then we can get the binary of manager-api at the `output` directory.
   
   ```
   ➜ cd output && ls
   conf        dag-to-lua  manager-api
   ```
   
   We can do `./manger-api -h` to see the help info.
   
   ```
   ./manager-api -h
   APISIX Manager API
   
   Usage:
     manager-api [flags]
     manager-api [command]
   
   Available Commands:
     help        Help about any command
     stop
   
   Flags:
     -h, --help              help for manager-api
     -p, --work-dir string   current work directory (default ".")
   
   Use "manager-api [command] --help" for more information about a command.
   ```
   
   The purpose of this issue is that we want to support "-c" command so that we can set the config path through the cli.
   
   
   


----------------------------------------------------------------
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