-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dyllamt
committed
Feb 23, 2024
1 parent
d4c1d4a
commit 9c8e330
Showing
19 changed files
with
61 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,33 @@ | ||
# coinbase-connector | ||
Connector between coinbase websocket feeds and kafka. | ||
# coinbase-producer | ||
Kafka producer for coinbase feeds. | ||
|
||
# Contents | ||
#### Replicas | ||
|
||
The application impliments an async webserver that subscribes to coinbase websocket feeds and forwards the messages to kafka. It is recommended that you deploy it in a replica set. | ||
If replicas are deployed, message deduplication should be implemented in downstream components. | ||
|
||
## Docker | ||
# Packages | ||
|
||
There is a docker image of the application published [here](https://github.com/dyllamt/coinbase-connector/pkgs/container/coinbase-connector). | ||
|
||
## Helm | ||
|
||
There is a packaged chart published [here](https://github.com/dyllamt/coinbase-connector/tree/gh-pages). A starter chart for kafka is also included. | ||
[Producer image](https://github.com/dyllamt/coinbase-producer/pkgs/container/coinbase-producer) | ||
[Producer chart](https://github.com/dyllamt/coinbase-producer/tree/gh-pages/coinbase-producer). | ||
[Kafka chart](https://github.com/dyllamt/coinbase-producer/tree/gh-pages/coinbase-kafka) | ||
|
||
# Developer Notes | ||
|
||
## CI/CD | ||
- on pull requests: format, unit, and integration tests. | ||
- merge into main: docker and helm release (if [version](https://github.com/dyllamt/coinbase-connector/blob/main/VERSION) bumped). | ||
|
||
## Local Testing | ||
|
||
- `make install` install python dependencies. | ||
- `make test-format` tests formating and performs static type checking. | ||
- `make test-unit` tests live message consumption to a mock kafka stream. | ||
- `make test-integration` tests helm deployment with kafka broker. | ||
|
||
## Logging | ||
|
||
#### Info | ||
- subscription messages sent to coinbase. | ||
- messages consumed from coinbase. | ||
|
||
#### Warnings | ||
- coinbase reconnection errors. | ||
|
||
## Replicas | ||
## Local Testing | ||
|
||
If multiple replicas are deployed, kafka consumers should implement deduplication logic. | ||
- `make install` install python dependencies. | ||
- `make test-format` tests formating and performs static type checking. | ||
- `make test-unit` tests live message consumption to a mock kafka stream. | ||
- `make test-integration` tests helm deployment with kafka broker. | ||
|
||
## CI/CD | ||
- `pull request`: format, unit, and integration tests. | ||
- `merge to main`: docker and helm release (if [version](https://github.com/dyllamt/coinbase-producer/blob/main/VERSION) bumped). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.5 | ||
0.0.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v2 | ||
description: "Simple kafka deployment for coinbase data." | ||
description: "Kafka broker chart for coinbase feeds." | ||
name: coinbase-kafka | ||
version: 0.0.1 # dynamic version set by gh-action from VERSION file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
cluster: | ||
# -- name of strimzi kafka crd | ||
name: coinbase-kafka | ||
# -- storage class for broker logs | ||
storage: ephemeral | ||
kafka: | ||
broker: | ||
# -- number of broker replicas | ||
replicas: 1 | ||
zookeeper: | ||
# -- number of zookeper replicas | ||
replicas: 1 | ||
# -- topics on the cluster | ||
# -- published topics | ||
topics: | ||
- ticker |
4 changes: 2 additions & 2 deletions
4
charts/coinbase-connector/Chart.yaml → charts/coinbase-producer/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v2 | ||
description: "Forwarding service from coinbase to kafka." | ||
name: coinbase-connector | ||
description: "Kafka producer for coinbase feeds." | ||
name: coinbase-producer | ||
version: 0.0.1 # dynamic version set by gh-action from VERSION file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...coinbase-connector/templates/service.yaml → .../coinbase-producer/templates/service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
helm uninstall -n dev coinbase-connector | ||
helm uninstall -n dev coinbase-producer | ||
helm uninstall -n dev coinbase-kafka | ||
helm uninstall -n dev strimzi-operator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters