[libvirt] [jenkins-ci PATCH 03/22] guests,jenkins: Add CentOS 8

Fabiano Fidêncio posted 22 patches 4 years, 11 months ago
There is a newer version of this series
[libvirt] [jenkins-ci PATCH 03/22] guests,jenkins: Add CentOS 8
Posted by Fabiano Fidêncio 4 years, 11 months ago
This commit allows calling `lcitool install libvirt-centos-8`.

`lcitool update libvirt-centos-8 $project` does *not* work as:
- EPEL repository is only enabled for CentOS 7;
  - The reason EPEL is needed because of some base packages (as screen);
- There's no task to enable PowerTools repository;
  - PowerTools is needed because the development packages are
    distributed via this repo;
- There's *no* project supported;

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
---
 guests/host_vars/libvirt-centos-8/docker.yml  | 2 ++
 guests/host_vars/libvirt-centos-8/install.yml | 2 ++
 guests/host_vars/libvirt-centos-8/main.yml    | 7 +++++++
 guests/inventory                              | 1 +
 guests/playbooks/build/jobs/defaults.yml      | 2 ++
 jenkins/jobs/defaults.yaml                    | 2 ++
 6 files changed, 16 insertions(+)
 create mode 100644 guests/host_vars/libvirt-centos-8/docker.yml
 create mode 100644 guests/host_vars/libvirt-centos-8/install.yml
 create mode 100644 guests/host_vars/libvirt-centos-8/main.yml

diff --git a/guests/host_vars/libvirt-centos-8/docker.yml b/guests/host_vars/libvirt-centos-8/docker.yml
new file mode 100644
index 0000000..10c2a50
--- /dev/null
+++ b/guests/host_vars/libvirt-centos-8/docker.yml
@@ -0,0 +1,2 @@
+---
+docker_base: centos:centos8
diff --git a/guests/host_vars/libvirt-centos-8/install.yml b/guests/host_vars/libvirt-centos-8/install.yml
new file mode 100644
index 0000000..46facc1
--- /dev/null
+++ b/guests/host_vars/libvirt-centos-8/install.yml
@@ -0,0 +1,2 @@
+---
+install_url: http://mirror.centos.org/centos-8/8/BaseOS/x86_64/os/
diff --git a/guests/host_vars/libvirt-centos-8/main.yml b/guests/host_vars/libvirt-centos-8/main.yml
new file mode 100644
index 0000000..a147183
--- /dev/null
+++ b/guests/host_vars/libvirt-centos-8/main.yml
@@ -0,0 +1,7 @@
+---
+package_format: 'rpm'
+package_manager: 'dnf'
+os_name: 'CentOS'
+os_version: '8'
+
+ansible_python_interpreter: /usr/bin/python3
diff --git a/guests/inventory b/guests/inventory
index ecdcc34..f062310 100644
--- a/guests/inventory
+++ b/guests/inventory
@@ -1,4 +1,5 @@
 libvirt-centos-7
+libvirt-centos-8
 libvirt-debian-9
 libvirt-debian-10
 libvirt-debian-sid
diff --git a/guests/playbooks/build/jobs/defaults.yml b/guests/playbooks/build/jobs/defaults.yml
index 0175a05..5e4ec03 100644
--- a/guests/playbooks/build/jobs/defaults.yml
+++ b/guests/playbooks/build/jobs/defaults.yml
@@ -1,6 +1,7 @@
 ---
 all_machines:
   - libvirt-centos-7
+  - libvirt-centos-8
   - libvirt-debian-9
   - libvirt-debian-10
   - libvirt-debian-sid
@@ -15,6 +16,7 @@ all_machines:
   - libvirt-ubuntu-1804
 rpm_machines:
   - libvirt-centos-7
+  - libvirt-centos-8
   - libvirt-fedora-30
   - libvirt-fedora-31
   - libvirt-fedora-rawhide
diff --git a/jenkins/jobs/defaults.yaml b/jenkins/jobs/defaults.yaml
index 676ecbf..9232d42 100644
--- a/jenkins/jobs/defaults.yaml
+++ b/jenkins/jobs/defaults.yaml
@@ -4,6 +4,7 @@
     node: libvirt
     all_machines:
       - libvirt-centos-7
+      - libvirt-centos-8
       - libvirt-debian-9
       - libvirt-debian-10
       - libvirt-fedora-30
@@ -13,6 +14,7 @@
       - libvirt-freebsd-12
     rpm_machines:
       - libvirt-centos-7
