Run the following commands on different consoles
Console [1] Start infrastructure (Cassandra, Kafka)
sh assets/docker-compose/dev-lite/infrastructure.sh
Console [2] Start first node of writeside
sh assets/docker-compose/dev-lite/seed.sh
Console [3] Start second node of writeside
sh assets/docker-compose/dev-lite/node1.sh
Console [4] Start third node of writeside
sh assets/docker-compose/dev-lite/node2.sh
Console [5] Start first node of readside
sh assets/docker-compose/dev-lite/readside.sh
Console [6] After all nodes have been started, start consumer
sh assets/scripts/start_consumers.sh
Console [7] To stop the local environment
sh assets/docker-compose/vm/stop_all.sh
sh assets/docker-compose/vm/stop_all.sh sh assets/docker-compose/vm/start_all.sh
sh assets/k8s/stop_all.sh sh assets/k8s/start_all.sh
This will publish a message to the DGR-COP-OBLIGACIONES-TRI topic,
using the JSON file at assets/examples/DGR-COP-OBLIGACIONES-TRI.json.
kafkacat -P -b 0.0.0.0:9092 -t DGR-COP-OBLIGACIONES-TRI assets/examples/DGR-COP-OBLIGACIONES-TRI.json
curl 0.0.0.0:8081/state/sujeto/1
curl 0.0.0.0:8081/state/sujeto/1/objeto/1/tipo/I
curl 0.0.0.0:8081/state/sujeto/1/objeto/1/tipo/I/obligacion/1
This would hit the seed node, which is exposed at the port 8081.
Other nodes like node1 and node2, you can find them at 8082 and 8082, respectively.
docker exec -it cassandra bash -c 'cqlsh -u cassandra -p cassandra'
kubectl exec -i $pod_name bash -c 'cqlsh -u cassandra -p cassandra'
This will get you inside Cassandra, where you can run queries like the followings:
select * from read_side.buc_sujeto;
select * from read_side.buc_sujeto_objeto;
select * from read_side.buc_obligaciones;
writeside, readside, and integration
sbt test
writeside only
sbt pcs/test
readside only
sbt readside/test
integration only
sbt it/test