sean- / BSDCan-2017

BSDCan 2017 Source Material

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Universal Userland

Why do we need to be different?

Universal Userland Slides

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?

Getting Started

$ cd ~/src/FreeBSD/
$ git clone https://github.com/sean-/BSDCan-2017.git
$ mkdir BSDCan-2017/rustbsd
$ cd BSDCan-2017
  1. Install rst2pdf_:

    $ make install-rst2pdf
    $ source bin/activate || source bin/activate.csh
  2. Install cfgt(1)_:

    $ make install-cfgt
  3. Install envchain_
  4. 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
  5. 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
  6. Build a FreeBSD_ image with Go_ userland utilities:

    $ make packer-build TEMPLATE=freebsd-userland-go.json EXTRA_ARGS=-on-error=abort
  7. Build a FreeBSD_ image with Rust userland utilities:

    $ make packer-build TEMPLATE=freebsd-userland-go.json EXTRA_ARGS=-on-error=abort

Helper Targets

$ 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

About

BSDCan 2017 Source Material

License:BSD 2-Clause "Simplified" License


Languages

Language:Makefile 74.9%Language:HCL 25.1%