lago-project / lago-images

Image creation and hosting related scripts and configurations
5 stars 6 forks source link

Remove extra repos from VM images #5

Closed mykaul closed 8 years ago

mykaul commented 8 years ago

There is no need for external repos such as: [epel] name=Extra Packages for Enterprise Linux 7 - $basearch

baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch failovermethod=priority enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

The assumption is that all deps are fetched from the host reposync'ed repos already.

In fact, I'm pretty sure there's no need to enable even 'base' - there is no need to look for packages there.

david-caro commented 8 years ago

I don't agree with this, at least for the base images, we want images that are as generic as possible and not everyone uses the reposync (and not even ovirt is using it for the epel repos too).

tlitovsk commented 8 years ago

I agree with David When I fetch some package that I develop it has some deps in the base or epel. Having epel installed is expected pre requisite.

mykaul commented 8 years ago

OK. Then perhaps in ovirt-system-tests we should explicitly only used the repos we inject? I'll check how much time it actually saves, if any.

On Tue, Mar 15, 2016 at 10:12 PM, Tolik Litovsky notifications@github.com wrote:

I agree with David When I fetch some package that I develop it has some deps in the base or epel. Having epel installed is expected pre requisite.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/lago-project/lago-images/issues/5#issuecomment-197001988

david-caro commented 8 years ago

Well, if you want to do that you will have to re-add the epel repos to the reposync config (and that will download all the epel packages for the run, only at first, but it's a lot of space). That will not improve on jenkins, but might be nicer on your laptop.

:+1: for trying

mykaul commented 8 years ago

Two ugly tricks, helped get slightly better times:

  1. Disabling all repos but the local repo: mini@ykaul-mini:~/ovirt-system-tests$ git diff common/deploy-scripts/setup_engine.sh diff --git a/common/deploy-scripts/setup_engine.sh b/common/deploy-scripts/setup_engine.sh index f9f73e9..1c862d8 100644 --- a/common/deploy-scripts/setup_engine.sh +++ b/common/deploy-scripts/setup_engine.sh @@ -11,4 +11,6 @@ EOF ADDR=$(/sbin/ip -4 -o addr show dev eth0 | awk '{split($4,a,"."); print a[1] "." a[2] "." a[3] ".1"}') echo "$ADDR engine" >> /etc/hosts

+sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/*.repo +sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/local-ovirt.repo

2nd - write reposync into /dev/shm/reposync by changing: mini@ykaul-mini:~/ovirt-system-tests$ grep shm /usr/lib/python2.7/site-packages/ovirtlago/cmd.py 'reposync_dir': '/dev/shm/reposync',

It brought engine RPM setup ~20 seconds less than it was before.

@ Deploy oVirt environment: Success (in 0:01:56) Running script 001_initialize_engine.py @ Run test: 001_initializeengine.py: nose.config: INFO: Ignoring files matching ['^.', '^', '^setup.py$']

001_initialize_engine.test_initialize_engine:

\* Copy

/home/mini/ovirt-system-tests/basic_suite_3.6/engine-answer-file.conf to lago_basic_suite_3_6_engine:/tmp/answer-file: * Copy /home/mini/ovirt-system-tests/basic_suite_3.6/engine-answer-file.conf to lago_basic_suite_3_6_engine:/tmp/answer-file: Success (in 0:00:00)

001_initialize_engine.test_initialize_engine: Success (in 0:01:06)

Results located at

/home/zram/3.6/default/nosetests-001_initialize_engine.py.xml @ Run test: 001_initialize_engine.py: Success (in 0:01:06)

I'm still hopeful I can cut down hosts installation time, which is still VERY high from my perspective:

add_hosts: Success (in 0:03:44)

Overall, good performance, but not enough to justify yet the change. I'm happy with the change as we are more tight in controlling the deps and with few tweaks (reposync from local office repos) we can get rid of slower internet repos sync (2GB of reposync for 3.6 required ~5 minutes to sync...)

On Tue, Mar 15, 2016 at 10:42 PM, David Caro notifications@github.com wrote:

Well, if you want to do that you will have to re-add the epel repos to the reposync config (and that will download all the epel packages for the run, only at first, but it's a lot of space). That will not improve on jenkins, but might be nicer on your laptop.

[image: :+1:] for trying

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/lago-project/lago-images/issues/5#issuecomment-197011737