2017-11-18 19:11:14 +01:00
|
|
|
.. _binary releases: https://github.com/zrepl/zrepl/releases
|
|
|
|
|
2017-11-09 21:17:09 +01:00
|
|
|
.. _installation:
|
|
|
|
|
2017-11-09 20:33:09 +01:00
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
|
|
|
.. TIP::
|
|
|
|
|
2017-11-10 14:30:51 +01:00
|
|
|
Note: check out the :ref:`tutorial` if you want a first impression of zrepl.
|
2017-11-09 20:33:09 +01:00
|
|
|
|
|
|
|
User Privileges
|
|
|
|
---------------
|
|
|
|
|
|
|
|
It is possible to run zrepl as an unprivileged user in combination with
|
2017-11-09 21:23:45 +01:00
|
|
|
`ZFS delegation <https://www.freebsd.org/doc/handbook/zfs-zfs-allow.html>`_.
|
2017-11-09 20:33:09 +01:00
|
|
|
Also, there is the possibility to run it in a jail on FreeBSD by delegating a dataset to the jail.
|
|
|
|
However, until we get around documenting those setups, you will have to run zrepl as root or experiment yourself :)
|
|
|
|
|
2017-11-10 14:30:51 +01:00
|
|
|
Packages
|
|
|
|
--------
|
|
|
|
|
2017-11-18 19:11:14 +01:00
|
|
|
zrepl source releases are signed & tagged by the author in the git repository.
|
2017-11-10 14:30:51 +01:00
|
|
|
Your OS vendor may provide binary packages of zrepl through the package manager.
|
2017-11-18 19:11:14 +01:00
|
|
|
Additionally, `binary releases`_ are provided on GitHub.
|
2017-11-10 14:30:51 +01:00
|
|
|
The following list may be incomplete, feel free to submit a PR with an update:
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
:header-rows: 1
|
2017-11-09 20:33:09 +01:00
|
|
|
|
2017-11-10 14:30:51 +01:00
|
|
|
* - OS / Distro
|
|
|
|
- Install Command
|
|
|
|
- Link
|
|
|
|
* - FreeBSD
|
|
|
|
- ``pkg install zrepl``
|
|
|
|
- `<https://www.freshports.org/sysutils/zrepl/>`_
|
|
|
|
* - Others
|
|
|
|
-
|
2017-11-18 19:11:14 +01:00
|
|
|
- Use `binary releases`_ or build from source.
|
2017-11-09 20:33:09 +01:00
|
|
|
|
2017-11-10 14:30:51 +01:00
|
|
|
Compile From Source
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2017-11-18 19:11:14 +01:00
|
|
|
Producing a release requires **Go 1.9** or newer and **Python 3** + **pip3** + ``docs/requirements.txt`` for the Sphinx documentation.
|
|
|
|
A tutorial to install Go is available over at `golang.org <https://golang.org/doc/install>`_.
|
|
|
|
Python and pip3 should probably be installed via your distro's package manager.
|
2017-11-12 16:15:12 +01:00
|
|
|
|
2017-11-18 19:11:14 +01:00
|
|
|
Alternatively, you can use the Docker build process:
|
|
|
|
it is used to produce the official zrepl `binary releases`_
|
|
|
|
and serves as a reference for build dependencies and procedure:
|
2017-11-09 20:33:09 +01:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
git clone https://github.com/zrepl/zrepl.git
|
|
|
|
cd zrepl
|
2017-11-18 19:11:14 +01:00
|
|
|
sudo docker build -t zrepl_build -f build.Dockerfile .
|
2017-11-12 16:15:12 +01:00
|
|
|
sudo docker run -it --rm \
|
2017-12-29 22:25:15 +01:00
|
|
|
-v "${PWD}:/go/src/github.com/zrepl/zrepl" \
|
2017-11-12 16:15:12 +01:00
|
|
|
--user "$(id -u):$(id -g)" \
|
2017-11-19 12:32:25 +01:00
|
|
|
zrepl_build make vendordeps release
|
2017-11-18 19:11:14 +01:00
|
|
|
|
|
|
|
Alternatively, you can install build dependencies on your local system and then build in your ``$GOPATH``:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
mkdir -p "${GOPATH}/src/github.com/zrepl/zrepl"
|
|
|
|
git clone https://github.com/zrepl/zrepl.git "${GOPATH}/src/github.com/zrepl/zrepl"
|
|
|
|
cd "${GOPATH}/src/github.com/zrepl/zrepl"
|
|
|
|
./lazy.sh devsetup
|
2017-11-19 12:32:25 +01:00
|
|
|
make vendordeps release
|
2017-11-18 19:11:14 +01:00
|
|
|
|
|
|
|
Build results are located in the ``artifacts/`` directory.
|
2017-11-12 16:15:12 +01:00
|
|
|
|
2017-11-18 19:11:14 +01:00
|
|
|
.. NOTE::
|
2017-11-12 16:15:12 +01:00
|
|
|
|
2017-11-18 19:11:14 +01:00
|
|
|
It is your job to install the apropriate binary in the zrepl users's ``$PATH``, e.g. ``/usr/local/bin/zrepl``.
|
|
|
|
Otherwise, the examples in the :ref:`tutorial` may need to be adjusted.
|
2017-11-09 20:33:09 +01:00
|
|
|
|
2017-11-09 21:17:09 +01:00
|
|
|
.. _mainconfigfile:
|
|
|
|
|
2017-12-27 18:34:02 +01:00
|
|
|
What next?
|
|
|
|
----------
|
2017-11-09 20:33:09 +01:00
|
|
|
|
2017-12-27 18:34:02 +01:00
|
|
|
Read the :ref:`configuration chapter<configuration_toc>` and optionally create the :ref:`runtime directories <configuration_preface>`.
|
|
|
|
Afterwards, continue with the :ref:`usage chapter<usage>`.
|
2017-11-09 20:33:09 +01:00
|
|
|
|
2017-12-27 18:34:02 +01:00
|
|
|
**Reminder**: If you want a quick introduction, please read the :ref:`tutorial`.
|
2017-11-09 20:33:09 +01:00
|
|
|
|