Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jans-keycloak-integration): add keycloak scheduler service #8343

Closed
uprightech opened this issue Apr 19, 2024 · 1 comment · Fixed by #8425, #8436 or #8454
Closed

feat(jans-keycloak-integration): add keycloak scheduler service #8343

uprightech opened this issue Apr 19, 2024 · 1 comment · Fixed by #8425, #8436 or #8454
Assignees
Labels
kind-feature Issue or PR is a new feature request

Comments

@uprightech
Copy link
Contributor

The keycloak scheduler application has for now the reponsibility of syncing keycloak saml clients using data from janssen.
This issue documents how to deploy it as a service , alongside the required dependencies.
Replace references to <jans_version> with the current build version of janssen.
Additional files mentionned in the issue can be found here

Create directory structure.

Create the diretory /opt/kc-scheduler which should contain the following sub directories:

  • /opt/kc-scheduler/bin
  • /opt/kc-scheduler/conf
  • /opt/kc-scheduler/lib
  • /opt/kc-scheduler/logs

Transfer files on the system

  1. Download and unzip the file https://jenkins.jans.io/maven/io/jans/kc-jans-scheduler/<jans_version>/kc-jans-scheduler-<jans_version>-deps.zip into /opt/kc-scheduler/lib
  2. Download the file https://jenkins.jans.io/maven/io/jans/kc-jans-scheduler/<jans_version>/kc-jans-scheduler-<jans_version>.jar and copy it into /opt/kc-scheduler/lib
  3. Unzip the jar downloaded in 3 and copy the files config.properties.sample and logback.xml.sample into the /opt/kc-scheduler/conf/ directory. Make sure to remove the .sample extension.
  4. Copy the file start.sh uploaded with this issue to /op/kc-scheduler/bin. Make sure it's executable
  5. Copy the file kc-scheduler.service uploaded with this issue to /etc/systemd/system. That's the service file

Configuration file setup

Make sure the following values in config.properties.sample (renamed to config.properties) has the following values set

  • app.logging.level.root to DEBUG
  • app.config-api.url to the jans-config-api endpoint. E.g. https://example.com/jans-config-api
  • app.config-api.auth.url to the jans-auth token endpoint url
  • app.config-api.auth.client.id and app.config-api.auth.client.secret are the client id and secrets of the kc_scheduler_api client.
  • app.config-api.auth.client.scopes is empty for now
  • app.config-api.auth.method is set to basic
  • app.keycloak-admin.url is set to the keycloak url . e.g. https://example.com/kc
  • app.keycloak-admin.realm is set to master
  • app.keycloak-admin.username is set to admin
  • app.keycloak-admin.password is set to the keycloak admin password
  • app.keycloak-admin.client.id is set to admin-cli
@mo-auto mo-auto added the kind-feature Issue or PR is a new feature request label Apr 19, 2024
uprightech added a commit that referenced this issue May 2, 2024
* changed the application into a single run application suitable for cron

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>
yuriyz pushed a commit that referenced this issue May 2, 2024
* fix(jans-linux-setup): improper scim configuration for jans kc #8210
* updated the keycloak configuration file to reflect the  configuration for the storage-spi

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

* chore(jans-keycloak-integration): bump kc version to 24.0.0 #8315

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

* feat(jans-keycloak-integration): add kc scheduler service #8343
* changed the application into a single run application suitable for cron

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

---------

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>
@uprightech
Copy link
Contributor Author

As per discussions on rocket chat with the team , it was decided that the scheduler will be run at regular intervals as a cron job.
A suggested run interval of every 10 minutes every day was suggested too.
Modifications were made to the application to cater for that. It will run , perform it's tasks and then exit gracefully.
This means invoking the script file start.sh at the specified interval. Also this means removing the kc.service as it's no longer necessary.

@uprightech uprightech reopened this May 3, 2024
uprightech added a commit that referenced this issue May 3, 2024
* adjusting log messaging

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>
pujavs pushed a commit that referenced this issue May 3, 2024
…#8442)

* fix(jans-linux-setup): improper scim configuration for jans kc #8210
* updated the keycloak configuration file to reflect the  configuration for the storage-spi

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

* chore(jans-keycloak-integration): bump kc version to 24.0.0 #8315

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

* feat(jans-keycloak-integration): add kc scheduler service #8343
* changed the application into a single run application suitable for cron

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

* feat(jans-keycloak-integration): add kc scheduler service #8343
* adjusting log messaging

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

---------

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>
uprightech added a commit that referenced this issue May 6, 2024
* removed logging configuration to allow them to be overriden on the command line
* changed the logging level of some statements to make explicit what the application is doing
* changed application version logging

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>
moabu pushed a commit that referenced this issue May 6, 2024
…#8454)

* fix(jans-linux-setup): improper scim configuration for jans kc #8210
* updated the keycloak configuration file to reflect the  configuration for the storage-spi

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

* chore(jans-keycloak-integration): bump kc version to 24.0.0 #8315

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

* feat(jans-keycloak-integration): add kc scheduler service #8343
* changed the application into a single run application suitable for cron

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

* feat(jans-keycloak-integration): add kc scheduler service #8343
* adjusting log messaging

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

* feat(jans-keycloak-integration): keycloak scheduler service #8343
* removed logging configuration to allow them to be overriden on the command line
* changed the logging level of some statements to make explicit what the application is doing
* changed application version logging

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>

---------

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment