- Command to start keycloak in the memory database (For windows): kc.sh start-dev --storage=chm
- Command to start Consul: consul agent -server -bootstrap-expect=1 -data-dir=consul-data -ui -bind=your-ip-address
- After, we need to create a local or repository, and create our confiuration files, then commit them to the repository
- To activate any new updates made to any configuration, we need first to commit the changes, then send a post request to : http://localhsot:port/actuator/refresh to activate them.
- Then, add the properties in application.yaml to configure the service and import the configuration for the configuration service :
- We are using Consul as our registration service, to work with Consul, just download the Zip file from https://developer.hashicorp.com/consul/downloads?host=www.consul.io
- Then open the correspond folder in Terminal, and execute the command mentioned above.
We are using to secure our app keycloak adapter.
- To launch keycloak locally, after downloading the zip file, you need to open the bin folder inside the keycloak folder, then launch the command above to start keycloak using memory storage.
- After launching, open keycloak on http://localhost:8080
- After creating the account, login to the keycloak
• Keycloak uses a configuration file keycloak.json , and to use application properties to set keycloak configuration properties,we need to add the following Bean:
• Keycloak properties in application.yml