Skip to content

Development

Mustafa Arıcı edited this page Apr 4, 2021 · 2 revisions

Development

Dependencies

Following sections describe how to obtain dependencies for building OVPM.

Golang

You should set up Golang >=v1.16 on your system.

Protobuf & GRPC

You should have the latest protobuf compiler together with Google development headers and types present on your system.

# on Fedora 33
$ dnf install -y protobuf-compiler protobuf-static

Also you should have the latest go, grpc, grpc-gateway and openapiv2 proto compiler plugins on your system.

# on Go 1.16
$ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
$ go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
$ go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest

Yarn

You should have the latest Yarn package manager on your system for building the WebUI.

# on Fedora 33
$ dnf -y yarnpkg nodejs

Bindata

You should have go-bindata on your system in order to be able to bundle assets and static files into the ovpmd server binary.

$ go install github.com/kevinburke/go-bindata/go-bindata@latest

NFPM

You should have the latest nfpm on your system in order to be able to create OS distributions.

$ go install github.com/goreleaser/nfpm/cmd/nfpm@latest

Bundling

In order to bundle all assets and statics into a go package you can invoke $ make bundle.

Building

In order to build and output binaries to the ./bin/ directory you can invoke $ make build.

Distribution

In order to create DEB and RPM distributions to ./dist/ directory you can invoke $ make dist.

Clone this wiki locally