diff --git a/rockcraft.yaml b/rockcraft.yaml new file mode 100644 index 0000000..09f5668 --- /dev/null +++ b/rockcraft.yaml @@ -0,0 +1,63 @@ +name: openfga +base: bare +build-base: ubuntu:22.04 +version: "1.3.3" +summary: Openfga Authorization Server +description: | + OpenFGA is a flexible Authorization system inspired by Google's Zanzibar, designed for reliability and low latency at scale. +license: Apache-2.0 +run-user: _daemon_ +platforms: + amd64: + +services: + openfga: + override: replace + command: openfga run + startup: disabled +checks: + up: + override: replace + level: alive + exec: + command: grpc_health_probe -addr localhost:8081 + + +parts: + util: + plugin: nil + stage-packages: + # This is needed to pipe the stdout/stderr to a file for log forwarding + - coreutils + prime: + - usr/bin/tee + + shell: + plugin: nil + stage-packages: + # This is needed to pipe the stdout/stderr to a file for log forwarding + - dash + + openfga: + plugin: go + build-snaps: + - go/1.21/stable + build-environment: + - CGO_ENABLED: 0 + source: https://github.com/openfga/openfga + source-type: git + source-tag: v1.3.3 + override-build: | + go build -o ${CRAFT_PART_INSTALL}/bin/openfga ./cmd/openfga + + grpc_health_probe: + plugin: go + build-snaps: + - go/1.21/stable + build-environment: + - CGO_ENABLED: 0 + source: https://github.com/grpc-ecosystem/grpc-health-probe + source-type: git + source-tag: v0.4.21 + override-build: | + go build -a -tags netgo -ldflags=-w -o ${CRAFT_PART_INSTALL}/bin/grpc_health_probe