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: [email protected]
