Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta release #1263

Merged
merged 2 commits into from
Jun 6, 2023
Merged

Beta release #1263

merged 2 commits into from
Jun 6, 2023

Conversation

efirs
Copy link
Collaborator

@efirs efirs commented Jun 6, 2023

Describe your changes

How best to test these changes

Issue ticket number and link

Server changes:
* Optional listening on unix domain socket.
* Local system root detection and auto authentication on UDS
  connection.
* TLS support. tigris_server2 is started with TLS and tests are run
  through TLS on it. Due to cmux limitations it can only be routed
  to HTTP or GRPC, so there is an option added to control this `server.tls_http`
* Test server configs moved to `test/config/server.{test,test2}.yaml`
  Teste secrets move to `test/config/keys/*`.

Single node instance improvement made as part of
`tigrisdata/tigris-local` container. The service is configured and
started using `scripts/service-local.sh` in the container.

The follwing configuration available:

* TIGRIS_BOOTSTRAP_LOCAL_AUTH - initialize authentication on first
  instance start. It creates necessary tokens, users, namespaces for
  server <-> gotrue interconnection.
* TIGRIS_LOCAL_PERSISTENCE initializes FDB in ssd mode vs memory.
* TIGRIS_LOCAL_GENERATE_ADMIN_TOKEN produces admin user token in the
  data directory (./user_admin_token.txt). This not necessary
  on unix compatible system, where we can detect container owner by peer.
* TIGRIS_SKIP_LOCAL_AUTH allows to temporary disable authenticaion on
  already initialized system.
* TIGRIS_LOCAL_DEBUG can be set to enable debug logging in `./init.log`

Bootstrap can only be initiated if the data directory is empty, it's
noop otherwise.

```
  docker run -e TIGRIS_BOOTSTRAP_LOCAL_AUTH=1 \
    -e TIGRIS_LOCAL_PERSISTENCE=1 \
    -e TIGRIS_LOCAL_GENERATE_ADMIN_TOKEN=1 \
    --name my-tigris -v $TMPDIR:/var/lib/tigris \
    -d -p $HOST_PORT:8081 tigrisdata/tigris-local
```

This is the structure of the persistence volume:

```
/var/lib/tigris/
├── foundationdb
│   ├── data
│   │   ├── coordination-0.fdq
│   │   ├── coordination-1.fdq
│   │   ├── log2-V_6-3c801d05cd47c75a120e968dce9187a9.sqlite
│   │   ├── log2-V_6-3c801d05cd47c75a120e968dce9187a9.sqlite-wal
│   │   ├── logqueue-V_6-3c801d05cd47c75a120e968dce9187a9-0.fdq
│   │   ├── processId
│   │   ├── storage-1b4c5b99aff541f54264fa55e20b84b3.sqlite
│   │   └── storage-1b4c5b99aff541f54264fa55e20b84b3.sqlite-wal
│   └── logs
│       └── trace.127.0.0.1.4500.1685517319.uq6Q1t.1.31.xml
├── gotrue
│   ├── config
│   │   ├── key
│   │   ├── key_pem.pub
│   │   └── key.pub
│   ├── data
│   └── logs
│       ├── stderr
│       └── stdout
├── initialized
├── init.log
├── server
│   ├── config
│   │   └── server.yaml
│   ├── data
│   ├── logs
│   │   ├── stderr
│   │   └── stdout
│   └── unix.sock
├── typesense
│   ├── config
│   │   └── typesense-server.ini
│   ├── data
│   │   ├── db
│   │   │   ├── 000234.log
│   │   │   ├── 000236.sst
│   │   │   ├── archive
│   │   │   │   ├── 000005.log
│   │   │   │   └── 000232.log
│   │   │   ├── CURRENT
│   │   │   ├── IDENTITY
│   │   │   ├── LOCK
│   │   │   ├── LOG
│   │   │   ├── MANIFEST-000004
│   │   │   └── OPTIONS-000007
│   │   ├── meta
│   │   │   ├── 000015.log
│   │   │   ├── archive
│   │   │   ├── CURRENT
│   │   │   ├── IDENTITY
│   │   │   ├── LOCK
│   │   │   ├── LOG
│   │   │   ├── LOG.old.1685517292544545
│   │   │   ├── LOG.old.1685517319188484
│   │   │   ├── MANIFEST-000014
│   │   │   ├── OPTIONS-000012
│   │   │   └── OPTIONS-000017
│   │   └── state
│   │       ├── log
│   │       │   ├── log_inprogress_00000000000000000001
│   │       │   └── log_meta
│   │       ├── meta
│   │       │   └── raft_meta
│   │       └── snapshot
│   │           └── snapshot_00000000000000000482
│   │               ├── db_snapshot
│   │               │   ├── 000231.sst
│   │               │   ├── CURRENT
│   │               │   ├── MANIFEST-000004
│   │               │   └── OPTIONS-000007
│   │               └── __raft_snapshot_meta
│   └── logs
│       └── typesense.log
└── user_admin_token.txt
```
@reviewpad reviewpad bot added the large label Jun 6, 2023
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Patch coverage: 37.76% and project coverage change: -0.28 ⚠️

Comparison is base (ca2e6e5) 65.03% compared to head (b2eec4c) 64.76%.

❗ Current head b2eec4c differs from pull request most recent head 53ba9fe. Consider uploading reports for the commit 53ba9fe to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             beta    #1263      +/-   ##
==========================================
- Coverage   65.03%   64.76%   -0.28%     
==========================================
  Files         217      217              
  Lines       27262    27460     +198     
==========================================
+ Hits        17731    17784      +53     
- Misses       8009     8138     +129     
- Partials     1522     1538      +16     
Impacted Files Coverage Δ
server/config/options.go 0.00% <ø> (ø)
server/services/v1/auth/common.go 10.71% <0.00%> (-1.49%) ⬇️
util/util.go 53.96% <0.00%> (-0.32%) ⬇️
server/middleware/authz.go 70.11% <11.11%> (-3.38%) ⬇️
server/middleware/auth.go 68.31% <25.00%> (-2.40%) ⬇️
server/muxer/grpc.go 44.44% <35.06%> (-55.56%) ⬇️
server/muxer/muxer.go 49.09% <40.62%> (-13.41%) ⬇️
server/request/request.go 79.45% <40.74%> (-4.01%) ⬇️
server/muxer/http.go 62.50% <54.16%> (-24.60%) ⬇️
server/main.go 79.12% <100.00%> (+6.29%) ⬆️
... and 4 more

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@JigarJoshi JigarJoshi merged commit 50a70d3 into beta Jun 6, 2023
14 checks passed
@tigrisdata-argocd-bot
Copy link
Collaborator

🎉 This PR is included in version 1.0.0-beta.115 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants