Giter VIP home page Giter VIP logo

keycloak-buildpack's Introduction

Scalingo Keycloak buildpack

This buildpack aims at installing a Keycloak instance on Scalingo and let you configure it at your convenance.

Deploy to Scalingo

Suitability of releases

Keycloak Buildpack
< 17 (wildfly) 0.1.0
>= 17 (quarkus) 0.2.0

Usage

Add this buildpack environment variable to your Scalingo application to install the Keycloak server:

BUILDPACK_URL=https://github.com/tchapgouv/keycloak-buildpack

Default version Keycloak is latest found in github releases, but you can choose another one:

scalingo env-set KEYCLOAK_VERSION=17.0.0

See Keycloak latest docs to use keycloak quarkus image server.

Configuration

You must have an add-on database postgresql.

Environment variables are listed in Keycloak quarkus configuration doc, starting with KC_

Add a user admin

In .env set these vars:

KEYCLOAK_ADMIN=your-admin-name
KEYCLOAK_ADMIN_PASSWORD=your-admin-password

then build again.

Export or import data

See Keycloak Admin CLI docs

With Scalingo CLI you can download or upload these files.

Hacking

Environment variables are set in a .env file. You copy the sample one:

cp .env.sample .env

Run an interactive docker scalingo stack:

 docker run --name keycloak -it -p 8080:8080 -v "$(pwd)"/.env:/env/.env -v "$(pwd)":/buildpack scalingo/scalingo-20:latest bash

And test in it:

bash buildpack/bin/detect
bash buildpack/bin/env.sh /env/.env /env
bash buildpack/bin/compile /build /cache /env
bash buildpack/bin/release

Run Keycloak server:

export PATH=$PATH:/build/java/bin
build/keycloak/bin/kc.sh start --auto-build

You can also use docker-compose stack 2:

docker-compose up --build -d

keycloak-buildpack's People

Contributors

mcalinghee avatar odelcroi avatar olivierroquigny avatar pseudonyme21 avatar tristanrobert avatar

Forkers

dxb

keycloak-buildpack's Issues

Enable installation of quarkus extensions from local dir

Use case :
Manually install sentry extensions from a list of named jars to be downloaded from a local dir

Example :
To install sentry extension this list of jars should be installed into the /providers directory of keycloak :

sentry-jul-5.7.4.jar
sentry-5.7.4.jar
quarkus-logging-sentry-deployment-1.1.1.jar
quarkus-logging-sentry-1.1.1.jar

Organize repo

  • Separate what env var is needed for the container build
  • Separate what env var is needed for the docker-compose run
  • Identify what is needed for the scalingo buildpack

Enable installation of quarkus extensions from maven central

Use case :
Manually install sentry extensions from a list of named jars to be downloaded from a centralized repo.

Example :
To install sentry extension this list of jars should be installed into the /providers directory of keycloak :

  • sentry-jul-5.7.4.jar
  • sentry-5.7.4.jar
  • quarkus-logging-sentry-deployment-1.1.1.jar
  • quarkus-logging-sentry-1.1.1.jar

Container does not run well with macbook M1

Two developers experience troubles with macbook m1 at running a keycloak container based on this buildpack.
We have built a docker compose project available here : https://github.com/tchapgouv/tchap-identite

  • Sometimes it does not start after minutes of waiting
  • Sometimes it starts quickly (1 minute or less)

-> It does not allow to develop keycloak extension efficiently locally

It seems that we avoid those problems by using the official keycloak docker container.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.