apache/shenyu-bootstrap

Sponsored OSS

By The Apache Software Foundation

Updated 1 day ago

shenyu-bootstrap is the core startup class of apache shenyu gateway, it provides very rich plugins.

Image
Security
Integration & delivery
API management
4

50K+

apache/shenyu-bootstrap repository overview


What is Apache ShenYu

Apache ShenYu dynamic full lifecycle JAVA API gateway with easy scalability and hot-pluggble features.


Apache ShenYu Bootstrap Features

  • ShenYu provides ability such as current limiting, fusing, forwarding, routing, monitoring and so on by its plugins.

  • Support HTTP, RESTFul, WebSocket, Dubbo, gRPC, Tars and Spring Cloud Proxy.

  • Plugin hot plug, users can customize the development.

  • Selectors and rules are dynamically configured for flexible matching.

  • Support for cluster deployment.

  • Support A/B test and grayscale publishing.


Quick Start

NOTE: A simpler deployment method is to use docker-compose, you can refer to: https://shenyu.apache.org/docs/next/deployment/deployment-docker-compose .

Run Apache ShenYu Bootstrap
> docker network create shenyu
> docker pull apache/shenyu-bootstrap
> docker run -d -p 9195:9195 --net shenyu apache/shenyu-bootstrap
Set router
{
  "name" : "Shenyu",
  "data" : "hello world"
}
  • Set routing rules (Standalone)

Add localKey: 123456 to Headers. If you need to customize the localKey, you can use the sha512 tool to generate the key based on plaintext and update the shenyu.local.sha512Key property.

curl --location --request POST 'http://localhost:9195/shenyu/plugin/selectorAndRules' \
--header 'Content-Type: application/json' \
--header 'localKey: 123456' \
--data-raw '{
    "pluginName": "divide",
    "selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8080\"}]",
    "conditionDataList": [{
        "paramType": "uri",
        "operator": "match",
        "paramValue": "/**"
    }],
    "ruleDataList": [{
        "ruleHandler": "{\"loadBalance\":\"random\"}",
        "conditionDataList": [{
            "paramType": "uri",
            "operator": "match",
            "paramValue": "/**"
        }]
    }]
}'
{
  "name" : "Shenyu",
  "data" : "hello world"
}

License

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Tag summary

Content type

Image

Digest

sha256:c5c8a33dd

Size

462.7 MB

Last updated

1 day ago

docker pull apache/shenyu-bootstrap

This week's pulls

Pulls:

109

Jun 29 to Jul 5