@colony2/jobdb 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +43 -5
  2. package/package.json +13 -13
package/README.md CHANGED
@@ -31,7 +31,7 @@ jobdb --listen 127.0.0.1:9047 --db jobdb.db
31
31
 
32
32
  This starts the runtime API at `http://127.0.0.1:9047`. SQLite is the default
33
33
  backend and persists runtime state in `jobdb.db`; large artifacts are stored in a
34
- blob directory that defaults to `<db>.blobs`.
34
+ blob bucket URL that defaults to a local directory at `<db>.blobs`.
35
35
 
36
36
  The explicit SQLite subcommand is equivalent:
37
37
 
@@ -52,13 +52,17 @@ SQLite is the default embedded durable backend.
52
52
  jobdb sqlite \
53
53
  --listen 127.0.0.1:9047 \
54
54
  --db ./jobdb.db \
55
- --blob-dir ./jobdb.blobs
55
+ --blob-store-uri 'file:///var/lib/jobdb/blobs'
56
56
  ```
57
57
 
58
58
  Flags:
59
59
 
60
60
  - `--db`: SQLite database path. Defaults to `jobdb.db`.
61
- - `--blob-dir`: directory for large artifacts. Defaults to `<db>.blobs`.
61
+ - `--blob-store-uri`: Go CDK blob bucket URL for large artifacts. Supports
62
+ `file://`, `gs://`, `s3://`, and `azblob://`; defaults to local blobfs at
63
+ `<db>.blobs`.
64
+ - `--blob-dir`: legacy directory shortcut for local large artifacts. Ignored
65
+ when `--blob-store-uri` is set.
62
66
  - `--sqlite-dsn`: SQLite DSN. Overrides `--db` and `JOBDB_SQLITE_DSN`.
63
67
  - `--listen`: HTTP listen address. Defaults to `127.0.0.1:9047`.
64
68
 
@@ -83,19 +87,53 @@ startup.
83
87
 
84
88
  ```bash
85
89
  JOBDB_POSTGRES_DSN='postgres://user:pass@localhost:5432/jobdb?sslmode=disable' \
86
- jobdb direct --blob-store-uri 'blobfs:///var/lib/jobdb/blobs' --listen 127.0.0.1:9047
90
+ jobdb direct --blob-store-uri 's3://jobdb-artifacts?region=us-east-1' --listen 127.0.0.1:9047
87
91
  ```
88
92
 
89
93
  Flags:
90
94
 
91
95
  - `--postgres-dsn`: Postgres DSN for `pgwf` state.
92
- - `--blob-store-uri`: Blobstore URI for large artifacts. Defaults to local blobfs.
96
+ - `--blob-store-uri`: Go CDK blob bucket URL for large artifacts. Defaults to
97
+ local blobfs.
93
98
  - `--listen`: HTTP listen address. Defaults to `127.0.0.1:9047`.
94
99
 
95
100
  Environment:
96
101
 
97
102
  - `JOBDB_POSTGRES_DSN`: Postgres DSN used when `--postgres-dsn` is not set.
98
103
 
