From nobody Thu May 15 11:49:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1508169750812142.99881334423753; Mon, 16 Oct 2017 09:02:30 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 7D67081DFE; Mon, 16 Oct 2017 16:02:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 570F217F4B; Mon, 16 Oct 2017 16:02:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1F0F162CF2; Mon, 16 Oct 2017 16:02:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9GG2MV2026443 for ; Mon, 16 Oct 2017 12:02:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8AC5517C4F; Mon, 16 Oct 2017 16:02:22 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.219]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 122B55D6A9 for ; Mon, 16 Oct 2017 16:02:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7D67081DFE Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 16 Oct 2017 18:02:07 +0200 Message-Id: <20171016160208.20112-5-abologna@redhat.com> In-Reply-To: <20171016160208.20112-1-abologna@redhat.com> References: <20171016160208.20112-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [libvirt-jenkins-ci PATCH 4/5] ansible: Update documentation X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 16 Oct 2017 16:02:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani --- ansible/README.markdown | 74 +++++++++++++++++++++++++++++++--------------= ---- 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/ansible/README.markdown b/ansible/README.markdown index 4d464e1..b867aee 100644 --- a/ansible/README.markdown +++ b/ansible/README.markdown @@ -1,38 +1,40 @@ -Ansible playbooks for libvirt CI -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D +libvirt CI - guest management tools +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -These can be used to turn a freshly installed machine into a worker for -the Jenkins-based libvirt CI. +The tools contained in this directory simplify and automate the management +of the guests used by the Jenkins-based libvirt CI environment. =20 -There are two main playbooks: +There are two steps to bringing up a guest: =20 -* `bootstrap.yml`, used to perform the bootstrapping phase, that is, getti= ng - guests to the point where Ansible can manage them fully and prompting the - user for a password is no longer required; +* `./manage install $guest` will perform an unattended installation + of `$guest`. Not all guests can be installed this way: see the "FreeBSD" + section below; =20 -* `site.yml`, used for the remaining configuration steps. +* `./manage prepare $guest` will go through all the post-installation + configuration steps required to make the newly-created guest usable as + part of the Jenkins setup. =20 -Although you can use the playbooks directly, it's much more convenient to -call either `make bootstrap` or `make site` instead. +Once those steps have been performed, maintainance will involve running: =20 -Each guest only needs to be bootstrapped once; that said, both playbooks a= re -idempotent so there's no harm in applying them over and over again. +* `./manage update $guest` =20 +periodically to ensure the guest configuration is sane and all installed +packages are updated. =20 -Requirements ------------- =20 -SSH must be running in the guest, and root login must be permitted. +Security warning +---------------- =20 +The guests created using these tools are configured to allow logging +in remotely as root with a well-known password: because of that, they +are *completely insecure* and must *never* be exposed on any network, +nor should they be used to perform any privacy-sensitive activity. =20 -CI use ------- =20 -After you have reinstalled a Jenkins worker, run `make bootstrap` followed -by `make site` and a reboot to get it ready for CI use. No further action -should be necessary. +Adding new guests +----------------- =20 -Adding new workers will require tweaking the inventory and host variables, +Adding new guests will require tweaking the inventory and host variables, but it should be very easy to eg. use the Fedora 26 configuration to come up with a working Fedora 27 configuration. =20 @@ -40,11 +42,11 @@ up with a working Fedora 27 configuration. Development use --------------- =20 -If you are a developer trying to reproduce a bug on some OS you don't have -easy access to, you can use these playbooks to create a suitable test +If you are a developer trying to reproduce a bug on some OS you don't +have easy access to, you can use these tools to create a suitable test environment. =20 -Since the playbooks are intended mainly for CI use, you'll have to tweak t= hem +Since the tools are intended mainly for CI use, you'll have to tweak them a bit first, including: =20 * trimming down the `inventory` file to just the guest you're interested i= n; @@ -56,5 +58,23 @@ a bit first, including: =20 * deleting `host_vars/$guest/vault.yml` altogether. =20 -After performing these tweaks, you should be able to just run `make bootst= rap` -followed by `make site` as usual. +After performing these tweaks, you should be able to use the same steps +outlined above. + + +FreeBSD +------- + +Installation of FreeBSD guests must be performed manually; alternatively, +the official qcow2 images can be used to quickly bring up such guests. + +Some manual tweaking will be needed, in particular: + +* `/etc/ssh/sshd_config` must contain the `PermitRootLogin yes` directive; + +* `/etc/rc.conf` must contain the `sshd_enable=3D"YES"` setting; + +* the root password must be manually set to "root" (without quotes). + +Once these steps have been performed, FreeBSD guests can be managed just +like all other guests. --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list