s3arch 0.1.4 → 0.1.5
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8c46893f02a5588325d730a0dbd3dfd7944a269ae03f398ca1ca9b0ebac13773
|
|
4
|
+
data.tar.gz: f2758f7ceb14bf54762c0f889d881a2f0e1edd4efa53ca143d31b1ba0bc6ea6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8dc8da0493198ceb3248fe17e3a4f13ed82f0bc2459598fb0798a30334307df5597413b07e4f6007a3ea25a6cdd866bd796571e712a3801d8618f2b0d2f1db89
|
|
7
|
+
data.tar.gz: 5c32d8cea5c684d5471411865de486462d313f222aece96f69cc1863111bfab3d7a001d22714272d734b154e61c6a897cff3a51e9eee9a3658ed42735b48c3ee
|
data/README.md
CHANGED
|
@@ -93,26 +93,18 @@ indexer.rebuild("user-123")
|
|
|
93
93
|
|
|
94
94
|
## Infrastructure
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
S3arch infrastructure is defined using [Belt](https://github.com/stowzilla/belt) and [Conveyor Belt](https://github.com/stowzilla/terraform-provider-conveyor-belt) conventions:
|
|
97
|
+
|
|
98
|
+
- **[`config/routes.rb`](./config/routes.rb)** — API Gateway routes for search and rebuild endpoints
|
|
99
|
+
- **[`config/contracts.rb`](./config/contracts.rb)** — Request/response schema contracts
|
|
100
|
+
|
|
101
|
+
When using S3arch with a Belt app, these files are automatically picked up by `belt deploy`. For standalone use, you'll need to provision:
|
|
97
102
|
|
|
98
103
|
- S3 bucket for index storage (with 90-day lifecycle)
|
|
99
104
|
- DynamoDB version tracking table (PAY_PER_REQUEST)
|
|
100
105
|
- SQS queue + DLQ for the indexer
|
|
101
106
|
- EventBridge Pipe (DynamoDB Stream → SQS)
|
|
102
107
|
|
|
103
|
-
```hcl
|
|
104
|
-
module "s3arch" {
|
|
105
|
-
source = "github.com/stowzilla/s3arch//terraform"
|
|
106
|
-
app_name = "myapp"
|
|
107
|
-
environment = "production"
|
|
108
|
-
source_table_name = aws_dynamodb_table.items.name
|
|
109
|
-
source_table_arn = aws_dynamodb_table.items.arn
|
|
110
|
-
source_table_stream_arn = aws_dynamodb_table.items.stream_arn
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Outputs include `indexer_env_vars`, `searcher_env_vars`, `indexer_permissions`, and `searcher_permissions` for easy Lambda configuration.
|
|
115
|
-
|
|
116
108
|
## Configuration Options
|
|
117
109
|
|
|
118
110
|
| Option | Default | Description |
|
|
@@ -148,13 +140,13 @@ S3arch requires the `sqlite3` native extension at runtime. A Rake task is includ
|
|
|
148
140
|
rake s3arch:layer:build
|
|
149
141
|
|
|
150
142
|
# Build and publish in one step
|
|
151
|
-
rake s3arch:layer:publish PROFILE=
|
|
143
|
+
rake s3arch:layer:publish PROFILE=your-profile
|
|
152
144
|
|
|
153
145
|
# Customize the build
|
|
154
146
|
rake s3arch:layer:build RUBY_VERSION=3.4 ARCHITECTURE=x86_64
|
|
155
147
|
|
|
156
148
|
# Publish to a specific region/account
|
|
157
|
-
rake s3arch:layer:publish PROFILE=production REGION=us-west-2 LAYER_NAME=
|
|
149
|
+
rake s3arch:layer:publish PROFILE=production REGION=us-west-2 LAYER_NAME=my-sqlite3-ruby
|
|
158
150
|
```
|
|
159
151
|
|
|
160
152
|
| Environment Variable | Default | Description |
|
|
@@ -164,7 +156,7 @@ rake s3arch:layer:publish PROFILE=production REGION=us-west-2 LAYER_NAME=stowzil
|
|
|
164
156
|
| `OUTPUT` | `pkg/sqlite-layer.zip` | Output path for the zip |
|
|
165
157
|
| `PROFILE` | (none) | AWS CLI profile for publishing |
|
|
166
158
|
| `REGION` | `us-east-1` | AWS region to publish to |
|
|
167
|
-
| `LAYER_NAME` | `
|
|
159
|
+
| `LAYER_NAME` | `sqlite3-ruby` | Layer name in AWS |
|
|
168
160
|
| `S3ARCH_VERSION` | `~> current minor` | Version constraint for s3arch in the layer |
|
|
169
161
|
|
|
170
162
|
Requires Docker to be running (uses the official AWS SAM build images).
|
data/lib/s3arch/version.rb
CHANGED
data/lib/tasks/s3arch.rake
CHANGED
|
@@ -127,9 +127,9 @@ namespace :s3arch do
|
|
|
127
127
|
)
|
|
128
128
|
end
|
|
129
129
|
|
|
130
|
-
desc 'Build and publish the Lambda layer (set AWS_PROFILE, LAYER_NAME=
|
|
130
|
+
desc 'Build and publish the Lambda layer (set AWS_PROFILE, LAYER_NAME=sqlite3-ruby)'
|
|
131
131
|
task publish: :build do
|
|
132
|
-
layer_name = ENV.fetch('LAYER_NAME', '
|
|
132
|
+
layer_name = ENV.fetch('LAYER_NAME', 'sqlite3-ruby')
|
|
133
133
|
ruby_version = ENV.fetch('RUBY_VERSION', '3.4')
|
|
134
134
|
architecture = ENV.fetch('ARCHITECTURE', 'x86_64')
|
|
135
135
|
output_file = File.expand_path(ENV.fetch('OUTPUT', 'pkg/sqlite-layer.zip'))
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: s3arch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Dalton
|
|
@@ -90,8 +90,8 @@ files:
|
|
|
90
90
|
- CHANGELOG.md
|
|
91
91
|
- LICENSE.txt
|
|
92
92
|
- README.md
|
|
93
|
-
-
|
|
94
|
-
-
|
|
93
|
+
- config/contracts.rb
|
|
94
|
+
- config/routes.rb
|
|
95
95
|
- lambda/controllers/s3arch_controller.rb
|
|
96
96
|
- lambda/models/search_version.rb
|
|
97
97
|
- lib/s3arch.rb
|