This is an experimental TFTP offload server built using allenap's TFTP library for Rust.
By offload I mean that this will do the work of receiving TFTP
requests and later transferring a file via TFTP, but another process —
in the first instance a MAAS rackd
process with
small modifications — gets to decide which file to serve, and can even
generate that file on-the-fly.
This code is experimental and may break, so these instructions are deliberately sparse: if you don't understand them as you read through then you probably should not go any further.
Once the tftp-offload merge proposal has landed you
can switch to running MAAS from the daily PPA. In the
meantime you can build packages yourself by running make package
in a
checkout of lp:maas
and use dpkg -i ../build-area/*.deb
to install
them.
Next you'll need Rust >= 1.13 to build this code. The easiest
way is using rustup. This comes with cargo which you should
use to fetch, build and install the allenap-tftp-offload
executable:
console
$ cargo install allenap-tftp-offload
Create some authbind configuration:
console
$ sudo touch /etc/authbind/byport/69
$ sudo chown maas /etc/authbind/byport/69
$ sudo chmod u+x /etc/authbind/byport/69
(An alternative here is to run allenap-tftp-offload
as root.)
Start it up as maas:
```console $ sudo -u maas authbind $(type -p allenap-tftp-offload) \
--socket /var/lib/maas/tftp-offload.socket ```
Then use MAAS as usual.
offload.sock
file in the working directory.