[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/4] Jobs based on custom runners: build environment docs
From: |
Cleber Rosa |
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 |
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 :|
>
>
signature.asc
Description: PGP signature
[PATCH v3 3/4] Jobs based on custom runners: docs and gitlab-runner setup playbook, Cleber Rosa, 2020/10/14
[PATCH v3 4/4] Jobs based on custom runners: add job definitions for QEMU's machines, Cleber Rosa, 2020/10/14