PingDirectory

Generating sample data

The PingDirectory server provides LDIF templates to generate sample entries for initializing your server. You can generate the sample data with the make-ldif utility together with template files that come bundled with the .zip build, or you can use template files that you create yourself.

About this task

The templates create sequential entries for testing the PingDirectory server with a range of dataset sizes. The templates are located in the config/MakeLDIF.

The sample data templates generate a dataset with basic access control privileges that grants anonymous read access to anyone, grants users the ability to modify their own accounts, and grants the admin account full privileges. The templates also include the uid=admin and ou=People entries.

Steps

  • To generate randomized sample data, use the --randomSeed option with the make-ldif command.

    Example:

    $ bin/make-ldif --templateFile config/MakeLDIF/example-10k.template \
      --ldifFile /path/to/data.ldif --randomSeed 0

    If the --randomSeed option is used with the same seed value, the template always generates the same .ldif file.

    Result:

    The command generates 10,000 sample entries and writes them to an output file, data.ldif. The random seed generator is set to 0.

  • To bypass the make-ldif command, use the --templateFile option with the import-ldif tool.