{"action":"created","issue":{"url":"https://api.github.com/repos/jboss-dockerfiles/keycloak/issues/100","repository_url":"https://api.github.com/repos/jboss-dockerfiles/keycloak","labels_url":"https://api.github.com/repos/jboss-dockerfiles/keycloak/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/jboss-dockerfiles/keycloak/issues/100/comments","events_url":"https://api.github.com/repos/jboss-dockerfiles/keycloak/issues/100/events","html_url":"https://github.com/jboss-dockerfiles/keycloak/pull/100","id":282426862,"node_id":"MDExOlB1bGxSZXF1ZXN0MTU4NjAyNzQz","number":100,"title":"Configure JGroups like DB, in entrypoint","user":{"login":"solsson","id":144945,"node_id":"MDQ6VXNlcjE0NDk0NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/144945?v=4","gravatar_id":"","url":"https://api.github.com/users/solsson","html_url":"https://github.com/solsson","followers_url":"https://api.github.com/users/solsson/followers","following_url":"https://api.github.com/users/solsson/following{/other_user}","gists_url":"https://api.github.com/users/solsson/gists{/gist_id}","starred_url":"https://api.github.com/users/solsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solsson/subscriptions","organizations_url":"https://api.github.com/users/solsson/orgs","repos_url":"https://api.github.com/users/solsson/repos","events_url":"https://api.github.com/users/solsson/events{/privacy}","received_events_url":"https://api.github.com/users/solsson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2017-12-15T13:26:35Z","updated_at":"2018-08-23T15:02:09Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/jboss-dockerfiles/keycloak/pulls/100","html_url":"https://github.com/jboss-dockerfiles/keycloak/pull/100","diff_url":"https://github.com/jboss-dockerfiles/keycloak/pull/100.diff","patch_url":"https://github.com/jboss-dockerfiles/keycloak/pull/100.patch"},"body":"This PR is based on my interpretation of the discussion in #92, in particular the remarks from @stianst:\r\n * Add support for configuration at startup, triggered by environment variables and applied through jboss-cli\r\n * Do everything in the `jboss/keycloak` image\r\n * Add a kubernetes example in a separate folder\r\n\r\nThe structure for JGroups is heavily inspired by #96. Thanks @rayscunningham, I think the two PRs could easily be merged.\r\n\r\nNow, my chief insight from #92 and #94 was that [DNS_PING](http://www.jgroups.org/manual4/index.html#_dns_ping) is significantly less complex than both JDBC_PING and KUBE_PING. Here I've actually implemented something similar with JGroups 3 in a couple of lines of bash. To use it:\r\n 1. Set up a DNS record that points to your keycloak instances. In Kubernetes that would be a [headless service](https://github.com/Reposoft/keycloak-ha-kubernetes/blob/8968e19801c5feea1e1e8cf31bc94e871178d585/kubernetes-examples/keycloak-ha.yaml#L5).\r\n 2. Set `JGROUPS_SETUP` env to `TCPPING` which basically only triggers the execution of [getent hosts $JGROUPS_DNS_NAME](https://github.com/Reposoft/keycloak-ha-kubernetes/blob/8968e19801c5feea1e1e8cf31bc94e871178d585/server/jgroups/change-jgroups.sh#L11).\r\n\r\nI seem to get faster cluster joins with this strategy, and no records left behind at instance shutdown.\r\n\r\nFor those who want to stick with JDBC_PING, set `JGROUPS_SETUP` env to `JDBC_PING`. It's sligtly improved compared to #92, with less waiting for JGroups to ping exited instances, thanks to [clear_table_on_view_change](https://github.com/Reposoft/keycloak-ha-kubernetes/blob/8968e19801c5feea1e1e8cf31bc94e871178d585/server/cli/jgroups/JDBC_PING/tcp-ping-jdbc-jndi.cli#L3).\r\n\r\nNote that #95 hasn't been merged, so logging to console in thits PR is always at or above INFO level."},"comment":{"url":"https://api.github.com/repos/jboss-dockerfiles/keycloak/issues/comments/415450665","html_url":"https://github.com/jboss-dockerfiles/keycloak/pull/100#issuecomment-415450665","issue_url":"https://api.github.com/repos/jboss-dockerfiles/keycloak/issues/100","id":415450665,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTQ1MDY2NQ==","user":{"login":"stianst","id":2271511,"node_id":"MDQ6VXNlcjIyNzE1MTE=","avatar_url":"https://avatars2.githubusercontent.com/u/2271511?v=4","gravatar_id":"","url":"https://api.github.com/users/stianst","html_url":"https://github.com/stianst","followers_url":"https://api.github.com/users/stianst/followers","following_url":"https://api.github.com/users/stianst/following{/other_user}","gists_url":"https://api.github.com/users/stianst/gists{/gist_id}","starred_url":"https://api.github.com/users/stianst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stianst/subscriptions","organizations_url":"https://api.github.com/users/stianst/orgs","repos_url":"https://api.github.com/users/stianst/repos","events_url":"https://api.github.com/users/stianst/events{/privacy}","received_events_url":"https://api.github.com/users/stianst/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T15:02:09Z","updated_at":"2018-08-23T15:02:09Z","author_association":"COLLABORATOR","body":"I'm guessing DNS_PING doesn't work in S3 unless you're running on top of Kubernetes or OpenShift."}}
{"actor":{"display_login":"stianst"}}