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

vendor vault UI's bindata_assetfs.go like Consul does? #5622

Closed
arianvp opened this issue Oct 26, 2018 · 4 comments
Closed

vendor vault UI's bindata_assetfs.go like Consul does? #5622

arianvp opened this issue Oct 26, 2018 · 4 comments

Comments

@arianvp
Copy link

arianvp commented Oct 26, 2018

Is your feature request related to a problem? Please describe.
https://nixos.org/ packages hashicorp tooling by building them from source (We are source based linux distro, like Gentoo) . For consul, we can just use
our standard go build infrastructure to build consul (we simply type go build in a container). And we get consul + consul UI because the consul UI assets are vendored with https://github.com/hashicorp/consul/blob/master/agent/bindata_assetfs.go . This makes packaging consul very easy for us (NixOS/nixpkgs#48714).

Recently, we've tried to update the vault package to a new version, but ran into some problems with building it. for the vault repo this bindata_assetfs.go is not commited. thus a simple go build does not succesfully build vault with the UI included.

We have to build this file manually, using the yarn project in /ui. However, yarn is not so well-supported in NixOS and thus it has been a bit of a pain to get vault to build for me (NixOS/nixpkgs#49082).

Describe the solution you'd like
Just commit the resulting bindata_assetfs.go. Then people can simply build vault with a go build. This would make building vault a lot easier

Describe alternatives you've considered
I've tried building the yarn project myself but this adds thousands of new dependencies to the nixos project, which we would prefer not to add. (We have to package up each individual yarn package that the UI Depends on into the OS, to successfully build the binary,). We're a bit reluctant to do so.

If you think this is undesired. Feel free to close. I can hack my way around it. but I would prefer if building vault and consul would be 'similar' in difficulity

@chrishoffman
Copy link
Contributor

The bindata_assetfs.go file is a build artifact and keeping this file up to date with multiple simultaneous features in development complicates the general development process. We build up our final binaries using the build scripts and docker images in the scripts folder if that is helpful.

@bricewge
Copy link

@chrishoffman Could it be possible then, to upload the build artifact as an assets on releases tags as suggested here?

@jefferai
Copy link
Member

I looked through that issue and it doesn't seem like our suggestion to use our Dockerfile was ever brought up. Can nix use Docker to build?

@bricewge
Copy link

No, Nix can't use Docker to build a package since it is meant to build reproducible packages and dockerfiles have side effects apt-get update, for example. Otherwise we would have gone that way, as suggested.

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

4 participants