Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation/Build instruction #58

Open
seydar opened this issue Oct 13, 2023 · 1 comment
Open

Installation/Build instruction #58

seydar opened this issue Oct 13, 2023 · 1 comment

Comments

@seydar
Copy link

seydar commented Oct 13, 2023

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.

@ciarand
Copy link
Member

ciarand commented Oct 13, 2023

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants