Integrated mode
Integrated mode is a feature that allows you to run both RADKit Client and RADKit Service within the same process, without having to go through the RADKit Cloud. No network connectivity to the public internet is required.
Note
The RADKit Service component requires setting up and providing a superadmin password.
If you would like to avoid password prompts, please refer to Storing the superadmin password.
Bootstrapping an integrated Service
Use the bootstrap_service() function from the REPL prompt to
bootstrap a radkit-service programmatically. This will create the vault, E2EE
certificate and webserver certificate.
>>> bootstrap_service(radkit_directory="/tmp/my-radkit-directory")
Instead of bootstrapping upfront, it is also possible to pass
autobootstrap=True to create_service().
Starting the integrated Service
Use the create_service() function from the REPL prompt to
start the integrated Service and connect to it. If the superadmin password
is not already available, the user is prompted for it. By default the webserver
is started, but this is not mandatory (see the Client API reference for a
description of all the possible parameters).
>>> integrated_service = create_service(radkit_directory="/tmp/my-radkit-directory")
Superadmin password: ************ [correct]
09:35:21.315Z INFO | Opening database. [path='/Users/<USER>/.radkit/service/service-db.json.encrypted']
09:35:22.804Z INFO | Creating service
09:35:22.805Z INFO | Starting RADKit Service [log_dir=PosixPath('/Users/<USER>/.radkit/logs/service')]
UI/API is listening on https://localhost:8081
09:35:22.813Z INFO | Starting UI and API listener [addresses=['::'] secure_port=8081]
09:35:23.099Z INFO | Webserver certificate fingerprint [fingerprint='006731318e1961fdd4b4cfef40e8af5c6b276c5fb97fb54240f13fd156f98531']
09:35:23.101Z INFO | E2EE certificate fingerprint [fingerprint='1591cf4a7053eba07edf77acc6d5907db02951cda70b934c0e70e0e3190acbfe']
09:35:23.108Z INFO | Starting HTTP server [bind=[':::8081']]
09:35:23.109Z INFO | new RPC request [rpc_name='get-capabilities' rpc_source='in-memory']
09:35:23.120Z INFO | user requested Capabilities
09:35:23.367Z INFO | Running on https://[::]:8081 (CTRL + C to quit)
09:35:23.370Z INFO | finished handling capabilities request
09:35:23.385Z INFO | RPC request finished [rpc_name='get-capabilities' rpc_source='in-memory']
09:35:23.386Z INFO | new RPC request [rpc_name='get-basic-inventory' rpc_source='in-memory']
09:35:23.388Z INFO | user requested inventory
09:35:23.398Z INFO | finished handling basic inventory request
09:35:23.399Z INFO | RPC request finished [rpc_name='get-basic-inventory' rpc_source='in-memory']
>>> integrated_service.service
[READY] Service(name='in-memory-1', service_id=None)
----------------------------- -------------------------------------------------------
name in-memory-1
domain None
client_id None
service_id None
#devices 2
#capabilities 26
version 1.8.0
e2ee_supported No
e2ee_active No, not supported by service (use_e2ee=WHEN_AVAILABLE).
e2e_verify_required No
supported_compression_methods ['zstd']
supports_h2_multiplexing Yes
connection_method None
direct_rpc_url None
----------------------------- -------------------------------------------------------
>>> integrated_service.service.inventory
...
Note
This makes it possible to run RADKit Integrated while also connecting to the RADKit Cloud
in parallel using e.g. client.sso_login(...), which was not possible with the former
radkit-integrated command.
Scripting with Integrated mode
Integrated mode is available through the Client API. It can be started by calling
radkit_client.sync.Client.create_service().