I’m currently trying to use the JVM embedded repo to manage my json-schemas and as I understood the documentation,
I should be able to mount the repository in my application (in runtime) under /snowplow-enricher/src/main/resources/repo/schemas/... but not matter how I configure my resolver config, the Iglu Embedded Client does not find my repo. Currently, it looks like:
Actually I think this might be possible, although the documentation is currently wrong.
The trick is to put it in a path where the JVM class loader can see it. If you use the standard docker image for enrich then classes are loaded from: /home/snowplow/lib. So try putting it under:
But sadly, the events end up in the bad-event bucket with a resolution error, so I think It’s probably not possible this way if I didn’t miss anything.
Thanks for the kind welcome!
I am trying to build a server side tracking solution with snowplow. We want to run snowplow in Kubernetes, and keep the json-schema inside one git-repository.
My idea was to sync the git repository and mount the schemas directly into the pod. That way, I could just add a new schema via a merge request, and it would automatically be pulled into the enricher. This way, I wouldn’t need to build an extra static repository, but the enricher would also not need to communicate with anything other than the kinesis stream.
It should be possible to use directly Github as a static HTTP server holding the schemas.
For instance let’s say that your schemas are there, then you can use the raw function of Github and use https://raw.githubusercontent.com/snowplow/iglu-central/master/ as Iglu URI in your resolver.
Would that be also possible with a private repository? I forgot to mention that keeping the schema repository private was one of the reasons why I came up with the idea of syncing it directly into the Kubernetes cluster.
I’m afraid that it’s not, as downloading would require to provide an authorization token in the HTTP headers but that’s not possible.
In case it can help you, your schemas could just be served by a static HTTP server, e.g. with python -m SimpleHTTPServer in the folder that contains schemas/.