You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

debug-lc.md 1.1 kB

1234567891011121314151617181920212223242526272829303132333435
  1. This document is intended to provide contributors with an introduction to develop [LC(LocalController)][framework] of the Sedna project.
  2. ### Debug LC
  3. 1\. config LC:
  4. Setting up the environments:
  5. 1. `GM_ADDRESS`: the addresss of GM.
  6. 1. `NODENAME`: the node name at which LC running.
  7. 1. `ROOTFS_MOUNT_DIR`: the directory of the host mounts, default `/rootfs`.
  8. ```shell
  9. # update these values if neccessary
  10. export GM_ADDRESS=192.168.0.10:9000
  11. export NODENAME=edge-node
  12. export ROOTFS_MOUNT_DIR=""
  13. ```
  14. > **Note**: If you have already run Sedna by following the [install doc], and decide to run LC in-place, you don't need to setup these environments, run `make lcimage` and `kubectl -n sedna delete pod lc-<pod-name>`.
  15. 2\. compile and run LC directly:
  16. ```shell
  17. make WHAT=lc
  18. _output/bin/sedna-lc -v4
  19. ```
  20. Alternatively you can debug LC with [golang delve]:
  21. ```shell
  22. dlv debug cmd/sedna-lc/sedna-lc.go -- -v4
  23. ```
  24. [install doc]: /docs/setup/install.md
  25. [golang delve]: https://github.com/go-delve/delve
  26. [framework]: /docs/proposals/architecture.md#architecture