Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
cybwan committed Aug 8, 2023
1 parent 3d98eaf commit 9ea1230
Show file tree
Hide file tree
Showing 209 changed files with 332 additions and 313 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ jobs:
needs: version
env:
VERSION: ${{ needs.version.outputs.version }}
BUILD_DATE_VAR: 'github.com/cybwan/fsmxlb/pkg/version.BuildDate'
BUILD_VERSION_VAR: 'github.com/cybwan/fsmxlb/pkg/version.Version'
BUILD_GITCOMMIT_VAR: 'github.com/cybwan/fsmxlb/pkg/version.GitCommit'
BUILD_DATE_VAR: 'github.com/flomesh-io/fsmxlb/pkg/version.BuildDate'
BUILD_VERSION_VAR: 'github.com/flomesh-io/fsmxlb/pkg/version.Version'
BUILD_GITCOMMIT_VAR: 'github.com/flomesh-io/fsmxlb/pkg/version.GitCommit'
strategy:
matrix:
id: [ "os", "xlb", "ccm" ]
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ endif
VERSION ?= dev
BUILD_DATE ?= $$(date +%Y-%m-%d-%H:%M)
GIT_SHA=$$(git rev-parse HEAD)
BUILD_DATE_VAR := github.com/cybwan/fsmxlb/pkg/version.BuildDate
BUILD_VERSION_VAR := github.com/cybwan/fsmxlb/pkg/version.Version
BUILD_GITCOMMIT_VAR := github.com/cybwan/fsmxlb/pkg/version.GitCommit
BUILD_DATE_VAR := github.com/flomesh-io/fsmxlb/pkg/version.BuildDate
BUILD_VERSION_VAR := github.com/flomesh-io/fsmxlb/pkg/version.Version
BUILD_GITCOMMIT_VAR := github.com/flomesh-io/fsmxlb/pkg/version.GitCommit

GO_LDFLAGS ?= "-X $(BUILD_DATE_VAR)=$(BUILD_DATE) -X $(BUILD_VERSION_VAR)=$(VERSION) -X $(BUILD_GITCOMMIT_VAR)=$(GIT_SHA) -s -w"

