[Avocado-devel] What is a right way to install avocado?

Andrei Stepanov astepano at redhat.com
Fri Feb 3 14:03:26 UTC 2017


Hello.

Cleber Rosa: thank you for RHEL6 Workstation Variant.

1. RPM.  There is a hidden pitfall for all testers. EPEL is supposed to be
used on the latest RHEL/Centos. Yes. It is true.
Think about it as: EPEL should be installed on .Z stream.
It could be a problem for automation. For example. Some tester could be
asked to run avocado tests for package from RHEL 7.1.  (Yes, QE teams runs
test against old RHEL.) Where current RHEL is 7.3.  Than EPEL supposed to
be installed on RHEL 7.3. It could be a problem to install EPEL on 7.1
(without updating packages to 7.3). Keep in mind that a tester is asked to
test 7.1 not 7.3 package.
So. My point is: in future minimize EPEL dependency. LTS avocado should be
easily installed on RHEL 7.0 7.1 7.2 7.3 7.3.

2. Maybe it is better to figure out how to install Avocado in Python
Virtual Environment. This is more appropriate approach for me. As we can
flexible change git repo. It is necessary to investigate this approach.
https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
Avocado should be usable from user&root accounts.


3. I think, our conversation should have some outcome. Some statement. QE
teams must clearly understand how to use Avocado. QE teams should know
where to report bugs related to Avocado installation. This should be
specified on main page: https://github.com/avocado-framework/avocado/
blob/master/README.rst . Something like: Officially supported OS is RHEL
6/x 7.x. Installation bugs report at: https://github.com/avocado-
framework/avocado/issues


4. I would like to mention a RPM packaging shortcoming.
After installation avocado should work with: /var/lib/<smth>
Currently it works with:

avocado bootstrap command:
/usr/share/avocado/data/avocado-vt/test-providers.d/
downloads/io-github-spiceqa-spice/spice/cfg/run.cfg
-- fetched from git

avocado run command:
/usr/share/avocado/data/avocado-vt/backends/spice/cfg/run.cfg

Please look at: https://fedoraproject.org/wiki/Archive:PackagingDrafts/
RPMMacros_sharedstatedir_optflags_and_admonitions
Avocado should use for dynamic data:  %{_sharedstatedir}    /var/lib
Files inside /usr/share should be known to RPM.
Again. It is like a proposal. A right way to do. Future roadmap.

5. Fresh RHEL7.3 + EPEL + RPM packages from: https://repos-
avocadoproject.rhcloud.com/static/avocado-el.repo

repoquery --location 'avocado*'
https://repos-avocadoproject.rhcloud.com/static/epel-
7Server-noarch/avocado-45.0-0.el7.centos.noarch.rpm
https://repos-avocadoproject.rhcloud.com/static/epel-7Server-noarch/avocado-
examples-45.0-0.el7.centos.noarch.rpm
https://repos-avocadoproject.rhcloud.com/static/epel-7Server-noarch/avocado-
plugins-output-html-45.0-0.el7.centos.noarch.rpm
https://repos-avocadoproject.rhcloud.com/static/epel-7Server-noarch/avocado-
plugins-vt-45.0-0.el7.centos.noarch.rpm

# avocado list
Failed to load plugin from module "avocado_vt.plugins.vt_list":
ImportError('No module named netaddr',)
Failed to load plugin from module "avocado_vt.plugins.vt": ImportError('No
module named netaddr',)

So, there is some lack of dependency on python-netaddr.

What do you think?


On Fri, Feb 3, 2017 at 7:04 AM, Lukáš Doktor <ldoktor at redhat.com> wrote:

> Dne 2.2.2017 v 22:36 Cleber Rosa napsal(a):
>
>>
>> ----- Original Message -----
>>
>>> From: "Andrei Stepanov" <astepano at redhat.com>
>>> To: "avocado-devel" <avocado-devel at redhat.com>
>>> Sent: Wednesday, February 1, 2017 11:48:11 AM
>>> Subject: [Avocado-devel] What is a right way to install avocado?
>>>
>>> Hello.
>>>
>>> We are currently experiencing some issues with avocado / avocado-vt.
>>>
>>> Our automation can be described in next steps:
>>>
>>> 0. Install RHEL 6/7.
>>> 1. Clone "master" branches for avocado/avocado-vt from github.
>>>
>>
>> Hi Andrei,
>>
>> Do you need specific features of Avocado not present in the LTS version?
>> I would strongly recommend that for "production testing", you'd use a more
>> stable version of Avocado.  If you're willing to take a look at this
>> suggested approach, let me if the fix for the Workstation version of EPEL6
>> works for you.
>>
>> 2. In avocado dir:
>>>
>>> make requirements
>>> python setup.py install
>>>
>>> 3. In avocado-vt dir:
>>> make link
>>> pip install sphinx
>>> pip install -r requirements.txt
>>> python setup.py install
>>>
>>>
>> For avocado-vt, an RPM package is also available (non-LTS, but designed
>> to work with avocado LTS).  Most dependencies would be solved by the
>> package install alone.  Then, dependencies for the test provider, say
>> tp-qemu, could also be installed alongside it (but manually specified).
>>
>
> Well actually let's cc some Avocado-vt maintainers. I'm wondering what
> version of Avocado are you using to run Avocado-vt. We try to keep the
> backward compatibility (avocado-vt -> avocado) but it's always better to
> use what the mainstream uses as it is more tested. Maybe, if the version is
> not changing frequently, it'd make sense to mention the "known-to-work"
> Avocado version in the Avocado-vt GetStarted documentation.
>
> As for the RPM IIRC we do not provide them, but you can use `make rpm` to
> produce one. Anyway to install it you need RPMs. I think Autotest and
> Aexpect one is in one of our repos, other dependencies can be obtain from
> EPEL but only for primary architectures and I'm not sure they are all
> no-arch. Still you could use `src.rpm` to rebuild it for your architecture
> and push it into your repository.
>
> Overall I think the correct approach would be just to get a machine
> somewhere and create a script to periodically check for the latest deps
> RPMs, rebuild them and publish them in you repo. For Avocado I'd freeze the
> version mainstream is using and update occasionally. For Avocado-vt I think
> you need the master, which means you could either build the RPM on test
> machine or just be fine with weekly updates from your custom repo script.
> Bonus points would be for sharing (internally) this repo with other teams.
>
> Lukáš
>
>
>
>> 4. Run tests.
>>>
>>> Above commands are run from root account.
>>> We cannot use this approach any more.
>>> It doesn't work with RHEL7.3.
>>>
>>> I have opened a bug: https://bugzilla.redhat.com/show_bug.cgi?id=1417613
>>> Than I had discussion with Tomas Orsava.
>>>
>>> The problem is, running pip as root in Fedora/EPEL is not supported and
>>> will break your system.
>>>
>>> https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
>>>
>>> My question is: what is official way to install avocado/avocado-vt?
>>>
>>> Invoking pip commands from root account is a bad approach.
>>>
>>> Is there a safe way to install avocado & avocado-vt?
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20170203/80f326b3/attachment.htm>


More information about the Avocado-devel mailing list