40 Commits

Author SHA1 Message Date
Albert Esteve
02ff3387b1 docs/container.md: document container
Add documentation for the containerized imageio
that is provided, showing how to build and run the
image.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2022-11-03 14:55:01 +01:00
Albert Esteve
e90371643b reuse: addheader rest recognized format
Add SPDX header to the rest of the files in the
project that have a recognised format by reuse.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2022-10-18 13:04:20 +02:00
Albert Esteve
ef0a69cadb reuse: addheader *.md
Add SPDX header to all markdown files
in the project.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2022-10-18 13:04:20 +02:00
Albert Esteve
74d423f23e Makefile: add venv target
Add venv target to the Makefile, which automatically
creates the Python virtual environment in a
consistent folder and installs all requirements in a
single step.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2022-08-11 15:07:43 +03:00
Albert Esteve
01e625f7f7 containers: rename docker to containers
Rename docker folder to containers to make
it more generic. Dockerfiles contained in
this folder are also renamed to containerfile.

Update the development document to reflect
the new path.

Fixes: #9
Signed-off-by: Albert Esteve <aesteve@redhat.com>
2022-07-12 12:37:13 +03:00
Nir Soffer
fc012f5a70 tests: Create base image in Makefile
The base image used for backup tests was created by a pytest fixture.
This is useful since the image is created transparently when needed, but
in CI environment creating the image can be very slow and requires very
long timeouts to avoid random failures.

Move the creation of the image to new "images" target. The "check"
target depends on it so the image will be create automatically when
running "make check".

With this change the backup tests run successfully on all tested
distros.  Previously they were skipped on centos 9 since they always
timed out.

Testing shows that the backup tests take 19-23 seconds on github, so 60
seconds timeout should be enough.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2022-04-03 12:26:39 +03:00
Nir Soffer
941a290825 ci: Don't run make
There is nothing to make before the tests. Running make is recommended
for developers to be able to run the daemon directly from source, but
the tests create the C extension when needed automatically.

Added a new section to docs/developement.md showing how to build and run
the daemon directly from source.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2022-04-03 12:26:39 +03:00
Nir Soffer
3f6e91fc96 docs: Add python3-setups-tools build instructions
Update the instructions for building development environment to install
also python3-setuptools.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2022-04-03 12:16:36 +03:00
Vojtech Juranek
45060547c9 Remove gerrit CI files
* remove `automation` directory with CI files for gerrit
* remove `stdci.yaml`
* update development page with packages required for development

Fixes #8
2022-03-31 23:16:22 +03:00
Vojtech Juranek
70c3d34f34 Update development page
Update development page:
* replace gerrit instruction with github instructions
* remove info how to run tests on Travis
* replace `yum` with `dnf`

Fixes #53
2022-03-31 23:16:22 +03:00
Nir Soffer
3fc44d98fc pypi: Eliminate the daemon directory
This make it easier to work with the project and to improve packaging.
For example, README.md is now at the expected location, so it is
packaged automatically for pypi.

Change-Id: Ib1a456054de34146bf2a4f39a69ccf1756b99e41
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-10-21 19:39:45 +03:00
Nir Soffer
e1d42a2bb0 docs: flows: Warn about outdated content
This document needs a major rewrite, but it may be useful for
developers.

Change-Id: I41f579d92f9f02baaef6b3e295b42dccb55f1fd5
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-06-30 13:47:29 +03:00
Nir Soffer
61ee43aca7 docs: packages: Describe the packages
Replace modules.md with outdated information about removed
ovirt-imageio-proxy and never implemented /progress endpoint with new
document about the current packages.

The section about the ovirt-imageio-daemon package updated to describe
the services, endpoints and backends provided by the server.

Change-Id: Ia11dcc1534499f1ec39145ff3942fe565fb74e01
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-06-30 13:47:27 +03:00
Nir Soffer
d005e7e6d4 docs: development: Add testing rpms section
Remove the section about installing development version on engine host.
The best way to test imageio is to build and install the rpms. Add a
section showing how to do this.

Dealing with engine development environment is handled in engine
documentation.

