Download and install Docker Desktop.
-
Clone repository
-
In root of repository run script
./build-container.shand wait for an inscriptionBuild finished
- Go to the Keycloak on
localhost:9001:
- Go to the section
Administration Console:
- Sign in with username
adminand passwordadmin:
- Go to the section
Masterand pressAdd realmbutton:
- Name realm
iot, pressSelect filebutton, choose from repository folderkeycloak/realmdatafilerealm-iot.jsonand pressCreatebutton:
- Go to the section
Iotand chooseMastersection:
- Go to the section
Clients:
- Press on
admin-cli:
- Choose
Access Typeand change frompublictoconfidential, turn onService Accounts Enabledand pressSavebutton below:
- Press on
Service Account Roles:
- Choose
Client Rolesand selectiot-realm:
- In
Available Roleschoosemanage-users,query-users,view-usersand pressAdd selected >>:
- Press on
Credentialsand copySecretvalue (or pressRegenerate Secretbutton and then copySecretvalue):
- Go to the section
Masterand chooseIotsection:
- Go to the section
Clients:
- Press on
iot-rest-api:
- Press on
Credentialsand copySecretvalue (or pressRegenerate Secretbutton and then copySecretvalue):
-
Close Keycloak
-
Stop and delete container in Docker Desktop and delete image
backend(IMPORTANT!!!)
- In repository folder
env.dopen filebackendand paste saved secret intoKEYCLOAK_ADMIN_CLIENT_SECRETandKEYCLOAK_IOT_CLIENT_SECRETvariables:
# SOME ENVIROMENT VARIABLES
# ...
KEYCLOAK_ADMIN_CLIENT_SECRET=<YOUR_SAVED_ADMIN_CLIENT_SECRET>
KEYCLOAK_IOT_CLIENT_SECRET=<YOUR_SAVED_IOT_CLIENT_SECRET>- In root of repository run script
./build-container.shand wait for an inscriptionBuild finished
Now backend is must be ready for REST API requests (for detail information about backend API, read API-DOC