You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/12/16 10:35:08 UTC

[GitHub] [apisix] idbeta opened a new pull request #3061: test: add ci on centos7

idbeta opened a new pull request #3061:
URL: https://github.com/apache/apisix/pull/3061


   resolve https://github.com/apache/apisix/issues/2573
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r551674119



##########
File path: utils/centos7-ci.sh
##########
@@ -0,0 +1,85 @@
+#!/usr/bin/env bash
+#
+# 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.
+#
+
+#!/bin/bash
+
+set -ex
+
+install_dependencies() {
+    export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH
+
+    # install development tools
+    yum install -y wget tar gcc automake autoconf libtool make \
+        curl git which
+
+    # install epel and luarocks
+    wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+    rpm -ivh epel-release-latest-7.noarch.rpm
+    yum install -y luarocks lua-devel
+
+    # install openresty
+    yum install -y yum-utils && yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
+    yum install -y openresty-debug
+
+    # install etcd
+    wget https://github.com/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz
+    tar xf etcd-v3.4.0-linux-amd64.tar.gz
+    cp /etcd-v3.4.0-linux-amd64/etcdctl /usr/local/bin/
+    rm -rf etcd-v3.4.0-linux-amd64

Review comment:
       `.//core/etcd-auth.t`, `.//core/etcd-auth-fail.t` used the `etcdctl` it provided




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] moonming commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r549727499



##########
File path: .github/workflows/centos7-ci.yml
##########
@@ -0,0 +1,96 @@
+name: CI Centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: run ci on centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379

Review comment:
       I still haven't found a place to use these two etcd clusters




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on pull request #3061: draft: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#issuecomment-747471273


   https://github.com/apache/apisix/pull/3061/checks?check_run_id=1563093449#step:5:906
   
   sleep with more time in test case. you can make a try @idbeta 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r548883373



##########
File path: utils/centos7-install-dependencies-ci.sh
##########
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+#
+# 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.
+#
+
+#!/bin/bash
+
+set -ex
+
+docker exec centos7Instance bash -c "yum install -y wget tar gcc automake autoconf libtool make && wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && rpm -ivh epel-release-latest-7.noarch.rpm"

Review comment:
       I think you did it the wrong way.
   There is still a lot of duplicate content here.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r549690277



##########
File path: utils/centos7-ci.sh
##########
@@ -23,13 +23,13 @@ set -ex
 install_dependencies() {
     export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH
     
-    # install epel
-    wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-    rpm -ivh epel-release-latest-7.noarch.rpm
-    
     # install development tools
     yum install -y wget tar gcc automake autoconf libtool make \
         curl git luarocks lua-devel which
+

Review comment:
       yes, i am doing now.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r549989634



##########
File path: .github/workflows/centos7-ci.yml
##########
@@ -0,0 +1,96 @@
+name: CI Centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: run ci on centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379

Review comment:
       ok, I have removed the `old_etcd ` part.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] moonming commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r551639714



##########
File path: .github/workflows/centos7-ci.yml
##########
@@ -0,0 +1,87 @@
+name: CI Centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: run ci on centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379

Review comment:
       where we using this service?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r549694502



