Skip to content

OpenResty/Nginx Gateway for API Monitoring and Management.

License

Notifications You must be signed in to change notification settings

dangdangdotcom/orange

 
 

Repository files navigation

Orange

GitHub release license

中文 | English | Website

A Gateway based on OpenResty(Nginx+lua) for API Monitoring and Management.

Install & Usages

Requirements

  • MySQL v5.5+
  • OpenResty v1.9.7.3+ or Nginx+lua module
    • install OpenResty with --with-http_stub_status_module option
  • Lor Framework please mind:
    • Orange v0.6.1 and versions before v0.6.1 are compatible with lor v0.2.*
    • Orange v0.6.2+ is compatible with lor v0.3.0+

Import the SQL file(e.g. install/orange-v0.7.0.sql) which is adapted to your Orange version into MySQL database named orange.

  • Install luarocks and opm tools
    • The Version of luarocks is higher than LuaRocks 2.2.2
    • Opm tool is integrated in Openresty, it is under the openresty/bin directory

Install and Config

  1. Install dependencies
#cd orange         // Go to the Orange root directory
#opm --install-dir=./ get zhangbao0325/orangelib      //opm download the 3rd packages
#luarocks install luafilesystem         //luarocks install lua dependencies             
#luarocks install luasocket
#luarocks install lrandom
  1. Generate configuration file
#cd conf
#cp orange.conf.example orange.conf
#cp nginx.conf.example nginx.conf

Attention:

  • the directive "store_mysql" in orange.conf should be modified as your mysql configuration,
  • the directive "lua_package_path" should add your lua package installation path of luarocks tool;
  1. script management

use shell scripts (e.g. start.sh) to manage Orange.

  1. CLI tools

In addition to start.sh script, a new cli tool could be utilized to manage Orange. You should install the cli first:

// orange root  directory
# make install  // Installation CLI tools

then, the Orange runtime lua module is installed in /usr/local/orange and an executable command named /usr/local/bin/orange is generated.

Usages

Before starting Orange, you should ensure that the orange.conf and nginx.conf are redefined to satisfy the demands of your project.

  1. script management

Just sh start.sh to start Orange. You could rewrite some other shell scripts as you need.

  1. CLI tool

orange help to check usages:

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

Documents

Find more about Orange on its website. There is only a Chinese version for now.

Docker

https://store.docker.com/community/images/syhily/orange maintained by @syhily

Contributors

See also

The plugin architecture is highly inspired by Kong.

License

MIT

About

OpenResty/Nginx Gateway for API Monitoring and Management.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 36.1%
  • HTML 28.6%
  • JavaScript 25.6%
  • TSQL 8.9%
  • CSS 0.7%
  • Makefile 0.1%