Skip to content

Commit

Permalink
docs: enabling MD045 - images with alternate text (#5280)
Browse files Browse the repository at this point in the history
  • Loading branch information
bisakhmondal authored Oct 20, 2021
1 parent b5d72cb commit 1b96444
Show file tree
Hide file tree
Showing 23 changed files with 72 additions and 66 deletions.
1 change: 0 additions & 1 deletion .markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ MD034: false
MD036: false
MD040: false
MD041: false
MD045: false
MD046: false
10 changes: 5 additions & 5 deletions docs/en/latest/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ title: Running APISIX in AWS with AWS CDK

This reference architecture walks you through building **APISIX** as a serverless container API Gateway on top of AWS Fargate with AWS CDK.

![](../../assets/images/aws-fargate-cdk.png)
![Apache APISIX Serverless Architecture](../../assets/images/aws-fargate-cdk.png)

## Generate an AWS CDK project with `projen`

Expand Down Expand Up @@ -208,15 +208,15 @@ Address: 44.226.102.63

Configure the IP addresses returned as your upstream nodes in your **APISIX** dashboard followed by the **Services** and **Routes** configuration. Let's say we have a `/index.php` as the URI for the first route for our first **Service** from the **Upstream** IP addresses.

![](../../assets/images/aws-nlb-ip-addr.png)
![](../../assets/images/aws-define-service.png)
![](../../assets/images/aws-define-route.png)
![upstream with AWS NLB IP addresses](../../assets/images/aws-nlb-ip-addr.png)
![service with created upstream](../../assets/images/aws-define-service.png)
![define route with service and uri](../../assets/images/aws-define-route.png)

## Validation

OK. Let's test the `/index.php` on `{apiSix.ApiSixServiceServiceURL}/index.php`

![](../../assets/images/aws-caddy-php-welcome-page.png)
![Testing Apache APISIX on AWS Fargate](../../assets/images/aws-caddy-php-welcome-page.png)

Now we have been successfully running **APISIX** in AWS Fargate as serverless container API Gateway service.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ title: Integration service discovery registry

When system traffic changes, the number of servers of the upstream service also increases or decreases, or the server needs to be replaced due to its hardware failure. If the gateway maintains upstream service information through configuration, the maintenance costs in the microservices architecture pattern are unpredictable. Furthermore, due to the untimely update of these information, will also bring a certain impact for the business, and the impact of human error operation can not be ignored. So it is very necessary for the gateway to automatically get the latest list of service instances through the service registry。As shown in the figure below:

![](../../assets/images/discovery.png)
![discovery through service registry](../../assets/images/discovery.png)

1. When the service starts, it will report some of its information, such as the service name, IP, port and other information to the registry. The services communicate with the registry using a mechanism such as a heartbeat, and if the registry and the service are unable to communicate for a long time, the instance will be cancel.When the service goes offline, the registry will delete the instance information.
2. The gateway gets service instance information from the registry in near-real time.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/discovery/consul_kv.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ title: consul_kv
For users who used [nginx-upsync-module](https://github.com/weibocom/nginx-upsync-module) and consul key value for service discovery way, as we Weibo Mobile Team, maybe need it.

Thanks to @fatman-x guy, who developed this module, called `consul_kv`, and its worker process data flow is below:
![](https://user-images.githubusercontent.com/548385/107141841-6ced3e00-6966-11eb-8aa4-bc790a4ad113.png)
![consul kv module data flow diagram](https://user-images.githubusercontent.com/548385/107141841-6ced3e00-6966-11eb-8aa4-bc790a4ad113.png)

## Configuration for discovery client

Expand Down
6 changes: 4 additions & 2 deletions docs/en/latest/plugins/hmac-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ title: hmac-auth
- [How To Enable](#how-to-enable)
- [Test Plugin](#test-plugin)
- [generate signature:](#generate-signature)
- [Request body checking](#request-body-checking)
- [Use the generated signature to try the request](#use-the-generated-signature-to-try-the-request)
- [Custom header key](#custom-header-key)
- [Enable request body checking](#enable-request-body-checking)
- [Disable Plugin](#disable-plugin)
- [Generate Signature Examples](#generate-signature-examples)

Expand Down Expand Up @@ -76,10 +78,10 @@ curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f1
The default `keep_headers` is false and `encode_uri_params` is true.

You can visit the dashboard to complete the above operations through the web interface, first add a consumer:
![](../../../assets/images/plugin/hmac-auth-1.png)
![create a consumer](../../../assets/images/plugin/hmac-auth-1.png)

Then add the hmac-auth plugin to the consumer page:
![](../../../assets/images/plugin/hmac-auth-2.png)
![enable hmac plugin](../../../assets/images/plugin/hmac-auth-2.png)

2. add a Route or add a Service, and enable the `hmac-auth` plugin

Expand Down
9 changes: 6 additions & 3 deletions docs/en/latest/plugins/jwt-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ title: jwt-auth

- [**Name**](#name)
- [**Attributes**](#attributes)
- [**API**](#api)
- [**How To Enable**](#how-to-enable)
- [**Test Plugin**](#test-plugin)
- [get the token in `jwt-auth` plugin:](#get-the-token-in-jwt-auth-plugin)
- [try request with token](#try-request-with-token)
- [**Disable Plugin**](#disable-plugin)

## Name
Expand Down Expand Up @@ -111,14 +114,14 @@ You can use [APISIX Dashboard](https://github.com/apache/apisix-dashboard) to co

1. Add a Consumer through the web console:

![](../../../assets/images/plugin/jwt-auth-1.png)
![create a consumer](../../../assets/images/plugin/jwt-auth-1.png)

then add jwt-auth plugin in the Consumer page:
![](../../../assets/images/plugin/jwt-auth-2.png)
![enable jwt plugin](../../../assets/images/plugin/jwt-auth-2.png)

2. Create a Route or Service object and enable the jwt-auth plugin:

![](../../../assets/images/plugin/jwt-auth-3.png)
![enable jwt from route or service](../../../assets/images/plugin/jwt-auth-3.png)

## Test Plugin

Expand Down
4 changes: 2 additions & 2 deletions docs/en/latest/plugins/key-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f1
```

You also can complete the above operation through the web interface, first add a route:
![](../../../assets/images/plugin/key-auth-1.png)
![create a consumer](../../../assets/images/plugin/key-auth-1.png)

Then add key-auth plugin:
![](../../../assets/images/plugin/key-auth-2.png)
![enable key-auth plugin](../../../assets/images/plugin/key-auth-2.png)

2. creates a route or service object, and enable plugin `key-auth`.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/plugins/limit-conn.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
```

You also can complete the above operation through the web interface, first add a route, then add limit-conn plugin:
![](../../../assets/images/plugin/limit-conn-1.png)
![enable limit-conn plugin](../../../assets/images/plugin/limit-conn-1.png)

## Test Plugin

Expand Down
16 changes: 8 additions & 8 deletions docs/en/latest/plugins/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ You can use [APISIX Dashboard](https://github.com/apache/apisix-dashboard) to co

First, add a Route:

![](../../../assets/images/plugin/prometheus-1.png)
![create a route](../../../assets/images/plugin/prometheus-1.png)

Then add prometheus plugin:

![](../../../assets/images/plugin/prometheus-2.png)
![enable prometheus plugin](../../../assets/images/plugin/prometheus-2.png)

## How to fetch the metric data

Expand All @@ -114,9 +114,9 @@ scrape_configs:
And we can check the status at prometheus console:
![](../../../assets/images/plugin/prometheus01.png)
![checking status on prometheus dashboard](../../../assets/images/plugin/prometheus01.png)
![](../../../assets/images/plugin/prometheus02.png)
![prometheus apisix in-depth metric view](../../../assets/images/plugin/prometheus02.png)
## How to specify export uri
Expand All @@ -142,13 +142,13 @@ Downloads [Grafana dashboard meta](https://github.com/apache/apisix/blob/master/

Or you can goto [Grafana official](https://grafana.com/grafana/dashboards/11719) for `Grafana` meta data.

![](../../../assets/images/plugin/grafana-1.png)
![Grafana chart-1](../../../assets/images/plugin/grafana-1.png)

![](../../../assets/images/plugin/grafana-2.png)
![Grafana chart-2](../../../assets/images/plugin/grafana-2.png)

![](../../../assets/images/plugin/grafana-3.png)
![Grafana chart-3](../../../assets/images/plugin/grafana-3.png)

![](../../../assets/images/plugin/grafana-4.png)
![Grafana chart-4](../../../assets/images/plugin/grafana-4.png)

### Available metrics

Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/plugins/response-rewrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ The `response-rewrite` plugin has been disabled now. It works for other plugins.

`ngx.exit` will interrupt the execution of the current request and return status code to Nginx.

![](https://cdn.jsdelivr.net/gh/Miss-you/img/picgo/20201113010623.png)
![ngx.edit tabular overview](https://cdn.jsdelivr.net/gh/Miss-you/img/picgo/20201113010623.png)

However, if you execute `ngx.exit` during the access phase, it only interrupts the request processing phase, and the response phase will still process it, i.e. if you configure the `response-rewrite` plugin, it will force overwriting of your response information (e.g. response status code).
2 changes: 1 addition & 1 deletion docs/en/latest/plugins/sls-logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ hello, world

* check log in ali cloud log service

![](../../../assets/images/plugin/sls-logger-1.png "sls logger view")
![sls logger view](../../../assets/images/plugin/sls-logger-1.png "sls logger view")

## Disable Plugin

Expand Down
4 changes: 2 additions & 2 deletions docs/en/latest/plugins/wolf-rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f
```

You also can complete the above operations through the web interface, first add a consumer:
![](../../../assets/images/plugin/wolf-rbac-1.png)
![add a consumer](../../../assets/images/plugin/wolf-rbac-1.png)

Then add the wolf-rbac plugin to the consumer page:
![](../../../assets/images/plugin/wolf-rbac-2.png)
![enable wolf-rbac plugin](../../../assets/images/plugin/wolf-rbac-2.png)

Notes: The `appid` filled in above needs to already exist in the wolf system.

Expand Down
7 changes: 4 additions & 3 deletions docs/en/latest/plugins/zipkin.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ title: Zipkin
- [**Attributes**](#attributes)
- [**How To Enable**](#how-to-enable)
- [**Test Plugin**](#test-plugin)
- [run the Zipkin instance](#run-the-zipkin-instance)
- [**Disable Plugin**](#disable-plugin)

## Name
Expand Down Expand Up @@ -95,7 +96,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f1

You also can complete the above operation through the web interface, first add a route, then add zipkin plugin:

![](../../../assets/images/plugin/zipkin-1.png)
![enable zipkin plugin](../../../assets/images/plugin/zipkin-1.png)

## Test Plugin

Expand All @@ -121,9 +122,9 @@ Then you can use a browser to access the webUI of Zipkin:
http://127.0.0.1:9411/zipkin
```

![](../../../assets/images/plugin/zipkin-1.jpg)
![zipkin web-ui](../../../assets/images/plugin/zipkin-1.jpg)

![](../../../assets/images/plugin/zipkin-2.jpg)
![zipkin web-ui list view](../../../assets/images/plugin/zipkin-2.jpg)

## Disable Plugin

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/latest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ Apache APISIX 的技术架构如下图所示:
- [Apache APISIX® Go Plugin Runner](https://github.com/apache/apisix-go-plugin-runner/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
- [Apache APISIX® Python Plugin Runner](https://github.com/apache/apisix-python-plugin-runner/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
- **微信公众号**
<br/>![](../../assets/images/OA.jpg)
<br/>![wechat official account](../../assets/images/OA.jpg)
- **微信视频号**
<br/>![](../../assets/images/MA.jpeg)
<br/>![wechat video account](../../assets/images/MA.jpeg)

## 特性

Expand Down
24 changes: 12 additions & 12 deletions docs/zh/latest/discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ title: 集成服务发现注册中心
#
-->

* [摘要](#摘要)
* [当前支持的注册中心](#当前支持的注册中心)
* [如何扩展注册中心?](#如何扩展注册中心)
* [基本步骤](#基本步骤)
* [以 Eureka 举例](#以-eureka-举例)
* [实现 eureka.lua](#实现-eurekalua)
* [Eureka 与 APISIX 之间数据转换逻辑](#eureka-与-apisix-之间数据转换逻辑)
* [注册中心配置](#注册中心配置)
* [初始化服务发现](#初始化服务发现)
* [Eureka 的配置](#eureka-的配置)
* [upstream 配置](#upstream-配置)
- [摘要](#摘要)
- [当前支持的注册中心](#当前支持的注册中心)
- [如何扩展注册中心?](#如何扩展注册中心)
- [基本步骤](#基本步骤)
- [以 Eureka 举例](#以-eureka-举例)
- [实现 eureka.lua](#实现-eurekalua)
- [Eureka 与 APISIX 之间数据转换逻辑](#eureka-与-apisix-之间数据转换逻辑)
- [注册中心配置](#注册中心配置)
- [初始化服务发现](#初始化服务发现)
- [Eureka 的配置](#eureka-的配置)
- [upstream 配置](#upstream-配置)

## 摘要

当业务量发生变化时,需要对上游服务进行扩缩容,或者因服务器硬件故障需要更换服务器。如果网关是通过配置来维护上游服务信息,在微服务架构模式下,其带来的维护成本可想而知。再者因不能及时更新这些信息,也会对业务带来一定的影响,还有人为误操作带来的影响也不可忽视,所以网关非常必要通过服务注册中心动态获取最新的服务实例信息。架构图如下所示:

![](../../assets/images/discovery-cn.png)
![discovery through service registry](../../assets/images/discovery-cn.png)

1. 服务启动时将自身的一些信息,比如服务名、IP、端口等信息上报到注册中心;各个服务与注册中心使用一定机制(例如心跳)通信,如果注册中心与服务长时间无法通信,就会注销该实例;当服务下线时,会删除注册中心的实例信息;
2. 网关会准实时地从注册中心获取服务实例信息;
Expand Down
7 changes: 4 additions & 3 deletions docs/zh/latest/plugins/jwt-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,15 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
你可以使用 [APISIX Dashboard](https://github.com/apache/apisix-dashboard),通过 web 界面来完成上面的操作。

1. 先增加一个 consumer:
![](../../../assets/images/plugin/jwt-auth-1.png)

![create a consumer](../../../assets/images/plugin/jwt-auth-1.png)

然后在 consumer 页面中添加 jwt-auth 插件:
![](../../../assets/images/plugin/jwt-auth-2.png)
![enable jwt plugin](../../../assets/images/plugin/jwt-auth-2.png)

2. 创建 Route 或 Service 对象,并开启 jwt-auth 插件:

![](../../../assets/images/plugin/jwt-auth-3.png)
![enabe jwt from route or service](../../../assets/images/plugin/jwt-auth-3.png)

## 测试插件

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/latest/plugins/key-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f1
```

你也可以通过 web 界面来完成上面的操作,先增加一个 consumer:
![](../../../assets/images/plugin/key-auth-1.png)
![create a consumer](../../../assets/images/plugin/key-auth-1.png)

然后在 consumer 页面中添加 key-auth 插件:
![](../../../assets/images/plugin/key-auth-2.png)
![enable key-auth plugin](../../../assets/images/plugin/key-auth-2.png)

2. 创建 route 或 service 对象,并开启 `key-auth` 插件。

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/limit-conn.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
```

你也可以通过 web 界面来完成上面的操作,先增加一个 route,然后在插件页面中添加 limit-conn 插件:
![](../../../assets/images/plugin/limit-conn-1.png)
![enable limit-conn plugin](../../../assets/images/plugin/limit-conn-1.png)

#### test plugin

Expand Down
16 changes: 8 additions & 8 deletions docs/zh/latest/plugins/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13

先增加一个 Route:

![](../../../assets/images/plugin/prometheus-1.png)
![create a route](../../../assets/images/plugin/prometheus-1.png)

然后在 route 页面中添加 prometheus 插件:

![](../../../assets/images/plugin/prometheus-2.png)
![enable prometheus plugin](../../../assets/images/plugin/prometheus-2.png)

## 如何提取指标数据

Expand All @@ -113,9 +113,9 @@ scrape_configs:
我们也可以在 prometheus 控制台中去检查状态:
![](../../../assets/images/plugin/prometheus01.png)
![checking status on prometheus dashboard](../../../assets/images/plugin/prometheus01.png)
![](../../../assets/images/plugin/prometheus02.png)
![prometheus apisix in-depth metric view](../../../assets/images/plugin/prometheus02.png)
## 如何修改暴露指标的 uri
Expand All @@ -141,13 +141,13 @@ plugin_attr:

你可以到 [Grafana 官方](https://grafana.com/grafana/dashboards/11719) 下载 `Grafana` 元数据.

![](../../../assets/images/plugin/grafana-1.png)
![Grafana chart-1](../../../assets/images/plugin/grafana-1.png)

![](../../../assets/images/plugin/grafana-2.png)
![Grafana chart-2](../../../assets/images/plugin/grafana-2.png)

![](../../../assets/images/plugin/grafana-3.png)
![Grafana chart-3](../../../assets/images/plugin/grafana-3.png)

![](../../../assets/images/plugin/grafana-4.png)
![Grafana chart-4](../../../assets/images/plugin/grafana-4.png)

### 可有的指标

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/response-rewrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f1

`ngx.exit`将中断当前请求的执行,并返回状态码给 Nginx。

![](https://cdn.jsdelivr.net/gh/Miss-you/img/picgo/20201113010623.png)
![ngx.edit tabular overview](https://cdn.jsdelivr.net/gh/Miss-you/img/picgo/20201113010623.png)

但是很多人可能会对`ngx.exit`理解出现偏差,即如果你在`access`阶段执行`ngx.exit`,只是中断了请求处理阶段,响应阶段仍然会处理。比如,如果你配置了`response-rewrite`插件,它会强制覆盖你的响应信息(如响应代码)。
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/sls-logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ hello, world
```

* 查看阿里云日志服务上传记录
![](../../../assets/images/plugin/sls-logger-1.png "阿里云日志服务预览")
![sls logger view](../../../assets/images/plugin/sls-logger-1.png "阿里云日志服务预览")

## 禁用插件

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/latest/plugins/wolf-rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f
```

你也可以通过 web 界面来完成上面的操作,先增加一个 consumer:
![](../../../assets/images/plugin/wolf-rbac-1.png)
![add a consumer](../../../assets/images/plugin/wolf-rbac-1.png)

然后在 consumer 页面中添加 wolf-rbac 插件:
![](../../../assets/images/plugin/wolf-rbac-2.png)
![enable wolf-rbac plugin](../../../assets/images/plugin/wolf-rbac-2.png)

注意: 上面填写的 `appid` 需要在 wolf 控制台中已经存在的.

Expand Down
Loading

0 comments on commit 1b96444

Please sign in to comment.