Short and Sweet

Consul Intro


Service discovery/ service registry

See


Consul

See https://www.consul.io/


Notable mentions

See


Forerunner

See https://www.osgi.org/

TODO: small demo

See https://www.knopflerfish.org/releases/current/docs/javadoc/org/osgi/framework/BundleContext.html#registerService(java.lang.Class,%20S,%20java.util.Dictionary) and https://www.knopflerfish.org/releases/current/docs/javadoc/org/osgi/framework/BundleContext.html#getServiceReferences(java.lang.Class,%20java.lang.String)


Consul demo (self-registration)

See infra/docker-compose.yml + self/*


Consul demo (3rd-party-registration, k8s)

TODO: small demo

See https://github.com/hashicorp/consul-k8s/blob/main/control-plane/connect-inject/container_init.go


Additional reading


Consul REST API


Snippets

kubectl config view --raw > ~/.kube/config
helm install --values helm-consul-values.yaml consul hashicorp/consul --create-namespace --namespace consul --version "0.43.0"
kubectl exec --stdin --tty consul-server-0 --namespace consul -- /bin/sh
kubectl run color-producer-red --image=bratuhia/color-producer:1.0.0 --env="CONSUL_ENABLED=false" --env="APP_COLOR=red" --dry-run=client -o yaml