##########
File path: utils/centos7-ci.sh
##########
@@ -22,7 +22,7 @@ set -ex
 
 install_dependencies() {
     export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH
-    

Review comment:
       nice catch. I edit it online :(




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r549359711



##########
File path: utils/centos7-ci.sh
##########
@@ -20,36 +20,29 @@
 
 set -ex
 
-install_dependencies() {
-    export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH
-    yum install -y wget tar gcc automake autoconf libtool make
-    wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-    rpm -ivh epel-release-latest-7.noarch.rpm
-    yum install -y curl git luarocks lua-devel which
-    yum install -y yum-utils && yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
-    yum install -y openresty-debug
-    wget https://github.com/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz
-    tar xf etcd-v3.4.0-linux-amd64.tar.gz
-    cp /etcd-v3.4.0-linux-amd64/etcdctl /usr/local/bin/
-    rm -rf etcd-v3.4.0-linux-amd64
-    yum install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl
-    cpanm --notest Test::Nginx IPC::Run > build.log 2>&1 || (cat build.log && exit 1)
-    mkdir build-cache 
-    wget https://github.com/iresty/grpc_server_example/releases/download/20200901/grpc_server_example-amd64.tar.gz
-    tar -xvf grpc_server_example-amd64.tar.gz 
-    mv grpc_server_example build-cache/
-    git clone https://github.com/iresty/grpc_server_example.git grpc_server_example 
-    cd grpc_server_example/ && mv proto/ ../build-cache/ && cd ..
-    ./build-cache/grpc_server_example > grpc_server_example.log 2>&1 || (cat grpc_server_example.log && exit 1)&
-    sleep 3
-    cd apisix
-    make deps
-    make init
-    git clone https://github.com/iresty/test-nginx.git test-nginx
-}
 
-run_case() {
-    export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH
-    cd apisix
-    prove -Itest-nginx/lib -I./ -r t/
-}
\ No newline at end of file
+export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH

Review comment:
       wow, please choose a better style, the current style is not easy for reading.
   
   eg: add more blank line and need some comments




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on a change in pull request #3061: draft: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r546547678



##########
File path: .github/workflows/centos7.yml
##########
@@ -0,0 +1,103 @@
+name: test_apisix_on_centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:     
+  test_apisix:
+    name: test_apisix_on_centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+    
+    steps:
+
+    - name: Install Redis Cluster
+      uses: vishnudxb/redis-cluster@1.0.5
+      with:
+        master1-port: 5000
+        master2-port: 5001
+        master3-port: 5002
+        slave1-port: 5003
+        slave2-port: 5004
+        slave3-port: 5005
+
+    - name: Running Redis Cluster Test
+      run: |
+        sudo apt-get install -y redis-tools
+        docker ps -a
+        redis-cli -h 127.0.0.1 -p 5000 ping
+        redis-cli -h 127.0.0.1 -p 5000 cluster nodes
+
+    - name: Running etcd server with TLS
+      run: |
+        sudo docker run -d -p 12379:12379 -p 12380:12380 \
+        -e ALLOW_NONE_AUTHENTICATION=yes \
+        -e ETCD_ADVERTISE_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_CERT_FILE=/certs/etcd.pem \
+        -e ETCD_KEY_FILE=/certs/etcd.key \
+        -e GITHUB_ACTIONS=true \
+        -e CI=true \
+        -v /apisix/t/certs:/certs \
+        bitnami/etcd:3.4.0
+
+    - name: run centos7 docker and install dependencies 
+      run: |
+        docker pull centos:7
+        docker run -itd -v /home/runner/work/apisix/apisix:/tmp/apisix --name centos7Instance --net="host" --restart=always docker.io/centos:7 /bin/bash

Review comment:
       `--restart=always` we can remove this argument




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r550389287



##########
File path: .github/workflows/centos7-ci.yml
##########
@@ -0,0 +1,96 @@
+name: CI Centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: run ci on centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379

Review comment:
       LGTM




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: draft: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r548015957



##########
File path: .github/workflows/centos7.yml
##########
@@ -0,0 +1,102 @@
+name: test_apisix_on_centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: test_apisix_on_centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+

Review comment:
       I was debugging different cases step by step, so some dependencies were not used after installation. Now all cases have been debugged, so they are now used.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r548811041



##########
File path: .github/workflows/centos7.yml
##########
@@ -0,0 +1,109 @@
+name: test_apisix_on_centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: test_apisix_on_centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+    steps:
+    - name: Check out code
+      uses: actions/checkout@v2
+      with:
+        submodules: recursive
+
+    - name: Install Redis Cluster
+      uses: vishnudxb/redis-cluster@1.0.5
+      with:
+        master1-port: 5000
+        master2-port: 5001
+        master3-port: 5002
+        slave1-port: 5003
+        slave2-port: 5004
+        slave3-port: 5005
+
+    - name: Running Redis Cluster Test
+      run: |
+        sudo apt-get install -y redis-tools
+        docker ps -a
+        redis-cli -h 127.0.0.1 -p 5000 ping
+        redis-cli -h 127.0.0.1 -p 5000 cluster nodes
+
+    - name: Running etcd server with TLS
+      run: |
+        sudo docker run -d -p 12379:12379 -p 12380:12380 \
+        -e ALLOW_NONE_AUTHENTICATION=yes \
+        -e ETCD_ADVERTISE_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_CERT_FILE=/certs/etcd.pem \
+        -e ETCD_KEY_FILE=/certs/etcd.key \
+        -e GITHUB_ACTIONS=true \
+        -e CI=true \
+        -v /home/runner/work/apisix/apisix/t/certs:/certs \
+        bitnami/etcd:3.4.0
+
+    - name: run centos7 docker and mapping apisix into container
+      run: |
+        docker run -itd -v /home/runner/work/apisix/apisix:/tmp/apisix --name centos7Instance --net="host" docker.io/centos:7 /bin/bash
+
+    - name: run other docker containers for test
+      run: |
+        docker run --rm -itd -p 6379:6379 --name apisix_redis redis:3.0-alpine
+        docker run --rm -itd -e HTTP_PORT=8888 -e HTTPS_PORT=9999 -p 8888:8888 -p 9999:9999 mendhak/http-https-echo
+        docker run --rm -itd -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=123456 -p 8090:8080 -p 8443:8443 sshniro/keycloak-apisix
+        docker network create kafka-net --driver bridge
+        docker run --name zookeeper-server -d -p 2181:2181 --network kafka-net -e ALLOW_ANONYMOUS_LOGIN=yes bitnami/zookeeper:3.6.0
+        docker run --name kafka-server1 -d --network kafka-net -e ALLOW_PLAINTEXT_LISTENER=yes -e KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper-server:2181 -e KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092 -p 9092:9092 -e KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true bitnami/kafka:latest
+        docker run --name eureka -d -p 8761:8761 --env ENVIRONMENT=apisix --env spring.application.name=apisix-eureka --env server.port=8761 --env eureka.instance.ip-address=127.0.0.1 --env eureka.client.registerWithEureka=true --env eureka.client.fetchRegistry=false --env eureka.client.serviceUrl.defaultZone=http://127.0.0.1:8761/eureka/ bitinit/eureka
+        sleep 5
+        docker exec -i kafka-server1 /opt/bitnami/kafka/bin/kafka-topics.sh --create --zookeeper zookeeper-server:2181 --replication-factor 1 --partitions 1 --topic test2
+        docker run --rm --name skywalking -d -p 1234:1234 -p 11800:11800 -p 12800:12800 apache/skywalking-oap-server
+
+    - name: install dependencies
+      run: |
+        docker exec centos7Instance bash -c "yum install -y wget tar gcc automake autoconf libtool make && wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && rpm -ivh epel-release-latest-7.noarch.rpm"
+        docker exec centos7Instance bash -c "yum install -y curl git luarocks lua-devel which"
+        docker exec centos7Instance bash -c "yum install -y yum-utils && yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo"
+        docker exec centos7Instance bash -c "yum install -y openresty-debug"
+        docker exec centos7Instance bash -c "wget https://github.com/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz && tar xf etcd-v3.4.0-linux-amd64.tar.gz"
+        docker exec centos7Instance bash -c "cp /etcd-v3.4.0-linux-amd64/etcdctl /usr/local/bin/ && rm -rf etcd-v3.4.0-linux-amd64"
+        docker exec centos7Instance bash -c "yum install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl"
+        docker exec centos7Instance bash -c "cp -r /tmp/apisix ./"
+        docker exec centos7Instance bash -c "PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH cpanm --notest Test::Nginx IPC::Run > build.log 2>&1 || (cat build.log && exit 1)"
+        docker exec centos7Instance bash -c "mkdir build-cache && wget https://github.com/iresty/grpc_server_example/releases/download/20200901/grpc_server_example-amd64.tar.gz && tar -xvf grpc_server_example-amd64.tar.gz && mv grpc_server_example build-cache/"
+        docker exec centos7Instance bash -c "git clone https://github.com/iresty/grpc_server_example.git grpc_server_example && cd grpc_server_example/ && mv proto/ ../build-cache/"
+        docker exec centos7Instance bash -c "./build-cache/grpc_server_example > grpc_server_example.log 2>&1 || (cat grpc_server_example.log && exit 1)&"
+        sleep 3
+        docker exec centos7Instance bash -c "cd apisix && PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH make deps"
+        docker exec centos7Instance bash -c "cd apisix && PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH make init"
+        docker exec centos7Instance bash -c "cd apisix && git clone https://github.com/iresty/test-nginx.git test-nginx"

Review comment:
       fixed, move this part of the code to a separate shell script.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] moonming commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r548553418



##########
File path: .github/workflows/centos7.yml
##########
@@ -0,0 +1,109 @@
+name: test_apisix_on_centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: test_apisix_on_centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+    steps:
+    - name: Check out code
+      uses: actions/checkout@v2
+      with:
+        submodules: recursive
+
+    - name: Install Redis Cluster
+      uses: vishnudxb/redis-cluster@1.0.5
+      with:
+        master1-port: 5000
+        master2-port: 5001
+        master3-port: 5002
+        slave1-port: 5003
+        slave2-port: 5004
+        slave3-port: 5005
+
+    - name: Running Redis Cluster Test
+      run: |
+        sudo apt-get install -y redis-tools
+        docker ps -a
+        redis-cli -h 127.0.0.1 -p 5000 ping
+        redis-cli -h 127.0.0.1 -p 5000 cluster nodes
+
+    - name: Running etcd server with TLS
+      run: |
+        sudo docker run -d -p 12379:12379 -p 12380:12380 \
+        -e ALLOW_NONE_AUTHENTICATION=yes \
+        -e ETCD_ADVERTISE_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_CERT_FILE=/certs/etcd.pem \
+        -e ETCD_KEY_FILE=/certs/etcd.key \
+        -e GITHUB_ACTIONS=true \
+        -e CI=true \
+        -v /home/runner/work/apisix/apisix/t/certs:/certs \
+        bitnami/etcd:3.4.0
+
+    - name: run centos7 docker and mapping apisix into container
+      run: |
+        docker run -itd -v /home/runner/work/apisix/apisix:/tmp/apisix --name centos7Instance --net="host" docker.io/centos:7 /bin/bash
+
+    - name: run other docker containers for test
+      run: |
+        docker run --rm -itd -p 6379:6379 --name apisix_redis redis:3.0-alpine
+        docker run --rm -itd -e HTTP_PORT=8888 -e HTTPS_PORT=9999 -p 8888:8888 -p 9999:9999 mendhak/http-https-echo
+        docker run --rm -itd -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=123456 -p 8090:8080 -p 8443:8443 sshniro/keycloak-apisix
+        docker network create kafka-net --driver bridge
+        docker run --name zookeeper-server -d -p 2181:2181 --network kafka-net -e ALLOW_ANONYMOUS_LOGIN=yes bitnami/zookeeper:3.6.0
+        docker run --name kafka-server1 -d --network kafka-net -e ALLOW_PLAINTEXT_LISTENER=yes -e KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper-server:2181 -e KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092 -p 9092:9092 -e KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true bitnami/kafka:latest
+        docker run --name eureka -d -p 8761:8761 --env ENVIRONMENT=apisix --env spring.application.name=apisix-eureka --env server.port=8761 --env eureka.instance.ip-address=127.0.0.1 --env eureka.client.registerWithEureka=true --env eureka.client.fetchRegistry=false --env eureka.client.serviceUrl.defaultZone=http://127.0.0.1:8761/eureka/ bitinit/eureka
+        sleep 5
+        docker exec -i kafka-server1 /opt/bitnami/kafka/bin/kafka-topics.sh --create --zookeeper zookeeper-server:2181 --replication-factor 1 --partitions 1 --topic test2
+        docker run --rm --name skywalking -d -p 1234:1234 -p 11800:11800 -p 12800:12800 apache/skywalking-oap-server
+
+    - name: install dependencies
+      run: |
+        docker exec centos7Instance bash -c "yum install -y wget tar gcc automake autoconf libtool make && wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && rpm -ivh epel-release-latest-7.noarch.rpm"
+        docker exec centos7Instance bash -c "yum install -y curl git luarocks lua-devel which"
+        docker exec centos7Instance bash -c "yum install -y yum-utils && yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo"
+        docker exec centos7Instance bash -c "yum install -y openresty-debug"
+        docker exec centos7Instance bash -c "wget https://github.com/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz && tar xf etcd-v3.4.0-linux-amd64.tar.gz"
+        docker exec centos7Instance bash -c "cp /etcd-v3.4.0-linux-amd64/etcdctl /usr/local/bin/ && rm -rf etcd-v3.4.0-linux-amd64"
+        docker exec centos7Instance bash -c "yum install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl"
+        docker exec centos7Instance bash -c "cp -r /tmp/apisix ./"
+        docker exec centos7Instance bash -c "PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH cpanm --notest Test::Nginx IPC::Run > build.log 2>&1 || (cat build.log && exit 1)"
+        docker exec centos7Instance bash -c "mkdir build-cache && wget https://github.com/iresty/grpc_server_example/releases/download/20200901/grpc_server_example-amd64.tar.gz && tar -xvf grpc_server_example-amd64.tar.gz && mv grpc_server_example build-cache/"
+        docker exec centos7Instance bash -c "git clone https://github.com/iresty/grpc_server_example.git grpc_server_example && cd grpc_server_example/ && mv proto/ ../build-cache/"
+        docker exec centos7Instance bash -c "./build-cache/grpc_server_example > grpc_server_example.log 2>&1 || (cat grpc_server_example.log && exit 1)&"
+        sleep 3
+        docker exec centos7Instance bash -c "cd apisix && PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH make deps"
+        docker exec centos7Instance bash -c "cd apisix && PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH make init"
+        docker exec centos7Instance bash -c "cd apisix && git clone https://github.com/iresty/test-nginx.git test-nginx"

Review comment:
       too hard to read, why not in one shell file?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r549734748



##########
File path: .github/workflows/centos7-ci.yml
##########
@@ -0,0 +1,96 @@
+name: CI Centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: run ci on centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379

Review comment:
       for ci `centos7`, it should be useless.
   
   it only was used in https://github.com/apache/apisix/blob/924a30db36268ee1d7fab255ddebfc23a7110314/.travis/apisix_cli_test/test_ci_only.sh#L31




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#issuecomment-758361507


   merged, many thx @idbeta 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] moonming commented on a change in pull request #3061: draft: add ci on centos7

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r547716128