Change-Id: I57026c2192784134d1ab481b683ffe51014d60c6
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-06-30 13:31:14 +03:00
Nir Soffer
964bb4b63d docs: development: Update code style tips
- Remove the section about generated files, since we don't such file now.
- Clean up the instructions about ordering imports.

Change-Id: Ica971c0416b9d319babce9ea033894c98c9bcde1
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-06-30 13:31:14 +03:00
Nir Soffer
906bd586c6 docs: development: Update CI section
- Update list of builds to current CI setup.
- Replace travis-ci.org with travis-ci.com.

Change-Id: I48c2d4c9316503740a2c295fddf79f6f782aa9dc
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-06-30 13:31:14 +03:00
Nir Soffer
8e9d8b3993 docs: development: Update testing instructions
Update the instructions for running the tests on Fedora 32 using new
tree layout changed in 2.0.0.

Update the section about using local qemu to show also how to use local
qemu-nbd.

Change-Id: Ib2b3e6311b68be523cc89fc61130f30cf835887b
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-06-30 13:31:13 +03:00
Nir Soffer
59b40b222a docs: development: Update setup instructions
Remove outdated instructions for Fedora 29 and Centos 7, and replace
with instructions that work on REHL 8/Centos Stream 8 /Fedora 32+.

Replace bad advice to install pip and tox with --user option with
instructions how to create virtual environment.

Change-Id: I1360d51a16353502b73545b8cc36992f435fe697
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-06-30 13:27:19 +03:00
Nir Soffer
5c410af69c docs: development: There is no commit-template.txt
We don't have a commit-template.txt in the source. I think this is
leftover from ovirt-imageio-proxy.

Change-Id: Iab412026257a1673e704bb54fef2f6279ba9ea31
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-06-30 13:27:19 +03:00
Nir Soffer
1a72aa626e docs: Document new zero flag in dirty extents
Since 2.2.0-1 we report also the zero status of a dirty extent. Explain
how this can be used to speed up incremental backup and minimize network
bandwidth and decrease storage for the backup.

Change-Id: I85bd64e000ad5a75fb7937c88833a09ad1d2f109
Bug-Url: https://bugzilla.redhat.com/1971185
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-06-17 20:25:45 +03:00
Nir Soffer
6f25abc32e docs: Refine description of hole extent
- A hole is reported regardless of having a backing file.
- Explain better the meaning of a hole.

Change-Id: I1118350d39faa2674158d9f0df336cceaa9c2754
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-06-17 20:21:40 +03:00
IlanZuckerman
5c0101c679 Fixed typo in 'tikcet' and in upload disk example url
Change-Id: I953c1eb181aab79d6eddf5d2ae3ae7338383f3f0
Signed-off-by: IlanZuckerman <ilan_man@hotmail.com>
2021-01-14 17:35:44 +02:00
Vojtech Juranek
2021164d06 doc: update installation page
The preview is on
https://github.com/vjuranek/ovirt-imageio/blob/doc_update/docs/installation.md

Change-Id: I7e34aa585aa0b091d1e3ef81f1aa81064b45026d
Signed-off-by: Vojtech Juranek <vjuranek@redhat.com>
2020-08-12 11:28:02 +02:00
Vojtech Juranek
a84b9faf9b doc: move TLS configuration into dedicated page
Move TLS configuration into dedicated confguration page and remove all
references to imageio-proxy from this section. This page will be later
on expanded and more configuration option will be added.

The preview is on
https://github.com/vjuranek/ovirt-imageio/blob/doc_update/docs/configuration.md

Change-Id: Ife93f5dd322411d6db94d4f877963d9c942d88ed
Signed-off-by: Vojtech Juranek <vjuranek@redhat.com>
2020-08-12 11:28:02 +02:00
Nir Soffer
9fe8ada74a images: Fix Overview heading level
Change-Id: I7a5a09188ed5ad08d8c2b81c63c34b35f2b1e7d2
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2020-08-05 13:09:14 +03:00
Nir Soffer
a965b50890 docs: Document images.md API
- Add images.md, documenting the /images resource API.
- Replace random-io.md with automatic redirect to images.md.
- Replace README.md with index.md - this shows the content when viewing
  the root directory.
