From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Cleber Rosa <crosa@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Erik Skultety" <eskultet@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
qemu-devel@nongnu.org,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Andrea Bolognani" <abologna@redhat.com>,
"Willian Rampazzo" <wrampazz@redhat.com>,
"Stefan Hajnoczi" <stefanha@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"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 18:30:09 +0100 [thread overview]
Message-ID: <20201014173009.GU115189@redhat.com> (raw)
In-Reply-To: <20201014052140.1146924-3-crosa@redhat.com>
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.
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 :|
next prev parent reply other threads:[~2020-10-14 17:31 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é [this message]
2020-10-14 18:59 ` Cleber Rosa
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=20201014173009.GU115189@redhat.com \
--to=berrange@redhat.com \
--cc=abologna@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=bleal@redhat.com \
--cc=crosa@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.