Skip to content

Conversation

@avnik
Copy link

@avnik avnik commented May 16, 2024

Just draft PoC, server do nothing at the moment, I just checked if rust' protobuf implementation accept our .proto files

@avnik avnik marked this pull request as draft May 16, 2024 12:14
@avnik avnik force-pushed the avnik/rust-proto branch from 71f8e3c to 4fc1896 Compare May 21, 2024 18:24
vilvo added a commit to tiiuae/dev-team-sandbox that referenced this pull request May 22, 2024
* Depends on tiiuae#611
* Depends on mbssrc/givc#1

Status:
* admin service running in admin-vm
  - [root@admin-vm:/home/ghaf]# ps aux|grep givc
    root ... /nix/store/...givc-admin-0.0.1/bin/givc-admin
  - [ghaf@admin-vm:~]$ netstat -na|grep 9001
    tcp  ... 192.168.101.10:9001     0.0.0.0:*      LISTEN
* Testing with grpcurl
  - added grpcurl to debug-tools module for all -debug build
    subsystems (host and guests) to access
  - [ghaf@admin-vm:~]$ grpcurl -vv -plaintext 192.168.101.10:9001 describe admin.AdminService
  Failed to resolve symbol "admin.AdminService": server does not support the reflection API
  - [ghaf@admin-vm:~]$ grpcurl -vv -plaintext 192.168.101.10:9001 admin.AdminService/Reboot
  Error invoking method "admin.AdminService/Reboot": failed to query for service descriptor "admin.AdminService": server does not support the reflection API

TODO:
* --reset-author - most of the givc-admin integration to gui-vm
  are authored by Manuel. Only refactored to admin-vm.

Co-authored-by: Manuel Bluhm <manuel@ssrc.tii.ae>
Co-authored-by: Ville Ilvonen <ville.ilvonen@unikie.com>

Signed-off-by: Ville Ilvonen <ville.ilvonen@unikie.com>
vilvo added a commit to tiiuae/dev-team-sandbox that referenced this pull request May 22, 2024
* Depends on mbssrc/givc#1

Status:
* admin service running in admin-vm
  - [root@admin-vm:/home/ghaf]# ps aux|grep givc
    root ... /nix/store/...givc-admin-0.0.1/bin/givc-admin
  - [ghaf@admin-vm:~]$ netstat -na|grep 9001
    tcp  ... 192.168.101.10:9001     0.0.0.0:*      LISTEN
* Testing with grpcurl
  - added grpcurl to debug-tools module for all -debug build
    subsystems (host and guests) to access
  - [ghaf@admin-vm:~]$ grpcurl -vv -plaintext 192.168.101.10:9001 describe admin.AdminService
  Failed to resolve symbol "admin.AdminService": server does not support the reflection API
  - [ghaf@admin-vm:~]$ grpcurl -vv -plaintext 192.168.101.10:9001 admin.AdminService/Reboot
  Error invoking method "admin.AdminService/Reboot": failed to query for service descriptor "admin.AdminService": server does not support the reflection API

TODO:
* --reset-author - most of the givc-admin integration to gui-vm
  are authored by Manuel. Only refactored to admin-vm.

Co-authored-by: Manuel Bluhm <manuel@ssrc.tii.ae>
Co-authored-by: Ville Ilvonen <ville.ilvonen@unikie.com>

Signed-off-by: Ville Ilvonen <ville.ilvonen@unikie.com>
vilvo added a commit to tiiuae/dev-team-sandbox that referenced this pull request May 23, 2024
* Depends on mbssrc/givc#1

Status:
* admin service running in admin-vm
  - [root@admin-vm:/home/ghaf]# ps aux|grep givc
    root ... /nix/store/...givc-admin-0.0.1/bin/givc-admin
  - [ghaf@admin-vm:~]$ netstat -na|grep 9001
    tcp  ... 192.168.101.10:9001     0.0.0.0:*      LISTEN
* Testing with grpcurl
  - added grpcurl to debug-tools module for all -debug build
    subsystems (host and guests) to access
  - [ghaf@admin-vm:~]$ grpcurl -vv -plaintext 192.168.101.10:9001 describe admin.AdminService
  Failed to resolve symbol "admin.AdminService": server does not support the reflection API
  - [ghaf@admin-vm:~]$ grpcurl -vv -plaintext 192.168.101.10:9001 admin.AdminService/Reboot
  Error invoking method "admin.AdminService/Reboot": failed to query for service descriptor "admin.AdminService": server does not support the reflection API

TODO:
* --reset-author - most of the givc-admin integration to gui-vm
  are authored by Manuel. Only refactored to admin-vm.

