From 444e537a6398f17fc2113fc4cbfdfcc21966403c Mon Sep 17 00:00:00 2001 From: Tyler Treat Date: Thu, 25 Feb 2021 10:09:29 -0700 Subject: [PATCH] Prepare v1.5.1 release [skip ci] --- documentation/configuration.md | 2 +- documentation/quick_start.md | 4 +- go.mod | 10 +- go.sum | 38 +-- server/version.go | 2 +- website/i18n/en.json | 6 + .../version-v1.5.1/configuration.md | 228 ++++++++++++++++++ .../version-v1.5.1/quick_start.md | 111 +++++++++ website/versions.json | 1 + 9 files changed, 365 insertions(+), 37 deletions(-) create mode 100644 website/versioned_docs/version-v1.5.1/configuration.md create mode 100644 website/versioned_docs/version-v1.5.1/quick_start.md diff --git a/documentation/configuration.md b/documentation/configuration.md index 3eafe801..6dd3510a 100644 --- a/documentation/configuration.md +++ b/documentation/configuration.md @@ -24,7 +24,7 @@ USAGE: liftbridge [global options] command [command options] [arguments...] VERSION: - v1.5.0 + v1.5.1 COMMANDS: help, h Shows a list of commands or help for one command diff --git a/documentation/quick_start.md b/documentation/quick_start.md index 90eaa063..999ba209 100644 --- a/documentation/quick_start.md +++ b/documentation/quick_start.md @@ -46,7 +46,7 @@ only be set on one server when bootstrapping a cluster.** ```shell $ liftbridge --raft-bootstrap-seed --embedded-nats -INFO[2020-12-29 13:19:33] Liftbridge Version: v1.5.0 +INFO[2020-12-29 13:19:33] Liftbridge Version: v1.5.1 INFO[2020-12-29 13:19:33] Server ID: m6nxFIddI395AaQABIQqNL INFO[2020-12-29 13:19:33] Namespace: liftbridge-default INFO[2020-12-29 13:19:33] NATS Servers: [nats://127.0.0.1:4222] @@ -62,7 +62,7 @@ We set the `--data-dir` and `--port` flags to avoid clobbering the first server. ```shell $ liftbridge --data-dir /tmp/liftbridge/server-2 --port=9293 -INFO[2020-12-29 13:21:09] Liftbridge Version: v1.5.0 +INFO[2020-12-29 13:21:09] Liftbridge Version: v1.5.1 INFO[2020-12-29 13:21:09] Server ID: 8mTiXh8VSFFBB8kIK0IOGU INFO[2020-12-29 13:21:09] Namespace: liftbridge-default INFO[2020-12-29 13:21:09] NATS Servers: [nats://127.0.0.1:4222] diff --git a/go.mod b/go.mod index 0485ee79..7671748e 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/hashicorp/golang-lru v0.5.4 github.com/hashicorp/raft v1.1.2 github.com/liftbridge-io/go-liftbridge/v2 v2.0.2-0.20201230170826-7ed0a0b06362 - github.com/liftbridge-io/liftbridge-api v1.5.0 + github.com/liftbridge-io/liftbridge-api v1.5.1 github.com/liftbridge-io/nats-on-a-log v0.0.0-20200818183806-bb17516cf3a3 github.com/liftbridge-io/raft-boltdb v0.0.0-20200414234651-aaf6e08d8f73 github.com/mattn/go-colorable v0.1.7 // indirect @@ -39,11 +39,11 @@ require ( github.com/urfave/cli v1.22.4 go.etcd.io/bbolt v1.3.5 // indirect golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de // indirect - golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect + golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 // indirect + golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 // indirect golang.org/x/text v0.3.5 // indirect - google.golang.org/genproto v0.0.0-20210212180131-e7f2df4ecc2d // indirect - google.golang.org/grpc v1.35.0 + google.golang.org/genproto v0.0.0-20210224155714-063164c882e6 // indirect + google.golang.org/grpc v1.36.0 gopkg.in/ini.v1 v1.57.0 // indirect launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect ) diff --git a/go.sum b/go.sum index 6c3de020..60989f1c 100644 --- a/go.sum +++ b/go.sum @@ -44,7 +44,6 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -65,7 +64,6 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -190,17 +188,11 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/liftbridge-io/go-liftbridge/v2 v2.0.2-0.20201118225953-b849cccb6467 h1:Ls62H5vuS7lNfBdDnLaA0kG8hIa91fNJRQY2WGYV/aM= -github.com/liftbridge-io/go-liftbridge/v2 v2.0.2-0.20201118225953-b849cccb6467/go.mod h1:24NMu02Ba2sMO2y+IYstP1UFKVA4a6/p54Lc7KccSLc= github.com/liftbridge-io/go-liftbridge/v2 v2.0.2-0.20201230170826-7ed0a0b06362 h1:oRrmcbPJxSaS1YaGqLlSOUwTLn1/8shN/qeC3pSKCDA= github.com/liftbridge-io/go-liftbridge/v2 v2.0.2-0.20201230170826-7ed0a0b06362/go.mod h1:1yLlNSFpRxHAUiFlmBC57h1FDZbkx6ypoMximsIpIhU= -github.com/liftbridge-io/liftbridge-api v1.1.1-0.20201029165056-10f2aa65f256 h1:2pZtC3v6IBTwE70xfb/k0DPlOJ6BlXpthCUWrxCnhwo= -github.com/liftbridge-io/liftbridge-api v1.1.1-0.20201029165056-10f2aa65f256/go.mod h1:6IFEFZ4ncnOgeDVjSt0vh1lKNhlJ5YT9xnG1eRa9LC8= github.com/liftbridge-io/liftbridge-api v1.3.1-0.20201124191421-8ceb6d0858ac/go.mod h1:6IFEFZ4ncnOgeDVjSt0vh1lKNhlJ5YT9xnG1eRa9LC8= -github.com/liftbridge-io/liftbridge-api v1.4.2-0.20201228201911-4b2d99797dbb h1:XdwKrJh9gUJ+kaOwYfU6Kt+mZxqOeJQ8oLFbVjpoNuA= -github.com/liftbridge-io/liftbridge-api v1.4.2-0.20201228201911-4b2d99797dbb/go.mod h1:6IFEFZ4ncnOgeDVjSt0vh1lKNhlJ5YT9xnG1eRa9LC8= -github.com/liftbridge-io/liftbridge-api v1.5.0 h1:pUhz08byv0A0Ba2c49ypOgKvPA/axMAoql/W/hpqRcI= -github.com/liftbridge-io/liftbridge-api v1.5.0/go.mod h1:6IFEFZ4ncnOgeDVjSt0vh1lKNhlJ5YT9xnG1eRa9LC8= +github.com/liftbridge-io/liftbridge-api v1.5.1 h1:R/Kk+c1aTt+gh+le4A/ifjO+42DHUOPGYgwgDQa1+cE= +github.com/liftbridge-io/liftbridge-api v1.5.1/go.mod h1:6IFEFZ4ncnOgeDVjSt0vh1lKNhlJ5YT9xnG1eRa9LC8= github.com/liftbridge-io/nats-on-a-log v0.0.0-20200818183806-bb17516cf3a3 h1:O4mg1NEmukgY8hxen3grrG5RY34LadMTzpbjf8kM2tA= github.com/liftbridge-io/nats-on-a-log v0.0.0-20200818183806-bb17516cf3a3/go.mod h1:wmIIYVq+psahPlB1rvtTkGiltdihsKJbqwE1DkIPwj4= github.com/liftbridge-io/raft-boltdb v0.0.0-20200414234651-aaf6e08d8f73 h1:8r/ReB1ns87pVDwSnPj87HIbOu/5y0uDyGChx9mUGSQ= @@ -395,10 +387,8 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201002202402-0a1ea396d57c h1:dk0ukUIHmGHqASjP0iue2261isepFCC6XRCSd1nHgDw= golang.org/x/net v0.0.0-20201002202402-0a1ea396d57c/go.mod h1:iQL9McJNjoIa5mjH6nYTCTZXUN6RP+XW3eib7Ya3XcI= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM= +golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -437,18 +427,14 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201223074533-0d417f636930 h1:vRgIt+nup/B/BwIS0g2oC0haq0iqbV3ZA+u6+0TlNCo= -golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 h1:8qxJSnu+7dRq6upnbntrmriWByIakBuct5OM/MdQC1M= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -496,10 +482,8 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20201002142447-3860012362da h1:DTQYk4u7nICKkkVZsBv0/0po0ChISxAJ5CTAfUhO0PQ= google.golang.org/genproto v0.0.0-20201002142447-3860012362da/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d h1:HV9Z9qMhQEsdlvxNFELgQ11RkMzO3CMkjEySjCtuLes= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210212180131-e7f2df4ecc2d h1:Edhcm0CKDPLQIecHCp5Iz57Lo7MfT6zUFBAlocmOjcY= -google.golang.org/genproto v0.0.0-20210212180131-e7f2df4ecc2d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210224155714-063164c882e6 h1:bXUwz2WkXXrXgiLxww3vWmoSHLOGv4ipdPdTvKymcKw= +google.golang.org/genproto v0.0.0-20210224155714-063164c882e6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -508,10 +492,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/server/version.go b/server/version.go index dc03a4a6..f4acc1c5 100644 --- a/server/version.go +++ b/server/version.go @@ -1,4 +1,4 @@ package server // Version of the Liftbridge server. -const Version = "v1.5.0" +const Version = "v1.5.1" diff --git a/website/i18n/en.json b/website/i18n/en.json index 7d00d226..898d5305 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -271,6 +271,12 @@ }, "version-v1.5.0/version-v1.5.0-scalability-configuration": { "title": "Configuring for Scalability" + }, + "version-v1.5.1/version-v1.5.1-configuration": { + "title": "Configuration" + }, + "version-v1.5.1/version-v1.5.1-quick-start": { + "title": "Quick Start" } }, "links": { diff --git a/website/versioned_docs/version-v1.5.1/configuration.md b/website/versioned_docs/version-v1.5.1/configuration.md new file mode 100644 index 00000000..5bde8efb --- /dev/null +++ b/website/versioned_docs/version-v1.5.1/configuration.md @@ -0,0 +1,228 @@ +--- +id: version-v1.5.1-configuration +title: Configuration +original_id: configuration +--- + +Liftbridge provides limited configuration through command-line flags and full +configuration using a configuration file. Flags will always take precedent +over settings in the configuration file. + +The configuration file is passed in using the `--config` flag: + +```shell +$ liftbridge --config liftbridge.yaml +``` + +To get a full list of the CLI flags, use the `--help` flag: + +```shell +$ liftbridge --help +NAME: + liftbridge - Lightweight, fault-tolerant message streams + +USAGE: + liftbridge [global options] command [command options] [arguments...] + +VERSION: + v1.5.1 + +COMMANDS: + help, h Shows a list of commands or help for one command + +GLOBAL OPTIONS: + --config FILE, -c FILE load configuration from FILE + --server-id value, --id value ID of the server in the cluster if there is no stored ID (default: random ID) + --namespace value, --ns value cluster namespace (default: "liftbridge-default") + --nats-servers ADDR[,ADDR], -n ADDR[,ADDR] connect to NATS cluster at ADDR[,ADDR] (default: "nats://127.0.0.1:4222") + --embedded-nats, -e run a NATS server embedded in this process + --embedded-nats-config FILE, --nc FILE load configuration for embedded NATS server from FILE + --data-dir DIR, -d DIR store data in DIR (default: "/tmp/liftbridge/") + --port value, -p value port to bind to (default: 9292) + --tls-cert value server certificate file + --tls-key value private key for server certificate + --level value, -l value logging level [debug|info|warn|error] (default: "info") + --raft-bootstrap-seed bootstrap the Raft cluster by electing self as leader if there is no existing state + --raft-bootstrap-peers value bootstrap the Raft cluster with the provided list of peer IDs if there is no existing state + --help, -h show help + --version, -v print the version +``` + +## Configuration File Format + +The configuration file uses a YAML format. The configuration settings are +described below. Settings follow a hierarchical pattern delimited by periods. +The full, flattened name or nested names can be used. For example: + +```yaml +logging.level: debug +logging.recovery: true +logging.raft: true +``` + +The above configuration is equivalent to: + +```yaml +logging: + level: debug + recovery: true + raft: true +``` + +## Example Configuration File + +An example configuration file is shown below. + +```yaml +--- +listen: localhost:9293 +host: localhost +data.dir: /tmp/liftbridge/server-2 +activity.stream.enabled: true + +# Configure logging. +logging: + level: debug + raft: true + +# Define NATS cluster to connect to. +nats.servers: + - nats://localhost:4300 + - nats://localhost:4301 + +# Specify message stream settings. +streams: + retention.max: + age: 24h + messages: 100 + compact.enabled: true + +# Specify cluster settings. +clustering: + server.id: server-2 + raft.bootstrap.seed: true + replica.max.lag.time: 20s +``` + +## Overriding Configuration Settings with Environment Variables + +For configuration set in the configuration file the value can be overridden +with environment variables prefixed with `LIFTBRIDGE_`. The key must exist in +the config file to be overridden. + +For example using the config file from above one could override the host and +logging level with: + +```sh +env LIFTBRIDGE_HOST=liftbridge.example.com \ + LIFTBRIDGE_LOGGING_LEVEL=error \ + liftbridge --config config.yaml +``` + +## Configuration Settings + +Below is the list of Liftbridge configuration settings, including the name of +the setting in the configuration file and the CLI flag if it exists. + +| Name | Flag | Description | Type | Default | Valid Values | +|:----|:----|:----|:----|:----|:----| +| listen | | The server listen host/port. This is the host and port the server will bind to. If this is not specified but `host` and `port` are specified, these values will be used. If neither `listen` nor `host`/`port` are specified, the default listen address will be used. | string | 0:0:0:0:9292 | | +| host | | The server host that is advertised to clients, i.e. the address clients will attempt to connect to based on metadata API responses. If not set, `listen` will be returned to clients. This value may differ from `listen` in situations where the external address differs from the internal address, e.g. when running in a container. If `listen` is not specified, the server will also bind to this host. | string | localhost | | +| port | port, p | The server port that is advertised to clients. See `host` for more information on how this behaves. | int | 9292 | | +| tls.key | tls-key | The private key file for server certificate. This must be set in combination with `tls.cert` to enable TLS. | string | | +| tls.cert | tls-cert | The server certificate file. This must be set in combination with `tls.key` to enable TLS. | string | | +| tls.client.auth.enabled | tls-client-auth | Enforce client-side authentication via certificate. | bool | false | +| tls.client.auth.ca | tls-client-auth-ca | The CA certificate file to use when authenticating clients. | string | | +| logging.level | level, l | The logging level. | string | info | [debug, info, warn, error] | +| logging.recovery | | Log messages resulting from the replay of the Raft log on server recovery. | bool | false | | +| logging.raft | | Enables logging in the Raft subsystem. | bool | false | | +| logging.nats | | Enables logging for the embedded NATS server, if enabled (see [`nats.embedded`](#nats-configuration-settings)). | bool | false | | +| data.dir | data-dir, d | The directory to store data in. | string | /tmp/liftbridge/namespace | | +| batch.max.messages | | The maximum number of messages to batch when writing to disk. | int | 1024 | +| batch.max.time | | The maximum time to wait to batch more messages when writing to disk. | duration | 0 | | +| metadata.cache.max.age | | The maximum age of cached broker metadata. | duration | 2m | | +| nats | | NATS configuration. | map | | [See below](#nats-configuration-settings) | +| streams | | Write-ahead log configuration for message streams. | map | | [See below](#streams-configuration-settings) | +| clustering | | Broker cluster configuration. | map | | [See below](#clustering-configuration-settings) | +| activity | | Meta activity event stream configuration. | map | | [See below](#activity-configuration-settings) | +| cursors | | Cursor management configuration. | map | | [See below](#cursors-configuration-settings) | + +### NATS Configuration Settings + +Below is the list of the configuration settings for the `nats` section of +the configuration file. + +| Name | Flag | Description | Type | Default | Valid Values | +|:----|:----|:----|:----|:----|:----| +| servers | nats-servers, n | List of NATS hosts to connect to. | list | nats://localhost:4222 | | +| user | | Username to use to connect to NATS servers. | string | | | +| password | | Password to use to connect to NATS servers. | string | | | +| tls.cert | | Path to NATS certificate file. | string | | | +| tls.key | | Path to NATS key file. | string | | | +| tls.ca | | Path to NATS CA Root file. | string | | | +| embedded | embedded-nats, e | Run a NATS server embedded in the process. | bool | false | | +| embedded.config | embedded-nats-config, nc | Path to [configuration file](https://docs.nats.io/nats-server/configuration) for embedded NATS server. | string | | | + +### Streams Configuration Settings + +Below is the list of the configuration settings for the `streams` section of the +configuration file. These settings are applied globally to all streams. +However, streams can be individually configured when they are created, +overriding these settings. + +| Name | Flag | Description | Type | Default | Valid Values | +|:----|:----|:----|:----|:----|:----| +| retention.max.bytes | | The maximum size a stream's log can grow to, in bytes, before we will discard old log segments to free up space. A value of 0 indicates no limit. | int64 | 0 | | +| retention.max.messages | | The maximum size a stream's log can grow to, in number of messages, before we will discard old log segments to free up space. A value of 0 indicates no limit. | int64 | 0 | | +| retention.max.age | | The TTL for stream log segment files, after which they are deleted. A value of 0 indicates no TTL. | duration | 168h | | +| cleaner.interval | | The frequency to check if a new stream log segment file should be rolled and whether any segments are eligible for deletion based on the retention policy or compaction if enabled. | duration | 5m | | +| segment.max.bytes | | The maximum size of a single stream log segment file in bytes. Retention is always done a file at a time, so a larger segment size means fewer files but less granular control over retention. | int64 | 268435456 | | +| segment.max.age | | The maximum time before a new stream log segment is rolled out. A value of 0 means new segments will only be rolled when `segment.max.bytes` is reached. Retention is always done a file at a time, so a larger value means fewer files but less granular control over retention. | duration | value of `retention.max.age` | | +| compact.enabled | | Enables stream log compaction. Compaction works by retaining only the latest message for each key and discarding older messages. The frequency in which compaction runs is controlled by `cleaner.interval`. | bool | false | | +| compact.max.goroutines | | The maximum number of concurrent goroutines to use for compaction on a stream log (only applicable if `compact.enabled` is `true`). | int | 10 | | +| auto.pause.time | | The amount of time a stream partition can go idle, i.e. not receive a message, before it is automatically paused. A value of 0 disables auto pausing. | duration | 0 | | +| auto.pause.disable.if.subscribers | | Disables automatic stream partition pausing when there are subscribers. | bool | false | | +| concurrency.control | | Enable Optimistic Concurrency Control on message publishing for all streams. | bool | false | | + +### Clustering Configuration Settings + +Below is the list of the configuration settings for the `clustering` section of +the configuration file. + +| Name | Flag | Description | Type | Default | Valid Values | +|:----|:----|:----|:----|:----|:----| +| server.id | server-id, id | ID of the server in the cluster. | string | random id | string with no spaces or periods | +| namespace | namespace, ns | Cluster namespace. | string | liftbridge-default | string with no spaces or periods | +| raft.snapshot.retain | | The number Raft log snapshots to retain on disk. | int | 2 | | +| raft.snapshot.threshold | | Controls how many outstanding logs there must be before taking a snapshot. This prevents excessive snapshots when a small set of logs can be replayed. | int | 8192 | | +| raft.cache.size | | The number of Raft logs to hold in memory for quick lookup. | int | 512 | | +| raft.bootstrap.seed | raft-bootstrap-seed | Bootstrap the Raft cluster by electing self as leader if there is no existing state. If this is enabled, `raft.bootstrap.peers` should generally not be used, either on this node or peer nodes, since cluster topology is not being explicitly defined. Instead, peers should be started without bootstrap flags which will cause them to automatically discover the bootstrapped leader and join the cluster. This is equivalent to setting `raft.bootstrap.peers` to be just this server, and it should only be enabled on one server in the cluster. | bool | false | | +| raft.bootstrap.peers | raft-bootstrap-peers | Bootstrap the Raft cluster with the provided list of peer IDs if there is no existing state. This should generally not be used in combination with `raft.bootstrap.seed` since it is explicitly defining cluster topology and the configured topology will elect a leader. Note that once the cluster is established, new nodes can join without setting bootstrap flags since they will automatically discover the elected leader and join the cluster. If `raft.bootstrap.peers` is set on multiple servers, it is recommended to set the full list of peers on each rather than a subset to avoid potential issues when setting `raft.max.quorum.size`. | list | | | +| raft.max.quorum.size | | The maximum number of servers to participate in the Raft quorum. Any servers added to the cluster beyond this number will participate as non-voters. Non-voter servers operate as normal but are not involved in the Raft election or commitment processes. Limiting this number allows the cluster to better scale since Raft requires a minimum of `N/2+1` nodes to perform operations. The should be set to the same value on all servers in the cluster. A value of 0 indicates no limit. | int | 0 | | +| replica.max.lag.time | | If a follower hasn't sent any replication requests or hasn't caught up to the leader's log end offset for at least this time, the leader will remove the follower from ISR. | duration | 15s | | +| replica.max.leader.timeout | | If a leader hasn't sent any replication responses for at least this time, the follower will report the leader to the controller. If a majority of the replicas report the leader, a new leader is selected by the controller. | duration | 15s | | +| replica.max.idle.wait | | The maximum amount of time a follower will wait before making a replication request once the follower is caught up with the leader. This value should always be less than `replica.max.lag.time` to avoid frequent shrinking of ISR for low-throughput streams. | duration | 10s | | +| replica.fetch.timeout | | Timeout duration for follower replication requests. | duration | 3s | | +| min.insync.replicas | | Specifies the minimum number of replicas that must acknowledge a stream write before it can be committed. If the ISR drops below this size, messages cannot be committed. | int | 1 | [1,...] | +| replication.max.bytes | | The maximum payload size, in bytes, a leader can send to followers for replication messages. This controls the amount of data that can be transferred for individual replication requests. If a leader receives a published message larger than this size, it will return an ack error to the client. Because replication is done over NATS, this cannot exceed the [`max_payload`](https://docs.nats.io/nats-server/configuration#limits) limit configured on the NATS cluster. Thus, this defaults to 1MB, which is the default value for `max_payload`. This should generally be set to match the value of `max_payload`. Setting it too low will preclude the replication of messages larger than it and negatively impact performance. This value should also be the same for all servers in the cluster. | int | 1048576 | | + +### Activity Configuration Settings + +Below is the list of the configuration settings for the `activity` section of +the configuration file. + +| Name | Flag | Description | Type | Default | Valid Values | +|:----|:----|:----|:----|:----|:----| +| stream.enabled | | Enables the activity stream. This will create an internal stream called `__activity` which events will be published to. | bool | false | | +| stream.publish.timeout | | The timeout for publishes to the activity stream. This is the time to wait for an ack from the activity stream, which means it's related to `stream.publish.ack.policy`. If the ack policy is `none`, this has no effect. | duration | 5s | | +| stream.publish.ack.policy | | The ack policy to use for publishes to the activity stream. The value `none` means publishes will not wait for an ack, `leader` means publishes will wait for the ack sent when the leader has committed the event, and `all` means publishes will wait for the ack sent when all replicas have committed the event. | string | all | [none, leader, all] | + +### Cursors Configuration Settings + +Below is the list of the configuration settings for the `cursors` section of +the configuration file. + +| Name | Flag | Description | Type | Default | Valid Values | +|:----|:----|:----|:----|:----|:----| +| stream.partitions | | Sets the number of partitions for the internal `__cursors` stream which stores consumer cursors. A value of 0 disables the cursors stream. This cannot be changed once it is set. | int | 0 | | +| stream.auto.pause.time | | The amount of time a partition in the internal `__cursors` stream can go idle, i.e. not receive a cursor update or fetch, before it is automatically paused. A value of 0 disables auto pausing. | duration | 1m | | diff --git a/website/versioned_docs/version-v1.5.1/quick_start.md b/website/versioned_docs/version-v1.5.1/quick_start.md new file mode 100644 index 00000000..f7196d0c --- /dev/null +++ b/website/versioned_docs/version-v1.5.1/quick_start.md @@ -0,0 +1,111 @@ +--- +id: version-v1.5.1-quick-start +title: Quick Start +original_id: quick-start +--- + +There are three ways to get started running Liftbridge on your machine: +[downloading a pre-built binary](#binary), [building from source](#building-from-source), +or [running a Docker container](#docker-container). There are also several +options for running a Liftbridge cluster [described below](#running-a-liftbridge-cluster-locally). + +## Binary + +A pre-built Liftbridge binary can be downloaded for a specific platform from +the [releases](https://github.com/liftbridge-io/liftbridge/releases) page. Once +you have installed the binary, refer to the steps under [Building From +Source](#building-from-source) for running the server. + +## Building From Source + +A Liftbridge binary can be built and installed from source using +[Go](https://golang.org/doc/install). Follow the below step to install from +source. + +```shell +$ go get github.com/liftbridge-io/liftbridge +``` +*Liftbridge uses [Go modules](https://github.com/golang/go/wiki/Modules), so +ensure this is enabled, e.g. `export GO111MODULE=on`.* + +Liftbridge relies on [NATS](https://github.com/nats-io/nats-server) for +intra-cluster communication. By default, it will connect to a NATS server +running on localhost. The `--nats-servers` flag allows configuring the NATS +server(s) to connect to. Liftbridge can also run a NATS server [embedded in the +process](./embedded_nats.md), allowing it to run as a complete, self-contained +system with no external dependencies. The `--embedded-nats` flag will start an +embedded NATS server. + +Also note that Liftbridge is clustered by default and relies on Raft for +coordination. This means a cluster of three or more servers is normally run +for high availability, and Raft manages electing a leader. A single server is +actually a cluster of size 1. For safety purposes, the server cannot elect +itself as leader without using the `--raft-bootstrap-seed` flag, which will +indicate to the server to elect itself as leader. This will start a single +server that can begin handling requests. **Use this flag with caution as it should +only be set on one server when bootstrapping a cluster.** + +```shell +$ liftbridge --raft-bootstrap-seed --embedded-nats +INFO[2020-12-29 13:19:33] Liftbridge Version: v1.5.1 +INFO[2020-12-29 13:19:33] Server ID: m6nxFIddI395AaQABIQqNL +INFO[2020-12-29 13:19:33] Namespace: liftbridge-default +INFO[2020-12-29 13:19:33] NATS Servers: [nats://127.0.0.1:4222] +INFO[2020-12-29 13:19:33] Default Retention Policy: [Age: 1 week, Compact: false] +INFO[2020-12-29 13:19:33] Default Partition Pausing: disabled +INFO[2020-12-29 13:19:33] Starting embedded NATS server on 0.0.0.0:4222 +INFO[2020-12-29 13:19:33] Starting Liftbridge server on 0.0.0.0:9292... +INFO[2020-12-29 13:19:34] Server became metadata leader, performing leader promotion actions +``` + +Once a leader has been elected, other servers will automatically join the cluster. +We set the `--data-dir` and `--port` flags to avoid clobbering the first server. + +```shell +$ liftbridge --data-dir /tmp/liftbridge/server-2 --port=9293 +INFO[2020-12-29 13:21:09] Liftbridge Version: v1.5.1 +INFO[2020-12-29 13:21:09] Server ID: 8mTiXh8VSFFBB8kIK0IOGU +INFO[2020-12-29 13:21:09] Namespace: liftbridge-default +INFO[2020-12-29 13:21:09] NATS Servers: [nats://127.0.0.1:4222] +INFO[2020-12-29 13:21:09] Default Retention Policy: [Age: 1 week, Compact: false] +INFO[2020-12-29 13:21:09] Default Partition Pausing: disabled +INFO[2020-12-29 13:21:09] Starting Liftbridge server on 0.0.0.0:9293... +``` + +We can also bootstrap a cluster by providing the explicit cluster configuration. +To do this, we provide the IDs of the participating peers in the cluster using the +`--raft-bootstrap-peers` flag. Raft will then handle electing a leader. + +```shell +$ liftbridge --raft-bootstrap-peers server-2,server-3 +``` + +## Docker Container + +Instead of running a binary, you can run Liftbridge using a container. There is +a [container image](https://hub.docker.com/r/liftbridge/standalone-dev) +available which runs an instance of Liftbridge and an embedded NATS server +inside a single Docker container. This is meant for development and testing +purposes. Use the following Docker commands to run this container: + +```shell +$ docker pull liftbridge/standalone-dev +$ docker run -d --name=liftbridge-main -p 4222:4222 -p 9292:9292 -p 8222:8222 -p 6222:6222 liftbridge/standalone-dev +``` + +This will run the container which will start both the NATS and Liftbridge +servers. To check the logs to see if the container started properly, run: + +```shell +$ docker logs liftbridge-main +``` + +See the [deployment guide](./deployment.md) for more information. + +## Running a Liftbridge Cluster Locally + +The quickest way to get a multi-node Liftbridge cluster up and running on your +machine is with either [Docker Compose](https://docs.docker.com/compose) or +[Kind](https://kind.sigs.k8s.io) (Kubernetes in Docker). Follow the +[deployment guide](./deployment.md) for help running a cluster locally for +development or testing. diff --git a/website/versions.json b/website/versions.json index 97b3972a..8f417705 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,4 +1,5 @@ [ + "v1.5.1", "v1.5.0", "v1.4.1", "v1.4.0",