[GitHub] [incubator-apisix] JohannT9527 opened a new issue #1122: 开启mqtt-proxy插件时检测不到9100端口

2020-02-12 Thread GitBox
JohannT9527 opened a new issue #1122: 开启mqtt-proxy插件时检测不到9100端口
URL: https://github.com/apache/incubator-apisix/issues/1122
 
 
打开stream_proxy 配置后,9100端口并未开启
   
![image](https://user-images.githubusercontent.com/61002378/74411730-f3b42b80-4e76-11ea-94cd-d4023d396d3a.png)
   应该怎么做呢?
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-apisix] membphis closed issue #973: Add protocol header for upstream service

2020-02-12 Thread GitBox
membphis closed issue #973: Add protocol header for upstream service
URL: https://github.com/apache/incubator-apisix/issues/973
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-apisix] membphis commented on a change in pull request #1121: Batch processor implementation to aggregate logs in batch

2020-02-12 Thread GitBox
membphis commented on a change in pull request #1121: Batch processor 
implementation to aggregate logs in batch 
URL: https://github.com/apache/incubator-apisix/pull/1121#discussion_r378637883
 
 

 ##
 File path: lua/apisix/plugins/batch-processor.lua
 ##
 @@ -0,0 +1,179 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core = require("apisix.core")
