Skip to content

Latest commit

 

History

History
124 lines (82 loc) · 2.9 KB

File metadata and controls

124 lines (82 loc) · 2.9 KB

Contributing

Ella Core is an open-source project and we welcome contributions from the community. This document provides guidelines for contributing to the project. Contributions to Ella Core can be made in the form of code, documentation, bug reports, feature requests, and feedback. We will judge contributions based on their quality, relevance, and alignment with the project's tenets.

Getting Started

Pre-requisites

You will need a Linux machine with the following software installed:

  • Docker
  • Go
  • Npm
  • Rockcraft

1. Setup local Docker registry

Create a local registry

docker run -d -p 5000:5000 --name registry registry:2

2. Build and Deploy Ella

Build the image and push it to the local registry

rockcraft pack
sudo rockcraft.skopeo --insecure-policy copy oci-archive:ella-core_v1.8.0_amd64.rock docker-daemon:ella-core:latest
docker tag ella-core:latest localhost:5000/ella-core:latest
docker push localhost:5000/ella-core:latest

3. Run the integration tests

INTEGRATION=1 go test ./integration/... -v

How-to Guides

Run Unit Tests

go test ./...

Build the Frontend

Install pre-requisites:

sudo snap install node --channel=24/stable --classic
npm install --prefix ui
npm run build --prefix ui

Build the Backend

Install pre-requisites:

sudo apt install clang llvm gcc-multilib libbpf-dev
sudo snap install go --channel=1.26/stable --classic

Generate the eBPF Go bindings:

go generate ./...

Build the backend:

REVISION=`git rev-parse HEAD`
go build -ldflags "-X github.com/ellanetworks/core/version.GitCommit=${REVISION}" ./cmd/core/main.go

Build documentation

uvx --with-requirements requirements-docs.txt mkdocs build

Build the Container image

sudo snap install rockcraft --classic --edge
rockcraft pack -v
sudo rockcraft.skopeo --insecure-policy copy oci-archive:ella-core_v1.8.0_amd64.rock docker-daemon:ella-core:latest
docker run ella-core:latest

View Test Coverage

go test ./... -coverprofile coverage.out
go tool cover -func coverage.out

References

Backend

Ella Core's backend is written in Go. Please follow standard Go conventions for code structure, formatting, and documentation.

  • Lint: golangci-lint run
  • Vet: go vet ./...

Embedded Database

Ella uses an embedded SQLite database to store its data. Type mappings between Go and SQLite are managed using sqlair.

Frontend

Ella Core's frontend is built with Vite and static files are embedded into the Go binary.

Troubleshooting

Running Docker in the same system as Ella Core can cause some issues because of IP forwarding. If your containers lose internal connectivity, you can restore Docker networking via sudo nft delete table inet filter.