From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E027C433E7 for ; Wed, 14 Oct 2020 17:31:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E394B2173E for ; Wed, 14 Oct 2020 17:31:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MhdlJZJ2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E394B2173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:32816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSkcX-0001jD-Oc for qemu-devel@archiver.kernel.org; Wed, 14 Oct 2020 13:31:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSkba-0001BV-UK for qemu-devel@nongnu.org; Wed, 14 Oct 2020 13:30:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kSkbY-0004CC-Un for qemu-devel@nongnu.org; Wed, 14 Oct 2020 13:30:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602696624; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=TF3+rtirjTZroGeuEivmMB6vCh1BBrt4C2SIR7mLHrs=; b=MhdlJZJ255jDwC6CFSEI12lEPu3dMCikytX5Mv0YuKzQ2zGu3ZiFwJZsjj7A7PuJxY8EeW VLTbkH7fqm+iCpplz378wAagECZ3L/ZCAxX4JX0MJNUIXTlNHBVC/Y6w9/uALvgDJ9X9dM FJdh7mNV+KmFSiMoEcaRbUbjOpby2WY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-61-xhHSdKKEPj2XnNxPG-HWlw-1; Wed, 14 Oct 2020 13:30:21 -0400 X-MC-Unique: xhHSdKKEPj2XnNxPG-HWlw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0BDE118BE167; Wed, 14 Oct 2020 17:30:19 +0000 (UTC) Received: from redhat.com (ovpn-113-137.ams2.redhat.com [10.36.113.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6EBC46EF67; Wed, 14 Oct 2020 17:30:12 +0000 (UTC) Date: Wed, 14 Oct 2020 18:30:09 +0100 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= To: Cleber Rosa Subject: Re: [PATCH v3 2/4] Jobs based on custom runners: build environment docs and playbook Message-ID: <20201014173009.GU115189@redhat.com> References: <20201014052140.1146924-1-crosa@redhat.com> <20201014052140.1146924-3-crosa@redhat.com> MIME-Version: 1.0 In-Reply-To: <20201014052140.1146924-3-crosa@redhat.com> User-Agent: Mutt/1.14.6 (2020-07-11) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=berrange@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Received-SPF: pass client-ip=216.205.24.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/14 01:12:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Cc: Peter Maydell , Thomas Huth , Eduardo Habkost , Erik Skultety , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , Andrea Bolognani , Willian Rampazzo , Stefan Hajnoczi , Alex =?utf-8?Q?Benn=C3=A9e?= , Beraldo Leal Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 > --- > 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 :|