+local setmetatable = setmetatable
+local timer_at = ngx.timer.at
+local remove = table.remove
+local fmt = string.format
+local ngx_log = ngx.log
+local DEBUG = ngx.DEBUG
+local table = table
+local now = ngx.now
+local type = type
+local Batch_Processor = {}
+local Batch_Processor_mt = {
+__index = Batch_Processor
+}
+local execute_func
+local create_buffer_timer
+
+
+local schema = {
+type = "object",
+properties = {
+name = {type = "string", default = "log buffer"},
+max_retry_count = {type = "integer", minimum = 0, default= 0},
+retry_delay = {type = "integer", minimum = 0, default= 1},
+buffer_duration = {type = "integer", minimum = 1, default= 60}, -- 
maximum age in seconds of the oldest log item in a batch before the batch must 
be transmitted
+inactive_timeout = {type = "integer", minimum = 1, default= 5}, -- 
maximum age in seconds when the buffer will be flushed if inactive
+batch_max_size = {type = "integer", minimum = 1, default= 1000}, -- 
maximum number of entries in a batch before the batch must be transmitted
+}
+}
+
+
+local function schedule_func_exec(batch_processor, delay, batch)
+local hdl, err = timer_at(delay, execute_func, batch_processor, batch)
+if not hdl then
+core.log.error("failed to create process timer: ", err)
+return
+end
+end
+
+
+execute_func = function(premature, batch_processor, batch)
+if premature then
+return
+end
+
+local ok, err = batch_processor.func(batch.entries)
+if ok then
+ngx_log(DEBUG, fmt("Batch Processor[%s] successfully processed the 
entries", batch_processor.name))
+
+else
+batch.retry_count = batch.retry_count + 1
+if batch.retry_count < batch_processor.max_retry_count then
+core.log.warn(fmt("Batch Processor[%s] failed to process entries: 
", batch_processor.name), err)
+schedule_func_exec(batch_processor, batch_processor.retry_delay, 
batch)
+else
+core.log.error(fmt("Batch Processor[%s] exceeded the 
max_retry_count[%d], dropping the entries", batch_processor.name, 
batch.retry_count))
+end
+end
+end
+
+
+local function flush_buffer(premature, batch_processor)
+
 
 Review comment:
   please remove this useless blank line


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-apisix] membphis commented on a change in pull request #1121: Batch processor implementation to aggregate logs in batch

2020-02-12 Thread GitBox
membphis commented on a change in pull request #1121: Batch processor 
implementation to aggregate logs in batch 
URL: https://github.com/apache/incubator-apisix/pull/1121#discussion_r378644301
 
 

 ##
 File path: lua/apisix/plugins/batch-processor.lua
 ##
 @@ -0,0 +1,179 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core = require("apisix.core")
+local setmetatable = setmetatable
+local timer_at = ngx.timer.at
+local remove = table.remove
+local fmt = string.format
+local ngx_log = ngx.log
+local DEBUG = ngx.DEBUG
+local table = table
+local now = ngx.now
+local type = type
+local Batch_Processor = {}
+local Batch_Processor_mt = {
+__index = Batch_Processor
+}
+local execute_func
+local create_buffer_timer
+
+
+local schema = {
+type = "object",
+properties = {
+name = {type = "string", default = "log buffer"},
+max_retry_count = {type = "integer", minimum = 0, default= 0},
+retry_delay = {type = "integer", minimum = 0, default= 1},
+buffer_duration = {type = "integer", minimum = 1, default= 60}, -- 
maximum age in seconds of the oldest log item in a batch before the batch must 
be transmitted
+inactive_timeout = {type = "integer", minimum = 1, default= 5}, -- 
maximum age in seconds when the buffer will be flushed if inactive
+batch_max_size = {type = "integer", minimum = 1, default= 1000}, -- 
maximum number of entries in a batch before the batch must be transmitted
+}
+}
+
+
+local function schedule_func_exec(batch_processor, delay, batch)
+local hdl, err = timer_at(delay, execute_func, batch_processor, batch)
+if not hdl then
+core.log.error("failed to create process timer: ", err)
+return
+end
+end
+
+
+execute_func = function(premature, batch_processor, batch)
+if premature then
+return
+end
+
+local ok, err = batch_processor.func(batch.entries)
+if ok then
+ngx_log(DEBUG, fmt("Batch Processor[%s] successfully processed the 
entries", batch_processor.name))
+
+else
+batch.retry_count = batch.retry_count + 1
+if batch.retry_count < batch_processor.max_retry_count then
+core.log.warn(fmt("Batch Processor[%s] failed to process entries: 
", batch_processor.name), err)
+schedule_func_exec(batch_processor, batch_processor.retry_delay, 
batch)
+else
+core.log.error(fmt("Batch Processor[%s] exceeded the 
max_retry_count[%d], dropping the entries", batch_processor.name, 
batch.retry_count))
+end
+end
+end
+
+
+local function flush_buffer(premature, batch_processor)
+
+if premature then
+return
+end
+
+if now() - batch_processor.last_entry_t >= 
batch_processor.inactive_timeout or
+now() - batch_processor.first_entry_t >= 
batch_processor.buffer_duration then
+ngx_log(DEBUG, fmt("BatchProcessor[%s] buffer duration exceeded, 
activating buffer flush", batch_processor.name))
+batch_processor:process_buffer()
+batch_processor.isTimerRunning = false
+return
+end
+
+-- buffer duration did not exceed or the buffer is active, extending the 
timer
+ngx_log(DEBUG, fmt("BatchProcessor[%s] extending buffer timer", 
batch_processor.name))
+create_buffer_timer(batch_processor)
+end
+
+
+create_buffer_timer = function(batch_processor)
+local hdl, err = timer_at(batch_processor.inactive_timeout, flush_buffer, 
batch_processor)
+if not hdl then
+core.log.error("failed to create buffer timer: ", err)
+return
+end
+batch_processor.isTimerRunning = true
+end
+
+
+function Batch_Processor:new(func, config)
+local ok, err = core.schema.check(schema, config)
+
+if not ok then
+return err
+end
+
+if not(type(func) == "function") then
+return nil, "Invalid argument, arg #1 must be a function"
+end
+
+local batch_processor = {
+func = func,
+buffer_duration = config.buffer_duration,
+inactive_timeout = config.inactive_timeout,
+max_retry_count = config.max_retry_count,
+batch_max_size = config.batch_max_size,
+retry_delay = config.retry_delay,
+name 

[GitHub] [incubator-apisix] membphis commented on a change in pull request #1121: Batch processor implementation to aggregate logs in batch

2020-02-12 Thread GitBox
membphis commented on a change in pull request #1121: Batch processor 
implementation to aggregate logs in batch 
URL: https://github.com/apache/incubator-apisix/pull/1121#discussion_r378637750
 
 

 ##
 File path: lua/apisix/plugins/batch-processor.lua
 ##
 @@ -0,0 +1,179 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core = require("apisix.core")
+local setmetatable = setmetatable
+local timer_at = ngx.timer.at
+local remove = table.remove
+local fmt = string.format
+local ngx_log = ngx.log
+local DEBUG = ngx.DEBUG
+local table = table
+local now = ngx.now
+local type = type
+local Batch_Processor = {}
+local Batch_Processor_mt = {
+__index = Batch_Processor
+}
+local execute_func
+local create_buffer_timer
+
+
+local schema = {
+type = "object",
+properties = {
+name = {type = "string", default = "log buffer"},
+max_retry_count = {type = "integer", minimum = 0, default= 0},
+retry_delay = {type = "integer", minimum = 0, default= 1},
+buffer_duration = {type = "integer", minimum = 1, default= 60}, -- 
maximum age in seconds of the oldest log item in a batch before the batch must 
be transmitted
+inactive_timeout = {type = "integer", minimum = 1, default= 5}, -- 
maximum age in seconds when the buffer will be flushed if inactive
+batch_max_size = {type = "integer", minimum = 1, default= 1000}, -- 
maximum number of entries in a batch before the batch must be transmitted
+}
+}
+
+
+local function schedule_func_exec(batch_processor, delay, batch)
+local hdl, err = timer_at(delay, execute_func, batch_processor, batch)
+if not hdl then
+core.log.error("failed to create process timer: ", err)
+return
+end
+end
+
+
+execute_func = function(premature, batch_processor, batch)
+if premature then
+return
+end
+
+local ok, err = batch_processor.func(batch.entries)
+if ok then
+ngx_log(DEBUG, fmt("Batch Processor[%s] successfully processed the 
entries", batch_processor.name))
+
+else
+batch.retry_count = batch.retry_count + 1
+if batch.retry_count < batch_processor.max_retry_count then
+core.log.warn(fmt("Batch Processor[%s] failed to process entries: 
", batch_processor.name), err)
+schedule_func_exec(batch_processor, batch_processor.retry_delay, 
batch)
+else
+core.log.error(fmt("Batch Processor[%s] exceeded the 
max_retry_count[%d], dropping the entries", batch_processor.name, 
batch.retry_count))
+end
+end
+end
+
+
+local function flush_buffer(premature, batch_processor)
+
+if premature then
+return
+end
+
+if now() - batch_processor.last_entry_t >= 
batch_processor.inactive_timeout or
+now() - batch_processor.first_entry_t >= 
batch_processor.buffer_duration then
+ngx_log(DEBUG, fmt("BatchProcessor[%s] buffer duration exceeded, 
activating buffer flush", batch_processor.name))
 
 Review comment:
   change to `core.log.debug(...)`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-apisix] membphis commented on a change in pull request #1121: Batch processor implementation to aggregate logs in batch

2020-02-12 Thread GitBox
membphis commented on a change in pull request #1121: Batch processor 
implementation to aggregate logs in batch 
URL: https://github.com/apache/incubator-apisix/pull/1121#discussion_r378637838
 
 

 ##
 File path: lua/apisix/plugins/batch-processor.lua
 ##
 @@ -0,0 +1,179 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core = require("apisix.core")
+local setmetatable = setmetatable
+local timer_at = ngx.timer.at
+local remove = table.remove
+local fmt = string.format
+local ngx_log = ngx.log
+local DEBUG = ngx.DEBUG
+local table = table
+local now = ngx.now
+local type = type
+local Batch_Processor = {}
+local Batch_Processor_mt = {
+__index = Batch_Processor
+}
+local execute_func
+local create_buffer_timer
+
+
+local schema = {
+type = "object",
+properties = {
+name = {type = "string", default = "log buffer"},
+max_retry_count = {type = "integer", minimum = 0, default= 0},
+retry_delay = {type = "integer", minimum = 0, default= 1},
+buffer_duration = {type = "integer", minimum = 1, default= 60}, -- 
maximum age in seconds of the oldest log item in a batch before the batch must 
be transmitted
+inactive_timeout = {type = "integer", minimum = 1, default= 5}, -- 
maximum age in seconds when the buffer will be flushed if inactive
+batch_max_size = {type = "integer", minimum = 1, default= 1000}, -- 
maximum number of entries in a batch before the batch must be transmitted
+}
+}
+
+
+local function schedule_func_exec(batch_processor, delay, batch)
+local hdl, err = timer_at(delay, execute_func, batch_processor, batch)
+if not hdl then
+core.log.error("failed to create process timer: ", err)
+return
+end
+end
+
+
+execute_func = function(premature, batch_processor, batch)
+if premature then
+return
+end
+
+local ok, err = batch_processor.func(batch.entries)
+if ok then
+ngx_log(DEBUG, fmt("Batch Processor[%s] successfully processed the 
entries", batch_processor.name))
+
+else
+batch.retry_count = batch.retry_count + 1
+if batch.retry_count < batch_processor.max_retry_count then
+core.log.warn(fmt("Batch Processor[%s] failed to process entries: 
", batch_processor.name), err)
+schedule_func_exec(batch_processor, batch_processor.retry_delay, 
batch)
+else
+core.log.error(fmt("Batch Processor[%s] exceeded the 
max_retry_count[%d], dropping the entries", batch_processor.name, 
batch.retry_count))
+end
+end
+end
+
+
+local function flush_buffer(premature, batch_processor)
+
+if premature then
+return
+end
+
+if now() - batch_processor.last_entry_t >= 
batch_processor.inactive_timeout or
+now() - batch_processor.first_entry_t >= 
batch_processor.buffer_duration then
+ngx_log(DEBUG, fmt("BatchProcessor[%s] buffer duration exceeded, 
activating buffer flush", batch_processor.name))
+batch_processor:process_buffer()
+batch_processor.isTimerRunning = false
+return
+end
+
+-- buffer duration did not exceed or the buffer is active, extending the 
timer
+ngx_log(DEBUG, fmt("BatchProcessor[%s] extending buffer timer", 
batch_processor.name))
 
 Review comment:
   ditto


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-apisix] membphis commented on a change in pull request #1121: Batch processor implementation to aggregate logs in batch

2020-02-12 Thread GitBox
membphis commented on a change in pull request #1121: Batch processor 
implementation to aggregate logs in batch 
URL: https://github.com/apache/incubator-apisix/pull/1121#discussion_r378643680
 
 

 ##
 File path: lua/apisix/plugins/batch-processor.lua
 ##
 @@ -0,0 +1,179 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core = require("apisix.core")
+local setmetatable = setmetatable
+local timer_at = ngx.timer.at
+local remove = table.remove
+local fmt = string.format
+local ngx_log = ngx.log
+local DEBUG = ngx.DEBUG
+local table = table
+local now = ngx.now
+local type = type
+local Batch_Processor = {}
+local Batch_Processor_mt = {
+__index = Batch_Processor
+}
+local execute_func
+local create_buffer_timer
+
+
+local schema = {
+type = "object",
+properties = {
+name = {type = "string", default = "log buffer"},
+max_retry_count = {type = "integer", minimum = 0, default= 0},
+retry_delay = {type = "integer", minimum = 0, default= 1},
+buffer_duration = {type = "integer", minimum = 1, default= 60}, -- 
maximum age in seconds of the oldest log item in a batch before the batch must 
be transmitted
+inactive_timeout = {type = "integer", minimum = 1, default= 5}, -- 
maximum age in seconds when the buffer will be flushed if inactive
+batch_max_size = {type = "integer", minimum = 1, default= 1000}, -- 
maximum number of entries in a batch before the batch must be transmitted
+}
+}
+
+
+local function schedule_func_exec(batch_processor, delay, batch)
+local hdl, err = timer_at(delay, execute_func, batch_processor, batch)
+if not hdl then
+core.log.error("failed to create process timer: ", err)
+return
+end
+end
+
+
+execute_func = function(premature, batch_processor, batch)
+if premature then
+return
+end
+
+local ok, err = batch_processor.func(batch.entries)
+if ok then
+ngx_log(DEBUG, fmt("Batch Processor[%s] successfully processed the 
entries", batch_processor.name))
+
+else
+batch.retry_count = batch.retry_count + 1
+if batch.retry_count < batch_processor.max_retry_count then
+core.log.warn(fmt("Batch Processor[%s] failed to process entries: 
", batch_processor.name), err)
+schedule_func_exec(batch_processor, batch_processor.retry_delay, 
batch)
+else
+core.log.error(fmt("Batch Processor[%s] exceeded the 
max_retry_count[%d], dropping the entries", batch_processor.name, 
batch.retry_count))
+end
+end
+end
+
+
+local function flush_buffer(premature, batch_processor)
+
+if premature then
+return
+end
+
+if now() - batch_processor.last_entry_t >= 
batch_processor.inactive_timeout or
+now() - batch_processor.first_entry_t >= 
batch_processor.buffer_duration then
+ngx_log(DEBUG, fmt("BatchProcessor[%s] buffer duration exceeded, 
activating buffer flush", batch_processor.name))
+batch_processor:process_buffer()
+batch_processor.isTimerRunning = false
+return
+end
+
+-- buffer duration did not exceed or the buffer is active, extending the 
timer
+ngx_log(DEBUG, fmt("BatchProcessor[%s] extending buffer timer", 
batch_processor.name))
+create_buffer_timer(batch_processor)
+end
+
+
+create_buffer_timer = function(batch_processor)
+local hdl, err = timer_at(batch_processor.inactive_timeout, flush_buffer, 
batch_processor)
+if not hdl then
+core.log.error("failed to create buffer timer: ", err)
+return
+end
+batch_processor.isTimerRunning = true
+end
+
+
+function Batch_Processor:new(func, config)
+local ok, err = core.schema.check(schema, config)
+
+if not ok then
+return err
+end
+
+if not(type(func) == "function") then
+return nil, "Invalid argument, arg #1 must be a function"
+end
+
+local batch_processor = {
+func = func,
+buffer_duration = config.buffer_duration,
+inactive_timeout = config.inactive_timeout,
+max_retry_count = config.max_retry_count,
+batch_max_size = config.batch_max_size,
+retry_delay = config.retry_delay,
+name 

[GitHub] [incubator-apisix] membphis commented on a change in pull request #1121: Batch processor implementation to aggregate logs in batch

2020-02-12 Thread GitBox
membphis commented on a change in pull request #1121: Batch processor 
implementation to aggregate logs in batch 
URL: https://github.com/apache/incubator-apisix/pull/1121#discussion_r378638012
 
 

 ##
 File path: lua/apisix/plugins/batch-processor.lua
 ##
 @@ -0,0 +1,179 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core = require("apisix.core")
+local setmetatable = setmetatable
+local timer_at = ngx.timer.at
+local remove = table.remove
+local fmt = string.format
+local ngx_log = ngx.log
+local DEBUG = ngx.DEBUG
+local table = table
+local now = ngx.now
+local type = type
+local Batch_Processor = {}
+local Batch_Processor_mt = {
+__index = Batch_Processor
+}
+local execute_func
+local create_buffer_timer
+
+
+local schema = {
+type = "object",
+properties = {
+name = {type = "string", default = "log buffer"},
+max_retry_count = {type = "integer", minimum = 0, default= 0},
+retry_delay = {type = "integer", minimum = 0, default= 1},
+buffer_duration = {type = "integer", minimum = 1, default= 60}, -- 
maximum age in seconds of the oldest log item in a batch before the batch must 
be transmitted
+inactive_timeout = {type = "integer", minimum = 1, default= 5}, -- 
maximum age in seconds when the buffer will be flushed if inactive
+batch_max_size = {type = "integer", minimum = 1, default= 1000}, -- 
maximum number of entries in a batch before the batch must be transmitted
+}
+}
+
+
+local function schedule_func_exec(batch_processor, delay, batch)
+local hdl, err = timer_at(delay, execute_func, batch_processor, batch)
+if not hdl then
+core.log.error("failed to create process timer: ", err)
+return
+end
+end
+
+
+execute_func = function(premature, batch_processor, batch)
+if premature then
+return
+end
+
+local ok, err = batch_processor.func(batch.entries)
+if ok then
+ngx_log(DEBUG, fmt("Batch Processor[%s] successfully processed the 
entries", batch_processor.name))
+
+else
+batch.retry_count = batch.retry_count + 1
+if batch.retry_count < batch_processor.max_retry_count then
+core.log.warn(fmt("Batch Processor[%s] failed to process entries: 
", batch_processor.name), err)
+schedule_func_exec(batch_processor, batch_processor.retry_delay, 
batch)
+else
+core.log.error(fmt("Batch Processor[%s] exceeded the 
max_retry_count[%d], dropping the entries", batch_processor.name, 
batch.retry_count))
+end
+end
+end
+
+
+local function flush_buffer(premature, batch_processor)
+
+if premature then
+return
+end
+
+if now() - batch_processor.last_entry_t >= 
batch_processor.inactive_timeout or
+now() - batch_processor.first_entry_t >= 
batch_processor.buffer_duration then
+ngx_log(DEBUG, fmt("BatchProcessor[%s] buffer duration exceeded, 
activating buffer flush", batch_processor.name))
+batch_processor:process_buffer()
+batch_processor.isTimerRunning = false
+return
+end
+
+-- buffer duration did not exceed or the buffer is active, extending the 
timer
+ngx_log(DEBUG, fmt("BatchProcessor[%s] extending buffer timer", 
batch_processor.name))
+create_buffer_timer(batch_processor)
+end
+
+
+create_buffer_timer = function(batch_processor)
 
 Review comment:
   code style: `local function create_buffer_timer()`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-apisix] membphis commented on a change in pull request #1121: Batch processor implementation to aggregate logs in batch

2020-02-12 Thread GitBox
membphis commented on a change in pull request #1121: Batch processor 
implementation to aggregate logs in batch 
URL: https://github.com/apache/incubator-apisix/pull/1121#discussion_r378643354
 
 

 ##
 File path: lua/apisix/plugins/batch-processor.lua
 ##
 @@ -0,0 +1,179 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core = require("apisix.core")
+local setmetatable = setmetatable
+local timer_at = ngx.timer.at
+local remove = table.remove
+local fmt = string.format
+local ngx_log = ngx.log
+local DEBUG = ngx.DEBUG
+local table = table
+local now = ngx.now
+local type = type
+local Batch_Processor = {}
+local Batch_Processor_mt = {
+__index = Batch_Processor
+}
+local execute_func
+local create_buffer_timer
+
+
+local schema = {
+type = "object",
+properties = {
+name = {type = "string", default = "log buffer"},
+max_retry_count = {type = "integer", minimum = 0, default= 0},
+retry_delay = {type = "integer", minimum = 0, default= 1},
+buffer_duration = {type = "integer", minimum = 1, default= 60}, -- 
maximum age in seconds of the oldest log item in a batch before the batch must 
be transmitted
+inactive_timeout = {type = "integer", minimum = 1, default= 5}, -- 
maximum age in seconds when the buffer will be flushed if inactive
+batch_max_size = {type = "integer", minimum = 1, default= 1000}, -- 
maximum number of entries in a batch before the batch must be transmitted
+}
+}
+
+
+local function schedule_func_exec(batch_processor, delay, batch)
+local hdl, err = timer_at(delay, execute_func, batch_processor, batch)
+if not hdl then
+core.log.error("failed to create process timer: ", err)
+return
+end
+end
+
+
+execute_func = function(premature, batch_processor, batch)
+if premature then
+return
+end
+
+local ok, err = batch_processor.func(batch.entries)
+if ok then
+ngx_log(DEBUG, fmt("Batch Processor[%s] successfully processed the 
entries", batch_processor.name))
+
+else
+batch.retry_count = batch.retry_count + 1
+if batch.retry_count < batch_processor.max_retry_count then
+core.log.warn(fmt("Batch Processor[%s] failed to process entries: 
", batch_processor.name), err)
+schedule_func_exec(batch_processor, batch_processor.retry_delay, 
batch)
+else
+core.log.error(fmt("Batch Processor[%s] exceeded the 
max_retry_count[%d], dropping the entries", batch_processor.name, 
batch.retry_count))
+end
+end
+end
+
+
+local function flush_buffer(premature, batch_processor)
+
+if premature then
+return
+end
+
+if now() - batch_processor.last_entry_t >= 
batch_processor.inactive_timeout or
+now() - batch_processor.first_entry_t >= 
batch_processor.buffer_duration then
+ngx_log(DEBUG, fmt("BatchProcessor[%s] buffer duration exceeded, 
activating buffer flush", batch_processor.name))
+batch_processor:process_buffer()
+batch_processor.isTimerRunning = false
+return
+end
+
+-- buffer duration did not exceed or the buffer is active, extending the 
timer
+ngx_log(DEBUG, fmt("BatchProcessor[%s] extending buffer timer", 
batch_processor.name))
+create_buffer_timer(batch_processor)
+end
+
+
+create_buffer_timer = function(batch_processor)
+local hdl, err = timer_at(batch_processor.inactive_timeout, flush_buffer, 
batch_processor)
+if not hdl then
+core.log.error("failed to create buffer timer: ", err)
+return
+end
+batch_processor.isTimerRunning = true
+end
+
+
+function Batch_Processor:new(func, config)
+local ok, err = core.schema.check(schema, config)
+
+if not ok then
+return err
+end
+
+if not(type(func) == "function") then
+return nil, "Invalid argument, arg #1 must be a function"
+end
+
+local batch_processor = {
+func = func,
+buffer_duration = config.buffer_duration,
+inactive_timeout = config.inactive_timeout,
+max_retry_count = config.max_retry_count,
+batch_max_size = config.batch_max_size,
+retry_delay = config.retry_delay,
+name 

[GitHub] [incubator-apisix] membphis commented on a change in pull request #1121: Batch processor implementation to aggregate logs in batch

2020-02-12 Thread GitBox
membphis commented on a change in pull request #1121: Batch processor 
implementation to aggregate logs in batch 
URL: https://github.com/apache/incubator-apisix/pull/1121#discussion_r378644474
 
 

 ##
 File path: t/plugin/batch-processor-refac.t
 ##
 @@ -0,0 +1,374 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+use t::APISIX 'no_plan';
+
+log_level('debug');
+repeat_each(1);
+no_long_string();
+no_root_location();
+run_tests;
+
+__DATA__
+
+=== TEST 1: wrong configuration parameters
+--- config
+location /t {
+content_by_lua_block {
+local Batch = require("apisix.plugins.batch-processor")
+local func_to_send = function(elements)
+return true
+end
+
+local config = {
+max_retry_count  = 2,
+batch_max_size = 1,
+process_delay  = 0,
+retry_delay  = 0,
+}
+
+local log_buffer, err = Batch:new("", config)
+
+if log_buffer then
+log_buffer:push({hello='world'})
+ngx.say("done")
+end
+
+if not log_buffer then
+ngx.say("failed")
+end
+
+}
+}
+--- request
+GET /t
+--- response_body
+failed
+--- wait: 0.5
+
+
+=== TEST 2: sanity
+--- config
+location /t {
+content_by_lua_block {
+local Batch = require("apisix.plugins.batch-processor")
+local func_to_send = function(elements)
+return true
+end
+
+local config = {
+max_retry_count  = 2,
+batch_max_size = 1,
+process_delay  = 0,
+retry_delay  = 0,
+}
+
+local log_buffer, err = Batch:new(func_to_send, config)
+
+if not log_buffer then
+ngx.say(err)
+end
+
+log_buffer:push({hello='world'})
+ngx.say("done")
+}
+}
+--- request
+GET /t
+--- response_body
+done
+--- error_log
+Batch Processor[log buffer] successfully processed the entries
+--- wait: 0.5
+
+=== TEST 3: batch processor timeout exceeded
 
 Review comment:
   
https://github.com/apache/incubator-apisix/blob/fda20d99d55d91905622b9d780e4dce79d128e76/Contributing.md#check-code-style-and-test-case-style
   
   check your code style and test case style


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-apisix] agile6v commented on issue #973: Add protocol header for upstream service

2020-02-12 Thread GitBox
agile6v commented on issue #973: Add protocol header for upstream service
URL: 
https://github.com/apache/incubator-apisix/issues/973#issuecomment-585234839
 
 
   This issue has been fixed by #1113 .


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-apisix-website] branch asf-site updated: Publishing to asf-site (publish.sh)

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 9f8a1b3  Publishing to asf-site (publish.sh)
9f8a1b3 is described below

commit 9f8a1b3689f0eacf4304bc60318828070597ec60
Author: juzhiyuan 
AuthorDate: Wed Feb 12 16:28:09 2020 +0800

Publishing to asf-site (publish.sh)
---
 contribute/release/index.html| 215 +++
 zh/contribute/release/index.html | 215 +++
 2 files changed, 430 insertions(+)

diff --git a/contribute/release/index.html b/contribute/release/index.html
index 970fcb1..4778ff1 100644
--- a/contribute/release/index.html
+++ b/contribute/release/index.html
@@ -307,6 +307,221 @@ GnuPG-2.x可使用:
 
 
 pool.sks-keyservers.net为随意挑选的https://sks-keyservers.net/status/; 
target="_blank">公钥服务器,每个服务器之间是自动同步的,选任意一个即可。
+id.apache.org 中录入 Key Fingerprint
+获取 Key Fingerprint
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+
+
+# 注意下方 Key fingerprint 部分
+$ gpg --list-keys --fingerprint
+/home/resty/.gnupg/pubring.gpg
+--
+pub   4096R/30B5FD72 2020-01-02
+  Key fingerprint = 0F91 BE0A 55A7 B22F DE1A  CEEC 
3352 48uid  Yuansheng Wang 
membphis@apache.org
+sub   4096R/3D2F913D 2020-01-02
+
+
+
+登录 id.apache.org 填写 Key Fingerprint
+点击左下角的 Submit changes... 按钮提交保存。
+Apache svn 中添加自己的 GPG 公钥
+下载 svn 目录
+
+
+1
+2
+
+
+$ svn --username=${Apache 用户名} 
 [...]
+
+
+
+进入 apisix 目录并查看其中文件:
+
+
+1
+2
+3
+4
+
+
+$ cd apisix 
+$ ls
+KEYS
+
+
+
+导出公钥到追加到 KEYS 文件:
+
+
+1
+2
+
+
+$ gpg -a --export ${GPG用户名
+
+
+提交修改后的 KEYS 文件,把公钥信息保存到 svn 服务器:
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+
+
+$ svn --username=${Apache 用户名} 
 [...]
+Authentication realm: https://dist.apache.org:443 ASF Committers
+Password for 
membphis: # 输入密码
+Store password unencrypted (yes/no)? yes
+SendingKEYS
+Transmitting file data .
+Committed revision 37434.
+
+
+
+制作安装包并上传到 Apache svn
+每个安装包都有版本,这里以准备 1.0-rc1 版本为例。在制作安装包之前,先确保在 github 上已经准备好分支 v1.0。
+
+
+ 1
+ 
2
+ 
3
+ 
4
+ 
5
+ 
6
+ 
7
+ 
8
+ 
9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+
+
+# 进入 Apache svn 的 apisix 目录,$ ls
+KEYS
+
+# 新建版本号目录并进入,比如:1.0-rc1
+$ mkdir 1.0-rc1  cd 
1.0-rc1 
+
+# 下载安装包
+git clone -b v1.0 git@github.com:apache/# 检查版本号
+$ cd apache-apisix-1.0-incubating 
 ./uti [...]
+
+# 删除 .git 文件夹
+$ rm -rf apache-apisix-1.0-incubating/.# 制作压缩包
+$ tar zcvf apache-apisix-1.0-rc1-incubating [...]
+
+# 制作签名(这步会弹出对话框,提示你输入生成 gpg 
时录入的密码)
+$ gpg --armor --detach-sign apache-apisix-< [...]
+
+# 生成 sha512 校验文件
+$ shasum -a512 apache-apisix-1.0-rc1-# 删除 apache-apisix-1.0-rc1-incubating
+$ rm -rf apache-apisix-1.0-incubating
+
+# 后退到 Apache 
svn 的 
apisix 根目录,并确认文件目录
+$ cd ..  tree
+.
+├── 1.0-rc1
+│   ├── apache-apisix-1.0-rc1-incubating│   ├── apache-apisix-1.0-rc1-incubating│   └── apache-apisix-1.0-rc1-incubating└── KEYS
+
+1 directory, 4 
files
+
+# 添加新文件到 svn
+$ svn add *
+A 1.0-rc1
+A  (bin)  1.0-rc1/apache-apisix-1.0-rc1< [...]
+A  (bin)  1.0-rc1/apache-apisix-1.0-rc1< [...]
+A 1.0-rc1/apache-apisix-1.0-rc1- [...]
+svn: warning: W150002: /home/resty/git/apache [...]
+svn: E29: Could 
not add 
all targets because 
some targets are 
alreadysvn: E29: Illegal target 
for the 
requested operation
+
+# 提交修改到 Apache 
svn 服务器
+$ svn --username=${Apache 用户名} 
commit -m release 1.0-rc [...]
+Adding 1.0-rc1
+Adding  (bin)  1.0-rc1/apache-apisix-1.0-Adding  (bin)  1.0-rc1/apache-apisix-1.0-Adding 1.0-rc1/apache-apisix-1.0-rc1Transmitting file data ...
+Committed revision 37435.
+
+
+
+发投票邮件
+https://lists.apache.org/thread.html/4d45dcbeecd0bb70f8010db3d075a5624817a5783beee66f392ae5e0%40%3Cdev.apisix.apache.org%3E;>点击此处查看参考邮件
 主要参考内容:邮件发送人(apache 邮箱)、邮件标题、邮件正文(主要是修改版本号和链接地址)。
   
 
 
diff --git a/zh/contribute/release/index.html b/zh/contribute/release/index.html
index 806268b..05aee43 100644
--- a/zh/contribute/release/index.html
+++ b/zh/contribute/release/index.html
@@ -307,6 +307,221 @@ GnuPG-2.x可使用:
 
 
 pool.sks-keyservers.net为随意挑选的https://sks-keyservers.net/status/; 
target="_blank">公钥服务器,每个服务器之间是自动同步的,选任意一个即可。
+id.apache.org 中录入 Key Fingerprint
+获取 Key Fingerprint
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+
+
+# 注意下方 Key fingerprint 部分
+$ gpg --list-keys --fingerprint
+/home/resty/.gnupg/pubring.gpg
+--
+pub   4096R/30B5FD72 

[incubator-apisix-website] branch master updated: feat: update release guide

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
 new e61484d  feat: update release guide
e61484d is described below

commit e61484de6a5b52e310a0a5c11a0d69c2308e366c
Author: juzhiyuan 
AuthorDate: Wed Feb 12 16:27:38 2020 +0800

feat: update release guide
---
 content/contribute/release/index.en.md | 102 +
 content/contribute/release/index.zh.md | 102 +
 2 files changed, 204 insertions(+)

diff --git a/content/contribute/release/index.en.md 
b/content/contribute/release/index.en.md
index b48e4c1..980df5c 100644
--- a/content/contribute/release/index.en.md
+++ b/content/contribute/release/index.en.md
@@ -52,5 +52,107 @@ include_footer: true
 gpg: sending key 30B5FD72 to hkp server pool.sks-keyservers.net
 {{< / highlight >}}
 pool.sks-keyservers.net为随意挑选的https://sks-keyservers.net/status/; 
target="_blank">公钥服务器,每个服务器之间是自动同步的,选任意一个即可。
+id.apache.org 中录入 Key Fingerprint
+获取 Key Fingerprint
+{{< highlight go "linenos=table" >}}
+# 注意下方 Key fingerprint 部分
+$ gpg --list-keys --fingerprint
+/home/resty/.gnupg/pubring.gpg
+--
+pub   4096R/30B5FD72 2020-01-02
+  Key fingerprint = 0F91 BE0A 55A7 B22F DE1A  CEEC 3352 48FD 30B5 FD72
+uid  Yuansheng Wang 
+sub   4096R/3D2F913D 2020-01-02
+{{< / highlight >}}
+登录 id.apache.org 填写 Key Fingerprint
+点击左下角的 Submit changes... 按钮提交保存。
+Apache svn 中添加自己的 GPG 公钥
+下载 svn 目录
+{{< highlight go "linenos=table" >}}
+$ svn --username=${Apache 用户名} co 
https://dist.apache.org/repos/dist/dev/incubator/apisix
+{{< / highlight >}}
+进入 apisix 目录并查看其中文件:
+{{< highlight go "linenos=table" >}}
+$ cd apisix 
+$ ls
+KEYS
+{{< / highlight >}}
+导出公钥到追加到 KEYS 文件:
+{{< highlight go "linenos=table" >}}
+$ gpg -a --export ${GPG用户名}  >> KEYS
+{{< / highlight >}}
+提交修改后的 KEYS 文件,把公钥信息保存到 svn 服务器:
+{{< highlight go "linenos=table" >}}
+$ svn --username=${Apache 用户名} commit -m "added ${Apache 邮箱} gpg pub key"
+Authentication realm:  ASF Committers
+Password for 'membphis': # 输入密码
+Store password unencrypted (yes/no)? yes
+SendingKEYS
+Transmitting file data .
+Committed revision 37434.
+{{< / highlight >}}
+制作安装包并上传到 Apache svn
+每个安装包都有版本,这里以准备 1.0-rc1 版本为例。在制作安装包之前,先确保在 github 上已经准备好分支 v1.0。
+{{< highlight go "linenos=table" >}}
+# 进入 Apache svn 的 apisix 目录,应只有一个 KEYS 文件
+$ ls
+KEYS
+
+# 新建版本号目录并进入,比如:1.0-rc1
+$ mkdir 1.0-rc1 && cd 1.0-rc1 
+
+# 下载安装包
+git clone -b v1.0 g...@github.com:apache/incubator-apisix.git 
apache-apisix-1.0-incubating
+
+# 检查版本号
+$ cd apache-apisix-1.0-incubating && ./utils/check-version.sh 1.0 && cd ..
+
+# 删除 .git 文件夹
+$ rm -rf apache-apisix-1.0-incubating/.git
+
+# 制作压缩包
+$ tar zcvf apache-apisix-1.0-rc1-incubating-src.tar.gz 
apache-apisix-1.0-incubating
+
+# 制作签名(这步会弹出对话框,提示你输入生成 gpg 时录入的密码)
+$ gpg --armor --detach-sign apache-apisix-1.0-rc1-incubating-src.tar.gz
+
+# 生成 sha512 校验文件
+$ shasum -a512 apache-apisix-1.0-rc1-incubating-src.tar.gz > 
apache-apisix-1.0-rc1-incubating-src.tar.gz.sha512
+
+# 删除 apache-apisix-1.0-rc1-incubating
+$ rm -rf apache-apisix-1.0-incubating
+
+# 后退到 Apache svn 的 apisix 根目录,并确认文件目录
+$ cd .. && tree
+.
+├── 1.0-rc1
+│   ├── apache-apisix-1.0-rc1-incubating-src.tar.gz
+│   ├── apache-apisix-1.0-rc1-incubating-src.tar.gz.asc
+│   └── apache-apisix-1.0-rc1-incubating-src.tar.gz.sha512
+└── KEYS
+
+1 directory, 4 files
+
+# 添加新文件到 svn
+$ svn add *
+A 1.0-rc1
+A  (bin)  1.0-rc1/apache-apisix-1.0-rc1-incubating-src.tar.gz.asc
+A  (bin)  1.0-rc1/apache-apisix-1.0-rc1-incubating-src.tar.gz
+A 1.0-rc1/apache-apisix-1.0-rc1-incubating-src.tar.gz.sha512
+svn: warning: W150002: '/home/resty/git/apache_svn/apisix/KEYS' is already 
under version control
+svn: E29: Could not add all targets because some targets are already 
versioned
+svn: E29: Illegal target for the requested operation
+
+# 提交修改到 Apache svn 服务器
+$ svn --username=${Apache 用户名} commit -m "release 1.0-rc1"
+Adding 1.0-rc1
+Adding  (bin)  1.0-rc1/apache-apisix-1.0-rc1-incubating-src.tar.gz
+Adding  (bin)  1.0-rc1/apache-apisix-1.0-rc1-incubating-src.tar.gz.asc
+Adding 1.0-rc1/apache-apisix-1.0-rc1-incubating-src.tar.gz.sha512
+Transmitting file data ...
+Committed revision 37435.
+{{< / highlight >}}
+发投票邮件
+

[incubator-apisix-website] branch asf-site updated: Publishing to asf-site (publish.sh)

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new c6ff786  Publishing to asf-site (publish.sh)
c6ff786 is described below

commit c6ff7862655fb5057ffd662dba9c0db1913cf42d
Author: juzhiyuan 
AuthorDate: Wed Feb 12 16:13:58 2020 +0800

Publishing to asf-site (publish.sh)
---
 contribute/release/index.html  |  4 +--
 downloads/index.html   |  4 +--
 en/sitemap.xml | 10 
 index.html |  4 +--
 security/index.html|  4 +--
 zh/contribute/release/index.html   | 16 ++--
 {downloads => zh/downloads}/index.html | 46 +-
 zh/index.html  | 16 ++--
 zh/index.xml   |  9 +++
 zh/security/index.html | 16 ++--
 zh/sitemap.xml | 15 +++
 11 files changed, 89 insertions(+), 55 deletions(-)

diff --git a/contribute/release/index.html b/contribute/release/index.html
index 57e3e13..970fcb1 100644
--- a/contribute/release/index.html
+++ b/contribute/release/index.html
@@ -72,7 +72,7 @@ GnuPG-2.x可使用:
 
 
 
-  
+  
 Release Guide
   
 
@@ -117,7 +117,7 @@ GnuPG-2.x可使用:
   
 
   
-
+
   Release Guide
 
   
diff --git a/downloads/index.html b/downloads/index.html
index ad11c81..460b94c 100644
--- a/downloads/index.html
+++ b/downloads/index.html
@@ -65,7 +65,7 @@
 
 
 
-  
+  
 Release Guide
   
 
@@ -110,7 +110,7 @@
   
 
   
-
+
   Release Guide
 
   
diff --git a/en/sitemap.xml b/en/sitemap.xml
index c2082b3..6aebce4 100644
--- a/en/sitemap.xml
+++ b/en/sitemap.xml
@@ -65,6 +65,16 @@
   
 https://apisix.incubator.apache.org/downloads/
 2019-11-26T23:48:02+08:00
+https://apisix.incubator.apache.org/zh/downloads/;
+/>
+https://apisix.incubator.apache.org/downloads/;
+/>
   
   
   
diff --git a/index.html b/index.html
index 0e48bda..ea32010 100644
--- a/index.html
+++ b/index.html
@@ -67,7 +67,7 @@
 
 
 
-  
+  
 Release Guide
   
 
@@ -112,7 +112,7 @@
   
 
   
-
+
   Release Guide
 
   
diff --git a/security/index.html b/security/index.html
index 33a34b0..fd9ba33 100644
--- a/security/index.html
+++ b/security/index.html
@@ -66,7 +66,7 @@ If you have apprehensions regarding APISIX’s security or you 
discover vulnerab
 
 
 
-  
+  
 Release Guide
   
 
@@ -111,7 +111,7 @@ If you have apprehensions regarding APISIX’s security or 
you discover vulnerab
   
 
   
-
+
   Release Guide
 
   
diff --git a/zh/contribute/release/index.html b/zh/contribute/release/index.html
index 20f3d37..806268b 100644
--- a/zh/contribute/release/index.html
+++ b/zh/contribute/release/index.html
@@ -57,13 +57,13 @@ GnuPG-2.x可使用:
   
 
 
-  
+  
 首页
   
-  
+  
 安全
   
-  
+  
 下载
   
   
@@ -72,7 +72,7 @@ GnuPG-2.x可使用:
 
 
 
-  
+  
 发布指南
   
 
@@ -102,13 +102,13 @@ GnuPG-2.x可使用:
 
 
   
-
+
   首页
 
-
+
   安全
 
-
+
   下载
 
 
@@ -117,7 +117,7 @@ GnuPG-2.x可使用:
   
 
   
-
+
   发布指南
 
   
diff --git a/downloads/index.html b/zh/downloads/index.html
similarity index 94%
copy from downloads/index.html
copy to zh/downloads/index.html
index ad11c81..cd11251 100644
--- a/downloads/index.html
+++ b/zh/downloads/index.html
@@ -3,10 +3,10 @@
   
 
 
-
+
 
 
-https://apisix.incubator.apache.org/downloads/; />
+https://apisix.incubator.apache.org/zh/downloads/; />
 
 
 
@@ -50,28 +50,28 @@
   
 
 
-  
-Home
+  
+首页
   
-  
-Security
+  
+安全
   
-  
-Downloads
+  
+下载
   
   
 
-  Get Involved
+  参与
 
 
 

[incubator-apisix-website] branch master updated: remove dubplicate downloads.md

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
 new b52fcb5  remove dubplicate downloads.md
b52fcb5 is described below

commit b52fcb5596688c6b48794b21ae925f39cd05a135
Author: juzhiyuan 
AuthorDate: Wed Feb 12 16:13:45 2020 +0800

remove dubplicate downloads.md
---
 content/downloads.md | 100 ---
 1 file changed, 100 deletions(-)

diff --git a/content/downloads.md b/content/downloads.md
deleted file mode 100644
index 5c04935..000
--- a/content/downloads.md
+++ /dev/null
@@ -1,100 +0,0 @@

-title: "Downloads"
-date: 2019-11-26T23:48:02+08:00
-include_footer: true

-
-
-  
-Releases
-
-  Apache APISIX is released as source code tarballs. The downloads are 
distributed via mirror sites and should be
-  checked for tampering using GPG or SHA-512.
-
-
-  
-Version
-Release date
-Source download
-  
-  
-0.9
-2019 November 24
-
-  https://dist.apache.org/repos/dist/release/incubator/apisix/0.9/;>source
-  (
-  http://www.apache.org/dist/incubator/apisix/0.9/apache-apisix-0.9-incubating-src.tar.gz.asc;>asc
-  http://www.apache.org/dist/incubator/apisix/0.9/apache-apisix-0.9-incubating-src.tar.gz.sha512;>sha512
-  )
-
-  
-
-  
-  
-Verify the releases
-https://www.apache.org/dist/incubator/apisix/KEYS;>PGP signatures 
KEYS
-
-  It is essential that you verify the integrity of the downloaded files 
using the PGP or SHA signatures. The PGP
-  signatures can be verified using GPG or PGP. Please download the KEYS as 
well as the asc signature files for
-  relevant distribution. It is recommended to get these files from the 
main distribution directory and not from the
-  mirrors.
-
-
-{{< highlight go "linenos=table" >}}
-gpg -i KEYS
-{{< / highlight >}}
-
-
-  or
-
-
-{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
-pgpk -a KEYS
-{{< / highlight >}}
-
-
-  or
-
-
-{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
-pgp -ka KEYS
-{{< / highlight >}}
-
-
-  To verify the binaries/sources you can download the relevant asc files 
for it from main distribution directory and
-  follow the below guide.
-
-
-{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
-gpg --verify apache-apisix-incubating-.asc 
apache-apisix-incubating-*
-{{< / highlight >}}
-
-
-  or
-
-
-{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
-pgpv apache-apisix-incubating-.asc
-{{< / highlight >}}
-
-
-  or
-
-
-{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
-pgp apache-apisix-incubating-.asc
-{{< / highlight >}}
-
-  
-  
-Disclaimer
-
-  Apache APISIX (incubating) is an effort undergoing incubation at The 
Apache Software Foundation (ASF),
-  sponsored by the Apache Incubator PMC. Incubation is required of all 
newly accepted projects until a further
-  review indicates that the infrastructure, communications, and decision 
making process have stabilized in a manner
-  consistent with other successful ASF projects. While incubation status 
is not necessarily a reflection of the
-  completeness or stability of the code, it does indicate that the project 
has yet to be fully endorsed by the ASF.
-
-  
-
\ No newline at end of file



[incubator-apisix-website] branch master updated: fix URL (#18)

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
 new c30a236  fix URL (#18)
c30a236 is described below

commit c30a2368026146965fce25fe43393ebcc72bd78b
Author: 琚致远 
AuthorDate: Wed Feb 12 16:13:00 2020 +0800

fix URL (#18)
---
 config.yaml   |  10 ++---
 content/downloads/index.en.md | 100 ++
 content/downloads/index.zh.md | 100 ++
 public|   1 +
 4 files changed, 206 insertions(+), 5 deletions(-)

diff --git a/config.yaml b/config.yaml
index ad139d4..c17d5c9 100644
--- a/config.yaml
+++ b/config.yaml
@@ -43,7 +43,7 @@ languages:
   - title: Get Involved
 sublinks:
 - title: Release Guide
-  url: contribute/release
+  url: /contribute/release
   language:
 name: 中
 link: /zh
@@ -119,15 +119,15 @@ languages:
 # Customizable navbar. For a dropdown, add a "sublinks" list.
 navbar:
 - title: 首页
-  url: /
+  url: /zh
 - title: 安全
-  url: security
+  url: /zh/security
 - title: 下载
-  url: /downloads
+  url: /zh/downloads
 - title: 参与
   sublinks:
   - title: 发布指南
-url: contribute/release
+url: /zh/contribute/release
 language:
 name: EN
 link: /
diff --git a/content/downloads/index.en.md b/content/downloads/index.en.md
new file mode 100644
index 000..5c04935
--- /dev/null
+++ b/content/downloads/index.en.md
@@ -0,0 +1,100 @@
+---
+title: "Downloads"
+date: 2019-11-26T23:48:02+08:00
+include_footer: true
+---
+
+
+  
+Releases
+
+  Apache APISIX is released as source code tarballs. The downloads are 
distributed via mirror sites and should be
+  checked for tampering using GPG or SHA-512.
+
+
+  
+Version
+Release date
+Source download
+  
+  
+0.9
+2019 November 24
+
+  https://dist.apache.org/repos/dist/release/incubator/apisix/0.9/;>source
+  (
+  http://www.apache.org/dist/incubator/apisix/0.9/apache-apisix-0.9-incubating-src.tar.gz.asc;>asc
+  http://www.apache.org/dist/incubator/apisix/0.9/apache-apisix-0.9-incubating-src.tar.gz.sha512;>sha512
+  )
+
+  
+
+  
+  
+Verify the releases
+https://www.apache.org/dist/incubator/apisix/KEYS;>PGP signatures 
KEYS
+
+  It is essential that you verify the integrity of the downloaded files 
using the PGP or SHA signatures. The PGP
+  signatures can be verified using GPG or PGP. Please download the KEYS as 
well as the asc signature files for
+  relevant distribution. It is recommended to get these files from the 
main distribution directory and not from the
+  mirrors.
+
+
+{{< highlight go "linenos=table" >}}
+gpg -i KEYS
+{{< / highlight >}}
+
+
+  or
+
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
+pgpk -a KEYS
+{{< / highlight >}}
+
+
+  or
+
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
+pgp -ka KEYS
+{{< / highlight >}}
+
+
+  To verify the binaries/sources you can download the relevant asc files 
for it from main distribution directory and
+  follow the below guide.
+
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
+gpg --verify apache-apisix-incubating-.asc 
apache-apisix-incubating-*
+{{< / highlight >}}
+
+
+  or
+
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
+pgpv apache-apisix-incubating-.asc
+{{< / highlight >}}
+
+
+  or
+
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
+pgp apache-apisix-incubating-.asc
+{{< / highlight >}}
+
+  
+  
+Disclaimer
+
+  Apache APISIX (incubating) is an effort undergoing incubation at The 
Apache Software Foundation (ASF),
+  sponsored by the Apache Incubator PMC. Incubation is required of all 
newly accepted projects until a further
+  review indicates that the infrastructure, communications, and decision 
making process have stabilized in a manner
+  consistent with other successful ASF projects. While incubation status 
is not necessarily a reflection of the
+  completeness or stability of the code, it does indicate that the project 
has yet to be fully endorsed by the ASF.
+
+  
+
\ No newline at end of file
diff --git a/content/downloads/index.zh.md b/content/downloads/index.zh.md
new file mode 100644
index 000..e7e9c30
--- /dev/null
+++ b/content/downloads/index.zh.md
@@ -0,0 +1,100 @@
+---
+title: "下载"
+date: 2019-11-26T23:48:02+08:00

[incubator-apisix-website] 01/01: fix URL

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch fix-nav
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git

commit 5a1e74169bf1d15733f0284691c35bc5948d3576
Author: juzhiyuan 
AuthorDate: Wed Feb 12 16:12:35 2020 +0800

fix URL
---
 config.yaml   |  10 ++---
 content/downloads/index.en.md | 100 ++
 content/downloads/index.zh.md | 100 ++
 public|   1 +
 4 files changed, 206 insertions(+), 5 deletions(-)

diff --git a/config.yaml b/config.yaml
index ad139d4..c17d5c9 100644
--- a/config.yaml
+++ b/config.yaml
@@ -43,7 +43,7 @@ languages:
   - title: Get Involved
 sublinks:
 - title: Release Guide
-  url: contribute/release
+  url: /contribute/release
   language:
 name: 中
 link: /zh
@@ -119,15 +119,15 @@ languages:
 # Customizable navbar. For a dropdown, add a "sublinks" list.
 navbar:
 - title: 首页
-  url: /
+  url: /zh
 - title: 安全
-  url: security
+  url: /zh/security
 - title: 下载
-  url: /downloads
+  url: /zh/downloads
 - title: 参与
   sublinks:
   - title: 发布指南
-url: contribute/release
+url: /zh/contribute/release
 language:
 name: EN
 link: /
diff --git a/content/downloads/index.en.md b/content/downloads/index.en.md
new file mode 100644
index 000..5c04935
--- /dev/null
+++ b/content/downloads/index.en.md
@@ -0,0 +1,100 @@
+---
+title: "Downloads"
+date: 2019-11-26T23:48:02+08:00
+include_footer: true
+---
+
+
+  
+Releases
+
+  Apache APISIX is released as source code tarballs. The downloads are 
distributed via mirror sites and should be
+  checked for tampering using GPG or SHA-512.
+
+
+  
+Version
+Release date
+Source download
+  
+  
+0.9
+2019 November 24
+
+  https://dist.apache.org/repos/dist/release/incubator/apisix/0.9/;>source
+  (
+  http://www.apache.org/dist/incubator/apisix/0.9/apache-apisix-0.9-incubating-src.tar.gz.asc;>asc
+  http://www.apache.org/dist/incubator/apisix/0.9/apache-apisix-0.9-incubating-src.tar.gz.sha512;>sha512
+  )
+
+  
+
+  
+  
+Verify the releases
+https://www.apache.org/dist/incubator/apisix/KEYS;>PGP signatures 
KEYS
+
+  It is essential that you verify the integrity of the downloaded files 
using the PGP or SHA signatures. The PGP
+  signatures can be verified using GPG or PGP. Please download the KEYS as 
well as the asc signature files for
+  relevant distribution. It is recommended to get these files from the 
main distribution directory and not from the
+  mirrors.
+
+
+{{< highlight go "linenos=table" >}}
+gpg -i KEYS
+{{< / highlight >}}
+
+
+  or
+
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
+pgpk -a KEYS
+{{< / highlight >}}
+
+
+  or
+
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
+pgp -ka KEYS
+{{< / highlight >}}
+
+
+  To verify the binaries/sources you can download the relevant asc files 
for it from main distribution directory and
+  follow the below guide.
+
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
+gpg --verify apache-apisix-incubating-.asc 
apache-apisix-incubating-*
+{{< / highlight >}}
+
+
+  or
+
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
+pgpv apache-apisix-incubating-.asc
+{{< / highlight >}}
+
+
+  or
+
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=1" >}}
+pgp apache-apisix-incubating-.asc
+{{< / highlight >}}
+
+  
+  
+Disclaimer
+
+  Apache APISIX (incubating) is an effort undergoing incubation at The 
Apache Software Foundation (ASF),
+  sponsored by the Apache Incubator PMC. Incubation is required of all 
newly accepted projects until a further
+  review indicates that the infrastructure, communications, and decision 
making process have stabilized in a manner
+  consistent with other successful ASF projects. While incubation status 
is not necessarily a reflection of the
+  completeness or stability of the code, it does indicate that the project 
has yet to be fully endorsed by the ASF.
+
+  
+
\ No newline at end of file
diff --git a/content/downloads/index.zh.md b/content/downloads/index.zh.md
new file mode 100644
index 000..e7e9c30
--- /dev/null
+++ b/content/downloads/index.zh.md
@@ -0,0 +1,100 @@
+---
+title: "下载"
+date: 2019-11-26T23:48:02+08:00
+include_footer: true
+---
+
+
+  
+Releases
+
+  Apache APISIX is released as source code tarballs. The downloads are 

[GitHub] [incubator-apisix-website] juzhiyuan merged pull request #18: fix URL

2020-02-12 Thread GitBox
juzhiyuan merged pull request #18: fix URL
URL: https://github.com/apache/incubator-apisix-website/pull/18
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-apisix-website] branch fix-nav created (now 5a1e741)

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch fix-nav
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git.


  at 5a1e741  fix URL

This branch includes the following new commits:

 new 5a1e741  fix URL

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[GitHub] [incubator-apisix-website] juzhiyuan opened a new pull request #18: fix URL

2020-02-12 Thread GitBox
juzhiyuan opened a new pull request #18: fix URL
URL: https://github.com/apache/incubator-apisix-website/pull/18
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-apisix-website] branch asf-site updated: Publishing to asf-site (publish.sh)

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 03d9464  Publishing to asf-site (publish.sh)
03d9464 is described below

commit 03d94649b382fce9827e37bbd66dc051bd325b73
Author: juzhiyuan 
AuthorDate: Wed Feb 12 16:06:38 2020 +0800

Publishing to asf-site (publish.sh)
---
 contribute/index.xml   |  30 ++
 contribute/release/index.html  | 422 +
 ...3e2b2e101f99ae09e5af7e801f9f2c6d51f802d9b1.css} |   2 +-
 downloads/index.html   |  24 +-
 en/sitemap.xml |  30 ++
 index.html |  24 +-
 index.xml  |  16 +
 security/index.html|  24 +-
 zh/contribute/index.xml|  30 ++
 zh/contribute/release/index.html   | 422 +
 zh/index.html  |  24 +-
 zh/index.xml   |  16 +
 zh/security/index.html |  24 +-
 zh/sitemap.xml |  30 ++
 14 files changed, 1112 insertions(+), 6 deletions(-)

diff --git a/contribute/index.xml b/contribute/index.xml
new file mode 100644
index 000..43fdd7e
--- /dev/null
+++ b/contribute/index.xml
@@ -0,0 +1,30 @@
+
+http://www.w3.org/2005/Atom;>
+  
+Contributes on Apache APISIX
+https://apisix.incubator.apache.org/contribute/
+Recent content in Contributes on Apache APISIX
+Hugo -- gohugo.io
+Tue, 07 Jan 2020 11:46:04 +0800
+
+   https://apisix.incubator.apache.org/contribute/index.xml; rel="self" 
type="application/rss+xml" />
+
+
+
+  Release Guide
+  https://apisix.incubator.apache.org/contribute/release/
+  Tue, 07 Jan 2020 11:46:04 +0800
+  
+  https://apisix.incubator.apache.org/contribute/release/
+  GPG 设置 安装 GPG 在 GnuPG 官网下载安装包。 GnuPG 的 1.x 版本和 2.x 
版本的命令有细微差别,下列说明以 GnuPG-2.1.23 版本为例。
+安装完成后,执行以下命令查看版本号。
+1 2  gpg --version创建 Key 安装完成后,执行以下命令创建key。
+GnuPG-2.x可使用:
+1 2  gpg --full-gen-keyGnuPG-1.x可使用:
+1 2  gpg --gen-key根据提示完成key:
+注意:请使用Apache mail生成GPG的Key。
+1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
30 31 32 33 34  gpg (GnuPG) 2.
+
+
+  
+
\ No newline at end of file
diff --git a/contribute/release/index.html b/contribute/release/index.html
new file mode 100644
index 000..57e3e13
--- /dev/null
+++ b/contribute/release/index.html
@@ -0,0 +1,422 @@
+
+
+  
+
+
+
+
+
+https://apisix.incubator.apache.org/contribute/release/; />
+
+
+
+
+
+
+
+
+Apache APISIX
+
+
+https://fonts.googleapis.com/css?family=OpenSans:400,600; 
rel="stylesheet">
+
+
+
+  
+  
+
+
+  
+
+
+
+
+
+
+
+  
+
+  
+
+  
+
+  
+
+
+
+  
+
+
+  
+
+
+  
+Home
+  
+  
+Security
+  
+  
+Downloads
+  
+  
+
+  Get Involved
+
+
+
+  
+Release Guide
+  
+
+  
+
+中
+  
+  
+
+
+
+
+
+  
+
+  
+
+  
+
+  
+
+
+
+  
+
+
+
+
+  
+
+  Home
+
+
+  Security
+
+
+  Downloads
+
+
+  
+Get Involved
+  
+
+  
+
+  Release Guide
+
+  
+
+  
+
+  中
+
+
+
+
+
+  
+
+  
+Release Guide
+
+
+  
+
+
+  
+GPG 设置
+
+安装 GPG
+在 GnuPG 官网下载安装包。 GnuPG 的 1.x 版本和 2.x 版本的命令有细微差别,下列说明以 GnuPG-2.1.23 
版本为例。
+安装完成后,执行以下命令查看版本号。
+
+
+1
+2
+
+
+gpg 
--version
+
+
+
+创建 Key
+安装完成后,执行以下命令创建key。
+GnuPG-2.x可使用:
+
+
+1
+2
+
+
+gpg 
--full-gen-key
+
+
+
+GnuPG-1.x可使用:
+
+
+1
+2
+
+
+gpg 
--gen-key
+
+
+
+根据提示完成key:
+注意:请使用Apache mail生成GPG的Key。
+
+
+ 1
+ 
2
+ 
3
+ 
4
+ 
5
+ 
6
+ 
7
+ 
8
+ 
9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
+
+gpg 
(GnuPG) 2.0.12; Copyright (C) 
2009 Free 
Software This is 
free software: you 
are free 
to change 
and redistribute it.
+There is 
NO WARRANTY, to 
the extent permitted by 
law.
+
+Please select what 
kind of 
key you 
want:
+  (1) RSA and RSA (default)
+  (2) DSA and Elgamal
+  (3) DSA (sign only)
+  (4) RSA (sign only)
+Your selection? 1
+RSA keys 
may be 
between 1024 and 4096 bits long.
+What 

[GitHub] [incubator-apisix-website] juzhiyuan closed issue #14: doc: how to release a new version for PPMC

2020-02-12 Thread GitBox
juzhiyuan closed issue #14: doc: how to release a new version for PPMC
URL: https://github.com/apache/incubator-apisix-website/issues/14
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-apisix-website] juzhiyuan merged pull request #15: WIP: feat: Release Guide

2020-02-12 Thread GitBox
juzhiyuan merged pull request #15: WIP: feat: Release Guide
URL: https://github.com/apache/incubator-apisix-website/pull/15
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-apisix-website] branch master updated: WIP: feat: Release Guide (#15)

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
 new b59cd75  WIP: feat: Release Guide (#15)
b59cd75 is described below

commit b59cd75c3753723de9cb998336d27f7585dbf387
Author: 琚致远 
AuthorDate: Wed Feb 12 16:06:06 2020 +0800

WIP: feat: Release Guide (#15)

* feat: added initial commit for releasing guide

* feat: added GPG

* feat: added release guide in Chinese
---
 assets/style.sass  |  3 +-
 assets/style.scss  | 17 +++
 config.yaml|  8 
 content/contribute/release/index.en.md | 56 ++
 content/contribute/release/index.zh.md | 56 ++
 .../contribute/release/gpg-key-generator.html  | 33 +
 6 files changed, 172 insertions(+), 1 deletion(-)

diff --git a/assets/style.sass b/assets/style.sass
index f73e6f9..9e8c1b1 100644
--- a/assets/style.sass
+++ b/assets/style.sass
@@ -1,3 +1,4 @@
 @import "bulma/bulma"
 @import "fresh/core"
-@import "./downloads"
\ No newline at end of file
+@import "./downloads"
+@import "./style"
\ No newline at end of file
diff --git a/assets/style.scss b/assets/style.scss
new file mode 100644
index 000..9adc62c
--- /dev/null
+++ b/assets/style.scss
@@ -0,0 +1,17 @@
+.title {
+  color: #363636;
+  font-size: 2rem;
+  font-weight: 600;
+  line-height: 1.125;
+}
+
+.subtitle {
+  color: #363636;
+  font-size: 1.5rem;
+  font-weight: 600;
+  line-height: 1.125;
+}
+
+.warning {
+  font-weight: bold;
+}
\ No newline at end of file
diff --git a/config.yaml b/config.yaml
index 61acfe7..ad139d4 100644
--- a/config.yaml
+++ b/config.yaml
@@ -40,6 +40,10 @@ languages:
 url: /security
   - title: Downloads
 url: /downloads
+  - title: Get Involved
+sublinks:
+- title: Release Guide
+  url: contribute/release
   language:
 name: 中
 link: /zh
@@ -120,6 +124,10 @@ languages:
   url: security
 - title: 下载
   url: /downloads
+- title: 参与
+  sublinks:
+  - title: 发布指南
+url: contribute/release
 language:
 name: EN
 link: /
diff --git a/content/contribute/release/index.en.md 
b/content/contribute/release/index.en.md
new file mode 100644
index 000..b48e4c1
--- /dev/null
+++ b/content/contribute/release/index.en.md
@@ -0,0 +1,56 @@
+---
+title: "Release Guide"
+date: 2020-01-07T11:46:04+08:00
+include_footer: true
+---
+
+
+  
+GPG 设置
+
+安装 GPG
+在 GnuPG 官网下载安装包。 GnuPG 的 1.x 版本和 2.x 版本的命令有细微差别,下列说明以 GnuPG-2.1.23 
版本为例。
+安装完成后,执行以下命令查看版本号。
+{{< highlight go "linenos=table" >}}
+gpg --version
+{{< / highlight >}}
+创建 Key
+安装完成后,执行以下命令创建key。
+GnuPG-2.x可使用:
+{{< highlight go "linenos=table" >}}
+gpg --full-gen-key
+{{< / highlight >}}
+GnuPG-1.x可使用:
+{{< highlight go "linenos=table" >}}
+gpg --gen-key
+{{< / highlight >}}
+根据提示完成key:
+注意:请使用Apache mail生成GPG的Key。
+{{< highlight go "linenos=table" >}}
+{{% contribute/release/gpg-key-generator %}}
+{{< / highlight >}}
+查看生成的key
+{{< highlight go "linenos=table" >}}
+gpg --list-keys
+{{< / highlight >}}
+执行结果:
+{{< highlight go "linenos=table" >}}
+// 笔者本地电脑
+$ gpg --list-keys
+/home/resty/.gnupg/pubring.gpg
+--
+pub   4096R/30B5FD72 2020-01-02  
+uid   Yuansheng Wang 
+sub   4096R/3D2F913D 2020-01-02
+{{< / highlight >}}
+其中 30B5FD72 为公钥 ID。
+将公钥同步到服务器
+命令如下:
+{{< highlight go "linenos=table" >}}
+// 最后参数是上面生成的公钥 ID。
+$ gpg --keyserver hkp://pool.sks-keyservers.net --send-key 30B5FD72
+gpg: sending key 30B5FD72 to hkp server pool.sks-keyservers.net
+{{< / highlight >}}
+pool.sks-keyservers.net为随意挑选的https://sks-keyservers.net/status/; 
target="_blank">公钥服务器,每个服务器之间是自动同步的,选任意一个即可。
+  
+
\ No newline at end of file
diff --git a/content/contribute/release/index.zh.md 
b/content/contribute/release/index.zh.md
new file mode 100644
index 000..da79699
--- /dev/null
+++ b/content/contribute/release/index.zh.md
@@ -0,0 +1,56 @@
+---
+title: "发布指南"
+date: 2020-01-07T11:46:04+08:00
+include_footer: true
+---
+
+
+  
+GPG 设置
+
+安装 GPG
+在 GnuPG 官网下载安装包。 GnuPG 的 1.x 版本和 2.x 版本的命令有细微差别,下列说明以 GnuPG-2.1.23 
版本为例。
+安装完成后,执行以下命令查看版本号。
+{{< highlight go "linenos=table" >}}
+gpg --version
+{{< / highlight >}}
+创建 Key
+安装完成后,执行以下命令创建key。
+GnuPG-2.x可使用:
+{{< highlight go "linenos=table" >}}
+gpg --full-gen-key
+{{< / highlight >}}
+GnuPG-1.x可使用:
+{{< highlight go "linenos=table" >}}
+gpg --gen-key
+{{< / highlight >}}
+根据提示完成key:
+

[incubator-apisix-website] branch feature-release updated (17835a1 -> 34b5ae0)

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch feature-release
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git.


from 17835a1  Merge branch 'master' into feature-release
 add 34b5ae0  feat: added release guide in Chinese

No new revisions were added by this update.

Summary of changes:
 content/contribute/release/index.en.md | 51 +-
 1 file changed, 50 insertions(+), 1 deletion(-)



[incubator-apisix-website] branch feature-release updated (e23891e -> 17835a1)

2020-02-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch feature-release
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-website.git.


from e23891e  feat: added GPG
 add 69b1b1a  feat: added Security page (#17)
 add 17835a1  Merge branch 'master' into feature-release

No new revisions were added by this update.

Summary of changes:
 config.yaml  |  4 
 content/security/index.en.md | 13 +
 content/security/index.zh.md | 13 +
 3 files changed, 30 insertions(+)
 create mode 100644 content/security/index.en.md
 create mode 100644 content/security/index.zh.md