Skip to content

Rust authority bootstrap#205

Merged
nbuffon merged 3 commits intoOrange-OpenSource:masterfrom
nbuffon:rust_authority_bootstrap
Nov 26, 2024
Merged

Rust authority bootstrap#205
nbuffon merged 3 commits intoOrange-OpenSource:masterfrom
nbuffon:rust_authority_bootstrap

Conversation

@nbuffon
Copy link
Member

@nbuffon nbuffon commented Nov 12, 2024

What's new

New function to create a Configuration from bootstrap sequence
The bootstrap sequence provide services' URL and credentials, any of these information already present in the configuration file
All the other fields that are unrelated to services connection are still read from the configuration file and set in the Configuration object

closes #185
closes #161

How to test

  1. Edit examples/config.ini and
    1. Fill the [bootstrap] section with the proper endpoint and credentials
    2. Remove the [mqtt] section
    3. Remove the ``telemetry]` section
  2. Apply the joined patch to make the copycat example using the bootstrap sequence
    cd rust
    wget https://github.com/user-attachments/files/17728759/copycat_bootstrap.txt
    mv copycat_bootstrap.txt copycat_bootstrap.patch
    git apply copycat_bootstrap.patch
    
  3. Start the copycat example
    cargo run --example copycat --features geo_routing --features telemetry
    
    => The example runs and receives messages

@nbuffon nbuffon added the Rust Rust code label Nov 12, 2024
@nbuffon nbuffon self-assigned this Nov 12, 2024
@nbuffon nbuffon force-pushed the rust_authority_bootstrap branch 2 times, most recently from 20cb68b to 0b56377 Compare November 12, 2024 16:51
@nbuffon nbuffon requested a review from Hugues360 November 13, 2024 08:10
@nbuffon nbuffon force-pushed the rust_authority_bootstrap branch from 0b56377 to 24426bb Compare November 13, 2024 10:09
@Hugues360
Copy link
Collaborator

Why not include the example of copycat with bootstrap to the current PR (with another name to keep existing copycat)? As bootstrap is now a feature of the lib.

@nbuffon
Copy link
Member Author

nbuffon commented Nov 18, 2024

Why not include the example of copycat with bootstrap to the current PR (with another name to keep existing copycat)? As bootstrap is now a feature of the lib.

Problem is that it requires a running bootstrap server and for now the code is private and the platform is not deployed as publicly usable
So I did patch the example to test the bootstrap, if you prefer I can add a dedicated example but it is not possible for external users to run it
In comparison the telemetry example already requires to edit the config.ini file to fit the OTLP collector instance (which is not very example friendly as an example should be able to run without any modification) but you can easily run your own collector using official Docker images
This is not yet possible for the bootstrap so I decided not to provide an example yet, the idea is to provide a public instance of the platform which is still work in progress

@nbuffon nbuffon requested a review from Hugues360 November 18, 2024 09:26
Copy link
Collaborator

@Hugues360 Hugues360 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See answer in the thread for station_id field in [bootstrap] section

Signed-off-by: Nicolas Buffon <nicolas.buffon@orange.com>
Signed-off-by: Nicolas Buffon <nicolas.buffon@orange.com>
@nbuffon nbuffon force-pushed the rust_authority_bootstrap branch from 24426bb to 2af51f4 Compare November 19, 2024 13:07
@nbuffon nbuffon requested a review from Hugues360 November 19, 2024 13:11
Signed-off-by: Nicolas Buffon <nicolas.buffon@orange.com>
@nbuffon nbuffon force-pushed the rust_authority_bootstrap branch from 2af51f4 to 9fe0273 Compare November 19, 2024 13:12
@nbuffon
Copy link
Member Author

nbuffon commented Nov 19, 2024

Changes are pushed, station_id now correctly comes from the [station] section

@nbuffon nbuffon merged commit 604a26a into Orange-OpenSource:master Nov 26, 2024
@nbuffon nbuffon deleted the rust_authority_bootstrap branch November 26, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rust Rust code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Use bootstrap information to connect to services Get connection information through bootstrap sequence

2 participants