]
Barak Korren updated OVIRT-1376:
--------------------------------
Epic Link: OVIRT-400
Make mock_runner for easer to use
---------------------------------
Key: OVIRT-1376
URL:
https://ovirt-jira.atlassian.net/browse/OVIRT-1376
Project: oVirt - virtualization made easy
Issue Type: New Feature
Components: Jenkins
Reporter: Barak Korren
Assignee: infra
Priority: Low
Currently to use '{{mock_runner.sh}}', one needs to:
# Install '{{mock}}' (Might require adding some '{{yum}}' repos, also
reuquires one to be running RHEL, CentOS or Fedora in the 1st place)
# Add one`s user account to the '{{mock}}' group (requires logoff and logon)
# Clone the '{{jenkins}}' repo
# Use a long set of command line arguments to make '{{mock_runner.sh}}' use the
right '{{mock}}' configuration files
All this is making '{{mock_runner.sh}}' hard and unpopular for local use. Also,
no knowing one need to do the above leads to strange errors. We can improve this by:
# Making '{{mock_runner.sh}' check that everything is configured correctly and
output meaningful warnings otherwise
# Setup the default so that '{{mock_runner.sh}}' knows how the find the right
configuration files
# Package '{{mock_runner.sh}}' in one way or another so that one doesn't need
to clone a whole repo to install it.
When it comes to packaging we have several options to consider:
* Using an RPM package:
** Pros:
*** Familiar format
*** Can include '{{mock}}' as a dependency.
** Cons:
*** One has to use CentOS or Fedora
*** One most have '{{root}}' permissions to install packages
* Using a self-contained executable built with a tool like
[pyinstaller|https://pyinstaller.readthedocs.io/en/stable/operating-mode.html].
** Pros:
*** Installation is just downloading a single file to a directory in '{{$PATH}}'
** Cons:
*** One will probably need to install '{{mock}}' and other dependencies
manually.
*** '{{pyinstaller}}' is mostly for Python projects, while
'{{mock_runner.sh}}' is a shell script.
* Using a Docker container:
** Pros:
*** Everything can be pre-configured in the container, including '{{mock}}'
itself and all needed permissions
*** Can run on any platform that can run Docker
** Cons:
*** One needs Docker itself to be installed and configured
*** '{{mock}}' may not run well inside a container
*** Everything that is mounted into the mock environment must first be mounted into the
container. This will probably require the container to run in privileged mode. This also
means that running the container with the right mounts may be a complicated matter.
*** The container image may end up being quite big.