Apache ShenYu Docker๏ƒ

Java ๅŽŸ็”ŸAPI็ฝ‘ๅ…ณ,็”จไบŽๆœๅŠกไปฃ็†ใ€ๅ่ฎฎ่ฝฌๆขๅ’ŒAPIๆฒป็†

Docker๏ƒ

Run Apache ShenYu Admin๏ƒ

docker network create shenyu
docker run -d --name shenyu-admin -p 9095:9095 --net shenyu apache/shenyu-admin

Run Apache ShenYu Bootstrap๏ƒ

docker run -d -p 9195:9195 -e "shenyu.local.enabled=true" --net shenyu apache/shenyu-bootstrap
docker run -d --name shenyu-bootstrap -p 9195:9195 -e "shenyu.local.enabled=true" -e SHENYU_SYNC_WEBSOCKET_URLS=ws://shenyu-admin:9095/websocket --net shenyu apache/shenyu-bootstrap

Set router๏ƒ

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": "/**"
        }]
    }]
}'

Runtime Environment๏ƒ

Architecture๏ƒ

https://shenyu.apache.org/assets/images/shenyu-architecture-3d-2b673fe8dfd0ef6a14223ffd00bfe824.png

Screenshots๏ƒ

https://shenyu.apache.org/zh/img/home/2_2.jpg

https://shenyu.apache.org/zh/img/home/2_3.jpg

https://shenyu.apache.org/zh/img/home/2_4.jpg

https://shenyu.apache.org/zh/img/home/2_5.jpg

https://shenyu.apache.org/zh/img/home/2_6.jpg

https://shenyu.apache.org/zh/img/home/2_7.jpg

https://shenyu.apache.org/zh/img/home/2_8.jpg

References๏ƒ