Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CGW 1.0 release #63

Merged
merged 136 commits into from
Jul 5, 2024
Merged

CGW 1.0 release #63

merged 136 commits into from
Jul 5, 2024

Conversation

Cahb
Copy link
Contributor

@Cahb Cahb commented Jul 4, 2024

First (1.0) official release of the CGW application.
The release consists of:

  • (core) Threadpool-driven async incoming (secure) Websockets Connection handling of uCentral-protocol abiding devices (APs and Switches); supports mTLS / certificate+MAC (based on data in the certificate) validation, duplicate connection detection etc;
  • (core) Built-it horizontal scaling: Async communication and support for multiple CGW (shards) instances deployment;
  • (core) Kafka-driven NB API (requests/results as well as messages from uCentral devices are pushed to Kafka; NB API can control CGW - group assignment, infra list creation, pushing down configs to uCentral devices etc) through Kafka;
  • (feature) Dynamic Topology Map building and discovery, based on both direct connections from the uCentral devices, as well as the data they post in the State event messages and Realtime events (currently only <client.leave>, <client.join> RT events are supported);
    NOTE: the feature is disabled by default, as it's deemed too unstable with high load of data sent from high amount devices;
  • (feature) Basic health-check and counters support (how many devices are up, is the application healthy - up and operating - etc);
  • (feature) Message queue embedded support: NB API can queue up the requests for any device, and the queue is handled by the CGW internally;

phwhite and others added 30 commits March 17, 2024 20:33
Signed-off-by: Paul White <[email protected]>
- Add rebalancing implementation (basic);
- Add prometheus metrics (draft);

Signed-off-by: Oleksandr Mazur <[email protected]>
Change-Id: Iff273da2fcbe938ada51b97c87dcc3e534d1f95d
- Update readme;
- Add run script that helps running cgw;
  (utilizes enviroment variables for starting app);
- Add makefile that will be used for building app
  (build, deploy, run, run tests etc)

Signed-off-by: Oleksandr Mazur <[email protected]>
Change-Id: I5b72e35a121afa95f3102efad8f1748995910a76
- Rework JSON parser of uCentral messages to report
  valid mac to conn_server (in hex + uppercase),
  either way, connmap lookup can fail and cgw is unable
  to forward (sink down) msg from NB API to device;
- Comment-out stale connection closing (for now);

Signed-off-by: Oleksandr Mazur <[email protected]>
…_fix

Fix invalid device MAC reporting upon connect
- Use special build-env docker image that uses local project
  directory (volume mount) to speedup build.
- Implement cgw-img (docker image) generation.
- Track cgw-img tag based on commit.

Signed-off-by: Oleksandr Mazur <[email protected]>
Implement dockerized building and running of CGW
This reverts commit 8493d0e.

Commit was merged by mistake by @Cahb
Revert "Added RAM cache for device - Groupd ID mapping"
Added RAM cache for device - Groupd ID mapping
Get device capabilities from first connectnion
…stead of getting it from cache for each field
- Tweak script to respect cgw_id
- Remove hardcoded broker ip for NB API producer

Signed-off-by: Oleksandr Mazur <[email protected]>
Cahb and others added 21 commits July 1, 2024 21:00
NOTE: CI changes will be made in other PRs.
This one only covers the buildsystem / application part;

Signed-off-by: Oleksandr Mazur <[email protected]>
Originally <as> is lowercased in present Dockerfile, which might
omit warnings upon build.
Fix this by uppercasing the <AS> instructions.

Signed-off-by: Oleksandr Mazur <[email protected]>
…_start

Build: Print version (hash) tag whenever app starts
Signed-off-by: Carsten Schafer <[email protected]>
State messages have only one place for serial - state: params:serial,
while CGW expected it to be in params:state:serial as well.
Fix it by removing the last params:state:serial expectation

Signed-off-by: Oleksandr Mazur <[email protected]>
…ormatting

Fix/minor fixes and formatting
This is a debug-oriented (in cloud deployment) change to debug
real-life deployment.

Signed-off-by: Oleksandr Mazur <[email protected]>
…arily_revert_root_user

CGW: Dockerfile: revert (temporarily) root user
To disable the feature, the CGW_FEATURE_TOPOMAP_DISABLE should
be exported (value doesn't matter);
To enabled it back, the ENV var CGW_FEATURE_TOPOMAP_DISABLE
should be unset:
$ unset CGW_FEATURE_TOPOMAP_DISABLE

Signed-off-by: Oleksandr Mazur <[email protected]>
…bug_build

Build: enable temporarily debug-only build by default
…topomap_processign

CGW: Allow disabling topomap handling through env var
Change current behavior of CGW to <disable> the
TopoMap feature by default, as it's current
implementation is very unstable with high
number of devices sending their state info data.

Signed-off-by: Oleksandr Mazur <[email protected]>
@Cahb Cahb marked this pull request as draft July 4, 2024 14:12
@Cahb Cahb marked this pull request as ready for review July 4, 2024 14:37
@Cahb Cahb requested a review from phwhite July 4, 2024 14:37
Carsten Schafer and others added 4 commits July 5, 2024 08:10
@Cahb Cahb merged commit 6202aec into main Jul 5, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants