Skip to content

Commit 806fae9

Browse files
authored
chore: prepare freighter v0.1.1-rc.2 (#20)
1 parent 04bf9e1 commit 806fae9

File tree

5 files changed

+73
-6
lines changed

5 files changed

+73
-6
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ members = [
1010

1111
[workspace.dependencies]
1212
freighter-auth = { path = "freighter-auth", registry = "freighter", version = "0.1.0-rc.1" }
13-
freighter-index = { path = "freighter-index", registry = "freighter", version = "0.1.0-rc.1" }
13+
freighter-index = { path = "freighter-index", registry = "freighter", version = "0.1.0-rc.2" }
1414
freighter-server = { path = "freighter-server", registry = "freighter", version = "0.1.0-rc.1" }
1515
freighter-storage = { path = "freighter-storage", registry = "freighter", version = "0.1.0-rc.1" }
1616

freighter-index/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "freighter-index"
3-
version = "0.1.0-rc.1"
3+
version = "0.1.0-rc.2"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
authors = ["Noah Kennedy <nomaxx117@gmail.com>"]

freighter/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[package]
22
name = "freighter"
3-
version = "0.1.1-rc.1"
3+
version = "0.1.1-rc.2"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
authors = ["Noah Kennedy <nomaxx117@gmail.com>"]
77
publish = ["freighter"]
88
repository = "https://github.com/cloudflare/freighter"
99
description = "Crate index traits and implementations for the freighter registry"
10-
categories = ["asynchronous", "authentication"]
10+
categories = ["asynchronous"]
1111
keywords = ["registries", "freighter"]
1212

1313
[dependencies]

freighter/README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Freighter
2+
Freighter is a Rust private registry implementation designed to be, above all else, modular, fast and operationally
3+
boring. Freighter is intended to be something you can feel comfortable deploying and then ignoring until the end of
4+
time.
5+
6+
## Features
7+
8+
### Configurability
9+
Freighter is configurable via a yaml file parsed at startup.
10+
11+
### Scalability
12+
Freighter stores the index in PostgreSQL databases, and crate tarballs in services implementing basic elements of the
13+
S3 API.
14+
15+
### Observability
16+
Freighter exposes metrics via prometheus, and logs to stdout using `tracing`.
17+
18+
### Graceful Restarts
19+
Freighter will stop accepting new requests but continue handling existing ones when a SIGTERM is received.
20+
21+
## Running locally
22+
23+
To try out Freighter **locally**, start a `postgres:14` or `postgres:15` server:
24+
```
25+
docker run -it -e POSTGRES_USER=freighter -e POSTGRES_PASSWORD=crates-crates-crates -p 5432:5432 -v /data:/var/lib/postgresql/data postgres:14
26+
```
27+
28+
Run the migrations, e.g. with a locally installed `psql`:
29+
```
30+
PGPASSWORD=crates-crates-crates psql -U freighter -h localhost -f sql/init-index-db.sql
31+
PGPASSWORD=crates-crates-crates psql -U freighter -h localhost -f sql/init-auth-db.sql
32+
```
33+
34+
Next, we need an S3-compatible server. You can use an S3 emulator for testing purposes:
35+
```
36+
docker run -it -p 9090:9090 -e initialBuckets=crates -e validKmsKeys="arn:aws:kms:us-east-1:1234567890:key/valid-secret" -e debug=true -t adobe/s3mock
37+
```
38+
39+
Finally, a config file using the above:
40+
```yaml
41+
service:
42+
address: "127.0.0.1:3000"
43+
download_endpoint: "127.0.0.1:3000/downloads/{crate}/{version}"
44+
api_endpoint: "127.0.0.1:3000"
45+
metrics_address: "127.0.0.1:3001"
46+
47+
index_db: &db
48+
dbname: "freighter"
49+
user: "freighter"
50+
password: "crates-crates-crates"
51+
host: "localhost"
52+
port: 5432
53+
54+
auth_db: *db
55+
56+
store:
57+
name: "crates"
58+
endpoint_url: "http://127.0.0.1:9090"
59+
region: "us-east-1"
60+
access_key_id: "1234567890"
61+
access_key_secret: "valid-secret"
62+
```
63+
64+
Start Freighter:
65+
```
66+
cargo run -p freighter -- -c config.yaml
67+
```

0 commit comments

Comments
 (0)