Walk through replacing the FreeBSD_ user land utilities from two different sets: a Go_-based user land go-coreutils
_ (GPLv3) and more interesting a Rust
_-based implementation of rs-coreutils
_ (MIT licensed). Why bother? What's interesting? What can be learned from non-C based user land utilities?
One of the things that irritates me is moving between operating systems and having my userland change. Both the layout, but most certainly the actual utilities themselves. In this talk I want to poke at the sacred cow and universally held belief that builtin utilities must be written in C and that they are operating system specific. What are the security benefits? What about the performance benefits? How do you package up a different userland effectively? Can the FreeBSD_ community partner with other OSes and distributions that also want a modern user land?
$ cd ~/src/FreeBSD/
$ git clone https://github.com/sean-/BSDCan-2017.git
$ mkdir BSDCan-2017/rustbsd
$ cd BSDCan-2017
Install
rst2pdf
_:$ make install-rst2pdf $ source bin/activate || source bin/activate.csh
Install
cfgt(1)
_:$ make install-cfgt
- Install
envchain
_ Show the public datacenters:
$ make triton-public-dcs triton datacenters NAME URL eu-ams-1 https://eu-ams-1.api.joyentcloud.com us-east-1 https://us-east-1.api.joyentcloud.com us-east-2 https://us-east-2.api.joyentcloud.com us-east-3 https://us-east-3.api.joyentcloud.com us-sw-1 https://us-sw-1.api.joyentcloud.com us-west-1 https://us-west-1.api.joyentcloud.com
Configure an
envchain
_ namespace for Triton_:$ envchain -s triton SDC_URL triton.SDC_URL: https://us-west-1.api.joyentcloud.com $ envchain -s triton SDC_ACCOUNT triton.SDC_ACCOUNT: ${USER} $ envchain -s triton SDC_KEY_ID triton.SDC_URL: https://us-east-3.api.joyentcloud.com
Build a FreeBSD_ image with Go_ userland utilities:
$ make packer-build TEMPLATE=freebsd-userland-go.json EXTRA_ARGS=-on-error=abort
Build a FreeBSD_ image with Rust userland utilities:
$ make packer-build TEMPLATE=freebsd-userland-go.json EXTRA_ARGS=-on-error=abort
$ make help
Valid targets:
apply Applies a given Terraform plan
clean Clean virtualenv
env Show local environment variables
fmt Format Terraform files inline
install-cfgt Install cfgt(1)
install-rst2pdf Install rst2pdf in a local virtualenv
json-config Show the config as a JSON file
packer-build Build a FreeBSD image
plan-target Plan a Terraform run against a specific target
plan Plan a Terraform run
show Show the Terraform state
taint Taints a given resource
triton-dcs Show Triton Datacenters
triton-freebsd-images Show all FreeBSD images on Triton
triton-instances Show all running instances on Triton
triton-my-images Show my Triton images
triton-networks Show Triton networks
triton-packages Show Triton Packages
triton-public-dcs Show Public Triton Datacenters
triton-ssh SSH to a given target on Triton