You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/08/06 05:53:42 UTC

[apisix-dashboard] branch v1.5 updated: Feat release 1.5 (#358)

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch v1.5
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/v1.5 by this push:
     new 9a5e643  Feat release 1.5 (#358)
9a5e643 is described below

commit 9a5e643447ff02cb00d69f4729956c595c6cca69
Author: 琚致远 <ju...@apache.org>
AuthorDate: Thu Aug 6 13:53:32 2020 +0800

    Feat release 1.5 (#358)
    
    * feat(doc): update README
    
    * feat: update CHANGELOG
    
    * doc: add usage of dashbaord
    
    * Revert "doc: add usage of dashbaord"
    
    This reverts commit 5a08c7f43539a44cd0cf0f6175574e59efbd0ab6.
    
    * feat(Doc): update deployment
    
    * feat(Doc): update the deployment
    
    * feat(Doc): update the deployment
    
    * feat: remove incubator text
    
    * doc: modify doc for manager-api runing in local
    
    * feat(Doc): update README
    
    * doc: check env variables and give run.sh power to execute
    
    * feat(Doc): update Deployment
    
    * feat(Doc): update deployment
    
    * doc: modify manager-api build
    
    * feat: update ignore file
    
    Co-authored-by: kv <gx...@163.com>
    Co-authored-by: 琚致远 <ju...@juzhiyuandeMini.lan>
---
 .gitignore                               |  5 ++-
 CHANGELOG.md                             | 13 +++++-
 README-dashboard.md                      | 65 ----------------------------
 README.md                                | 72 +++++++++++++++++++++++++++++---
 api/README.md                            |  6 +--
 api/conf/conf.json                       | 12 +++---
 api/run/build.md                         | 52 -----------------------
 api/run/run.sh                           | 30 +++++++++----
 compose/README.md                        |  2 +-
 compose/gen-config-yaml.sh               |  2 +-
 src/components/Footer/index.tsx          |  2 +-
 src/components/PluginPage/PluginPage.tsx |  2 +-
 src/components/RightContent/index.tsx    |  2 +-
 13 files changed, 119 insertions(+), 146 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9caa192..27dda22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,4 +40,7 @@ build
 
 /compose/**/*.log
 /compose/**/nginx.pid
-/compose/etcd_data
\ No newline at end of file
+/compose/etcd_data
+manager-api
+conf.json
+conf.json-e
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d72bc3b..4553526 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,15 +19,26 @@
 
 # Table of Contents
 
+- [1.5.0](#150)
 - [1.0.0](#100)
 
+# 1.5.0
+
+This release mainly refactors the dashboard.
+
+### Core
+
+- Integrate with Ant Design Pro. [#263](https://github.com/apache/apisix-dashboard/pull/263)
+- Added Manager API support to process logics between APISIX and Dashboard.
+- Added Metrics/Route/SSL/Upstream/Consumer module.
+
 ## 1.0.0
 
 This release is mainly to build some basic panels and resolve License issue.
 
 ### Core
 
-- Dashboard initial. [#1](https://github.com/apache/incubator-apisix-dashboard/pull/1)
+- Dashboard initial. [#1](https://github.com/apache/apisix-dashboard/pull/1)
 - Resolve licence issues.
 - Remove unused files from the Dashboard boilerplate.
 - Support panel to list, create and modify Route, Consumer, Service, SSL and Upstream.
diff --git a/README-dashboard.md b/README-dashboard.md
deleted file mode 100644
index b1c8c13..0000000
--- a/README-dashboard.md
+++ /dev/null
@@ -1,65 +0,0 @@
-<!--
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
--->
-# READMD for Dashboard
-
-This project is initialized with [Ant Design Pro](https://pro.ant.design). Follow is the quick guide for how to use.
-
-## Environment Prepare
-
-1. Make sure you have `Node.js` installed on your machine.
-2. Install [yarn](https://yarnpkg.com/).
-3. Install `node_modules`:
-
-```bash
-$ yarn
-```
-
-### Start project
-
-```bash
-yarn start:no-mock
-```
-
-### Build project
-
-```bash
-yarn build
-```
-
-### Check code style
-
-```bash
-yarn lint
-```
-
-You can also use script to auto fix some lint error:
-
-```bash
-yarn lint:fix
-```
-
-### Test code
-
-```bash
-yarn test
-```
-
-## More
-
-You can view full document on our [official website](https://pro.ant.design). And welcome any feedback in our [github](https://github.com/ant-design/ant-design-pro).
diff --git a/README.md b/README.md
index 3a80fae..b0e8651 100644
--- a/README.md
+++ b/README.md
@@ -16,15 +16,77 @@
 # limitations under the License.
 #
 -->
+
 # Apache APISIX Dashboard
 
-Dashboard for [Apache APISIX](https://github.com/apache/incubator-apisix-dashboard)
+Dashboard for [Apache APISIX](https://github.com/apache/apisix-dashboard)
 
-## Deploy with Docker (currently)
+## Deploy with Docker
 
 Please refer to [Deploy with Docker README](./compose/README.md)
 
-## More
+## Deploy Manually
+
+### Clone the project
+
+```sh
+$ git clone https://github.com/apache/apisix-dashboard.git
+
+$ cd apisix-dashboard
+```
+
+### 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 `MySQL/Golang` to be preinstalled.
+
+```sh
+# e.g Initialization for MySQL
+$ mysql –uroot –p123456
+> source ./api/script/db/schema.sql
+```
+
+2. Start the Apache APISIX.
+
+[Please follow this guide](https://github.com/apache/apisix#configure-and-installation)
+
+3. Check environment variables
+
+According to your local deployment environment, check the environment variables in `./api/run/run.sh`, modify the environment variables if needed.
+
+4. Build
+
+```sh
+$ cd api && go build -o ../manager-api . && cd ..
+```
+
+5. Run
+
+```sh
+$ sh ./api/run/run.sh &
+```
+
+### Build the Dashboard
+
+This project is initialized with [Ant Design Pro](https://pro.ant.design). The following are some quick guides for how to use.
+
+1. Make sure you have `Node.js(version 8.10.0+)/Nginx` installed on your machine.
+2. Install [yarn](https://yarnpkg.com/).
+3. Install dependencies:
+
+```sh
+$ yarn install
+```
+
+4. Build
+
+```sh
+$ 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: just move them to nginx's default html folder, then visit `http://127.0.0.1` in your browser. The default Setting page would be shown, and you should set the API field to the manager api's address, e.g `http://127.0.0.1:8080/apisix/admin` .
+
+## Other
 
-1. More infomation about the frontend Dashboard, please refer to [README for Dashboard](./README-dashboard.md)
-2. If you need the dashboard built with Vue.js, please refer to [master-vue](https://github.com/apache/incubator-apisix-dashboard/tree/master-vue).
+1. If you need the elder dashboard which is built with Vue.js, please refer to [master-vue](https://github.com/apache/apisix-dashboard/tree/master-vue).
diff --git a/api/README.md b/api/README.md
index 1239ce4..eab5c40 100644
--- a/api/README.md
+++ b/api/README.md
@@ -19,8 +19,8 @@
 
 # manager-api
 
-This is a back-end project that the dashboard depends on, implemented through golang.
+This is a backend project which the dashboard depends on, implemented by Golang.
 
-## configuration and install
+## Installation
 
-[Install Doc](run/build.md)
+[Please refer to the doc](../README.md)
diff --git a/api/conf/conf.json b/api/conf/conf.json
index 95fe86e..31731c3 100644
--- a/api/conf/conf.json
+++ b/api/conf/conf.json
@@ -1,6 +1,6 @@
 {
-  "conf":{
-    "mysql":{
+  "conf": {
+    "mysql": {
       "address": "127.0.0.1:3306",
       "user": "root",
       "password": "123456",
@@ -8,12 +8,12 @@
       "maxIdleConns": 25,
       "maxLifeTime": 10
     },
-    "syslog":{
-      "host": "localhost"
+    "syslog": {
+      "host": "127.0.0.1"
     },
-    "apisix":{
+    "apisix": {
       "base_url": "http://127.0.0.1:9080/apisix/admin",
       "api_key": "edd1c9f034335f136f87ad84b625c8f1"
     }
   }
-}
\ No newline at end of file
+}
diff --git a/api/run/build.md b/api/run/build.md
deleted file mode 100644
index dafea17..0000000
--- a/api/run/build.md
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
--->
-
-# manager-api 
-
-## build
-
-```shell
-$ go build -o manager-api ../.
-```
-
-## Pre-dependence
-
-### mysql
-
-Install mysql in advance, and then initialize the database. e.g.
-
-```shell
-mysql –uroot –p123456 < ../script/db/schema.sql
-```
-
-### Start APISIX
-
-[Install APISIX](https://github.com/apache/apisix#configure-and-installation)
-
-### Set environment variables
-
-According to your local deployment environment, modify the environment variables in `./run.sh`
-
-## Run
-
-```shell
-$ sh run.sh
-```
-
-
diff --git a/api/run/run.sh b/api/run/run.sh
old mode 100644
new mode 100755
index 09f318d..f47d089
--- a/api/run/run.sh
+++ b/api/run/run.sh
@@ -17,20 +17,34 @@
 #
 
 pwd=`pwd`
+
+cp ${pwd}/api/conf.json ${pwd}/conf.json
+
 export MYSQL_SERVER_ADDRESS="127.0.0.1:3306"
 export MYSQL_USER=root
 export MYSQL_PASSWORD=123456
 export SYSLOG_HOST=127.0.0.1
 export APISIX_BASE_URL="http://127.0.0.1:9080/apisix/admin"
 export APISIX_API_KEY="edd1c9f034335f136f87ad84b625c8f1"
-export ENV=prod
-
-sed -i -e "s%#mysqlAddress#%`echo $MYSQL_SERVER_ADDRESS`%g" ${pwd}/conf.json
-sed -i -e "s%#mysqlUser#%`echo $MYSQL_USER`%g" ${pwd}/conf.json
-sed -i -e "s%#mysqlPWD#%`echo $MYSQL_PASSWORD`%g" ${pwd}/conf.json
-sed -i -e "s%#syslogAddress#%`echo $SYSLOG_HOST`%g" ${pwd}/conf.json
-sed -i -e "s%#apisixBaseUrl#%`echo $APISIX_BASE_URL`%g" ${pwd}/conf.json
-sed -i -e "s%#apisixApiKey#%`echo $APISIX_API_KEY`%g" ${pwd}/conf.json
+
+if [[ "$unamestr" == 'Darwin' ]]; then
+	sed -i '' -e "s%#mysqlAddress#%`echo $MYSQL_SERVER_ADDRESS`%g" ${pwd}/conf.json
+	sed -i '' -e "s%#mysqlUser#%`echo $MYSQL_USER`%g" ${pwd}/conf.json
+	sed -i '' -e "s%#mysqlPWD#%`echo $MYSQL_PASSWORD`%g" ${pwd}/conf.json
+	sed -i '' -e "s%#syslogAddress#%`echo $SYSLOG_HOST`%g" ${pwd}/conf.json
+	sed -i '' -e "s%#apisixBaseUrl#%`echo $APISIX_BASE_URL`%g" ${pwd}/conf.json
+	sed -i '' -e "s%#apisixApiKey#%`echo $APISIX_API_KEY`%g" ${pwd}/conf.json
+else
+	sed -i -e "s%#mysqlAddress#%`echo $MYSQL_SERVER_ADDRESS`%g" ${pwd}/conf.json
+	sed -i -e "s%#mysqlUser#%`echo $MYSQL_USER`%g" ${pwd}/conf.json
+	sed -i -e "s%#mysqlPWD#%`echo $MYSQL_PASSWORD`%g" ${pwd}/conf.json
+	sed -i -e "s%#syslogAddress#%`echo $SYSLOG_HOST`%g" ${pwd}/conf.json
+	sed -i -e "s%#apisixBaseUrl#%`echo $APISIX_BASE_URL`%g" ${pwd}/conf.json
+	sed -i -e "s%#apisixApiKey#%`echo $APISIX_API_KEY`%g" ${pwd}/conf.json
+fi
+
+
+cp ${pwd}/conf.json ${pwd}/api/conf/conf.json
 
 exec ./manager-api
 
diff --git a/compose/README.md b/compose/README.md
index 66e83a3..f3b0edc 100644
--- a/compose/README.md
+++ b/compose/README.md
@@ -20,7 +20,7 @@
 ## Deploy
 
 ```sh
-$ cd incubator-apisix-dashboard/compose
+$ cd apisix-dashboard/compose
 
 $ chmod +x ./manager_conf/build.sh
 
diff --git a/compose/gen-config-yaml.sh b/compose/gen-config-yaml.sh
index d9d07d6..374b245 100644
--- a/compose/gen-config-yaml.sh
+++ b/compose/gen-config-yaml.sh
@@ -21,7 +21,7 @@ export etcd_url='http://192.17.5.10:2379'
 
 unamestr=`uname`
 
-wget https://raw.githubusercontent.com/apache/incubator-apisix/master/conf/config.yaml
+wget https://raw.githubusercontent.com/apache/apisix/master/conf/config.yaml
 
 if [[ "$unamestr" == 'Darwin' ]]; then
    sed -i '' -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml
diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx
index 10ea647..703f282 100644
--- a/src/components/Footer/index.tsx
+++ b/src/components/Footer/index.tsx
@@ -25,7 +25,7 @@ export default () => (
       {
         key: 'GitHub',
         title: <GithubOutlined />,
-        href: 'https://github.com/apache/incubator-apisix',
+        href: 'https://github.com/apache/apisix',
         blankTarget: true,
       },
     ]}
diff --git a/src/components/PluginPage/PluginPage.tsx b/src/components/PluginPage/PluginPage.tsx
index 7ecce9e..aee0a7b 100644
--- a/src/components/PluginPage/PluginPage.tsx
+++ b/src/components/PluginPage/PluginPage.tsx
@@ -92,7 +92,7 @@ const PluginPage: React.FC<Props> = ({ data = {}, disabled, onChange }) => {
                   <LinkOutlined
                     onClick={() =>
                       window.open(
-                        `https://github.com/apache/incubator-apisix/blob/master/doc/plugins/${name}.md`,
+                        `https://github.com/apache/apisix/blob/master/doc/plugins/${name}.md`,
                       )
                     }
                   />,
diff --git a/src/components/RightContent/index.tsx b/src/components/RightContent/index.tsx
index 858ffd2..5b89ba7 100644
--- a/src/components/RightContent/index.tsx
+++ b/src/components/RightContent/index.tsx
@@ -55,7 +55,7 @@ const GlobalHeaderRight: React.FC<{}> = () => {
         <span
           className={styles.action}
           onClick={() => {
-            window.location.href = 'https://github.com/apache/incubator-apisix';
+            window.location.href = 'https://github.com/apache/apisix';
           }}
         >
           <QuestionCircleOutlined />