##########
File path: .github/workflows/centos7.yml
##########
@@ -0,0 +1,102 @@
+name: test_apisix_on_centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: test_apisix_on_centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+

Review comment:
       not used, why?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r551738534



##########
File path: .github/workflows/centos7-ci.yml
##########
@@ -0,0 +1,87 @@
+name: CI Centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: run ci on centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379

Review comment:
       https://github.com/apache/apisix/blob/e1a2dcd1d1fbce20441b111c5c1dedc77075b63a/utils/centos7-ci.sh#L62-L65
   The test needs to compile apisix dependencies, which need etcd, otherwise prompt error `got malformed version message: "" from etcd`




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r550383196



##########
File path: .github/workflows/centos7-ci.yml
##########
@@ -0,0 +1,96 @@
+name: CI Centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: run ci on centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379

Review comment:
       ping @moonming @membphis 




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on pull request #3061: draft: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#issuecomment-749992823


   @idbeta please take a look at the output of CI:
   
   https://github.com/apache/apisix/pull/3061/checks?check_run_id=1594094992#step:10:910
   
   ```shell
   bash: ./build-cache/grpc_server_example: No such file or directory
   ./bin/apisix init
   ./bin/apisix init_etcd


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#issuecomment-750891680


   > @idbeta please take a look at the output of CI:
   > 
   > https://github.com/apache/apisix/pull/3061/checks?check_run_id=1594094992#step:10:910
   > 
   > ```shell
   > bash: ./build-cache/grpc_server_example: No such file or directory
   > ./bin/apisix init
   > ./bin/apisix init_etcd
   > ```
   
   fixed.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#issuecomment-751473372


   ping @membphis @moonming 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r549689969



##########
File path: utils/centos7-ci.sh
##########
@@ -23,13 +23,13 @@ set -ex
 install_dependencies() {
     export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH
     
-    # install epel
-    wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-    rpm -ivh epel-release-latest-7.noarch.rpm
-    
     # install development tools
     yum install -y wget tar gcc automake autoconf libtool make \
         curl git luarocks lua-devel which
+

Review comment:
       old steps is correct and safe. pls revert this commit




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r548541340



##########
File path: .github/workflows/centos7.yml
##########
@@ -0,0 +1,103 @@
+name: test_apisix_on_centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:     
+  test_apisix:
+    name: test_apisix_on_centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+    
+    steps:
+
+    - name: Install Redis Cluster
+      uses: vishnudxb/redis-cluster@1.0.5
+      with:
+        master1-port: 5000
+        master2-port: 5001
+        master3-port: 5002
+        slave1-port: 5003
+        slave2-port: 5004
+        slave3-port: 5005
+
+    - name: Running Redis Cluster Test
+      run: |
+        sudo apt-get install -y redis-tools
+        docker ps -a
+        redis-cli -h 127.0.0.1 -p 5000 ping
+        redis-cli -h 127.0.0.1 -p 5000 cluster nodes
+
+    - name: Running etcd server with TLS
+      run: |
+        sudo docker run -d -p 12379:12379 -p 12380:12380 \
+        -e ALLOW_NONE_AUTHENTICATION=yes \
+        -e ETCD_ADVERTISE_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_CERT_FILE=/certs/etcd.pem \
+        -e ETCD_KEY_FILE=/certs/etcd.key \
+        -e GITHUB_ACTIONS=true \
+        -e CI=true \
+        -v /apisix/t/certs:/certs \
+        bitnami/etcd:3.4.0
+
+    - name: run centos7 docker and install dependencies 
+      run: |
+        docker pull centos:7
+        docker run -itd -v /home/runner/work/apisix/apisix:/tmp/apisix --name centos7Instance --net="host" --restart=always docker.io/centos:7 /bin/bash

Review comment:
       fixed.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] moonming commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r551640114



##########
File path: utils/centos7-ci.sh
##########
@@ -0,0 +1,85 @@
+#!/usr/bin/env bash
+#
+# 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.
+#
+
+#!/bin/bash
+
+set -ex
+
+install_dependencies() {
+    export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH
+
+    # install development tools
+    yum install -y wget tar gcc automake autoconf libtool make \
+        curl git which
+
+    # install epel and luarocks
+    wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+    rpm -ivh epel-release-latest-7.noarch.rpm
+    yum install -y luarocks lua-devel
+
+    # install openresty
+    yum install -y yum-utils && yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
+    yum install -y openresty-debug
+
+    # install etcd
+    wget https://github.com/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz
+    tar xf etcd-v3.4.0-linux-amd64.tar.gz
+    cp /etcd-v3.4.0-linux-amd64/etcdctl /usr/local/bin/
+    rm -rf etcd-v3.4.0-linux-amd64

Review comment:
       ditto

##########
File path: .github/workflows/centos7-ci.yml
##########
@@ -0,0 +1,87 @@
+name: CI Centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: run ci on centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+    steps:
+    - name: Check out code
+      uses: actions/checkout@v2
+      with:
+        submodules: recursive
+
+    - name: Install Redis Cluster
+      run: |
+        docker run -d -p ${MASTER1_PORT}:6379 -p ${MASTER2_PORT}:6380 -p ${MASTER3_PORT}:6381 -p ${SLAVE1_PORT}:6382 -p ${SLAVE2_PORT}:6383 -p ${SLAVE3_PORT}:6384 --name redis-cluster vishnunair/docker-redis-cluster:latest
+      env:
+        MASTER1_PORT: 5000
+        MASTER2_PORT: 5001
+        MASTER3_PORT: 5002
+        SLAVE1_PORT: 5003
+        SLAVE2_PORT: 5004
+        SLAVE3_PORT: 5005
+
+    - name: Running Redis Cluster Test
+      run: |
+        sudo apt-get install -y redis-tools
+        docker ps -a
+        redis-cli -h 127.0.0.1 -p 5000 ping
+        redis-cli -h 127.0.0.1 -p 5000 cluster nodes
+
+    - name: Running etcd server with TLS
+      run: |
+        sudo docker run -d -p 12379:12379 -p 12380:12380 \
+        -e ALLOW_NONE_AUTHENTICATION=yes \
+        -e ETCD_ADVERTISE_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_CERT_FILE=/certs/etcd.pem \
+        -e ETCD_KEY_FILE=/certs/etcd.key \
+        -e GITHUB_ACTIONS=true \
+        -e CI=true \
+        -v /home/runner/work/apisix/apisix/t/certs:/certs \
+        bitnami/etcd:3.4.0

Review comment:
       ditto
   why so many etcd service?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis merged pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
membphis merged pull request #3061:
URL: https://github.com/apache/apisix/pull/3061


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r551673634



##########
File path: .github/workflows/centos7-ci.yml
##########
@@ -0,0 +1,87 @@
+name: CI Centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: run ci on centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+    steps:
+    - name: Check out code
+      uses: actions/checkout@v2
+      with:
+        submodules: recursive
+
+    - name: Install Redis Cluster
+      run: |
+        docker run -d -p ${MASTER1_PORT}:6379 -p ${MASTER2_PORT}:6380 -p ${MASTER3_PORT}:6381 -p ${SLAVE1_PORT}:6382 -p ${SLAVE2_PORT}:6383 -p ${SLAVE3_PORT}:6384 --name redis-cluster vishnunair/docker-redis-cluster:latest
+      env:
+        MASTER1_PORT: 5000
+        MASTER2_PORT: 5001
+        MASTER3_PORT: 5002
+        SLAVE1_PORT: 5003
+        SLAVE2_PORT: 5004
+        SLAVE3_PORT: 5005
+
+    - name: Running Redis Cluster Test
+      run: |
+        sudo apt-get install -y redis-tools
+        docker ps -a
+        redis-cli -h 127.0.0.1 -p 5000 ping
+        redis-cli -h 127.0.0.1 -p 5000 cluster nodes
+
+    - name: Running etcd server with TLS
+      run: |
+        sudo docker run -d -p 12379:12379 -p 12380:12380 \
+        -e ALLOW_NONE_AUTHENTICATION=yes \
+        -e ETCD_ADVERTISE_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:12379 \
+        -e ETCD_CERT_FILE=/certs/etcd.pem \
+        -e ETCD_KEY_FILE=/certs/etcd.key \
+        -e GITHUB_ACTIONS=true \
+        -e CI=true \
+        -v /home/runner/work/apisix/apisix/t/certs:/certs \
+        bitnami/etcd:3.4.0

Review comment:
       it was used by `.//core/config_etcd.t`




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#issuecomment-754428028


   ping @moonming 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] moonming commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r549882521



