26 Commits

Author SHA1 Message Date
Sviatoslav Boichuk
932b211706 Merge pull request #103 from Telecominfraproject/feat/test_initial_infra_message_impl
Initial infra message impl
2024-12-06 13:03:03 +02:00
Oleksandr Mazur
8d919e6dcb Utils: run_cgw: change hardcoded host port bind to env-var
Export host-to-docker port based on value taken from
env var rather then hardcoded value.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-05 14:36:57 +02:00
Sviatoslav Boichuk
ae78f133d4 Removed duplicate if condition in run_cgw.sh + fix CGW_REDIS_USERNAME|PASSWORD env var checker 2024-12-05 12:31:45 +02:00
Oleksandr Mazur
55f037ed0c Run cgw: generate base client cert/key pair on make all
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-11-15 12:15:28 +02:00
Oleksandr Mazur
768c41dd90 Testing: introduce initial automated testing _core_ changes
Implement initial core for automated tests:
 * mostly resuses/extends existing simulator, kafka producer etc;
 * helper scripts added for manual testing
   (single infra/group add/del etc)
 * Tests compose either of simple steps premade into fixtures,
   or combine usage of both fixtures + custom code inside
   test's funcion

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-11-12 14:20:08 +02:00
Oleksandr Mazur
d70c4d718d Client simulator: use pool of macs with single crt/key
Make client simulator use single cert/key pair with mac
being taken from predefind macs list. This makes it easier
to use simulator, as it doesn't depend upon a big list
of certificates that are expected to match simulated MAC
and so on.

Fixup some python imports to not use relative import,
but rather istruct makefile to pass python path var
that includes relative path.
This is a change required for following commits that
bring automated testing using this simulator.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-11-12 13:26:16 +02:00
Oleksandr Mazur
abb99f544c Add proper all-in-one make job
This change makes it possibly to fire make all / make run
without any additional prerequisites required.
It instructs Makefile to launch docker compose for thirdparty
services, as well as instructs CGW container to communicate
with newly created containers.
Also generates self-signed certs, in case if these are missing.

- Tweak docker-compose files for thirdparty services to resign
  in a cgw-dedicated network, and use hostnames where needed;
- Change CGW app default network to cgw-dedicated network;
- Tweak PGSQL scripts to create tables in CGW DB, as well
  as change ownership to them.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-10-02 14:37:13 +03:00
Oleksandr Mazur
46120c6056 Conn Server: W/A: wrap schema-related init into spawn blocking
Currently, schema validator panics because sync func is called
within async context.

Temporary W/A to at least overcome issue at least temporarily,
up untill refactoring enforced.

Also add RUST_BACKTRACE=1 to the run_cgw to enable tracing
by default (if launched through helper script).

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-09-17 14:51:56 +03:00
Sviatoslav Boichuk
aff78fb170 Added env variables to configure group devices capacity 2024-08-22 16:54:02 +03:00
Sviatoslav Boichuk
4b8232601b Add env. vars to configure groups capacity and threshold 2024-08-22 16:54:02 +03:00
Sviatoslav Boichuk
7bd2e0a5b3 Use JSON schema to validate configure commands 2024-08-14 13:03:58 +03:00
Sviatoslav Boichuk
d9efb9a1c4 Make TLS connection to Redis/PSQL optional 2024-08-12 17:48:28 +03:00
Sviatoslav Boichuk
1c458e7edc Utilize TLS connection for Redis & PostgeSQL 2024-07-18 10:35:00 +03:00
Sviatoslav Boichuk
b8f5747fb1 Use credentials to connect to Redis 2024-07-16 12:05:56 +03:00
Oleksandr Mazur
2531373044 CGW: TopoMap: Disable by default
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 <oleksandr.mazur@plvision.eu>
2024-07-04 11:01:01 +03:00
Oleksandr Mazur
58e59ccd84 CGW: Allow disabling topomap handling through env var
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 <oleksandr.mazur@plvision.eu>
2024-07-03 00:15:18 +03:00
Oleksandr Mazur
840d142c1f Fixup run_cgw script to use proper env var for <wss_t_num>
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-06-30 17:03:00 +03:00
Sviatoslav Boichuk
e301ae1577 Use host instead of IP Address for: GRPC, KAFKA, REDIS, POSTGRES DB 2024-06-14 14:52:02 +03:00
Sviatoslav Boichuk
9a1d27ad26 Add env variable for metrics port 2024-06-14 12:18:31 +03:00
Sviatoslav Boichuk
e6394a714d Added function to retrieve CN name from peer certificate 2024-05-23 08:56:34 +03:00
Sviatoslav Boichuk
af7773a044 Added client certs verifier 2024-05-22 16:44:21 +03:00
Sviatoslav Boichuk
57ae9e0c9b Use rustls instead of native tls 2024-05-22 14:18:08 +03:00
Sviatoslav Boichuk
5ba1030392 Change app args to env variables 2024-05-16 09:29:35 +03:00
Oleksandr Mazur
ab62ffb325 Fix invalid app_args processing
- Tweak script to respect cgw_id
- Remove hardcoded broker ip for NB API producer

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-04-30 19:23:04 +03:00
Oleksandr Mazur
c3172eed34 Implement dockerized building and running of CGW
- 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 <oleksandr.mazur@plvision.eu>
2024-04-04 11:24:34 +03:00
Oleksandr Mazur
eda553ccdb Update readme, add make to ease-out building
- 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 <oleksandr.mazur@plvision.eu>
Change-Id: I5b72e35a121afa95f3102efad8f1748995910a76
2024-03-28 18:28:11 +02:00