IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

README.md 1.7KB

4 yıl önce
4 yıl önce
4 yıl önce
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Focker
  2. ## Introduction
  3. Focker is a FreeBSD image orchestration tool in the vein of Docker.
  4. ## Installation
  5. In order to use Focker you need a ZFS pool available in your FreeBSD installation.
  6. ### Installing the Python package
  7. Run:
  8. ```bash
  9. git clone https://github.com/sadaszewski/focker.git
  10. cd focker/
  11. python setup.py install
  12. ```
  13. or (if you want an uninstaller):
  14. ```bash
  15. git clone https://github.com/sadaszewski/focker.git
  16. cd focker/
  17. python setup.py sdist
  18. pip install dist/focker-0.9.tgz
  19. ```
  20. ### Setting up ZFS
  21. Upon first execution of the `focker` command, Focker will automatically create the necessary directories and ZFS datasets. You just need to exclude the unlikely case that you are already using /focker in your filesystem hierarchy. The layout after initialization will look the following:
  22. ```
  23. /focker
  24. /focker/images
  25. /focker/jails
  26. /focker/volumes
  27. ```
  28. `images`, `jails`, and `volumes` have corresponding ZFS datasets with `canmount=off` so that they serve as mountpoint anchors for child entries.
  29. ### Preparing base image
  30. To bootstrap the images system you need to install FreeBSD in jail mode to a ZFS dataset placed in /focker/images and provide two user-defined properties - `focker:sha256` and `focker:tags`. One way to achieve this would be the following:
  31. ```bash
  32. TAGS="freebsd-latest freebsd-$(freebsd-version | cut -d'-' -f1)"
  33. VERSION="FreeBSD $(freebsd-version)"
  34. SHA256=$(echo -n ${VERSION} | sha256)
  35. NAME=${SHA256:0:7}
  36. zfs create -o focker:sha256=${SHA256} -o focker:tags="${TAGS}" zroot/focker/images/${NAME}
  37. bsdinstall jail /focker/images/${NAME}
  38. zfs set readonly=on zroot/focker/images/${NAME}
  39. zfs snapshot zroot/focker/images/${NAME}@1
  40. ```