From: Cleber Rosa <crosa@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Erik Skultety" <eskultet@redhat.com>,
"Stefan Hajnoczi" <stefanha@gmail.com>,
qemu-devel@nongnu.org,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Andrea Bolognani" <abologna@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Willian Rampazzo" <wrampazz@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Beraldo Leal" <bleal@redhat.com>
Subject: Re: [PATCH v3 2/4] Jobs based on custom runners: build environment docs and playbook
Date: Wed, 14 Oct 2020 14:59:52 -0400 [thread overview]
Message-ID: <20201014185952.GA1196177@localhost.localdomain> (raw)
In-Reply-To: <20201014173009.GU115189@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 5147 bytes --]
On Wed, Oct 14, 2020 at 06:30:09PM +0100, Daniel P. Berrangé wrote:
> On Wed, Oct 14, 2020 at 01:21:38AM -0400, Cleber Rosa wrote:
> > To run basic jobs on custom runners, the environment needs to be
> > properly set up. The most common requirement is having the right
> > packages installed.
> >
> > The playbook introduced here covers a number of different Linux
> > distributions and FreeBSD, and are intended to provide a reproducible
> > environment.
> >
> > Signed-off-by: Cleber Rosa <crosa@redhat.com>
> > ---
> > docs/devel/ci.rst | 32 ++++
> > scripts/ci/setup/build-environment.yml | 220 +++++++++++++++++++++++++
> > scripts/ci/setup/inventory | 2 +
> > 3 files changed, 254 insertions(+)
> > create mode 100644 scripts/ci/setup/build-environment.yml
> > create mode 100644 scripts/ci/setup/inventory
> >
> > diff --git a/docs/devel/ci.rst b/docs/devel/ci.rst
> > index 41a4bbddad..208b5e399b 100644
> > --- a/docs/devel/ci.rst
> > +++ b/docs/devel/ci.rst
> > @@ -52,3 +52,35 @@ As a general rule, those newly added contributed jobs should run as
> > The precise minimum requirements and exact rules for machine
> > configuration documentation/scripts, and the success rate of jobs are
> > still to be defined.
> > +
> > +Machine Setup Howto
> > +-------------------
> > +
> > +For all Linux based systems, the setup can be mostly automated by the
> > +execution of two Ansible playbooks. Start by adding your machines to
> > +the ``inventory`` file under ``scripts/ci/setup``, such as this::
> > +
> > + [local]
> > + fully.qualified.domain
> > + other.machine.hostname
> > +
> > +You may need to set some variables in the inventory file itself. One
> > +very common need is to tell Ansible to use a Python 3 interpreter on
> > +those hosts. This would look like::
> > +
> > + [local]
> > + fully.qualified.domain ansible_python_interpreter=/usr/bin/python3
> > + other.machine.hostname ansible_python_interpreter=/usr/bin/python3
> > +
> > +Build environment
> > +~~~~~~~~~~~~~~~~~
> > +
> > +The ``scripts/ci/setup/build-environment.yml`` Ansible playbook will
> > +set up machines with the environment needed to perform builds and run
> > +QEMU tests. It covers a number of different Linux distributions and
> > +FreeBSD.
> > +
> > +To run the playbook, execute::
> > +
> > + cd scripts/ci/setup
> > + ansible-playbook -i inventory build-environment.yml
> > diff --git a/scripts/ci/setup/build-environment.yml b/scripts/ci/setup/build-environment.yml
> > new file mode 100644
> > index 0000000000..0e8894bca9
> > --- /dev/null
> > +++ b/scripts/ci/setup/build-environment.yml
> > @@ -0,0 +1,220 @@
> > +---
> > +- name: Installation of basic packages to build QEMU
> > + hosts: all
> > + tasks:
> > + - name: Install basic packages to build QEMU on Ubuntu 18.04/20.04
> > + apt:
> > + update_cache: yes
> > + # Originally from tests/docker/dockerfiles/ubuntu1804.docker
> > + pkg:
> > + - ccache
> > + - clang
> > + - gcc
> > + - gettext
> > + - git
> > + - glusterfs-common
> > + - libaio-dev
> > + - libattr1-dev
> > + - libbrlapi-dev
> > + - libbz2-dev
> > + - libcacard-dev
> > + - libcap-ng-dev
> > + - libcurl4-gnutls-dev
> > + - libdrm-dev
> > + - libepoxy-dev
> > + - libfdt-dev
> > + - libgbm-dev
> > + - libgtk-3-dev
> > + - libibverbs-dev
> > + - libiscsi-dev
> > + - libjemalloc-dev
> > + - libjpeg-turbo8-dev
> > + - liblzo2-dev
> > + - libncurses5-dev
> > + - libncursesw5-dev
> > + - libnfs-dev
> > + - libnss3-dev
> > + - libnuma-dev
> > + - libpixman-1-dev
> > + - librados-dev
> > + - librbd-dev
> > + - librdmacm-dev
> > + - libsasl2-dev
> > + - libsdl2-dev
> > + - libseccomp-dev
> > + - libsnappy-dev
> > + - libspice-protocol-dev
> > + - libssh-dev
> > + - libusb-1.0-0-dev
> > + - libusbredirhost-dev
> > + - libvdeplug-dev
> > + - libvte-2.91-dev
> > + - libzstd-dev
> > + - make
> > + - python3-yaml
> > + - python3-sphinx
> > + - sparse
> > + - xfslibs-dev
>
> This needs updating to add meson, and with Paolo's series today you
> might as well go ahead and add ninja-build immediately too
>
> https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg04025.html
>
> Same for all the other distro package lists.
>
>
Good point, will do.
Thanks!
- Cleber.
> Regards,
> Daniel
> --
> |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o- https://fstop138.berrange.com :|
> |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-10-14 19:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 5:21 [PATCH v3 0/4] GitLab Custom Runners and Jobs (was: QEMU Gating CI) Cleber Rosa
2020-10-14 5:21 ` [PATCH v3 1/4] Jobs based on custom runners: documentation and configuration placeholder Cleber Rosa
2020-10-14 17:28 ` Daniel P. Berrangé
2020-10-14 5:21 ` [PATCH v3 2/4] Jobs based on custom runners: build environment docs and playbook Cleber Rosa
2020-10-14 17:30 ` Daniel P. Berrangé
2020-10-14 18:59 ` Cleber Rosa [this message]
2020-10-14 19:19 ` Cleber Rosa
2020-10-15 8:29 ` Daniel P. Berrangé
2020-10-19 1:43 ` Cleber Rosa
2020-10-14 5:21 ` [PATCH v3 3/4] Jobs based on custom runners: docs and gitlab-runner setup playbook Cleber Rosa
2020-10-14 17:31 ` Daniel P. Berrangé
2020-10-14 5:21 ` [PATCH v3 4/4] Jobs based on custom runners: add job definitions for QEMU's machines Cleber Rosa
2020-10-14 17:46 ` Daniel P. Berrangé
2020-10-14 21:13 ` Cleber Rosa
2020-10-14 23:24 ` Cleber Rosa
2020-10-15 6:09 ` Thomas Huth
2020-10-15 8:32 ` Daniel P. Berrangé
2020-10-15 8:34 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201014185952.GA1196177@localhost.localdomain \
--to=crosa@redhat.com \
--cc=abologna@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=bleal@redhat.com \
--cc=ehabkost@redhat.com \
--cc=eskultet@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
--cc=wrampazz@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).