summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authormjkwiatkowski <mati.rewa@gmail.com>2026-02-16 15:18:21 +0100
committermjkwiatkowski <mati.rewa@gmail.com>2026-02-16 15:18:21 +0100
commit2f16cb0f48eca4453e3e894b3d45a3aa09e6dcc0 (patch)
tree672d98baa2ac071f2c30de06d613254d0d8cd105 /README.md
parent86d35fcec83057e346e4982b5a6908f25342a392 (diff)
feat: opendc -> kafka -> postgresql works; added protobuf encodingHEADmaster
Diffstat (limited to 'README.md')
-rw-r--r--README.md55
1 files changed, 55 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..5267b498
--- /dev/null
+++ b/README.md
@@ -0,0 +1,55 @@
+### Dependencies
+
+Paths are hardcoded.
+
+Confluent local (see https://www.confluent.io/installation/):
+
+```bash
+export CONFLUENT_HOME=/opt/confluent
+export PATH=/opt/confluent/bin:$PATH
+cd /opt/confluent
+kafka-storage.sh random-uuid
+kafka-storage.sh format -t 2vi2WtHxQAOPyXb1Bj1Jvw -c etc/kafka/server.properties
+kafka-server-start.sh etc/kafka/server.properties
+kafka-server-start etc/kafka/server.properties
+schema-registry-start $CONFLUENT_HOME/etc/schema-registry/schema-registry.properties
+connect-standalone $CONFLUENT_HOME/etc/kafka/connect-standalone.properties $CONFLUENT_HOME/share/confluent-common/connectors/sink-jdbc.properties
+```
+
+Confluent JDBC sink and source (includes Postgres connector)
+(see https://www.confluent.io/hub/confluentinc/kafka-connect-jdbc)
+Be mindful to configure the right `plugin.path` in `etc/kafka/connect-standalone.properties`
+```bash
+ln -s $HOME/git/opendc/resources/experiments/sink-jdbc.properties opt/confluent/share/confluent-common/connectors/sink-jdbc.properties
+```
+
+Protobuf:
+
+extra/protobuf 33.1-3
+
+You need to run this each time you change `schema.proto`
+```bash
+cd resources/experiments/
+protoc --java_out=/home/matt/git/opendc/opendc-common/src/main/java/ schema.proto
+```
+
+Postgresql:
+
+extra/postgresql 18.1-2
+
+```bash
+initdb -D /var/lib/postgres/data
+mkdir /run/postgresql/
+cd /run/postgresql/
+touch .s.PGSQL.5432.lock
+chown -R postgres:postgres /run/postgresql
+```
+
+
+Random
+```bash
+bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic postgres-topic
+bin/kafka-topics.sh --create --topic postgres-topic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1
+bin/kafka-topics.sh --list --bootstrap-server localhost:9092
+bin/kafka-console-consumer.sh --bootstrap-server :9092 --topic postgres-topic --from-beginning
+``` \ No newline at end of file