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

FreeBSD Support #109

Closed
9 tasks done
tmcgilchrist opened this issue Jul 5, 2022 · 9 comments
Closed
9 tasks done

FreeBSD Support #109

tmcgilchrist opened this issue Jul 5, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@tmcgilchrist
Copy link
Member

tmcgilchrist commented Jul 5, 2022

This is a tracking issue (and will likely be updated) for getting OBuilder running with FreeBSD.

Motivation

FreeBSD on x86 is a Tier 1 supported architecture for OCaml. We should support all Tier 1 architectures for CI systems where technically possible. Adding FreeBSD support for OBuilder would allow the CI systems maintained by CI team to work on that platform. Additional efforts to support macos and Windows are currently in progress.

Scope

  • Implement and test the ZFS on FreeBSD. Current ZFS implementation is being used on macos and has been validated but not currently used, on Linux. Existing ZFS modules are being used across macOS and FreeBSD.
  • Implement obuilder sandbox model, either using Jails/user isolation directly on FreeBSD, or the runj OCI implementation https://github.com/samuelkarp/runj. Used jails directly Freebsd #174
  • OCluster worker integration for FreeBSD, produce OCaml binaries on FreeBSD that are deployable to the cluster. Setup via ansible in https://github.com/ocurrent/freebsd-infra
  • Document the technical architecture of OBuilder on FreeBSD
  • Technical blog post about FreeBSD OBuilder support (IN PROGRESS)
  • Setup stress tests for FreeBSD OBuilder, opam-health-check used to stress test the FreeBSD pool.
  • Setup CI for FreeBSD OBuilder, included in ocaml-ci builds.
  • Deploy FreeBSD OBuilder as an OCluster worker and setup test pool for testing higher level applications like (Freebsd support ocaml-ci#856), health check and (Added FreeBSD opam-repo-ci#230).
  • Get a baseline for FreeBSD ocluster-worker to size up a suitable server to run it on.
@kit-ty-kate
Copy link
Contributor

runj finally got networking support as of yesterday: samuelkarp/runj#32
We might want to try it out again at some point in the near future to see if it's viable as an experimental platform.

@dustanddreams
Copy link
Contributor

dustanddreams commented Jun 1, 2023

I have written some technical documentation of PR#156 and instructions on how to setup a FreeBSD system for OBuilder. It's not finished yet but interested people can have a look:

obuilder-freebsd.md

EDIT (20230804): updated the document

@hannesm
Copy link

hannesm commented Jul 4, 2023

Great that there's some work on FreeBSD support. A minor note about the document @dustanddreams (feel free to reach out to me if you want to discuss FreeBSD & OCaml & opam things): you can just pkg install ocaml-opam -- I maintain this port, and going that path will also work on arm64 and 32 bit systems (there are some patches needed for the opam-full tarball).

@dustanddreams
Copy link
Contributor

Great that there's some work on FreeBSD support. A minor note about the document @dustanddreams (feel free to reach out to me if you want to discuss FreeBSD & OCaml & opam things): you can just pkg install ocaml-opam -- I maintain this port, and going that path will also work on arm64 and 32 bit systems (there are some patches needed for the opam-full tarball).

Oh, thanks, I was not aware of an ocaml-opam package, and had found the hard way that the ocaml package is way out of date and unsuitable for recent opam.

@hannesm
Copy link

hannesm commented Aug 8, 2023

@dustanddreams thanks for your work on this. I'm curious whether you tried the devel/ocaml-opam FreeBSD package instead of downloading the 2.1.4 (sic) full tarball yourself? If you run into issues with the devel/ocaml-opam port, please let me know -- since I'm happy to look into these. [NB: this may reduce your stage1 to "opam init -y -a bare ; opam switch create 4.14.1"]

@kit-ty-kate
Copy link
Contributor

@hannesm in a CI setting I would rather use upstream opam rather than any of the distribution's. This way we control what version it should be (e.g. on Linux we use opam master in opam-repo-ci) and are alerted much quicker if there are issues in opam itself.

@hannesm
Copy link

hannesm commented Aug 8, 2023

@hannesm in a CI setting I would rather use upstream opam rather than any of the distribution's. This way we control what version it should be (e.g. on Linux we use opam master in opam-repo-ci) and are alerted much quicker if there are issues in opam itself.

As you like, but please note according to the document linked above, the opam tarball used is 2.1.4, while the package is 2.1.5. I honestly would use the distributers opam (unless it is very old) since this is what most people use. I'd as well sync the installation / OCaml installation guidelines with what CI is using (i.e. on old systems, please download opam from ... ; on more up-to-date systems, install opam from the system package manager).

But as written above, you're in charge of the opam repo CI.

@tmcgilchrist
Copy link
Member Author

An initial run of opam-health-check against FreeBSD 13.2 for OCaml 4.14 is available on http://freebsd-health-check.ocamllabs.io:8080. We plan to add a temporary health-check instance just for FreeBSD 4.14 and 5.0 to run semi-regularly until more packages are supported or constrained away in opam-repository.

@tmcgilchrist
Copy link
Member Author

Closing as completed. FreeBSD support is available in the cluster and applications like opam-repo-ci and ocaml-ci are using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants