Skip to content

Commit

Permalink
merge release/v1.4.0 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
clarinette9 committed Dec 10, 2021
2 parents 2445f06 + 870d586 commit 826f6c8
Show file tree
Hide file tree
Showing 55 changed files with 594 additions and 171 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2021 The BFE Authors
#
# Licensed 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.
#
# This is a basic workflow to help you get started with Actions

name: CI
Expand Down Expand Up @@ -34,6 +48,10 @@ jobs:
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Check license header
- name: Check License Header
uses: apache/skywalking-eyes@main

# Build
- name: Build
shell: bash
Expand Down
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2021 The BFE Authors
#
# Licensed 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.
#
.svn
.tmp
.download
Expand All @@ -10,3 +24,5 @@ profile.out
coverage.txt
.idea/*
.vscode/*
bfe
dist/*
18 changes: 16 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# Copyright 2021 The BFE Authors
#
# Licensed 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.
#
project_name: bfe

builds:
- binary: bfe
- binary: bin/bfe
main: ./bfe.go
ldflags:
- -X main.version={{.Version}} -X main.commit={{.Commit}}
Expand Down Expand Up @@ -31,7 +45,7 @@ archives:
- LICENSE
- README.md
- CHANGELOG.md
- conf/**/*
- conf/*

checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
Expand Down
40 changes: 40 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (c) 2021 The BFE Authors.
#
# Licensed 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.

header:
license:
spdx-id: Apache-2.0
copyright-owner: The BFE Authors

paths-ignore:
- 'conf'
- 'docs/material'
- 'docs/images'
- '**/go.mod'
- '**/go.sum'
- '**/*.md'
- '**/testdata/*'
- '**/test_data/*/**'
- '**/*/testdata/*/**'
- 'LICENSE'
- 'NOTICE'
- 'VERSION'
- 'staticcheck.conf'
- 'bfe_basic/condition/parser/y.go'

comment: on-failure

dependency:
files:
- go.mod
17 changes: 16 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Copyright 2021 The BFE Authors
#
# Licensed 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.
#
repos:
- repo: git://github.com/dnephin/pre-commit-golang
rev: master
rev: v0.4.0
hooks:
- id: go-fmt
- id: go-vet
Expand Down
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2021 The BFE Authors
#
# Licensed 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.
#
language: go

go:
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.4.0] - 2021-12-10

### Added

- Documents optimization

### Changed

- Upgrade golang version from 1.13 to 1.17
- mod_markdown: upgrade bluemonday version to 1.0.16
- Optimize mutex
- Improve Makefile and pre-commit

## [v1.3.0] - 2021-09-16

### Added
Expand Down Expand Up @@ -262,6 +275,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Flexible plugin framework to extend functionality. Based on the framework, developer can add new features rapidly
- Detailed built-in metrics available for service status monitor

<<<<<<< HEAD
=======
[v1.4.0]: https://github.com/bfenetworks/bfe/compare/v1.3.0...v1.4.0
>>>>>>> release/v1.4.0
[v1.3.0]: https://github.com/bfenetworks/bfe/compare/v1.2.0...v1.3.0
[v1.2.0]: https://github.com/bfenetworks/bfe/compare/v1.1.0...v1.2.0
[v1.1.0]: https://github.com/bfenetworks/bfe/compare/v1.0.0...v1.1.0
Expand Down
14 changes: 9 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Contribute Code

