Skip to content

Commit

Permalink
Update readme with readthedocs link
Browse files Browse the repository at this point in the history
  • Loading branch information
johnramsden committed May 28, 2018
1 parent b8c6dd0 commit 3c662cb
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 25 deletions.
89 changes: 65 additions & 24 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
======
zedenv
======

.. image:: https://travis-ci.com/johnramsden/zedenv.svg?token=4X1vWwTyHTHCUwBTudyN&branch=release/v0.0.2
.. image:: https://travis-ci.com/johnramsden/zedenv.svg
:target: https://travis-ci.com/johnramsden/zedenv

ZFS boot environment manager

Documentation for the project can be found at `readthedocs <zedenv.readthedocs.io>`_.

``zedenv`` is still experimental and should not be used on production systems.

Requirements
------------

``zedenv`` requires python 3.6+, and ZFS running as the root filesystem.
``zedenv`` works on Linux and FreeBSD, requires python 3.6+, and ZFS running as
the root filesystem.

The system should also be configured in the format:

Expand All @@ -20,40 +26,75 @@ The system should also be configured in the format:
For example, ``zpool/ROOT/default`` or ``zpool/sys/hostname/ROOT/default``.

Installing
---------
----------

``zedenv`` can be installed by cloning the repo, and running the ``setup.py`` script.
``zedenv`` can be installed a faw ways:

.. code:: shell
* In a ``venv``
* From the arch ``PKGBUILD``

$ git clone https://github.com/johnramsden/zedenv
$ cd zedenv
$ python setup.py install
To start, clone the git repos.

Quick How-to
------------
.. code-block:: shell
To check the options run ``zedenv --help``.
git clone https://github.com/johnramsden/pyzfscmds
git clone https://github.com/johnramsden/zedenv
Create a new boot environment
Arch
~~~~

.. code:: shell
Install ``pyzfscmds`` and ``zedenv`` by entering ``packaging/arch`` and running ``makepkg -sic``.

$ zedenv create -v zedenv-$(date +%Y-%m-%d-%H%M%S)
Virtualenv
~~~~~~~~~~

List boot environments
To install without poluting your system, you can also create a directory somewhere
and install in a ``venv``.

.. code:: shell
Create ``venv`` and activate.

$ zedenv list
default
zedenv-2017-11-21-231400
.. code-block:: shell
Testing
-------
python3.6 -m venv venv
. venv/bin/activate
To test using pytest, run it from the root directory with a zfs dataset.
Enter the repos and install.

.. code:: shell
.. code-block:: shell
cd pyzfscmds
python setup.py install
cd ../zedenv pyzfscmds
python setup.py install
How To Use
----------


``zedenv`` can be used to manage boot environments using ZFS. If your system
is set up in a way compatible with boot environments, you can start using
them right away.

Create and activate a new Boot Environment.

.. code-block:: shell
$ zedenv create default-0
$ zedenv activate default-0
This will make it the Boot Environment used on reboot.

.. code-block:: shell
$ zedenv list
.. code-block:: none
Name Active Mountpoint Creation
default N - Wed-May-23-23:48-2018
default-0 R / Thu-May-24-23:54-2018
# pytest tests --root-dataset="zpool/ROOT/default"
This can be shown with a list, command. The boot environment currently being used will
have a 'N' in the active column signifying the boot environment is being used now.
An 'R' in the active column means this environment will be used on reboot.
4 changes: 3 additions & 1 deletion doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
Install
=======

``zedenv`` can be installed a faw ways:
``zedenv`` requires python 3.6+, and ZFS running as the root filesystem.

It can be installed a few ways:

* In a ``venv``
* From the arch ``PKGBUILD``
Expand Down

0 comments on commit 3c662cb

Please sign in to comment.