- api.md was horribly outdated and completely irrelevant, remove it.

The preview the changes, visit:
- https://nirs.github.io/ovirt-imageio/
- https://nirs.github.io/ovirt-imageio/images.html
- https://nirs.github.io/ovirt-imageio/random-io.html

Change-Id: I5bb0eb2b69ced5b300a442af52972ae14ecdd623
Bug-Url: https://bugzilla.redhat.com/1855465
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2020-08-05 12:08:36 +03:00
Vojtech Juranek
ec0be121a3 doc: use list for build targets
Current headings for build targets don't work. Instead of using
subsection for each target, use list instead and switch to subsections
if we have more content there.

Change-Id: Ic60412f6d7dc6a541955090fd6fd305c05df78f6
Signed-off-by: Vojtech Juranek <vjuranek@redhat.com>
2020-07-29 11:12:18 +02:00
Vojtech Juranek
18d53c0fde doc: fix client example link
Change-Id: I73b3c6b3ff77a8f29d6c9a9789dfea2f80b5537d
Signed-off-by: Vojtech Juranek <vjuranek@redhat.com>
2020-07-29 10:58:39 +02:00
Nir Soffer
e1e44f5acc docker: Fix requirements.txt copy
COPY ../requirements.txt requirements.txt is not compatible with docker,
and it seems that podman was fixed to behave like docker. Move the
requirements file in the docker directory so we can copy it into the
containers.

Change-Id: I31a59eba8159763649c5a24da2a2492511963cab
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2019-11-25 23:20:03 +02:00
Nir Soffer
df6b0d805d tests: Allow using private qemu-kvm executable
Add QEMU environment variable to allow running the tests with private
qemu-kvm executable. This can be useful for testing qemu from git.

To run the test with private qemu-kvm use:

   QEMU=/path/to/qemu-kvm tox

Change-Id: Ice13c7c8836f2fa3ab8ff2507b6cfc2a6409cadb
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2019-09-05 01:46:22 +03:00
Nir Soffer
369a98a26a automation: Require tox 3.14
This version fixed issue with more_itertools breaking all python
projects lately:

    Traceback (most recent call last):
      File "/usr/bin/tox", line 7, in <module>
        from tox import cmdline
      File "/usr/lib/python2.7/site-packages/tox/__init__.py", line 9, in <module>
        import pluggy
      File "/usr/lib/python2.7/site-packages/pluggy/__init__.py", line 16, in <module>
        from .manager import PluginManager, PluginValidationError
      File "/usr/lib/python2.7/site-packages/pluggy/manager.py", line 6, in <module>
        import importlib_metadata
      File "/usr/lib/python2.7/site-packages/importlib_metadata/__init__.py", line 9, in <module>
        import zipp
      File "/usr/lib/python2.7/site-packages/zipp.py", line 12, in <module>
        import more_itertools
      File "/usr/lib/python2.7/site-packages/more_itertools/__init__.py", line 1, in <module>
        from more_itertools.more import *  # noqa
      File "/usr/lib/python2.7/site-packages/more_itertools/more.py", line 340
        def _collate(*iterables, key=lambda a: a, reverse=False):
                                   ^
    SyntaxError: invalid syntax

Change-Id: I23e4f35637a21d823a97ab83f1bc302c5317d301
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2019-09-05 01:46:21 +03:00
Nir Soffer
5a6a6a32a0 build: Add travis configuration
We cannot create userstorage with 4k sector size in oVirt CI, so tests
using 4k storage are disabled in oVirt CI. The only way to run these
tests is locally, or on Travis CI.

Add .travis.yaml configuration and travis/test.sh script for running the
tests on Travis, and document current CI solution.

Change-Id: I8b18dcde21e5a769258659cb052c150fbe172ea0
Bug-Url: https://bugzilla.redhat.com/172980
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2019-07-29 14:15:04 +03:00
Nir Soffer
d20a644c2d build: Add userstorage for tests
Add userstorage configuration file (storage.py) defining the storage
devices and files used by the tests.