Co-authored-by: Manuel Bluhm <manuel@ssrc.tii.ae>
Co-authored-by: Ville Ilvonen <ville.ilvonen@unikie.com>

Signed-off-by: Ville Ilvonen <ville.ilvonen@unikie.com>
@avnik avnik force-pushed the avnik/rust-proto branch from 512b57a to 1dcf1ad Compare May 23, 2024 10:11
vilvo pushed a commit to tiiuae/dev-team-sandbox that referenced this pull request May 24, 2024
* Depends on mbssrc/givc#1

* Integrates givc - ghaf/grpc inter-vm communications -
  framework to ghaf as new flake input. Future framework
  updates can be handled via flake givc input specific updates
  incrementally.
* Integrates givc-admin module into the admin-vm and binds
  the server to port 9001 with allowed TCP firewall policy.
* Depends on and the testing is based on the rust implementation.
  Does not yet support TLS but supports server grpc reflection
  even though the server methods are not yet implemented
* -debug build testing is supported with grpcurl system wide
* Refactored to admin-vm from Manuel Bluhm's more holistic module
  integration with givc-admin in gui-vm. Refactoring, format checks
  and testing by co-author Ville Ilvonen.

Testing:
1. use ghaf -debug build to update and reboot:

  nixos-rebuild --flake .#lenovo-x1-carbon-gen11-debug \
  --target-host root@<ghaf-host-debug-eth-ip> switch
  ssh ghaf@<ghaf-host-debug-eth-ip>
  [ghaf@ghaf-host:~]$ sudo reboot -n

2. log into ghaf-host and further into admin-vm
  [ghaf@ghaf-host:~]$ ssh 192.168.101.10
  [ghaf@admin-vm:~]$ systemctl status givc-admin.service

3. test grpc admin service locally
  [ghaf@admin-vm:~]$ grpcurl -v -plaintext -use-reflection 192.168.101.10:9001 describe
  admin.AdminService is a service:
  service AdminService {
    ... # service methods

4. test grpc admin service from gui-vm
  [ghaf@ghaf-host:~]$ ssh 192.168.101.3
  [ghaf@gui-vm:~]$ grpcurl -v -plaintext -use-reflection 192.168.101.10:9001 describe

Co-authored-by: Ville Ilvonen <ville.ilvonen@unikie.com>

Signed-off-by: Ville Ilvonen <ville.ilvonen@unikie.com>
vilvo pushed a commit to tiiuae/dev-team-sandbox that referenced this pull request May 24, 2024
* Depends on mbssrc/givc#1

* Integrates givc - ghaf/grpc inter-vm communications -
  framework to ghaf as new flake input. Future framework
  updates can be handled via flake givc input specific updates
  incrementally.
* Integrates givc-admin module into the admin-vm and binds
  the server to port 9001 with allowed TCP firewall policy.
* Depends on and the testing is based on the rust implementation.
  Does not yet support TLS but supports server grpc reflection
  even though the server methods are not yet implemented
* -debug build testing is supported with grpcurl system wide
* Refactored to admin-vm from Manuel Bluhm's more holistic module
  integration with givc-admin in gui-vm. Refactoring, format checks
  and testing by co-author Ville Ilvonen.

Testing:
1. use ghaf -debug build to update and reboot:

  nixos-rebuild --flake .#lenovo-x1-carbon-gen11-debug \
  --target-host root@<ghaf-host-debug-eth-ip> switch
  ssh ghaf@<ghaf-host-debug-eth-ip>
  [ghaf@ghaf-host:~]$ sudo reboot -n

2. log into ghaf-host and further into admin-vm
  [ghaf@ghaf-host:~]$ ssh 192.168.101.10
  [ghaf@admin-vm:~]$ systemctl status givc-admin.service

3. test grpc admin service locally
  [ghaf@admin-vm:~]$ grpcurl -v -plaintext -use-reflection 192.168.101.10:9001 describe
  admin.AdminService is a service:
  service AdminService {
    ... # service methods

4. test grpc admin service from gui-vm
  [ghaf@ghaf-host:~]$ ssh 192.168.101.3
  [ghaf@gui-vm:~]$ grpcurl -v -plaintext -use-reflection 192.168.101.10:9001 describe

Co-authored-by: Ville Ilvonen <ville.ilvonen@unikie.com>

Signed-off-by: Ville Ilvonen <ville.ilvonen@unikie.com>
avnik added 3 commits May 27, 2024 16:26
Signed-off-by: Alexander V. Nikolaev <avn@avnik.info>
Signed-off-by: Alexander V. Nikolaev <avn@avnik.info>
Signed-off-by: Alexander V. Nikolaev <avn@avnik.info>
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.

2 participants