From f001d21bded08af3fb38e8a58b6220f10c3efe1a Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Thu, 21 Jan 2021 15:40:26 +0100 Subject: [PATCH] doc --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..a5010c8 --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# Keycloak Realm Generator & Importer + +This tool is used to load data into Keycloak before running a performance test. + +## Usage + +### Generation + +Generate 5 realms, each one containing 10 clients and 100 users. +Generated files are saved in the current directory. + +```sh +kci generate --realms 5 --clients 10 --users 100 +``` + +Same as above but save files in the specified directory. + +```sh +kci generate --realms 5 --clients 10 --users 100 --target realms/ +``` + +Generate realms using the provided template. + +```sh +kci generate --realms 5 --clients 10 --users 100 --realm my.template +``` + +### Import + +Configure your target Keycloak instance. + +```sh +kci config set realm --value master +kci config set login --value admin +kci config set password --value S3cr3t +kci config set keycloak_url --value http://localhost:8080/auth +``` + +Import the previously generated realms. + +```sh +kci import *.json +``` + +By default, 5 workers are used to speed up the loading process. +You can change this with: + +```sh +kci config set workers --value 10 +```