Before running the tests, developers must create storage for the tests
using:

    make storage

The automation script creates the storage for every run, and cleans up
the storage when tests are done.

The storage will be used by the tests in later patches.

Change-Id: I334269e4d83082f8a64d952843ee4ed641a65d67
Bug-Url: https://bugzilla.redhat.com/172980
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2019-07-29 14:14:58 +03:00
Nir Soffer
8b32873f81 docs: Rewrite development.md
Reorganize the document to make it more useful for new developers, and
make room for documenting how to create userstorage for tests.

Older parts of the document are probably broken and need more work.

Change-Id: I6d1a5516f298b9a4c13d63dd20409abfb075eaa0
Bug-Url: https://bugzilla.redhat.com/172980
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2019-07-28 20:11:29 +03:00
Yedidyah Bar David
1b26d4c65d packaging: setup: proxy: Use apache pki instead of own
Use apache httpd key/cert/ca_cert instead of engine-ca-generated ones.
This should make it easier to use:
- If using engine-ca for apache, user most likely already approved it
in the browser when logging in, so will not have to handle again for
imageio.
- If using 3rd party CA for apache, CA cert likely already added to the
browser.

In a normal upgrade, where the user didn't touch the conf manually,
notify the user and update the proxy conf.

In an upgrade where the user changed the conf manually after setup,
create a new file with a different name and notify the user, suggesting
to check the diff and update.

In an upgrade where the user changed the conf manually after setup, but
changed it to have the content we want it to have with current patch,
only log, but still "update" the file, so that a following setup or
especially cleanup will consider the file "ok" (not changed manually).

The only case that will be broken by current patch is if a user needs,
for some reason, two different certs for the two different https
services on two different ports, on the engine machine. In a discussion
in bugzilla it was decided that this is not an issue.

Bug-Url: https://bugzilla.redhat.com/1637809
Change-Id: I7bed070cfd8a84306e13a941815947e42c94bf3a
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
2019-06-05 12:51:07 +03:00
Nir Soffer
d8d36ba5f8 docs: Include example UnixHTTPConnection class
We don't want people to import our private uhttp module, so include the
UnixHTTPConnection in the documentation.

Change-Id: I52fd37664af29751971404acdecb2b08a2a2b05e
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2018-06-26 17:49:24 +03:00
Daniel Erez
c8e3c03364 docs: unix-support
Added documentation for "UNIX socket support"

Change-Id: I4c76adb7091f36e365f378f7df25a96607645d6c
Signed-off-by: Daniel Erez <derez@redhat.com>
2018-06-18 15:14:49 -04:00
Nir Soffer
7e9198a302 images: Report unix socket address in OPTIONS
An application running on the host preforming a transfer can get the
unix socket address using OPTIONS request. If the "unix_socket" key
exists in the response, the application should use the unix socket to
transfer data for improved throughput and lower CPU usage.

Here is an example request:

    OPTIONS /images/ticket-uuid
    ...
    {
        "features": ["zero", "flush"],
        "unix_socket": "\0/org/ovirt/imageio"
    }

Change-Id: I0e448d89ddfe535b2c15937f9243fc687f269a6d
Bug-Url: https://bugzilla.redhat.com/1585675
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2018-06-12 19:19:25 +03:00
Daniel Erez
850343f36c added documentation markdown files
Extracted information scattered in readme files
to an external docs folder.

Change-Id: I2ca4786a4d0a152cf4a5427842129fc63934066a
Signed-off-by: Daniel Erez <derez@redhat.com>
2018-06-10 11:22:17 +03:00
Nir Soffer
7ed674e6a8 Document the random I/O APIs
We already support reading and writing byte ranges using GET and PUT,
but this support is optimized for transferring complete images.

We need to improve random I/O APIs for integration with virt-v2v and for
backup vendors. This patch documents the existing, changed, and new APIs
to be introduced in 1.3.

Change-Id: I98fbc20e1c05ab9fe627d33034034a47e1740da8
Bug-Url: https://bugzilla.redhat.com/1560242
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2018-03-27 23:13:24 +03:00