Expand All @@ -39,7 +39,7 @@ depends:
@mkdir -p /opt/fsmxlb/cert
@cp api/certification/* /opt/fsmxlb/cert/
@if [ ! -f /usr/local/sbin/bpftool ]; then git clone --recurse-submodules https://github.com/libbpf/bpftool.git && cd bpftool/src/ && make clean && make -j $(nproc) && cp -f ./bpftool /usr/local/sbin/bpftool && cd - && rm -fr bpftool; fi
@if [ ! -f /usr/local/sbin/ntc ]; then wget https://github.com/cybwan/iproute2/archive/refs/heads/fsmxlb.zip && unzip fsmxlb.zip && cd iproute2-fsmxlb/libbpf/src/ && mkdir build && DESTDIR=build make install && cd - && cd iproute2-fsmxlb/ && export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && cp -f tc/tc /usr/local/sbin/ntc && cd - && cd iproute2-fsmxlb/libbpf/src/ && make install && cd - && rm -fr fsmxlb.zip iproute2-fsmxlb; fi
@if [ ! -f /usr/local/sbin/ntc ]; then wget https://github.com/flomesh-io/iproute2/archive/refs/heads/fsmxlb.zip && unzip fsmxlb.zip && cd iproute2-fsmxlb/libbpf/src/ && mkdir build && DESTDIR=build make install && cd - && cd iproute2-fsmxlb/ && export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && cp -f tc/tc /usr/local/sbin/ntc && cd - && cd iproute2-fsmxlb/libbpf/src/ && make install && cd - && rm -fr fsmxlb.zip iproute2-fsmxlb; fi
@if [ ! -f /usr/lib64/libbpf.so.0.4.0 ]; then cd bpf && make && make install && cd -; fi
@if [ ! -f /usr/sbin/gobgp ]; then arch=${shell arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/} && echo https://github.com/osrg/gobgp/releases/download/v3.5.0/gobgp_3.5.0_linux_$${arch}.tar.gz.tar.gz && wget https://github.com/osrg/gobgp/releases/download/v3.5.0/gobgp_3.5.0_linux_$${arch}.tar.gz && tar -xzf gobgp_3.5.0_linux_$${arch}.tar.gz && rm gobgp_3.5.0_linux_$${arch}.tar.gz LICENSE README.md && mv gobgp* /usr/sbin/; fi
@if [ ! -f /usr/local/go/bin/go ]; then arch=${shell arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/} && echo https://go.dev/dl/go1.19.linux-$${arch}.tar.gz && wget https://go.dev/dl/go1.19.linux-$${arch}.tar.gz && tar -xzf go1.19.linux-$${arch}.tar.gz --directory /usr/local/ && rm go1.19.linux-$${arch}.tar.gz;echo please export PATH=\$${PATH}:/usr/local/go/bin; fi
Expand Down
8 changes: 4 additions & 4 deletions Makefile.docker
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

TARGETS := darwin/amd64 darwin/arm64 linux/amd64 linux/arm64
DIST_DIRS := find * -type d -exec
CTR_REGISTRY ?= cybwan
CTR_REGISTRY ?= flomesh-io
CTR_TAG ?= latest
VERIFY_TAGS ?= false

Expand All @@ -13,9 +13,9 @@ DOCKER_BUILDX_OUTPUT ?= type=registry
VERSION ?= dev
BUILD_DATE ?=
GIT_SHA=$$(git rev-parse HEAD)
BUILD_DATE_VAR := github.com/cybwan/fsmxlb/pkg/version.BuildDate
BUILD_VERSION_VAR := github.com/cybwan/fsmxlb/pkg/version.Version
BUILD_GITCOMMIT_VAR := github.com/cybwan/fsmxlb/pkg/version.GitCommit
BUILD_DATE_VAR := github.com/flomesh-io/fsmxlb/pkg/version.BuildDate
BUILD_VERSION_VAR := github.com/flomesh-io/fsmxlb/pkg/version.Version
BUILD_GITCOMMIT_VAR := github.com/flomesh-io/fsmxlb/pkg/version.GitCommit
DOCKER_GO_VERSION = 1.19

GO_LDFLAGS ?= "-X $(BUILD_DATE_VAR)=$(BUILD_DATE) -X $(BUILD_VERSION_VAR)=$(VERSION) -X $(BUILD_GITCOMMIT_VAR)=$(GIT_SHA) -s -w"
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
## fsmxlb
## How to build?

```bash
make depends

make subsys

make build-cli
```

## How to test ?

```bash
make run
make -f Makefile.standalone test-up
make -f Makefile.standalone test-apply-lb
make -f Makefile.standalone test-down
make stop
```

12 changes: 6 additions & 6 deletions api/api.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package api

import (
"github.com/cybwan/fsmxlb/api/restapi"
"github.com/cybwan/fsmxlb/api/restapi/handler"
"github.com/cybwan/fsmxlb/api/restapi/operations"
cmn "github.com/cybwan/fsmxlb/pkg/common"
"github.com/cybwan/fsmxlb/pkg/options"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/restapi"
"github.com/flomesh-io/fsmxlb/api/restapi/handler"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"
"github.com/flomesh-io/fsmxlb/pkg/options"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/go-openapi/loads"
flags "github.com/jessevdk/go-flags"
"log"
Expand Down
2 changes: 1 addition & 1 deletion api/apiutils/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"os/exec"
"strings"

"github.com/cybwan/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/models"
)

// ProcessInfoGet- Get Process Status using "top -bn 1" command
Expand Down
4 changes: 2 additions & 2 deletions api/cmd/fsmxlb-rest-api-server/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"sync"
"time"

cmn "github.com/cybwan/fsmxlb/pkg/common"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
dto "github.com/prometheus/client_model/go"
Expand Down
6 changes: 3 additions & 3 deletions api/restapi/configure_fsmxlb_rest_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"crypto/tls"
"net/http"

opts "github.com/cybwan/fsmxlb/pkg/options"
opts "github.com/flomesh-io/fsmxlb/pkg/options"

"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
"github.com/go-openapi/swag"

"github.com/cybwan/fsmxlb/api/restapi/handler"
"github.com/cybwan/fsmxlb/api/restapi/operations"
"github.com/flomesh-io/fsmxlb/api/restapi/handler"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
)

//go:generate swagger generate server --target ../../api --name FsmxlbRestAPI --spec ../swagger.yml --principal interface{}
Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
package handler

import (
"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
cmn "github.com/cybwan/fsmxlb/pkg/common"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/go-openapi/runtime/middleware"
"net"
)
Expand Down
2 changes: 1 addition & 1 deletion api/restapi/handler/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package handler
import (
"net/http"

cmn "github.com/cybwan/fsmxlb/pkg/common"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"

"github.com/go-openapi/runtime"
)
Expand Down
6 changes: 3 additions & 3 deletions api/restapi/handler/conntrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
package handler

import (
"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"

"github.com/go-openapi/runtime/middleware"
)
Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
package handler

import (
"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
cmn "github.com/cybwan/fsmxlb/pkg/common"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/go-openapi/runtime/middleware"
)

Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/fdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
package handler

import (
"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
"github.com/cybwan/fsmxlb/api/xlbnlp"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
"github.com/flomesh-io/fsmxlb/api/xlbnlp"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/go-openapi/runtime/middleware"
)

Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package handler
import (
"fmt"

"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
cmn "github.com/cybwan/fsmxlb/pkg/common"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/go-openapi/runtime/middleware"
)

Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/ipv4address.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ package handler

import (
"fmt"
"github.com/cybwan/fsmxlb/api/xlbnlp"
"github.com/flomesh-io/fsmxlb/api/xlbnlp"

"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/go-openapi/runtime/middleware"
)

Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
package handler

import (
"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
cmn "github.com/cybwan/fsmxlb/pkg/common"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/go-openapi/runtime/middleware"
)

Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package handler
import (
"net"

"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
cmn "github.com/cybwan/fsmxlb/pkg/common"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"

"github.com/go-openapi/runtime/middleware"
)
Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/neighbor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
package handler

import (
"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/xlbnlp"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/xlbnlp"

"github.com/cybwan/fsmxlb/api/restapi/operations"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/go-openapi/runtime/middleware"
)

Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
package handler

import (
"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
cmn "github.com/cybwan/fsmxlb/pkg/common"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"

"github.com/go-openapi/runtime/middleware"
)
Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
package handler

import (
"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
cmn "github.com/cybwan/fsmxlb/pkg/common"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"

"github.com/go-openapi/runtime/middleware"
)
Expand Down
6 changes: 3 additions & 3 deletions api/restapi/handler/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
package handler

import (
"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"

"github.com/go-openapi/runtime/middleware"
)
Expand Down
6 changes: 3 additions & 3 deletions api/restapi/handler/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ package handler
import (
"net/http"

"github.com/cybwan/fsmxlb/api/restapi/operations"
"github.com/cybwan/fsmxlb/pkg/options"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
"github.com/flomesh-io/fsmxlb/pkg/options"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/prometheus/client_golang/prometheus/promhttp"
Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ package handler

import (
"fmt"
"github.com/cybwan/fsmxlb/api/xlbnlp"
"github.com/flomesh-io/fsmxlb/api/xlbnlp"
"strings"

"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"
"github.com/go-openapi/runtime/middleware"
)

Expand Down
8 changes: 4 additions & 4 deletions api/restapi/handler/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ package handler
import (
"net"

"github.com/cybwan/fsmxlb/api/models"
"github.com/cybwan/fsmxlb/api/restapi/operations"
cmn "github.com/cybwan/fsmxlb/pkg/common"
"github.com/flomesh-io/fsmxlb/api/models"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
cmn "github.com/flomesh-io/fsmxlb/pkg/common"

tk "github.com/cybwan/fsmxlb/pkg/xlblib"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"

"github.com/go-openapi/runtime/middleware"
)
Expand Down
6 changes: 3 additions & 3 deletions api/restapi/handler/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
package handler

import (
"github.com/cybwan/fsmxlb/api/apiutils/status"
"github.com/cybwan/fsmxlb/api/restapi/operations"
tk "github.com/cybwan/fsmxlb/pkg/xlblib"
"github.com/flomesh-io/fsmxlb/api/apiutils/status"
"github.com/flomesh-io/fsmxlb/api/restapi/operations"
tk "github.com/flomesh-io/fsmxlb/pkg/xlblib"

"github.com/go-openapi/runtime/middleware"
)
Expand Down
Loading

0 comments on commit 9ea1230

Please sign in to comment.