##########
File path: .github/workflows/centos7-ci.yml
##########
@@ -0,0 +1,96 @@
+name: CI Centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: run ci on centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379

Review comment:
       I am not sure if there are other similar codes




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r549004768



##########
File path: utils/centos7-install-dependencies-ci.sh
##########
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+#
+# 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.
+#
+
+#!/bin/bash
+
+set -ex
+
+docker exec centos7Instance bash -c "yum install -y wget tar gcc automake autoconf libtool make && wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && rpm -ivh epel-release-latest-7.noarch.rpm"

Review comment:
       i got your point, fixed.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on a change in pull request #3061: draft: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#discussion_r548015957



##########
File path: .github/workflows/centos7.yml
##########
@@ -0,0 +1,102 @@
+name: test_apisix_on_centos7
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  test_apisix:
+    name: test_apisix_on_centos7
+    runs-on: ubuntu-latest
+
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.0
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+
+      old_etcd:
+        image: bitnami/etcd:3.3.8
+        ports:
+          - 3379:2379
+          - 3380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+          ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+

Review comment:
       I was debugging different cases step by step, so some dependencies were not used after installation. Now all cases have been debugged, so they are now used. @moonming 




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on pull request #3061: draft: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#issuecomment-749465822


   @membphis please help me check the reason:
   ```
   bash: ./build-cache/grpc_server_example: No such file or directory
   ./bin/apisix init
   ./bin/apisix init_etcd
   Error: [error] init_by_lua error: /apisix/apisix/core.lua:21: failed to parse yaml config: failed to merge, path[apisix->node_listen] expect: number, but got: string
   stack traceback:
   	[C]: in function 'error'
   	/apisix/apisix/core.lua:21: in main chunk
   	[C]: in function 'require'
   	/apisix/apisix/init.lua:18: in main chunk
   	[C]: in function 'require'
   	init_by_lua:9: in main chunk
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on pull request #3061: test: add ci on centos7

Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #3061:
URL: https://github.com/apache/apisix/pull/3061#issuecomment-756576481


   hello @moonming, please review the pr when you are free.


----------------------------------------------------------------
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:
users@infra.apache.org