Pipeline Components and Applications

  1. Home
  2. Docs
  3. Pipeline Components and Applications
  4. Iglu
  5. Iglu Central Setup

Iglu Central Setup

This guide is designed for Iglu users wanting to create a public mirror or private clone of Iglu Central. There are a couple of reasons you may want to do this:

  1. Some Snowplow components require a Iglu Server, so the static Iglu Central repository will not work.
  2. You may want to access Iglu Central from a software system that cannot access the open internet.
  3. You may want a mirror of Iglu Central which has lower latency to your software system.

This guide is divided into two sections:

  1. Create Iglu Central Mirror
  2. Update your Iglu client configuration to point to your new Iglu Central

Create Iglu Central Mirror

Hosting an Iglu Server based mirror

Some components of Snowplow require an Iglu Server, and a static repo will not work. This means you’ll want to host a mirror of Iglu Central. You can mirror Iglu Central using igluctl:

git clone https://github.com/snowplow/iglu-central cd iglu-central igluctl static push --public schemas/ http://MY-IGLU-URL 00000000-0000-0000-0000-000000000000
Code language: PHP (php)

For further information on Iglu Central, consult the Iglu Central setup guide.

Hosting a Static Repository based mirror

Iglu Central is built on top of the Iglu static repo server, so the first step is to setup a static repo. You can give your copy of Iglu Central a name like:

http://iglucentral.acme.com
Code language: JavaScript (javascript)

Once you have completed this static repo setup, then copy into your /schemas sub-folder all of the schemas that you can find in the Iglu Central GitHub Repo

Once you have done this, check that your schemas are publically accessible, for example:

http://iglucentral.acme.com/schemas/com.snowplowanalytics.self-desc/instance/jsonschema/1-0-2
Code language: JavaScript (javascript)

Update your Iglu client configuration

You now need to update your Iglu client configuration to point to your Iglu Central mirror, rather than the original.

Given a standard Iglu client configuration:

{
  "schema": "iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-2",
  "data": {
    "cacheSize": 500,
    "repositories": [
      {
        "name": "Iglu Central",
        "priority": 0,
        "vendorPrefixes": [ "com.snowplowanalytics" ],
        "connection": {
          "http": {
            "uri": "http://iglucentral.com"
          }
        }
      }
    ]
  }
}

Update it to point to your Iglu Central mirror:

{
  "schema": "iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-2",
  "data": {
    "cacheSize": 500,
    "repositories": [
      {
        "name": "Acme Corp's Iglu Central mirror",
        "priority": 0,
        "vendorPrefixes": [ "com.snowplowanalytics" ],
        "connection": {
          "http": {
            "uri": "http://iglucentral.acme.com"
          }
        }
      }
    ]
  }
}

And that’s it – your Iglu client should now resolve to your Iglu Central mirror, rather than the original.