vector icon indicating copy to clipboard operation
vector copied to clipboard

Officially list FreeBSD

Open Hoverbear opened this issue 5 years ago • 19 comments

This issue proposes adding FreeBSD to our OS list on https://vector.dev/docs/setup/installation/operating-systems/ and supporting it through publishing packages.

Add FreeBSD here:

image

Also: Mention the official packages by @myfreeweb there!

Running curl --proto '=https' --tlsv1.2 -sSf https://sh.vector.dev | sh on FreeBSD should work.

root@freebsd-s-2vcpu-2gb-tor1-01:~ # curl --proto '=https' --tlsv1.2 -sSf https://sh.vector.dev | sh
                                   __   __  __
                                   \ \ / / / /
                                    \ V / / /
                                     \_/  \/

                                   V E C T O R
                                    Installer


--------------------------------------------------------------------------------
Website: https://vector.dev
Docs: https://vector.dev/docs/
Community: https://vector.dev/community/
--------------------------------------------------------------------------------

>>> We'll be installing Vector via a pre-built archive at https://packages.timber.io/vector/latest/
>>> Ready to proceed? (y/n)

>>> y
>>> unsupported arch: x86_64-unknown-freebsd

Hoverbear avatar Jul 10 '20 17:07 Hoverbear

Ref #732. I'm all for this if we can reliably support it.

binarylogic avatar Jul 10 '20 17:07 binarylogic

@binarylogic I'd like to bundle this in with upgrading our FreeBSD packages in their repos? @myfreeweb maintains it and I'd love to learn the process of upgrading it.

Hoverbear avatar Jul 24 '20 17:07 Hoverbear

@Hoverbear oh the process is simple: make sure /usr/ports is a git checkout (or at least svn checkout haha), go to /usr/ports/sysutils/vector, edit Makefile (change DISTVERSION, remove PORTREVISION, edit GH_TUPLE to match submodule revisions), run make makesum, run make cargo-crates to generate new CARGO_CRATES, put that into the Makefile instead of the old CARGO_CRATES, try the build with make, try packaging with make package. if everything is good, submit the git diff (or svn diff if you're still using that for some reason) to bugzilla or phabricator, then I approve, then a commiter commits.

Actually I guess it's not that simple unless you've been a maintainer before :D

valpackett avatar Jul 24 '20 22:07 valpackett

Noting we can include FreeBSD wasm support now: https://github.com/bytecodealliance/lucet/pull/577.

Really incredible job @myfreeweb :)

Hoverbear avatar Aug 20 '20 17:08 Hoverbear

What's the current status on this? I'd like to see what I can potentially do to contribute here.

The version in the FreeBSD ports tree looks to be fairly behind. My rust is a bit rusty (heh, sorry), but I'm getting back into it again here soon for a couple of other projects as well.

I did try building from source but ran into some unsurprising build errors, which I have in my notes as follows:

  • Build failure caused by the os_info crate dependency of mongodb crate. Bumping from 3.0.2 to 3.0.7 appears to work for moving past that roadblock.
  • Current roadblock are multiple build failures due to the src/sources/host_metrics module depending on the heim family of crates for metrics. I'm willing to try my hand at adding feature flag conditionals there to support FreeBSD metrics collection services, though I'd have to do some refresher reading & evaluate existing options first to select the best bang-for-buck approach.

If there's anything going on currently that might impact what I've listed above, I'm all ears :) Don't want to do a bunch of work or nothing or if someone is working on it elsewhere then duplicating the work needlessly.

xorander00 avatar Sep 03 '21 07:09 xorander00

Yeah, sorry, I haven't been updating the port because I'm not actively using Vector right now. I've been planning to do an update but have lots of other things to do. If anyone would like to take over maintainership, I'll be happy to hand it over.

depending on the heim family of crates for metrics

~~As the author of systemstat, I have a suggestion~~ :D I've looked into porting heim, it looked like a rather tedious job. But really it has to be done eventually…

valpackett avatar Sep 03 '21 11:09 valpackett

We could consider packaging Vector without the host_metrics source for FreeBSD until the requisite changes could be made to heim. Briefly looking at https://github.com/unrelentingtech/systemstat, however, it does seem like that could cover Vector's needs from heim though 🤔 I'm curious if @bruceg has thoughts.

jszwedko avatar Sep 03 '21 20:09 jszwedko

Was systemstat one of the ones @bruceg compared when we did host metrics? I can't remember but I presume it'll be in the RFC if we want to see comparisons.

jamtur01 avatar Sep 03 '21 20:09 jamtur01

I did look at systemstat briefly when I first wrote host metrics, but ISTR it was missing support for something we wanted at that time. I don't recall exactly what now though.

bruceg avatar Sep 03 '21 21:09 bruceg

Indeed, the RFC does mention other alternative crates:

https://github.com/timberio/vector/pull/3581/files#diff-1f4a48456df1b2a20b22c6139776d5f1c9e7b870f18db49b16683acffb732931R29-R38

And points to comparison matrix in heim: https://github.com/heim-rs/heim/blob/master/COMPARISON.md

Heim does support more options, in particular system introspection things like kernel version, but I think the subset of heim functionality we are currently using could possibly be covered by systemstat too.

jszwedko avatar Sep 03 '21 21:09 jszwedko

heim is also the only one to support async operation, which is an important consideration as well.

bruceg avatar Sep 03 '21 21:09 bruceg

My plan was to look at what's currently required in that part of the vector source first & then evaluate that list against what's currently offered by both aforementioned crates. Alternatively I was considering generating the bindings and using the native APIs if the list of items required by vector wasn't too big.

xorander00 avatar Sep 03 '21 21:09 xorander00

@unrelentingtech I hear ya man, I'm the same way. Too much to do, too little time. I doubt I'd be much better at maintaining, but after it's brought up to date, maybe we can figure something out.

@jszwedko That would be great! I could get 0.16.x compiled sans metrics for now at least and start experimenting with the configuration. Once we have the metrics part figured out, enabling it by default should be easy enough (hopefully heh).

xorander00 avatar Sep 04 '21 02:09 xorander00

@xorander00 did you share your work anywhere by any chance?

abh avatar Dec 23 '21 07:12 abh

@abh No, sorry not yet. I haven't had the time to resume it recently, but I have the project saved in my workspace. I can take a look at it after I'm back from the Holidays and look at putting it online and/or resuming it.

xorander00 avatar Dec 25 '21 07:12 xorander00

Just noting that I started work on this with #10614 but haven't been able to focus on it recently.

jszwedko avatar Aug 03 '22 19:08 jszwedko

@jszwedko any updates? :)

ghost avatar Jan 29 '24 09:01 ghost

@jszwedko any updates? :)

Unfortunately nothing on my end. I'd be happy to see someone pick up https://github.com/vectordotdev/vector/pull/10614 if they are motivated though.

jszwedko avatar Jan 29 '24 15:01 jszwedko

We could consider packaging Vector without the host_metrics source for FreeBSD [..]

We want to use Vector not as metrics collector but as log aggregator, so building it without host_metrics is for us just fine.

How can this be done? Even with --no-default-features, cargo tries to build heim, which still fails on FreeBSD.

htmue avatar Apr 24 '24 15:04 htmue