Skip to content

Installation/Build instruction #58

Description

@seydar

Hi,

I'm interested in playing around with the NBI API, but the build instructions appear to be blank, and I can't see to find any instructions on installing it.

Where should I be looking? I don't see anything on the website, either.

Activity

  1. ciarand commented on Oct 13, 2023

    @ciarand
    Member

    Hi @seydar! This project uses Bazel to build. I recommend using the Bazelisk wrapper, which ensures you're using the same Bazel version as we do in our CI/CD pipelines. Once you've got bazelisk installed, you can look at the available targets by using bazelisk query //api/nbi/... which will show all the build targets available under the api/nbi directory. There are different targets for each of the main languages used in the repo (Go, Python, Java, C++), and you can build them by running bazelisk build <target>. We have some documentation updates planned that will provide more detail, but for now the Bazel docs are probably the best explanation of what's going on in the repo. The scenario building tutorial also goes over some of the main concepts using the nbictl tool.

    Unfortunately, there's not currently a trivial way to seamlessly export the bazel-built protobuf libraries into another build system. They're just source files of course, but if you copy them out of the built bin directory (bazel-bin by default) they may require some manual massaging of import paths and dependencies to conform to the conventions of other build systems. Luckily, since the API is defined with gRPC protobuf files, you can also always just use the standard gRPC + protoc toolchain to generate the requisite client stubs (that's what the bazel targets above do).

    For our information, what language(s) and build system(s) were you planning on using to experiment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions