polyn-cli 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/polyn/cli/version.rb +1 -1
- data/lib/polyn/cli.rb +1 -1
- data/lib/polyn/templates/README.md +11 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a516676ead604b6dcfc242c75addef95ad9512f4c7a9b009369cb46d581f946e
|
4
|
+
data.tar.gz: 9ebdfaec0ba3df014121d75d9903ee234dad27ba4444d45178cdf66fd132336d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 545df32cdd3d928022e23798cbb08ee88521fc54248a1fd1911e80b88ff71d97987f092b2d73429942ec2fa66e818a8c0d88d11de30d7f5f77bd73ff3078e496
|
7
|
+
data.tar.gz: 58f0c9aaa9348efdf8c4310c1c1e7376cfb57d43e2f662015cbc224d14df0306ffc6da439f0618a079d08f57aeb3b08391b61cfa622ea5d1f8843fbd07989623
|
data/Gemfile.lock
CHANGED
data/lib/polyn/cli/version.rb
CHANGED
data/lib/polyn/cli.rb
CHANGED
@@ -130,7 +130,7 @@ module Polyn
|
|
130
130
|
|
131
131
|
def tf_apply
|
132
132
|
if polyn_env == "development"
|
133
|
-
%(terraform apply -var "jetstream_servers=#{nats_servers}")
|
133
|
+
%(terraform apply -auto-approve -input=false -var "jetstream_servers=#{nats_servers}")
|
134
134
|
else
|
135
135
|
"terraform apply -auto-approve -input=false "\
|
136
136
|
"-var \"jetstream_servers=#{nats_servers}\" "\
|
@@ -3,20 +3,19 @@
|
|
3
3
|
This repository contains all of the events and terraform resources for the Polyn services
|
4
4
|
environment.
|
5
5
|
|
6
|
-
## Development Setup
|
7
|
-
|
8
6
|
1. Install [Ruby](https://github.com/asdf-vm/asdf-ruby)
|
9
|
-
2. Install
|
7
|
+
2. Install bundler `gem install bundler`
|
8
|
+
3. Install dependencies `bundle install`
|
9
|
+
4. Install Terraform. For M1 Macs, [download the AMD64 version](https://www.terraform.io/downloads)
|
10
10
|
rather than using Homebrew to install Terraform.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
6. Call `polyn up`. By default this will run in `development` mode, which will start the NATS
|
11
|
+
5. Ensure Docker & Docker Compose is installed
|
12
|
+
6. Call `bundle exec polyn tf_init` if this is the first time using terraform in the codebase.
|
13
|
+
7. Call `bundle exec polyn up`. By default this will run in `development` mode, which will start the NATS
|
15
14
|
server, configure it via Terraform, and update the Polyn Event Registry.
|
16
15
|
|
17
16
|
### Running NATS locally
|
18
17
|
|
19
|
-
`polyn up` will use run a Docker container for you if one is not already running. Alternatively, you can run `nats-server` yourself locally if you prefer.
|
18
|
+
`bundle exec polyn up` will use run a Docker container for you if one is not already running. Alternatively, you can run `nats-server` yourself locally if you prefer.
|
20
19
|
|
21
20
|
## Naming Conventions
|
22
21
|
|
@@ -24,15 +23,15 @@ See the Protocol Documentation for [Naming Conventions](https://github.com/Spiff
|
|
24
23
|
|
25
24
|
## Streams
|
26
25
|
|
27
|
-
Each stream should have its own configuration file under `./tf
|
26
|
+
Each stream should have its own configuration file under `./tf`. Run `bundle exec polyn gen:stream <stream_name>` to generate a new configuration file for a stream
|
28
27
|
|
29
28
|
## Consumers
|
30
29
|
|
31
|
-
Run `polyn gen:consumer <stream_name> <destination_name> <event_type>` to generate new configuration for a consumer of a stream. It will be included in the same file as the stream configuration.
|
30
|
+
Run `bundle exec polyn gen:consumer <stream_name> <destination_name> <event_type>` to generate new configuration for a consumer of a stream. It will be included in the same file as the stream configuration.
|
32
31
|
|
33
32
|
## Event Schemas
|
34
33
|
|
35
|
-
Run `polyn gen:schema <event_type>` to generate a new JSON Schema for an event
|
34
|
+
Run `bundle exec polyn gen:schema <event_type>` to generate a new JSON Schema for an event
|
36
35
|
|
37
36
|
All the schemas for your events should live in the `./events` directory.
|
38
37
|
The name of your schema file should be the same as your event, but with `.json` at the end.
|
@@ -45,7 +44,7 @@ This means you only need to include the JSON Schema for the `data` portion of th
|
|
45
44
|
|
46
45
|
If you'd like to organize your events by team ownership or some other convention, you can use subdirectories to do so. The full event type should still be part of the file name. You should also ensure there are not duplicate event types in different directories as only one schema can be defined per event type.
|
47
46
|
|
48
|
-
You can generate a schema in a subdirectory like this: `polyn gen:schema some/nested/dir/widgets.created.v1`
|
47
|
+
You can generate a schema in a subdirectory like this: `bundle exec polyn gen:schema some/nested/dir/widgets.created.v1`
|
49
48
|
|
50
49
|
## Schema Versioning
|
51
50
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyn-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarod
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-08-
|
12
|
+
date: 2022-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dotenv
|