You are welcome to contribute to project BFE. To contribute to BFE, you have to agree with the
[Contributor License Agreement](https://cla-assistant.io/bfenetworks/bfe).

We sincerely appreciate your contribution. This document explains our workflow and work style.
You are welcome to contribute to project BFE. This document explains our workflow and work style.

## Workflow

Expand Down Expand Up @@ -44,8 +41,15 @@ BFE uses this [Git branching model](http://nvie.com/posts/a-successful-git-branc
Once installed, `pre-commit` checks the style of code and documentation in every commit:

```
$ git commit
$ git commit -s
```

NOTE: You should add a line to every git commit message, e.g.
```
Signed-off-by: Sijie Yang <[email protected]>
```
Please use your real name (sorry, no pseudonyms or anonymous contributions). The signoff line at the end of the commit message certifies that you wrote it
or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the [Developer Certificate of Origin](https://developercertificate.org/).

NOTE: The `yapf` installed by `pip install pre-commit` and `conda install -c conda-forge pre-commit` is slightly different. BFE developers use `pip install pre-commit`.

Expand Down
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2021 The BFE Authors
#
# Licensed 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.
#
FROM golang:1.13.11-alpine AS build

WORKDIR /bfe
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ GOGEN := $(GO) generate
GOCLEAN := $(GO) clean
GOFLAGS := -race
STATICCHECK := staticcheck
LICENSEEYE := license-eye

# init arch
ARCH := $(shell getconf LONG_BIT)
Expand All @@ -48,6 +49,9 @@ BFE_PKGS := $(shell go list ./...)
# make, make all
all: prepare compile package

# make, make strip
strip: prepare compile-strip package

# make prepare, download dependencies
prepare: prepare-dep prepare-gen
prepare-dep:
Expand All @@ -60,6 +64,11 @@ compile: test build
build:
$(GOBUILD) -ldflags "-X main.version=$(BFE_VERSION) -X main.commit=$(GIT_COMMIT) -extldflags=-static"

# make compile-strip, go build without symbols and DWARFs
compile-strip: test build-strip
build-strip:
$(GOBUILD) -ldflags "-X main.version=$(BFE_VERSION) -X main.commit=$(GIT_COMMIT) -extldflags=-static -s -w"

# make test, test your code
test: test-case vet-case
test-case:
Expand All @@ -83,6 +92,11 @@ check:
$(GO) get honnef.co/go/tools/cmd/staticcheck
$(STATICCHECK) ./...

# make license-check, check code file's license declearation
license-check:
$(GO) install github.com/apache/skywalking-eyes/cmd/license-eye@latest
$(LICENSEEYE) header check

# make docker
docker:
docker build \
Expand Down
28 changes: 24 additions & 4 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,41 @@
[![Snap Status](https://build.snapcraft.io/badge/bfenetworks/bfe.svg)](https://build.snapcraft.io/user/bfenetworks/bfe)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3209/badge)](https://bestpractices.coreinfrastructure.org/projects/3209)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbfenetworks%2Fbfe.svg?type=shield)](https://app.fossa.com/reports/1f05f9f0-ac3d-486e-8ba9-ad95dabd4768)
[![CLA assistant](https://cla-assistant.io/readme/badge/bfenetworks/bfe)](https://cla-assistant.io/bfenetworks/bfe)
[![Slack Widget](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=green)](https://slack.cncf.io)

BFE是百度开源的现代化七层负载均衡系统
BFE是百度开源的现代化、企业级的七层负载均衡系统

## 简介

BFE开源项目包含多个组件,可以搭建完整的七层负载均衡和流量接入解决方案

BFE系统包括数据平面和控制平面:

- 数据平面:负责用户流量的转发,包含下列组件
- BFE Server:BFE 核心转发引擎,即为本项目(bfenetworks/bfe)。BFE Server 将用户流量经过内容路由、负载均衡,最终转发给合适的后端业务集群
- 控制平面:负责BFE系统的配置和管理等,包含下列组件
- [API-Server](https://github.com/bfenetworks/api-server):对外提供 API 接口,完成 BFE 配置的变更、存储和生成
- [Conf-Agent](https://github.com/bfenetworks/conf-agent):配置加载组件,从API-Server获取最新配置,并触发 BFE Server 进行配置热加载
- [Dashboard](https://github.com/bfenetworks/dashboard):为用户提供了图形化操作界面,以对 BFE 的主要配置进行管理和查看

BFE的架构说明见[概览](docs/zh_cn/introduction/overview.md)文档

此外,我们也基于 BFE 实现了 [BFE Ingress Controller](https://github.com/bfenetworks/ingress-bfe),用于支持在 Kubernetes 中使用 Ingress

## 特性及优点

- 丰富协议支持:支持HTTP、HTTPS、SPDY、HTTP/2、WebSocket、TLS、gRPC、FastCGI等
- 基于请求内容的路由:支持高级条件表达式定制转发规则,转发规则易于理解及维护
- 高级负载均衡:支持全局/分布式负载均衡,实现就近访问、跨可用区容灾及过载保护等
- 灵活的模块框架:支持高效率定制开发第三方扩展模块
- 高效易用的管理:支持转发集群配置集中管理,提供Dashboard和RESTful API
- 一流的可见性:提供丰富详尽的监控指标,提供各类日志供问题诊断、数据分析及可视化
[了解更多详情](https://www.bfe-networks.net/zh_cn/introduction/overview/)

## 开始使用
- [编译及运行](docs/zh_cn/installation/install_from_source.md)

- 数据平面:BFE核心转发引擎的[编译及运行](docs/zh_cn/installation/install_from_source.md)
- 控制平面:请参考控制平面的[部署说明](https://github.com/bfenetworks/api-server/blob/develop/docs/zh_cn/deploy.md)

## 运行测试
- 请参考[编译及运行](docs/zh_cn/installation/install_from_source.md)
Expand Down Expand Up @@ -66,7 +86,7 @@ BFE是百度开源的现代化七层负载均衡系统
</tr>
</table>

- **开源BFE开发者微信群**: [发送邮件](mailto:yangsijie@baidu.com)说明您的微信号及贡献(例如PR/Issue),我们将及时邀请您加入
- **开源BFE开发者微信群**: [发送邮件](mailto:iyangsj@gmail.com)说明您的微信号及贡献(例如PR/Issue),我们将及时邀请您加入

## 许可
BFE基于Apache 2.0许可证,详见[LICENSE](LICENSE)文件说明
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,39 @@ English | [中文](README-CN.md)
[![Snap Status](https://build.snapcraft.io/badge/bfenetworks/bfe.svg)](https://build.snapcraft.io/user/bfenetworks/bfe)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3209/badge)](https://bestpractices.coreinfrastructure.org/projects/3209)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbfenetworks%2Fbfe.svg?type=shield)](https://app.fossa.com/reports/1f05f9f0-ac3d-486e-8ba9-ad95dabd4768)
[![CLA assistant](https://cla-assistant.io/readme/badge/bfenetworks/bfe)](https://cla-assistant.io/bfenetworks/bfe)
[![Slack Widget](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=green)](https://slack.cncf.io)

BFE is a modern layer 7 load balancer from baidu.

## Introduction

BFE opensource project includes several components, which can be used together as a integrated layer 7 load balancer and traffic management solution.

BFE system consists of data plane and control plane:

- Data plane:responsible for forwarding user's traffic, including below component:
- BFE Server:BFE forward engine (this repository, bfenetworks/bfe). BFE Server performs content based routing, load balancing and forwards the traffic to backend servers.
- Control plane:responsible for management and configuration of BFE system, including below components:
- [API-Server](https://github.com/bfenetworks/api-server):provides API and handles update, storage and generation of BFE config
- [Conf-Agent](https://github.com/bfenetworks/conf-agent):component for loading config, fetches latest config from API-Server and triggers BFE Server to reload it
- [Dashboard](https://github.com/bfenetworks/dashboard):provides a graphic interface for user to manage and view major config of BFE

Refer to [Overview](docs/en_us/introduction/overview.md) in BFE document for more information

Besides, we also implement [BFE Ingress Controller](https://github.com/bfenetworks/ingress-bfe) based on BFE, to fulfill Ingress in Kubernetes

## Advantages

- Multiple protocols supported, including HTTP, HTTPS, SPDY, HTTP2, WebSocket, TLS, FastCGI, etc.
- Content based routing, support user-defined routing rule in advanced domain-specific language.
- Support multiple load balancing policies.
- Flexible plugin framework to extend functionality. Based on the framework, developer can add new features rapidly.
- Efficient, easy and centralized management, with RESTful API and Dashboard support.
- Detailed built-in metrics available for service status monitor.

## Getting Started
- [Build and run](docs/en_us/installation/install_from_source.md)
- Data plane: BFE Server [build and run](docs/en_us/installation/install_from_source.md)
- Control plane: English document coming soon. [Chinese version](https://github.com/bfenetworks/api-server/blob/develop/docs/zh_cn/deploy.md)

## Running the tests
- See [Build and run](docs/en_us/installation/install_from_source.md)
Expand All @@ -44,7 +63,7 @@ BFE is a modern layer 7 load balancer from baidu.

## Communication
- BFE community on Slack: [Sign up](https://slack.cncf.io/) CNCF Slack and join bfe channel.
- BFE developer group on WeChat: [Send a request mail](mailto:yangsijie@baidu.com) with your WeChat ID and a contribution you've made to BFE(such as a PR/Issue). We will invite you right away.
- BFE developer group on WeChat: [Send a request mail](mailto:iyangsj@gmail.com) with your WeChat ID and a contribution you've made to BFE(such as a PR/Issue). We will invite you right away.

## License
BFE is under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.0
1.4.0
Loading

0 comments on commit 826f6c8

Please sign in to comment.