104
+ Blob URL examples:
105
+
106
+ - Local filesystem: `file:///var/lib/jobdb/blobs` or legacy
107
+ `blobfs:///var/lib/jobdb/blobs`.
108
+ - Google Cloud Storage: `gs://jobdb-artifacts?prefix=prod/`.
109
+ - Amazon S3: `s3://jobdb-artifacts?region=us-east-1&prefix=prod/`.
110
+ - Azure Blob Storage: `azblob://jobdb-artifacts?prefix=prod/`.
111
+
112
+ Credential resolution is handled by the Go CDK provider drivers, so `jobdb`
113
+ does not need separate credential flags:
114
+
115
+ - GCS uses Application Default Credentials. Use
116
+ `GOOGLE_APPLICATION_CREDENTIALS`, `gcloud auth application-default login`, or
117
+ attached Google Cloud service account credentials in VM/container
118
+ environments.
119
+ - S3 uses the AWS SDK for Go v2 configuration chain. Provide `AWS_REGION` and
120
+ credentials through environment variables, shared `~/.aws/config` and
121
+ `~/.aws/credentials` profiles, or attached instance/task roles.
122
+ - Azure Blob Storage uses Go CDK's Azure driver. Provide
123
+ `AZURE_STORAGE_ACCOUNT` with `AZURE_STORAGE_KEY`, a connection string, a SAS
124
+ token, or Azure default credentials such as environment credentials, Azure
125
+ CLI credentials, or managed identity.
126
+
127
+ References:
128
+
129
+ - [Go CDK blob storage guide](https://gocloud.dev/howto/blob/)
130
+ - [Go CDK URL opener concepts](https://gocloud.dev/concepts/urls/)
131
+ - [Go CDK GCS driver credentials](https://pkg.go.dev/gocloud.dev/blob/gcsblob)
132
+ - [AWS SDK for Go v2 configuration](https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-gosdk.html)
133
+ - [Google Application Default Credentials](https://docs.cloud.google.com/docs/authentication/application-default-credentials)
134
+ - [Go CDK Azure Blob driver credentials](https://pkg.go.dev/gocloud.dev/blob/azureblob)
135
+ - [Azure Identity credential chains for Go](https://learn.microsoft.com/en-us/azure/developer/go/sdk/authentication/credential-chains)
136
+
99
137
  ## Runtime API
100
138
 
101
139
  The server exposes the JobDB runtime REST API. The wire contract is documented
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@colony2/jobdb",
3
3
  "type": "module",
4
- "version": "0.0.10",
4
+ "version": "0.0.12",
5
5
  "description": "jobdb job system",
6
6
  "scripts": {
7
7
  "postinstall": "node install.js",
@@ -30,51 +30,51 @@
30
30
  },
31
31
  "archives": {
32
32
  "darwin-arm64": {
33
- "name": "jobdb_0.0.10_Darwin_arm64.tar.gz",
34
- "url": "https://github.com/colony-2/jobdb/releases/download/v0.0.10/jobdb_0.0.10_Darwin_arm64.tar.gz",
33
+ "name": "jobdb_0.0.12_Darwin_arm64.tar.gz",
34
+ "url": "https://github.com/colony-2/jobdb/releases/download/v0.0.12/jobdb_0.0.12_Darwin_arm64.tar.gz",
35
35
  "bins": [
36
36
  "jobdb"
37
37
  ],
38
38
  "format": "tar.gz",
39
39
  "checksum": {
40
40
  "algorithm": "sha256",
41
- "digest": "c6604dbd46347dce23c75df4092bc1e3803e3c1142269609f96b6eb010fc8355"
41
+ "digest": "22df55d92a85bc219f1f350af659f745a2426b292ea55401f3f4d83714e441e3"
42
42
  }
43
43
  },
44
44
  "darwin-x64": {
45
- "name": "jobdb_0.0.10_Darwin_x86_64.tar.gz",
46
- "url": "https://github.com/colony-2/jobdb/releases/download/v0.0.10/jobdb_0.0.10_Darwin_x86_64.tar.gz",
45
+ "name": "jobdb_0.0.12_Darwin_x86_64.tar.gz",
46
+ "url": "https://github.com/colony-2/jobdb/releases/download/v0.0.12/jobdb_0.0.12_Darwin_x86_64.tar.gz",
47
47
  "bins": [
48
48
  "jobdb"
49
49
  ],
50
50
  "format": "tar.gz",
51
51
  "checksum": {
52
52
  "algorithm": "sha256",
53
- "digest": "2d9abbcf2cb67d4123fef17dbb14fe2c909a5b4a6a7e6812934ce4ab274fdc44"
53
+ "digest": "d277bd8dcb751b03e7fb1a7f4e890e0a11a5beff8bfeb85b61e6990197947fbf"
54
54
  }
55
55
  },
56
56
  "linux-arm64": {
57
- "name": "jobdb_0.0.10_Linux_arm64.tar.gz",
58
- "url": "https://github.com/colony-2/jobdb/releases/download/v0.0.10/jobdb_0.0.10_Linux_arm64.tar.gz",
57
+ "name": "jobdb_0.0.12_Linux_arm64.tar.gz",
58
+ "url": "https://github.com/colony-2/jobdb/releases/download/v0.0.12/jobdb_0.0.12_Linux_arm64.tar.gz",
59
59
  "bins": [
60
60
  "jobdb"
61
61
  ],
62
62
  "format": "tar.gz",
63
63
  "checksum": {
64
64
  "algorithm": "sha256",
65
- "digest": "e1cb989ae67774d5b26c86dca07385f26b59ccd37b00af9b8965294edf6c48ea"
65
+ "digest": "adadf22e3592c666f4d2617636f8c4ad9666d009d7fd4c7107c5fb73b6419536"
66
66
  }
67
67
  },
68
68
  "linux-x64": {
69
- "name": "jobdb_0.0.10_Linux_x86_64.tar.gz",
70
- "url": "https://github.com/colony-2/jobdb/releases/download/v0.0.10/jobdb_0.0.10_Linux_x86_64.tar.gz",
69
+ "name": "jobdb_0.0.12_Linux_x86_64.tar.gz",
70
+ "url": "https://github.com/colony-2/jobdb/releases/download/v0.0.12/jobdb_0.0.12_Linux_x86_64.tar.gz",
71
71
  "bins": [
72
72
  "jobdb"
73
73
  ],
74
74
  "format": "tar.gz",
75
75
  "checksum": {
76
76
  "algorithm": "sha256",
77
- "digest": "6dc5af9b1aec10c0a9307a646012e3ceafb991952b77d282820f0a25e96acf70"
77
+ "digest": "e55573d1d76e7a38fd7c191e81854fd35daaa6495e78efd79898756599df471c"
78
78
  }
79
79
  }
80
80
  },