This project was built as a proof of concept for a better and open-source controller for EVE-OS, the edge-specific OS bulit by Zededa. I wanted to be able to operate edge nodes in a fully state-assertive way, as one would using the k8s API or Terraform. The longer I worked on this, the more I felt like building this solution on top of EVE was not a good way to do it, as there are more sane and open projects such as kube-edge.
This has been left as an publicly visible repo as evidence for my ability to build complicated distributed systems, and to use Rust in such an environment. It no longer builds due to a combination of dropped support for the versions of bulid tools originally used, and newer versions of related dependencies needing API changes.
When I stopped working on it, the set of tools here could generate the full set of keys & certs needed, build an EVE image with the relevant keys embedded, start an instance of the controller, onboard the virtualised EVE instance with controller, and report logs and metrics from the VM. There is partial functionality present for generating an EVE config from a DB. I had started to work on integrating with the k8s api, but did not make much progress there.
If anyone wants to see this building let me know, I would be happy to clean it up.
To build:
- check out eve in a neighbouring directory
- cargo build
To run eve:
- create a file in the config directory called hosts, and add a line with your ip and chosen domain name to be copied to /etc/hosts
- put the chosen domain name in the file called "server"
- make sure the subnets specified for qemu in the makefile are not the same as the network used by the host
make live run-live
Generation of SSL cert with required SAN:
openssl ecparam -name prime256v1 -genkey -noout -out key.pem
-out example.org.crt \
-days 356 \
-subj "/C=NL/ST=Zuid Holland/L=Rotterdam/O=ACME Corp/OU=IT Dept/CN=example.org" \
-addext "subjectAltName = DNS:localhost,DNS:example.org" ```
A good starting point for the crypto library in use: https://docs.rs/aws-lc-rs/1.10.0/aws_lc_rs/signature/index.html
For setting up the dev db with sqlite and sqlx:
export DATABASE_URL="sqlite:todos.db" sqlx db create sqlx migrate run