From 3f845c6b4217d629f384b5e744bb19d8d143f6b9 Mon Sep 17 00:00:00 2001 From: nic-chen Date: Sat, 24 Oct 2020 11:35:28 +0800 Subject: [PATCH 1/9] fix: update docs about preinstall in deployment --- docs/deploy.md | 4 +++- docs/deploy.zh-CN.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/deploy.md b/docs/deploy.md index 41deb4746a..cd72bc2c0f 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -31,7 +31,9 @@ $ cd apisix-dashboard The `manager-api` is used to provide APIs for Dashboard, just like a bridge between the Apache APISIX and the Dashboard. Here are the steps to build it manually: -1. We need `Go` 1.13+ and `Lua` 5.1+ to be preinstalled. +1. We need `Go` 1.13+ to be preinstalled. + +If want to use the plugin orchestration, `Lua` 5.1+ to need be preinstalled at the same time. And we will optimize this part and remove the dependency on `Lua` in the future. 2. Check environment variables diff --git a/docs/deploy.zh-CN.md b/docs/deploy.zh-CN.md index ceeefc40b8..99a60038b7 100644 --- a/docs/deploy.zh-CN.md +++ b/docs/deploy.zh-CN.md @@ -31,7 +31,9 @@ $ cd apisix-dashboard `manager-api` 用于为控制台提供接口,就像 Apache APISIX 和控制台之间的桥梁。下面是手动构建步骤: -1. 需要预先安装 `Go` 1.13+ 、`Lua` 5.1+ +1. 需要预先安装 `Go` 1.13+ + +如果使用插件编排,需要同时预先安装 `Lua` 5.1+ ,后续版本会对此进行优化,取消对 `Lua` 的依赖 2. 检查环境变量 From ac96e0fe9205f33abf358d54375939315a4b4fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=90=9A=E8=87=B4=E8=BF=9C?= Date: Sat, 24 Oct 2020 11:44:22 +0800 Subject: [PATCH 2/9] Update deploy.md --- docs/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deploy.md b/docs/deploy.md index cd72bc2c0f..09dd2b988b 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -33,7 +33,7 @@ The `manager-api` is used to provide APIs for Dashboard, just like a bridge betw 1. We need `Go` 1.13+ to be preinstalled. -If want to use the plugin orchestration, `Lua` 5.1+ to need be preinstalled at the same time. And we will optimize this part and remove the dependency on `Lua` in the future. +NOTE: You also need to install `Lua` 5.1+ if you want to use the Plugin Orchestration, we will optimize this part and remove the dependency about `Lua` in the future. 2. Check environment variables From b87b327eb1b1aca76eba76448148fb3c119900f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=90=9A=E8=87=B4=E8=BF=9C?= Date: Sat, 24 Oct 2020 11:45:45 +0800 Subject: [PATCH 3/9] Update deploy.md --- docs/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deploy.md b/docs/deploy.md index 09dd2b988b..fa017fcbc7 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -33,7 +33,7 @@ The `manager-api` is used to provide APIs for Dashboard, just like a bridge betw 1. We need `Go` 1.13+ to be preinstalled. -NOTE: You also need to install `Lua` 5.1+ if you want to use the Plugin Orchestration, we will optimize this part and remove the dependency about `Lua` in the future. +NOTE: You also need to install `Lua` 5.1+ if you want to use the Plugin Orchestration, we will improve this part and remove Lua's dependency in the future. 2. Check environment variables From f202332291a974944d9e51e84792f12e18f8266b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=90=9A=E8=87=B4=E8=BF=9C?= Date: Sat, 24 Oct 2020 11:47:32 +0800 Subject: [PATCH 4/9] Update deploy.md --- docs/deploy.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/deploy.md b/docs/deploy.md index fa017fcbc7..93c81c0028 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -19,7 +19,7 @@ # Deploy manually -## Clone the project +## 1. Clone the project ```sh $ git clone https://github.com/apache/apisix-dashboard.git @@ -27,13 +27,13 @@ $ git clone https://github.com/apache/apisix-dashboard.git $ cd apisix-dashboard ``` -## Build the manager-api +## 2. Build the manager-api The `manager-api` is used to provide APIs for Dashboard, just like a bridge between the Apache APISIX and the Dashboard. Here are the steps to build it manually: 1. We need `Go` 1.13+ to be preinstalled. -NOTE: You also need to install `Lua` 5.1+ if you want to use the Plugin Orchestration, we will improve this part and remove Lua's dependency in the future. +NOTE: You also need to install `Lua` 5.1+ if you want to use the Plugin Orchestration, we will improve this part and omit Lua's dependency in the future. 2. Check environment variables @@ -67,7 +67,7 @@ $ go env -w GOPROXY=https://goproxy.cn,direct $ ./api/run.sh & ``` -## Build the frontend +## 3. Build the frontend This project is initialized with [Ant Design Pro](https://pro.ant.design). The following are some quick guides for how to use. @@ -86,4 +86,7 @@ $ yarn build ``` 5. The bundled files are under `/dist` folder if the step 4 is successful, then we recommend using `nginx` to handle those files, please install `nginx` manually, then refer to the nginx conf `compose/dashboard_conf/nginx.conf`. -6. Move files under `dist` folder to nginx's default html folder, then visit `http://127.0.0.1` in your browser. + +## 5. Finally + +Move files under `dist` folder to nginx's default html folder, then visit `http://127.0.0.1` in your browser. From 72dbfef67fa9945d2957efdecb35f19873e57620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=90=9A=E8=87=B4=E8=BF=9C?= Date: Sat, 24 Oct 2020 11:48:59 +0800 Subject: [PATCH 5/9] Update deploy.md --- docs/deploy.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/deploy.md b/docs/deploy.md index 93c81c0028..09cf2893e7 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -19,7 +19,7 @@ # Deploy manually -## 1. Clone the project +## Clone the project ```sh $ git clone https://github.com/apache/apisix-dashboard.git @@ -27,7 +27,7 @@ $ git clone https://github.com/apache/apisix-dashboard.git $ cd apisix-dashboard ``` -## 2. Build the manager-api +## Build the manager-api The `manager-api` is used to provide APIs for Dashboard, just like a bridge between the Apache APISIX and the Dashboard. Here are the steps to build it manually: @@ -67,7 +67,7 @@ $ go env -w GOPROXY=https://goproxy.cn,direct $ ./api/run.sh & ``` -## 3. Build the frontend +## Build the frontend This project is initialized with [Ant Design Pro](https://pro.ant.design). The following are some quick guides for how to use. @@ -86,7 +86,4 @@ $ yarn build ``` 5. The bundled files are under `/dist` folder if the step 4 is successful, then we recommend using `nginx` to handle those files, please install `nginx` manually, then refer to the nginx conf `compose/dashboard_conf/nginx.conf`. - -## 5. Finally - Move files under `dist` folder to nginx's default html folder, then visit `http://127.0.0.1` in your browser. From 837315e154c155fc67322bea3234e21d59341abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=90=9A=E8=87=B4=E8=BF=9C?= Date: Sat, 24 Oct 2020 11:49:16 +0800 Subject: [PATCH 6/9] Update deploy.md --- docs/deploy.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/deploy.md b/docs/deploy.md index 09cf2893e7..9640a9211c 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -86,4 +86,5 @@ $ yarn build ``` 5. The bundled files are under `/dist` folder if the step 4 is successful, then we recommend using `nginx` to handle those files, please install `nginx` manually, then refer to the nginx conf `compose/dashboard_conf/nginx.conf`. -Move files under `dist` folder to nginx's default html folder, then visit `http://127.0.0.1` in your browser. + +6. Move files under `dist` folder to nginx's default html folder, then visit `http://127.0.0.1` in your browser. From e52cc82dbf2a90cb1b5d1597f0c503979c4edd12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=90=9A=E8=87=B4=E8=BF=9C?= Date: Sat, 24 Oct 2020 11:50:28 +0800 Subject: [PATCH 7/9] Update deploy.zh-CN.md --- docs/deploy.zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deploy.zh-CN.md b/docs/deploy.zh-CN.md index 9bfde81f24..f8a899b6f5 100644 --- a/docs/deploy.zh-CN.md +++ b/docs/deploy.zh-CN.md @@ -33,7 +33,7 @@ $ cd apisix-dashboard 1. 需要预先安装 `Go` 1.13+ -如果使用插件编排,需要同时预先安装 `Lua` 5.1+ ,后续版本会对此进行优化,取消对 `Lua` 的依赖 +注意:如果使用插件编排,需要同时预先安装 `Lua` 5.1+ ,后续版本会对此进行优化,取消对 `Lua` 的依赖。 2. 检查环境变量 From 471cee1e486c9c152cb9ee08edb041fb0ca21f32 Mon Sep 17 00:00:00 2001 From: nic-chen Date: Sat, 24 Oct 2020 14:17:48 +0800 Subject: [PATCH 8/9] fix: use the exists schema.json so we don't need Lua on building --- api/run.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/run.sh b/api/run.sh index 737cd2488e..c738bd2d61 100755 --- a/api/run.sh +++ b/api/run.sh @@ -41,8 +41,8 @@ if [[ ! -f "dag-to-lua-1.1/lib/dag-to-lua.lua" ]]; then fi -# generate json schema -if [[ ! -f "${pwd}/schema.json" ]]; then +# generate json schema if need a new one +if [[ ! -f "${pwd}/api/confschema.json" ]]; then rm master.zip rm -rf ./api/build-tools/apisix/ wget https://github.com/apache/apisix/archive/master.zip @@ -50,8 +50,8 @@ if [[ ! -f "${pwd}/schema.json" ]]; then mkdir -p ./api/build-tools/apisix/ mv ./apisix-master/apisix/* ./api/build-tools/apisix/ rm -rf ./apisix-master - cd ./api/build-tools/ && lua schema-sync.lua > ${pwd}/schema.json - cd ../../ + cd ./api/build-tools/ && lua schema-sync.lua > ${pwd}/api/conf/schema.json + cd ../../ fi # build From a9de5eff0591eebc254f149691666d519d944a60 Mon Sep 17 00:00:00 2001 From: nic-chen Date: Sat, 24 Oct 2020 14:21:12 +0800 Subject: [PATCH 9/9] fix typo --- api/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/run.sh b/api/run.sh index c738bd2d61..a45061dc61 100755 --- a/api/run.sh +++ b/api/run.sh @@ -42,7 +42,7 @@ fi # generate json schema if need a new one -if [[ ! -f "${pwd}/api/confschema.json" ]]; then +if [[ ! -f "${pwd}/api/conf/schema.json" ]]; then rm master.zip rm -rf ./api/build-tools/apisix/ wget https://github.com/apache/apisix/archive/master.zip