+      - libvirt-centos-8
       - libvirt-fedora-30
       - libvirt-fedora-31
       - libvirt-fedora-rawhide
-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH 03/22] guests, jenkins: Add CentOS 8
Posted by Andrea Bolognani 4 years, 11 months ago
On Mon, 2019-12-09 at 16:20 +0100, Fabiano Fidêncio wrote:
> guests,jenkins: Add CentOS 8

s/,jenkins//

[...]
> diff --git a/guests/playbooks/build/jobs/defaults.yml b/guests/playbooks/build/jobs/defaults.yml
> index 0175a05..5e4ec03 100644
> --- a/guests/playbooks/build/jobs/defaults.yml
> +++ b/guests/playbooks/build/jobs/defaults.yml
> @@ -1,6 +1,7 @@
>  ---
>  all_machines:
>    - libvirt-centos-7
> +  - libvirt-centos-8
>    - libvirt-debian-9
>    - libvirt-debian-10
>    - libvirt-debian-sid
> @@ -15,6 +16,7 @@ all_machines:
>    - libvirt-ubuntu-1804
>  rpm_machines:
>    - libvirt-centos-7
> +  - libvirt-centos-8
>    - libvirt-fedora-30
>    - libvirt-fedora-31
>    - libvirt-fedora-rawhide
> diff --git a/jenkins/jobs/defaults.yaml b/jenkins/jobs/defaults.yaml
> index 676ecbf..9232d42 100644
> --- a/jenkins/jobs/defaults.yaml
> +++ b/jenkins/jobs/defaults.yaml
> @@ -4,6 +4,7 @@
>      node: libvirt
>      all_machines:
>        - libvirt-centos-7
> +      - libvirt-centos-8
>        - libvirt-debian-9
>        - libvirt-debian-10
>        - libvirt-fedora-30
> @@ -13,6 +14,7 @@
>        - libvirt-freebsd-12
>      rpm_machines:
>        - libvirt-centos-7
> +      - libvirt-centos-8
>        - libvirt-fedora-30
>        - libvirt-fedora-31
>        - libvirt-fedora-rawhide

These changes are not wrong per se, but I would prefer it if the
series had a different structure:

  * set the stage
    + this is your first two patches

  * add support for installing a CentOS 8 guest
    + all the other hunks of this patch plus the next two
    + './lcitool install libvirt-centos-8' now works
    + happens entirely inside the guests/ directory

  * add projects to CentOS 8 one by one
    + one patch per project
    + just tweak the mappings as needed and add the corresponding
      project to host_vars/libvirt-centos-8/main.yml when done
    + './lcitool update libvirt-centos-8 $project' should succeed
      with the patch applied
    + also requires touching guests/ only

  * start building projects on CentOS 8
    + single patch that enables everything
    + touches guests/playbooks/build/ and jenkins/ only

This structure makes more sense to me because adding
libvirt-centos-8 to all_machines feels really wrong when you know
that, at that point in time, you wouldn't actually be able to build
a single project on the resulting guest.


So, in conclusion:

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

to all other hunks, but save these last few for later.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH 03/22] guests, jenkins: Add CentOS 8
Posted by Andrea Bolognani 4 years, 11 months ago
On Mon, 2019-12-09 at 18:29 +0100, Andrea Bolognani wrote:
> These changes are not wrong per se, but I would prefer it if the
> series had a different structure:
> 
>   * set the stage
>     + this is your first two patches
> 
>   * add support for installing a CentOS 8 guest
>     + all the other hunks of this patch plus the next two
>     + './lcitool install libvirt-centos-8' now works
>     + happens entirely inside the guests/ directory
> 
>   * add projects to CentOS 8 one by one
>     + one patch per project
>     + just tweak the mappings as needed and add the corresponding
>       project to host_vars/libvirt-centos-8/main.yml when done
>     + './lcitool update libvirt-centos-8 $project' should succeed
>       with the patch applied
>     + also requires touching guests/ only

Taking half a step back after giving a second look to the rest of the
series, once you split the changes to playbooks/build/ and jenkins/
off to a separate patch there's very little point in having one patch
per project, as the changes to mappings.yml and host_vars/ in patches
6,7 and 12-22 are small and straighforward enough that it would make
more sense to have them all together. So let's do that instead.

I don't see the need to add further comments to this incarnation of
the series. The only remaining question IMHO is whether we can get
away without patches 8-11 - I really don't like those :)

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list