10 Star 43 Fork 14

sumory / orange

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Orange

GitHub release license

中文 | English | Website

Orange 是一个基于 OpenResty 的API网关。除 Nginx 的基本功能外,它还可用于API监控访问控制(鉴权、WAF)流量筛选访问限速AB测试静/动态分流 等。它有以下特性:

  • 提供了一套默认的 Dashboard 用于动态管理各种功能和配置。
  • 提供了API接口用于实现第三方服务(如个性化运维需求第三方Dashboard等)。
  • 可根据规范编写自定义插件扩展 Orange 功能。

安装 & 使用

生产环境安装(不支持 macOS)

1) 安装依赖项

我们推荐使用 luarocks 来安装 Orange,以减少由不同操作系统发行版本中的依赖项扩展引起的问题。

在不同的操作系统上安装 Orange 所必需的系统依赖(openrestyresty-cliluarocks等),请参见:依赖安装文档

2) 安装 Lor Framework

查看Lor Framework官方文档或执行以下命令。

git clone https://github.com/sumory/lor.git
cd lor
sudo make install

3) 安装 Orange

curl -Lo install.sh https://raw.githubusercontent.com/orlabs/orange/master/install/install-orange.sh
sudo sh install.sh

安装过程结束后,输出消息 orange 0.8-0 is now installed in /usr/local/orange/deps (license: MIT) 即说明安装成功。

4) 导入 MySQL

要求:MySQL版本 5.5+

  • 登录到 MySQL 客户端,创建一个 orange 数据库。

  • 导入数据表(/usr/local/orange/conf/orange-v0.8.0.sql)。

  • 修改Orange配位置文件中(/usr/local/orange/conf/orange.confMySQL相关配置。

5) 启动 Orange

sudo orange start

Orange 启动成功后,DashboardAPI server 也随之启动:

  • 通过 http://localhost:9999 访问 Dashboard
  • 通过 http://localhost:7777 访问 API Server

至此,Orange已全部安装并配置完毕,请尽情享受。

开发环境安装(不支持 macOS)

1) 依赖项和Lor

请使用 生产环境安装 方式中的 安装依赖项安装 Lor Framework 方法进行安装。

2) 安装 Orange

git clone https://github.com/orlabs/orange.git
cd orange
sudo make dev

安装过程结束后,输出消息 Stopping after installing dependencies for orange-master 1.0-0 即说明安装成功。

3) 导入 MySQL

请使用 生产环境安装 方式中的 导入 MySQL 方法进行导入。

注意:在开发模式下安装 OrangeMySQL数据表 文件和 Orange配置 文件位于当前项目的 conf文件夹中。

4) 启动 Orange

sudo ./bin/orange start

成功启动 Orange 后的访问方式,请参考:生产环境安装 方式中的 启动 Orange

使用

命令行管理工具

通过命令行工具orange来管理, 执行orange help查看有哪些命令可以使用:

Usage: orange COMMAND [OPTIONS]

The commands are:

start   Start the Orange Gateway
stop    Stop current Orange
reload  Reload the config of Orange
restart Restart Orange
store   Init/Update/Backup Orange store
version Show the version of Orange
help    Show help tips

文档

Docker

https://store.docker.com/community/images/syhily/orange@syhily维护.

贡献者

See also

Orange的插件设计参考自Kong.

License

MIT License

The MIT License (MIT) Copyright (c) 2016 - 2017 sumory.wu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Orange是一个基于OpenResty的API Gateway,提供API及自定义规则的监控和管理,如访问统计、流量切分、API重定向、API鉴权、WEB防火墙等功能 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Lua
1
https://gitee.com/sumory/orange.git
git@gitee.com:sumory/orange.git
sumory
orange
orange
master

搜索帮助

14c37bed 8189591 565d56ea 8189591