]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: s/slave/builder s/master/controller
authorDavid Galloway <dgallowa@redhat.com>
Thu, 3 Feb 2022 19:17:35 +0000 (14:17 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 19 May 2022 19:01:14 +0000 (15:01 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
33 files changed:
ansible/examples/builder.yml [new file with mode: 0644]
ansible/examples/controller.yml [new file with mode: 0644]
ansible/examples/master.yml [deleted file]
ansible/examples/slave.yml [deleted file]
ansible/library/jenkins_node
ansible/release.yml
ansible/roles/ansible-jenkins/README.rst
ansible/roles/ansible-jenkins/files/jobs/jenkins-job-builder/config.xml
ansible/slave.yml
ansible/slaves/hosts [deleted file]
ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml
ceph-container-flake8/build/build
ceph-container-lint/build/build
ceph-dev-build/config/definitions/ceph-dev-build.yml
ceph-dev-cron/config/definitions/ceph-dev-cron.yml
ceph-dev-new-build/config/definitions/ceph-dev-new-build.yml
ceph-dev-new-trigger/config/definitions/ceph-dev-new-trigger.yml
ceph-dev-new/config/definitions/ceph-dev-new.yml
ceph-dev-trigger/config/definitions/ceph-dev-trigger.yml
ceph-dev/config/definitions/ceph-dev.yml
ceph-iscsi-cli-trigger/config/definitions/ceph-iscsi-cli-trigger.yml
ceph-iscsi-config-trigger/config/definitions/ceph-iscsi-config-trigger.yml
ceph-iscsi-tools-trigger/config/definitions/ceph-iscsi-tools-trigger.yml
ceph-iscsi-trigger/config/definitions/ceph-iscsi-trigger.yml
ceph-pr-arm-trigger/config/definitions/ceph-pr-arm-trigger.yml
kernel-trigger/config/definitions/kernel-trigger.yml
mita-deploy/config/definitions/mita-deploy.yml
nfs-ganesha/build/build_rpm
radosgw-agent-pull-requests/build/build
rtslib-fb-trigger/config/definitions/rtslib-fb-trigger.yml
samba-trigger/config/definitions/samba-trigger.yml
scripts/build_utils.sh
tcmu-runner-trigger/config/definitions/tcmu-runner-trigger.yml

diff --git a/ansible/examples/builder.yml b/ansible/examples/builder.yml
new file mode 100644 (file)
index 0000000..21c31fb
--- /dev/null
@@ -0,0 +1,932 @@
+---
+## Instead of trying to keep 4 separate playbooks up to date, let's do it all here.
+## The only difference from using multiple playbooks is we need to specify `-e libvirt=true` and/or `-e permanent=true` if the builder will be permanent/static.
+## Tested on: CentOS 7, CentOS 8, Xenial, Bionic, Focal, Leap 15.1 using ansible 2.8.5
+##
+## Example:
+## ansible-playbook -vvv -M ./library/ builder.yml -e '{"labels": "x86_64 xenial etc", "token": "XXXXX", "jenkins_credentials_uuid": "jenkins-build", "api_uri": "https://jenkins.ceph.com"}' -e permanent=true -e ansible_ssh_user=ubuntu --limit braggi01*
+
+- hosts: all
+  become: true
+  user: ubuntu # This should be overridden on the CLI (e.g., -e user=centos).  It doesn't matter on a mita/prado builder because the playbook is run locally by root.
+  vars:
+    - libvirt: false # Should vagrant be installed?
+    - permanent: false # Is this a permanent builder?  Since the ephemeral (non-permanent) tasks get run more often, we'll default to false.
+    - jenkins_user: 'jenkins-build'
+    #- jenkins_key: This gets defined below now.
+    # jenkins API credentials:
+    - api_user: 'ceph-jenkins'
+    - token: '{{ token }}'
+    - api_uri: 'https://jenkins.ceph.com'
+    - jenkins_credentials_uuid: 'jenkins-build'
+    - nodename: '{{ nodename }}'
+    - labels: '{{ labels }}'
+    - grant_sudo: true
+    - osc_user: 'username'
+    - osc_pass: 'password'
+    - container_mirror: 'docker-mirror.front.sepia.ceph.com:5000'
+
+  tasks:
+    ## DEFINE PACKAGE LISTS BELOW
+    # Universal DEBs
+    - set_fact:
+        universal_debs:
+          - git
+          - fakeroot
+          - debhelper
+          - reprepro
+          - devscripts
+          - pbuilder
+          - pkg-config
+          - libtool
+          - autotools-dev
+          - automake
+          - libssl-dev
+          - libffi-dev
+          - default-jdk
+          - default-jre
+          - debian-keyring
+          - debian-archive-keyring
+          - software-properties-common
+          # jenkins-job-builder job:
+          - libyaml-dev
+          - jq
+          # ceph-docs job:
+          - doxygen
+          - ditaa
+          - ant
+          - tmpreaper
+        tmp_cleaner_name: tmpreaper
+        tmp_cleaner_args: "--runtime=0 14d /tmp/"
+      when: ansible_os_family == "Debian"
+      tags: always
+
+    # Libvirt DEBs (Bionic and older)
+    - set_fact:
+        libvirt_debs:
+          - qemu-kvm
+          - libvirt-bin
+          - libvirt-dev
+          - vagrant
+      when:
+        - ansible_os_family == "Debian"
+        - ansible_distribution_major_version|int <= 18
+        - libvirt|bool
+      tags: always
+
+    # Libvirt DEBs (Focal and newer)
+    - set_fact:
+        libvirt_debs:
+          - qemu-kvm
+          - libvirt-daemon-system
+          - libvirt-clients
+          - libvirt-dev
+          - vagrant
+      when:
+        - ansible_os_family == "Debian"
+        - ansible_distribution_major_version|int >= 20
+        - libvirt|bool
+      tags: always
+
+    # python2 DEBs
+    - set_fact:
+        python2_debs:
+          - python
+          - python-dev
+          - python-pip
+          - python-virtualenv
+      when:
+        - ansible_os_family == "Debian"
+        - ansible_distribution_major_version|int <= 18
+      tags: always
+
+    # python3 DEBs (We only install python2 *and* python3 on Bionic)
+    - set_fact:
+        python3_debs:
+          - python3
+          - python3-dev
+          - python3-pip
+          - python3-venv
+          - python3-virtualenv
+      when:
+        - ansible_os_family == "Debian"
+        - ansible_distribution_major_version|int >= 18
+      tags: always
+
+    # chroot DEBs (Xenial and older)
+    - set_fact:
+        chroot_deb: dchroot
+      when:
+        - ansible_os_family == "Debian"
+        - ansible_distribution_major_version|int <= 16
+      tags: always
+
+    # chroot DEBs (Bionic and newer)
+    - set_fact:
+        chroot_deb: schroot
+      when:
+        - ansible_os_family == "Debian"
+        - ansible_distribution_major_version|int >= 18
+      tags: always
+
+    # Universal RPMs
+    - set_fact:
+        universal_rpms:
+          - createrepo
+          - java-1.8.0-openjdk
+          - git
+          - libtool
+          #- rpm-sign
+          - autoconf
+          - automake
+          - cmake
+          - binutils
+          - bison
+          - flex
+          - gcc
+          - gcc-c++
+          - gettext
+          - libtool
+          - make
+          - patch
+          - pkgconfig
+          - redhat-rpm-config
+          - rpm-build
+          - rpmdevtools
+          - openssl-devel
+          - libffi-devel
+          - tmpwatch
+        tmp_cleaner_name: tmpwatch
+        tmp_cleaner_args: "14d /tmp/"
+      when: ansible_os_family == "RedHat"
+      tags: always
+
+    # Libvirt RPMs
+    - set_fact:
+        libvirt_rpms:
+          - qemu-kvm
+          - libvirt-devel
+          - libguestfs
+          - libvirt
+          - libguestfs-tools
+          - vagrant
+      when:
+        - ansible_os_family == "RedHat"
+        - libvirt|bool
+      tags: always
+
+    # EL7 RPMs
+    - set_fact:
+        epel_rpms:
+          - jq
+          - python-pip
+          - python-devel
+          - python-virtualenv
+          - mock
+          - docker
+        container_service_name: docker
+        container_certs_path: "/etc/docker/certs.d/{{ container_mirror }}"
+      when:
+        - ansible_os_family == "RedHat"
+        - ansible_distribution_major_version|int <= 7
+      tags: always
+
+    # EL8 RPMs
+    - set_fact:
+        epel_rpms:
+          - jq
+          - python3-pip
+          - python3-devel
+          - python3-virtualenv
+          - mock
+          - podman
+        container_service_name: podman
+        container_certs_path: "/etc/containers/certs.d/{{ container_mirror }}"
+        hackery_packages:
+          - gcc
+          - libguestfs-tools-c
+          - libvirt
+          - libvirt-devel
+          - libxml2-devel
+          - libxslt-devel
+          - make
+          - ruby-devel
+      when:
+        - ansible_os_family == "RedHat"
+        - ansible_distribution_major_version|int == 8
+      tags: always
+
+    # EL9 RPMs
+    - set_fact:
+        epel_rpms:
+          - jq
+          - python3-pip
+          - python3-devel
+          - podman
+        container_service_name: podman
+        container_certs_path: "/etc/containers/certs.d/{{ container_mirror }}"
+        hackery_packages:
+          - gcc
+          - libguestfs-tools-c
+          - libvirt
+          - libvirt-devel
+          - libxml2-devel
+          - libxslt-devel
+          - make
+          - ruby-devel
+      when:
+        - ansible_os_family == "RedHat"
+        - ansible_distribution_major_version|int == 9
+      tags: always
+
+    # This package removed in EL9
+    # This has to be a "list" otherwise it gets rendered as an empty string and the yum ansible module doesn't like that.
+    - set_fact:
+        lsb_package:
+          - redhat-lsb-core
+      when:
+        - ansible_os_family == "RedHat"
+        - ansible_distribution_major_version|int <= 8
+      tags: always
+
+    # OpenSUSE RPMs
+    - set_fact:
+        zypper_rpms:
+          - autoconf
+          - automake
+          - binutils
+          - bison
+          - cmake
+          - ccache
+          - createrepo
+          - flex
+          - gcc
+          - gcc-c++
+          - gettext-runtime
+          - git
+          - java-1_8_0-openjdk
+          - jq
+          - libffi-devel
+          - libopenssl-devel
+          - libtool
+          - lsb-release
+          - make
+          - patch
+          - pkg-config
+          - python2-pip
+          - python2-virtualenv
+          - python3-pip
+          - python3-virtualenv
+          - rpm-build
+          - rpmdevtools
+          - tig
+          - wget 
+          # obs requirements
+          - osc
+          - build
+        tmp_cleaner_name: tmpwatch
+        tmp_cleaner_args: "14d /tmp/"
+      when: ansible_os_family == "Suse"
+      tags: always
+
+    # OpenSUSE Libvirt RPMs (We've never tried this to date so more might be needed)
+    - set_fact:
+        zypper_libvirt_rpms:
+          - libvirt
+          - libvirt-devel
+          - qemu
+          - kvm
+          - vagrant
+          - ruby-devel
+      when:
+        - ansible_os_family == "Suse"
+        - libvirt|bool
+      tags: always
+
+    ## Let's make sure we don't accidentally set up a permanent builder from Sepia as ephemeral
+    - set_fact:
+        permanent: true
+      with_items: "{{ ansible_all_ipv4_addresses }}"
+      when: "item.startswith('172.21.')"
+      tags: always
+
+    ## Let's make sure nodename gets set using our Sepia hostnames if the builder's in Sepia
+    - set_fact:
+        nodename: "{{ ansible_hostname }}"
+      with_items: "{{ ansible_all_ipv4_addresses }}"
+      when: "item.startswith('172.21.')"
+      tags: always
+
+    ## EPHEMERAL SLAVE TASKS
+    # We would occasionally have issues with name resolution on the Ephemeral builder
+    # so we force them to use Google's DNS servers. This has to be done before
+    # package-related tasks to avoid communication errors with various repos.
+    - name: Ephemeral Slave Tasks
+      block:
+        - name: Uninstall resolvconf on Ubuntu to manually manage resolv.conf
+          apt:
+            name: resolvconf
+            state: absent
+          when: ansible_os_family == "Debian"
+    
+        - name: Check for NetworkManager conf
+          stat:
+            path: /etc/NetworkManager/NetworkManager.conf
+          register: nm_conf
+    
+        - name: Tell NetworkManager to leave resolv.conf alone on CentOS
+          lineinfile:
+            dest: /etc/NetworkManager/NetworkManager.conf
+            regexp: '^dns='
+            line: 'dns=none'
+            state: present
+          when: ansible_os_family == "RedHat" and nm_conf.stat.exists
+    
+        - name: Tell dhclient to leave resolv.conf alone on Ubuntu
+          lineinfile:
+            dest: /etc/dhcp/dhclient.conf
+            regexp: 'prepend domain-name-servers'
+            line: 'supersede domain-name-servers 8.8.8.8;'
+            state: present
+          when: ansible_os_family == "Debian"
+    
+        - name: Use Google DNS for name resolution
+          lineinfile:
+            dest: /etc/resolv.conf
+            regexp: '^nameserver'
+            line: 'nameserver 8.8.8.8'
+            state: present
+
+        - name: Set Hostname with hostname command
+          hostname:
+            name: "ceph-builders"
+          when: ansible_os_family != "Suse"
+    
+        # https://github.com/ansible/ansible/issues/42726
+        - name: Set Hostname on OpenSUSE Leap
+          command: 'hostname ceph-builders'
+          when: ansible_os_family == "Suse"
+    
+        - name: Ensure that 127.0.1.1 is present with an actual hostname
+          lineinfile:
+            backup: yes
+            dest: /etc/hosts
+            line: '127.0.1.1 ceph-builders'
+    
+        - name: Update etc cloud templates for debian /etc/hosts
+          lineinfile:
+            backup: yes
+            dest: /etc/cloud/templates/hosts.debian.tmpl
+            line: '127.0.1.1 ceph-builders'
+          when: ansible_os_family  == "Debian"
+    
+        - name: Update /etc/cloud templates for Red Hat /etc/hosts
+          lineinfile:
+            backup: yes
+            dest: /etc/cloud/templates/hosts.redhat.tmpl
+            line: '127.0.1.1 ceph-builders'
+          failed_when: false
+          when: ansible_os_family == "RedHat"
+    
+        - name: Update /etc/cloud templates for Suse /etc/hosts
+          lineinfile:
+            backup: yes
+            dest: /etc/cloud/templates/hosts.suse.tmpl
+            line: '127.0.1.1 ceph-builders'
+          failed_when: false
+          when: ansible_os_family == "Suse"
+
+        - name: Stop and disable daily apt activities
+          command: "{{ item }}"
+          with_items:
+            - systemctl stop apt-daily.timer
+            - systemctl disable apt-daily.timer
+            - systemctl disable apt-daily.service
+            - systemctl daemon-reload
+          when: ansible_os_family == "Debian"
+          # Just in case.  This isn't a super important task and might not even be required.
+          ignore_errors: true
+      when: not permanent|bool
+
+    ## VAGRANT REPO TASKS (for libvirt builders)
+    # vagrant doesn't have repositories, this chacra repo will be better to have
+    # around and can get updates as soon as a new vagrant version is published via
+    # chacractl
+    - name: Vagrant/Libvirt Repo Tasks
+      block:
+        - name: Add our vagrant DEB repository
+          apt_repository:
+            repo: "deb [trusted=yes] https://chacra.ceph.com/r/vagrant/latest/HEAD/ubuntu/{{ ansible_distribution_release }}/flavors/default/ {{ ansible_distribution_release }} main"
+            state: present
+          when: ansible_os_family == "Debian"
+
+        - name: Add our vagrant RPM repository
+          yum_repository:
+            name: vagrant
+            description: self-hosted vagrant repo
+            # Although this is a 'CentOS7' repo, the vagrant RPM is OS-version agnostic
+            baseurl: "https://chacra.ceph.com/r/vagrant/latest/HEAD/centos/7/flavors/default/x86_64/"
+            enabled: yes
+            gpgcheck: no
+          when: ansible_os_family == "RedHat"
+      when: libvirt|bool
+
+    ## PACKAGE INSTALLATION TASKS
+    # We do this in one big task to save time and avoid using `with` loops.  If a variable isn't defined, it's fine because of the |defaults.
+    - name: Install DEBs
+      apt:
+        name: "{{ universal_debs + libvirt_debs|default([]) + python2_debs|default([]) + python3_debs|default([]) + [ chroot_deb|default('') ] }}"
+        state: latest
+        update_cache: yes
+      when: ansible_os_family == "Debian"
+
+    # Sometimes, builders would connect to Jenkins and try to run an apt transaction right away.  Except apt-daily/unattended-upgrades has the dpkg lock so the Jenkins job would fail.
+    - name: Uninstall unattended-upgrades
+      package:
+        name: unattended-upgrades
+        state: absent
+      when: ansible_os_family == "Debian"
+
+    - name: Install EPEL repo
+      yum:
+        name: epel-release
+        state: latest
+      when:
+        - ansible_os_family == "RedHat"
+        - ansible_distribution_major_version|int <= 8
+
+    - name: Install RPMs without EPEL
+      yum:
+        name: "{{ universal_rpms + libvirt_rpms|default([]) + lsb_package|default([]) }}"
+        state: present
+        disablerepo: epel
+      when: ansible_os_family == "RedHat"
+
+    - name: Install RPMs with EPEL
+      yum:
+        name: "{{ epel_rpms|default([]) }}"
+        state: latest
+        enablerepo: epel
+      when: ansible_os_family == "RedHat"
+
+    - name: Install Suse RPMs
+      zypper:
+        name: "{{ zypper_rpms + zypper_libvirt_rpms|default([]) }}"
+        state: latest
+        update_cache: yes
+      when: ansible_os_family == "Suse"
+
+    ## JENKINS USER TASKS
+    - set_fact:
+        jenkins_groups:
+          - "{{ jenkins_user }}"
+          - libvirtd
+      when:
+        - ansible_os_family == "Debian"
+        - ansible_distribution_version == '16.04'
+        - libvirt|bool
+
+    # The group name changed to 'libvirt' in Ubuntu 16.10 and is already 'libvirt' everywhere else
+    - set_fact:
+        jenkins_groups:
+          - "{{ jenkins_user }}"
+          - libvirt
+      when:
+        - not (ansible_os_family == "Debian" and ansible_distribution_version == '16.04')
+        - libvirt|bool
+
+    - name: "Create a {{ jenkins_user }} group"
+      group:
+        name: "{{ jenkins_user }}"
+        state: present
+
+    - name: "Create a {{ jenkins_user }} user"
+      user:
+        name: "{{ jenkins_user }}"
+        # This will add to the jenkins_user and appropriate libvirt group if jenkins_groups is defined.
+        # Otherwise, default to just adding to {{ jenkins_user }} group.
+        groups: "{{ jenkins_groups|default(jenkins_user) }}"
+        state: present
+        comment: "Jenkins Build Slave User"
+
+    - name: "Add {{ jenkins_user }} to mock group"
+      user:
+        name: "{{ jenkins_user }}"
+        groups: mock
+        append: yes
+      when:
+        - ansible_os_family == "RedHat"
+        - ansible_distribution_major_version|int <= 8
+
+    - name: "Create a {{ jenkins_user }} home directory"
+      file:
+        path: "/home/{{ jenkins_user }}/"
+        state: directory
+        owner: "{{ jenkins_user }}"
+
+    - name: Create .ssh directory
+      file:
+        path: "/home/{{ jenkins_user }}/.ssh"
+        state: directory
+        owner: "{{ jenkins_user }}"
+
+    # On a mita/prado provisioned builder, everything gets put into a 'playbook' dir.
+    # Otherwise it can be found in files/ssh/...
+    - set_fact:
+        jenkins_key: "{{ lookup('first_found', key_locations) }}"
+      vars:
+        key_locations:
+          - "playbook/files/ssh/keys/jenkins_build.pub"
+          - "files/ssh/keys/jenkins_build.pub"
+
+    # And worst case scenario, we just pull the key from github.
+    - name: Set the authorized keys
+      authorized_key:
+        user: "{{ jenkins_user }}"
+        key: "{{ lookup('file', '{{ jenkins_key }}')|default('https://raw.githubusercontent.com/ceph/ceph-build/main/ansible/files/ssh/keys/jenkins_build.pub') }}"
+
+    - name: "Ensure {{ jenkins_user }} can sudo without a prompt"
+      lineinfile:
+        dest: /etc/sudoers
+        regexp: '^{{ jenkins_user }} ALL'
+        line: '{{ jenkins_user }}   ALL=(ALL:ALL) NOPASSWD:ALL'
+        validate: 'visudo -cf %s'
+      when: grant_sudo|bool
+
+    - name: Set utf-8 for LC_ALL
+      lineinfile:
+        dest: "/home/{{ jenkins_user }}/.bashrc"
+        regexp: '^export LC_ALL='
+        line: "export LC_ALL=en_US.UTF-8"
+        create: true
+        state: present
+
+    - name: Set utf-8 for LANG
+      lineinfile:
+        dest: "/home/{{ jenkins_user }}/.bashrc"
+        regexp: '^export LANG='
+        line: "export LANG=en_US.UTF-8"
+
+    - name: Set utf-8 for LANGUAGE
+      lineinfile:
+        dest: "/home/{{ jenkins_user }}/.bashrc"
+        regexp: '^export LANGUAGE='
+        line: "export LANGUAGE=en_US.UTF-8"
+
+    - name: Ensure the build dir exists
+      file:
+        path: "/home/{{ jenkins_user }}/build"
+        state: directory
+        owner: "{{ jenkins_user }}"
+
+    - name: Create .config/osc directory
+      file:
+        path: "/home/{{ jenkins_user }}/.config/osc"
+        state: directory
+        owner: "{{ jenkins_user }}"
+      when: ansible_os_family == "Suse"
+
+    - name: Add oscrc file
+      blockinfile:
+        create: yes
+        block: |
+          [general]
+          apiurl = https://api.opensuse.org
+          build-root = /home/{{ jenkins_user }}/osc/%(repo)s-%(arch)s
+          [https://api.opensuse.org]
+          user = {{ osc_user }}
+          pass = {{ osc_pass }}
+        path: "/home/{{ jenkins_user }}/.config/osc/oscrc"
+      become_user: "{{ jenkins_user }}"
+      when: ansible_os_family == "Suse"
+
+    - name: Ensure the home dir has the right owner permissions
+      file:
+        path: "/home/{{ jenkins_user }}"
+        state: directory
+        owner: "{{ jenkins_user }}"
+        group: "{{ jenkins_user }}"
+        recurse: yes
+        follow: no
+
+    ## DEBIAN GPG KEY TASKS
+    - name: Install Debian GPG Keys on Ubuntu
+      block:
+        - name: Add the Debian Buster Key
+          apt_key:
+           id: 3CBBABEE
+           url: https://ftp-master.debian.org/keys/archive-key-10.asc
+           keyring: /etc/apt/trusted.gpg
+           state: present
+      
+        - name: Add the Debian Security Buster Key
+          apt_key:
+            id: CAA96DFA
+            url: https://ftp-master.debian.org/keys/archive-key-10-security.asc
+            keyring: /etc/apt/trusted.gpg
+            state: present
+      
+        - name: Add the Debian Buster Stable Key
+          apt_key:
+            id: 77E11517
+            url: https://ftp-master.debian.org/keys/release-10.asc
+            keyring: /etc/apt/trusted.gpg
+            state: present
+      when: ansible_os_family == "Debian"
+
+    ## VAGRANT PLUGIN TASKS
+    - name: Install vagrant-libvirt plugin
+      block:
+        - name: Install the vagrant-libvirt plugin (without args)
+          shell: vagrant plugin install vagrant-libvirt --plugin-version 0.3.0
+          become_user: "{{ jenkins_user }}"
+          when: (ansible_os_family == "RedHat" and ansible_distribution_major_version|int <= 7) or
+                (ansible_os_family == "Debian" and ansible_distribution_major_version|int <= 18)
+
+        - name: Install packages needed to build krb5 from source (EL8)
+          dnf:
+            name: "{{ hackery_packages }}"
+            state: present
+          when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 8
+
+        - name: Build krb5 library from source (EL8)
+          shell: |
+            cd $(mktemp -d)
+            wget https://vault.centos.org/8.4.2105/BaseOS/Source/SPackages/krb5-1.18.2-8.el8.src.rpm
+            rpm2cpio krb5-1.18.2-8.el8.src.rpm | cpio -imdV
+            tar xf krb5-1.18.2.tar.gz; cd krb5-1.18.2/src
+            LDFLAGS='-L/opt/vagrant/embedded/' ./configure
+            make
+            sudo cp lib/libk5crypto.* /opt/vagrant/embedded/lib/
+            wget https://vault.centos.org/8.4.2105/BaseOS/Source/SPackages/libssh-0.9.4-2.el8.src.rpm
+            rpm2cpio libssh-0.9.4-2.el8.src.rpm | cpio -imdV
+            tar xf libssh-0.9.4.tar.xz
+            mkdir build
+            cd build
+            cmake ../libssh-0.9.4 -DOPENSSL_ROOT_DIR=/opt/vagrant/embedded/
+            make
+            cp lib/libssh* /opt/vagrant/embedded/lib64
+          when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 8
+
+        # https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1127#issuecomment-713651332
+        - name: Install the vagrant-libvirt plugin (EL8)
+          command: vagrant plugin install vagrant-libvirt --plugin-version 0.3.0
+          become_user: "{{ jenkins_user }}"
+          environment:
+            CONFIGURE_ARGS: 'with-ldflags=-L/opt/vagrant/embedded/lib with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib'
+            GEM_HOME: '~/.vagrant.d/gems'
+            GEM_PATH: '$GEM_HOME:/opt/vagrant/embedded/gems'
+          when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 8
+
+        - name: Install the vagrant-libvirt plugin (Suse)
+          command: vagrant plugin install vagrant-libvirt
+          become_user: "{{ jenkins_user }}"
+          environment:
+            CONFIGURE_ARGS: 'with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib64'
+          when: ansible_os_family == "Suse"
+
+        - name: Install the vagrant-libvirt plugin (Focal)
+          command: vagrant plugin install vagrant-libvirt
+          become_user: "{{ jenkins_user }}"
+          environment:
+            CONFIGURE_ARGS: 'with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib'
+          when: ansible_os_family == "Debian" and ansible_distribution_major_version|int >= 20
+      when: libvirt|bool
+
+    ## RPMMACROS TASKS
+    - name: rpmmacros Tasks
+      block:
+        - name: Ensure the rpmmacros file exists to fix centos builds
+          file:
+            path: "/home/{{ jenkins_user }}/.rpmmacros"
+            owner: "{{ jenkins_user }}"
+            state: touch
+    
+        - name: Write the rpmmacros needed in centos
+          lineinfile:
+            dest: "/home/{{ jenkins_user }}/.rpmmacros"
+            regexp: '^%dist'
+            line: '%dist .el{{ ansible_distribution_major_version }}'
+      when: ansible_os_family == "RedHat"
+
+    ## tmpwatch/tmpreaper TASKS
+    - name: tmpwatch/tmpreaper Tasks
+      block:
+        # In case we're running 'ansible-playbook --tags tmp'
+        - name: "Make sure {{ tmp_cleaner_name }} is installed"
+          package:
+            name: "{{ tmp_cleaner_name }}"
+            state: present
+
+        - name: Disable tmpreaper cron.daily timer
+          file:
+            path: /etc/cron.daily/tmpreaper
+            state: absent
+          when: ansible_os_family == "Debian"
+
+        - name: Create tmp cleaning cronjob
+          cron:
+            name: "Delete /tmp files that have not been accessed in 14 days"
+            special_time: daily
+            job: "{{ tmp_cleaner_name }} {{ tmp_cleaner_args }}"
+      when: permanent|bool
+      tags: tmp
+
+    ## GITCONFIG TASKS
+    - name: Ensure the gitconfig file exists
+      shell: printf "[user]\name=Ceph CI\nemail=ceph-release-team@redhat.com\n" > /home/{{ jenkins_user }}/.gitconfig
+      tags: github
+
+    - name: Ensure the gitconfig file has right permissions
+      file:
+        path: "/home/{{ jenkins_user }}/.gitconfig"
+        owner: "{{ jenkins_user }}"
+      tags: github
+
+    # On a mita/prado provisioned builder, everything gets put into a 'playbook' dir.
+    # If all else fails, get it from github (using the |default)
+    - set_fact:
+        github_key: "{{ lookup('first_found', key_locations) }}"
+      vars:
+        key_locations:
+          # github.com.pub is the output of `ssh-keyscan github.com`
+          - "playbook/files/ssh/hostkeys/github.com.pub"
+          - "files/ssh/hostkeys/github.com.pub"
+      tags: github
+
+    - name: Add github.com host key
+      known_hosts:
+        name: github.com
+        path: '/etc/ssh/ssh_known_hosts'
+        key: "{{ lookup('file', '{{ github_key }}')|default('https://raw.githubusercontent.com/ceph/ceph-build/main/ansible/files/ssh/hostkeys/github.com.pub') }}"
+      tags: github
+
+    ## PIP TASKS
+    - set_fact:
+        pip_version: pip
+        ansible_python_interpreter: /usr/bin/python
+      when: (ansible_os_family == "RedHat" and ansible_distribution_major_version|int <= 7) or
+            (ansible_os_family == "Debian" and ansible_distribution_major_version|int <= 16)
+      tags:
+        - register
+
+    - set_fact:
+        pip_version: pip3
+        ansible_python_interpreter: /usr/bin/python3
+      when: (ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 8) or
+            (ansible_os_family == "Debian" and ansible_distribution_major_version|int >= 18) or
+            ansible_os_family == "Suse"
+      tags:
+        - register
+
+    - name: Install six, latest one
+      pip:
+        name: six
+        state: latest
+        executable: "{{ pip_version }}"
+      when: ansible_os_family != "Suse"
+      tags:
+        - register
+
+    - name: Install python-jenkins
+      # https://review.openstack.org/460363
+      pip:
+        name: python-jenkins
+        version: 0.4.15
+        executable: "{{ pip_version }}"
+      tags:
+        - register
+
+    ## LIBVIRT SERVICE TASKS
+    - name: start libvirt services
+      service:
+        name: "{{ item }}"
+        state: restarted
+      with_items:
+        - libvirtd
+        - libvirt-guests
+      when: libvirt|bool
+
+    ## CONTAINER SERVICE TASKS
+    - name: Container Tasks
+      block:
+        - name: "Create {{ container_certs_path }}"
+          file:
+            path: "{{ container_certs_path }}"
+            state: directory
+
+        - name: "Copy {{ container_mirror }} self-signed cert"
+          copy:
+            dest: "{{ container_certs_path }}/docker-mirror.crt"
+            content: |
+              -----BEGIN CERTIFICATE-----
+              MIIGRTCCBC2gAwIBAgIUPCTsbv8FMCQdzmusdvXTdO8UaKMwDQYJKoZIhvcNAQEL
+              BQAwgbExCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJOQzEUMBIGA1UEBwwLTW9ycmlz
+              dmlsbGUxFjAUBgNVBAoMDVJlZCBIYXQsIEluYy4xDTALBgNVBAsMBENlcGgxKzAp
+              BgNVBAMMImRvY2tlci1taXJyb3IuZnJvbnQuc2VwaWEuY2VwaC5jb20xKzApBgkq
+              hkiG9w0BCQEWHGNlcGgtaW5mcmEtYWRtaW5zQHJlZGhhdC5jb20wHhcNMjAxMTEy
+              MDAwMjM1WhcNMjAxMjEyMDAwMjM1WjCBsTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM
+              Ak5DMRQwEgYDVQQHDAtNb3JyaXN2aWxsZTEWMBQGA1UECgwNUmVkIEhhdCwgSW5j
+              LjENMAsGA1UECwwEQ2VwaDErMCkGA1UEAwwiZG9ja2VyLW1pcnJvci5mcm9udC5z
+              ZXBpYS5jZXBoLmNvbTErMCkGCSqGSIb3DQEJARYcY2VwaC1pbmZyYS1hZG1pbnNA
+              cmVkaGF0LmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALUfPWaA
+              Gyuu+McgrPmPBafco3NjOQ2Na8rfLA5X0pz1tTfWgmtwuzhgKR674Nh6yz1WKXmS
+              ic5416dSx6r8NnBXkPSVLP3HlejPki1ohrqm9M1rXdPqvdmzV5TcRvmmLljo1IjI
+              Glwhv+XjJlKPLOUmi4Yk8cmgwVThc9OGC67sve2oDY0+JufFdiMPB5OLi13t9vPz
+              lixFzHXsss4KgD95Ou2PVLQpPCJ4Bxyar5BR0sb4+b2J0b3V3sxg/bvuOdlUuxAy
+              yCogtCTVXCBsERJ3wVI28MsibfBy+tLbNMbIJTZC+LblFOKfxbNiLGNv6z2NQ12h
+              S9C3YCxmgs8b3h9dkQtTj0/7/kpOppLPTvU9v/MOt177biTlbw8QQAjYyZYdXkZT
+              6LwdQmQQGCIQUUaMoeZgIplxEu7My1Gk3M2dfy/c36+r/olfbuTxPav2y9/wwjV2
+              2TrmbSTrAxZwFVvlb9wJCpW6jKh+Cl55XS4wFmEdgf5OJC8W2Rsa69pUmFnro+2z
+              d6zXlDXj5lxdqwSu6FF/PkImToUJ2J9hvotejIdRIJ/TfowwVygqC9k3wgRDYRut
+              q/tmorElTMDmwt1sATuvK81WkTZ28d3hcg5Xu9o1qwCQnKRHUeOOyP4M6c0lSvLb
+              lkZsptmUHyslGBlc9MOd6kH4REZH9x2pga2nAgMBAAGjUzBRMB0GA1UdDgQWBBSk
+              4Vk1KYHJ4VmDAorKCtSx5RVD7TAfBgNVHSMEGDAWgBSk4Vk1KYHJ4VmDAorKCtSx
+              5RVD7TAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4ICAQBYaG8PFoE5
+              PSdIwjT2NRV0ARC+xkM/P8Vo4H2tYewSz/wGwdfjpz7NJD/os6Tiff6BWBaD75t0
+              2X2MLXeGT2vOJ05hoETCJ1PqHSSlBXkH8De925lGfz4lTeS0gz6qZuEWxeN0Utib
+              5Q3hq7OByS6I8L5kE6L9acFzKqbIOtJOWXXx9J4B7GEUoE+Jk5Vm6yfH4AeGhEbT
+              bQ8J5FbP+zk6iPkXGQdb/3aUBbOCn5OCSmERcTPyK9XzuyBz6wkFjZ9PAvbFLvOI
+              bD1KGIte1Np4jrM4ur924vjZTxm+wVKFDNS64J8t48yN2LUS2pV2zfwC6ACHypf4
+              WhsGpd1hNy+ZGt0dIrgRgKkttNx5VoVaLgzn3ozFz5BXbdHRCXV2BmY36QDzGQqw
+              2BdKeJ/7INdB9NkGSkJYTvkNAS9YixqATxNsaOMt35HRADUlPQoUqzxIEujJzYdz
+              LVpzeTMNDxASqDG1MRIjNDp6l2xgC+H5wVpm5wn4eGvf4A7GXr35Q1TNRzmHayiP
+              FBp0Epiy+oFS1Xd/WQvMHCQMT4HoKSGf5u0++DpU1E5vN29vrxIOZ4+a9a5kZA95
+              QnsemvTiYf3C1xktkYR9AmUqYqCDTp/5nfqbQibRO0Chpy5UnhAXujkL0ABeaSaz
+              MViiJ2AX7vk2E++MXkBhi4IMyz0Vw2lPhg==
+              -----END CERTIFICATE-----
+      when: ansible_os_family == "RedHat"
+
+    ## JENKINS BUILDER AGENT TASKS
+    # We use SSH for ephemeral builders
+    - name: Register ephemeral builder using SSH
+      jenkins_node:
+        username: "{{ api_user }}"
+        uri: "{{ api_uri }}"
+        password: "{{ token }}"
+        # relies on a convention to set a unique name that allows a reverse
+        # mapping from Jenkins back to whatever service created the current
+        # node
+        name: "{{ ansible_default_ipv4.address }}+{{ nodename }}"
+        labels: "{{ labels }}"
+        host: "{{ ansible_default_ipv4.address }}"
+        credentialsId: "{{ jenkins_credentials_uuid }}"
+        remoteFS: '/home/{{ jenkins_user }}/build'
+        executors: '{{ executors|default(1) }}'
+        exclusive: true
+      when: not permanent|bool
+      tags: register
+
+    - name: Register Permanent Builder
+      block:
+        - name: Register permenant builder using JNLP
+          jenkins_node:
+            username: "{{ api_user }}"
+            uri: "{{ api_uri }}"
+            password: "{{ token }}"
+            # relies on a convention to set a unique name that allows a reverse
+            # mapping from Jenkins back to whatever service created the current
+            # node
+            name: "{{ ansible_default_ipv4.address }}+{{ ansible_hostname }}"
+            labels: "{{ labels }}"
+            host: "{{ ansible_default_ipv4.address }}"
+            credentialsId: "{{ jenkins_credentials_uuid }}"
+            launcher: 'hudson.slaves.JNLPLauncher'
+            remoteFS: '/home/{{ jenkins_user }}/build'
+            executors: '{{ executors|default(1) }}'
+            exclusive: true
+
+        - name: Download agent.jar
+          get_url:
+            url: "{{ api_uri }}/jnlpJars/agent.jar"
+            dest: "/home/{{ jenkins_user }}/agent.jar"
+            force: yes
+          register: jar_changed
+
+        - name: Install the systemd unit files for jenkins
+          template:
+            src: "templates/systemd/jenkins.{{ item }}.j2"
+            dest: "/etc/systemd/system/jenkins.{{ item }}"
+          with_items:
+            - service
+            - secret
+          register: unit_files_changed
+
+        - name: Reload systemd unit files (to pick up potential changes)
+          systemd:
+            daemon_reload: yes
+
+        - name: Start jenkins service
+          service:
+            name: jenkins
+            state: started
+            enabled: yes
+
+        - name: REstart jenkins service (if necessary)
+          service:
+            name: jenkins
+            state: restarted
+            enabled: yes
+          when: jar_changed is changed or unit_files_changed is changed
+      when: permanent|bool
+      tags: register
diff --git a/ansible/examples/controller.yml b/ansible/examples/controller.yml
new file mode 100644 (file)
index 0000000..773eefd
--- /dev/null
@@ -0,0 +1,140 @@
+---
+
+- hosts: jenkins_controller
+  user: cm
+  become: true
+  roles:
+    - ansible-jenkins
+  vars:
+    - nginx_processor_count: 20
+    - nginx_connections: 2048
+    - ansible_ssh_port: 2222
+    - plugins:
+      - 'ace-editor'
+      - 'additional-metrics'
+      - 'ant'
+      - 'antisamy-markup-formatter'
+      - 'apache-httpcomponents-client-4-api'
+      - 'applitools-eyes'
+      - 'authentication-tokens'
+      - 'bouncycastle-api'
+      - 'branch-api'
+      - 'build-failure-analyzer'
+      - 'build-history-metrics-plugin'
+      - 'build-monitor-plugin'
+      - 'build-user-vars-plugin'
+      - 'built-on-column'
+      - 'cloudbees-folder'
+      - 'cobertura'
+      - 'code-coverage-api'
+      - 'command-launcher'
+      - 'compress-artifacts'
+      - 'conditional-buildstep'
+      - 'configuration-as-code'
+      - 'copyartifact'
+      - 'credentials'
+      - 'credentials-binding'
+      - 'cvs'
+      - 'dashboard-view'
+      - 'description-setter'
+      - 'display-url-api'
+      - 'docker-commons'
+      - 'docker-workflow'
+      - 'durable-task'
+      - 'dynamic-axis'
+      - 'envinject'
+      - 'envinject-api'
+      - 'external-monitor-job'
+      - 'ghprb'
+      - 'git'
+      - 'git-client'
+      - 'github'
+      - 'github-api'
+      - 'github-branch-source'
+      - 'github-oauth'
+      - 'github-organization-folder'
+      - 'git-server'
+      - 'global-build-stats'
+      - 'handlebars'
+      - 'htmlpublisher'
+      - 'icon-shim'
+      - 'jackson2-api'
+      - 'javadoc'
+      - 'jdk-tool'
+      - 'jenkins-multijob-plugin'
+      - 'jquery-detached'
+      - 'jsch'
+      - 'junit'
+      - 'ldap'
+      - 'lockable-resources'
+      - 'mailer'
+      - 'mapdb-api'
+      - 'mask-passwords'
+      - 'matrix-auth'
+      - 'matrix-project'
+      - 'maven-plugin'
+      - 'momentjs'
+      - 'multiple-scms'
+      - 'naginator'
+      - 'nested-view'
+      - 'pam-auth'
+      - 'parameterized-trigger'
+      - 'pipeline-build-step'
+      - 'pipeline-github-lib'
+      - 'pipeline-graph-analysis'
+      - 'pipeline-input-step'
+      - 'pipeline-milestone-step'
+      - 'pipeline-model-api'
+      - 'pipeline-model-declarative-agent'
+      - 'pipeline-model-definition'
+      - 'pipeline-model-extensions'
+      - 'pipeline-rest-api'
+      - 'pipeline-stage-step'
+      - 'pipeline-stage-tags-metadata'
+      - 'pipeline-stage-view'
+      - 'plain-credentials'
+      - 'postbuildscript'
+      - 'preSCMbuildstep'
+      - 'publish-over'
+      - 'publish-over-ssh'
+      - 'rebuild'
+      - 'resource-disposer'
+      - 'run-condition'
+      - 'scm-api'
+      - 'script-security'
+      - 'short-workspace-path'
+      - 'ssh-agent'
+      - 'ssh-credentials'
+      - 'ssh-slaves'
+      - 'structs'
+      - 'subversion'
+      - 'token-macro'
+      - 'translation'
+      - 'trilead-api'
+      - 'urltrigger'
+      - 'windows-slaves'
+      - 'workflow-aggregator'
+      - 'workflow-api'
+      - 'workflow-basic-steps'
+      - 'workflow-cps'
+      - 'workflow-cps-global-lib'
+      - 'workflow-durable-task-step'
+      - 'workflow-job'
+      - 'workflow-multibranch'
+      - 'workflow-scm-step'
+      - 'workflow-step-api'
+      - 'workflow-support'
+      - 'ws-cleanup'
+
+    - jenkins_port: 8080
+    - prefix: '/build'
+    - xmx: 8192
+    # Email support
+    #- email:
+    #  smtp_host: 'mail.example.com'
+    #  smtp_ssl: 'true'
+    #  default_email_suffix: '@example.com'
+  vars_prompt:
+  - name: "okay_with_restart"
+    prompt: "\nWARNING: Some tasks like updating/installing plugins will restart Jenkins.\nAre you okay with restarting the Jenkins service? (y|n)"
+    default: "n"
diff --git a/ansible/examples/master.yml b/ansible/examples/master.yml
deleted file mode 100644 (file)
index 707439f..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
----
-
-- hosts: jenkins_master
-  user: cm
-  become: true
-  roles:
-    - ansible-jenkins
-  vars:
-    - nginx_processor_count: 20
-    - nginx_connections: 2048
-    - ansible_ssh_port: 2222
-    - plugins:
-      - 'ace-editor'
-      - 'additional-metrics'
-      - 'ant'
-      - 'antisamy-markup-formatter'
-      - 'apache-httpcomponents-client-4-api'
-      - 'applitools-eyes'
-      - 'authentication-tokens'
-      - 'bouncycastle-api'
-      - 'branch-api'
-      - 'build-failure-analyzer'
-      - 'build-history-metrics-plugin'
-      - 'build-monitor-plugin'
-      - 'build-user-vars-plugin'
-      - 'built-on-column'
-      - 'cloudbees-folder'
-      - 'cobertura'
-      - 'code-coverage-api'
-      - 'command-launcher'
-      - 'compress-artifacts'
-      - 'conditional-buildstep'
-      - 'configuration-as-code'
-      - 'copyartifact'
-      - 'credentials'
-      - 'credentials-binding'
-      - 'cvs'
-      - 'dashboard-view'
-      - 'description-setter'
-      - 'display-url-api'
-      - 'docker-commons'
-      - 'docker-workflow'
-      - 'durable-task'
-      - 'dynamic-axis'
-      - 'envinject'
-      - 'envinject-api'
-      - 'external-monitor-job'
-      - 'ghprb'
-      - 'git'
-      - 'git-client'
-      - 'github'
-      - 'github-api'
-      - 'github-branch-source'
-      - 'github-oauth'
-      - 'github-organization-folder'
-      - 'git-server'
-      - 'global-build-stats'
-      - 'handlebars'
-      - 'htmlpublisher'
-      - 'icon-shim'
-      - 'jackson2-api'
-      - 'javadoc'
-      - 'jdk-tool'
-      - 'jenkins-multijob-plugin'
-      - 'jquery-detached'
-      - 'jsch'
-      - 'junit'
-      - 'ldap'
-      - 'lockable-resources'
-      - 'mailer'
-      - 'mapdb-api'
-      - 'mask-passwords'
-      - 'matrix-auth'
-      - 'matrix-project'
-      - 'maven-plugin'
-      - 'momentjs'
-      - 'multiple-scms'
-      - 'naginator'
-      - 'nested-view'
-      - 'pam-auth'
-      - 'parameterized-trigger'
-      - 'pipeline-build-step'
-      - 'pipeline-github-lib'
-      - 'pipeline-graph-analysis'
-      - 'pipeline-input-step'
-      - 'pipeline-milestone-step'
-      - 'pipeline-model-api'
-      - 'pipeline-model-declarative-agent'
-      - 'pipeline-model-definition'
-      - 'pipeline-model-extensions'
-      - 'pipeline-rest-api'
-      - 'pipeline-stage-step'
-      - 'pipeline-stage-tags-metadata'
-      - 'pipeline-stage-view'
-      - 'plain-credentials'
-      - 'postbuildscript'
-      - 'preSCMbuildstep'
-      - 'publish-over'
-      - 'publish-over-ssh'
-      - 'rebuild'
-      - 'resource-disposer'
-      - 'run-condition'
-      - 'scm-api'
-      - 'script-security'
-      - 'short-workspace-path'
-      - 'ssh-agent'
-      - 'ssh-credentials'
-      - 'ssh-slaves'
-      - 'structs'
-      - 'subversion'
-      - 'token-macro'
-      - 'translation'
-      - 'trilead-api'
-      - 'urltrigger'
-      - 'windows-slaves'
-      - 'workflow-aggregator'
-      - 'workflow-api'
-      - 'workflow-basic-steps'
-      - 'workflow-cps'
-      - 'workflow-cps-global-lib'
-      - 'workflow-durable-task-step'
-      - 'workflow-job'
-      - 'workflow-multibranch'
-      - 'workflow-scm-step'
-      - 'workflow-step-api'
-      - 'workflow-support'
-      - 'ws-cleanup'
-
-    - jenkins_port: 8080
-    - prefix: '/build'
-    - xmx: 8192
-    # Email support
-    #- email:
-    #  smtp_host: 'mail.example.com'
-    #  smtp_ssl: 'true'
-    #  default_email_suffix: '@example.com'
-  vars_prompt:
-  - name: "okay_with_restart"
-    prompt: "\nWARNING: Some tasks like updating/installing plugins will restart Jenkins.\nAre you okay with restarting the Jenkins service? (y|n)"
-    default: "n"
diff --git a/ansible/examples/slave.yml b/ansible/examples/slave.yml
deleted file mode 100644 (file)
index 361b1db..0000000
+++ /dev/null
@@ -1,932 +0,0 @@
----
-## Instead of trying to keep 4 separate playbooks up to date, let's do it all here.
-## The only difference from using multiple playbooks is we need to specify `-e libvirt=true` and/or `-e permanent=true` if the slave will be permanent/static.
-## Tested on: CentOS 7, CentOS 8, Xenial, Bionic, Focal, Leap 15.1 using ansible 2.8.5
-##
-## Example:
-## ansible-playbook -vvv -M ./library/ slave.yml -e '{"labels": "x86_64 xenial etc", "token": "XXXXX", "jenkins_credentials_uuid": "jenkins-build", "api_uri": "https://jenkins.ceph.com"}' -e permanent=true -e ansible_ssh_user=ubuntu --limit braggi01*
-
-- hosts: all
-  become: true
-  user: ubuntu # This should be overridden on the CLI (e.g., -e user=centos).  It doesn't matter on a mita/prado slave because the playbook is run locally by root.
-  vars:
-    - libvirt: false # Should vagrant be installed?
-    - permanent: false # Is this a permanent slave?  Since the ephemeral (non-permanent) tasks get run more often, we'll default to false.
-    - jenkins_user: 'jenkins-build'
-    #- jenkins_key: This gets defined below now.
-    # jenkins API credentials:
-    - api_user: 'ceph-jenkins'
-    - token: '{{ token }}'
-    - api_uri: 'https://jenkins.ceph.com'
-    - jenkins_credentials_uuid: 'jenkins-build'
-    - nodename: '{{ nodename }}'
-    - labels: '{{ labels }}'
-    - grant_sudo: true
-    - osc_user: 'username'
-    - osc_pass: 'password'
-    - container_mirror: 'docker-mirror.front.sepia.ceph.com:5000'
-
-  tasks:
-    ## DEFINE PACKAGE LISTS BELOW
-    # Universal DEBs
-    - set_fact:
-        universal_debs:
-          - git
-          - fakeroot
-          - debhelper
-          - reprepro
-          - devscripts
-          - pbuilder
-          - pkg-config
-          - libtool
-          - autotools-dev
-          - automake
-          - libssl-dev
-          - libffi-dev
-          - default-jdk
-          - default-jre
-          - debian-keyring
-          - debian-archive-keyring
-          - software-properties-common
-          # jenkins-job-builder job:
-          - libyaml-dev
-          - jq
-          # ceph-docs job:
-          - doxygen
-          - ditaa
-          - ant
-          - tmpreaper
-        tmp_cleaner_name: tmpreaper
-        tmp_cleaner_args: "--runtime=0 14d /tmp/"
-      when: ansible_os_family == "Debian"
-      tags: always
-
-    # Libvirt DEBs (Bionic and older)
-    - set_fact:
-        libvirt_debs:
-          - qemu-kvm
-          - libvirt-bin
-          - libvirt-dev
-          - vagrant
-      when:
-        - ansible_os_family == "Debian"
-        - ansible_distribution_major_version|int <= 18
-        - libvirt|bool
-      tags: always
-
-    # Libvirt DEBs (Focal and newer)
-    - set_fact:
-        libvirt_debs:
-          - qemu-kvm
-          - libvirt-daemon-system
-          - libvirt-clients
-          - libvirt-dev
-          - vagrant
-      when:
-        - ansible_os_family == "Debian"
-        - ansible_distribution_major_version|int >= 20
-        - libvirt|bool
-      tags: always
-
-    # python2 DEBs
-    - set_fact:
-        python2_debs:
-          - python
-          - python-dev
-          - python-pip
-          - python-virtualenv
-      when:
-        - ansible_os_family == "Debian"
-        - ansible_distribution_major_version|int <= 18
-      tags: always
-
-    # python3 DEBs (We only install python2 *and* python3 on Bionic)
-    - set_fact:
-        python3_debs:
-          - python3
-          - python3-dev
-          - python3-pip
-          - python3-venv
-          - python3-virtualenv
-      when:
-        - ansible_os_family == "Debian"
-        - ansible_distribution_major_version|int >= 18
-      tags: always
-
-    # chroot DEBs (Xenial and older)
-    - set_fact:
-        chroot_deb: dchroot
-      when:
-        - ansible_os_family == "Debian"
-        - ansible_distribution_major_version|int <= 16
-      tags: always
-
-    # chroot DEBs (Bionic and newer)
-    - set_fact:
-        chroot_deb: schroot
-      when:
-        - ansible_os_family == "Debian"
-        - ansible_distribution_major_version|int >= 18
-      tags: always
-
-    # Universal RPMs
-    - set_fact:
-        universal_rpms:
-          - createrepo
-          - java-1.8.0-openjdk
-          - git
-          - libtool
-          #- rpm-sign
-          - autoconf
-          - automake
-          - cmake
-          - binutils
-          - bison
-          - flex
-          - gcc
-          - gcc-c++
-          - gettext
-          - libtool
-          - make
-          - patch
-          - pkgconfig
-          - redhat-rpm-config
-          - rpm-build
-          - rpmdevtools
-          - openssl-devel
-          - libffi-devel
-          - tmpwatch
-        tmp_cleaner_name: tmpwatch
-        tmp_cleaner_args: "14d /tmp/"
-      when: ansible_os_family == "RedHat"
-      tags: always
-
-    # Libvirt RPMs
-    - set_fact:
-        libvirt_rpms:
-          - qemu-kvm
-          - libvirt-devel
-          - libguestfs
-          - libvirt
-          - libguestfs-tools
-          - vagrant
-      when:
-        - ansible_os_family == "RedHat"
-        - libvirt|bool
-      tags: always
-
-    # EL7 RPMs
-    - set_fact:
-        epel_rpms:
-          - jq
-          - python-pip
-          - python-devel
-          - python-virtualenv
-          - mock
-          - docker
-        container_service_name: docker
-        container_certs_path: "/etc/docker/certs.d/{{ container_mirror }}"
-      when:
-        - ansible_os_family == "RedHat"
-        - ansible_distribution_major_version|int <= 7
-      tags: always
-
-    # EL8 RPMs
-    - set_fact:
-        epel_rpms:
-          - jq
-          - python3-pip
-          - python3-devel
-          - python3-virtualenv
-          - mock
-          - podman
-        container_service_name: podman
-        container_certs_path: "/etc/containers/certs.d/{{ container_mirror }}"
-        hackery_packages:
-          - gcc
-          - libguestfs-tools-c
-          - libvirt
-          - libvirt-devel
-          - libxml2-devel
-          - libxslt-devel
-          - make
-          - ruby-devel
-      when:
-        - ansible_os_family == "RedHat"
-        - ansible_distribution_major_version|int == 8
-      tags: always
-
-    # EL9 RPMs
-    - set_fact:
-        epel_rpms:
-          - jq
-          - python3-pip
-          - python3-devel
-          - podman
-        container_service_name: podman
-        container_certs_path: "/etc/containers/certs.d/{{ container_mirror }}"
-        hackery_packages:
-          - gcc
-          - libguestfs-tools-c
-          - libvirt
-          - libvirt-devel
-          - libxml2-devel
-          - libxslt-devel
-          - make
-          - ruby-devel
-      when:
-        - ansible_os_family == "RedHat"
-        - ansible_distribution_major_version|int == 9
-      tags: always
-
-    # This package removed in EL9
-    # This has to be a "list" otherwise it gets rendered as an empty string and the yum ansible module doesn't like that.
-    - set_fact:
-        lsb_package:
-          - redhat-lsb-core
-      when:
-        - ansible_os_family == "RedHat"
-        - ansible_distribution_major_version|int <= 8
-      tags: always
-
-    # OpenSUSE RPMs
-    - set_fact:
-        zypper_rpms:
-          - autoconf
-          - automake
-          - binutils
-          - bison
-          - cmake
-          - ccache
-          - createrepo
-          - flex
-          - gcc
-          - gcc-c++
-          - gettext-runtime
-          - git
-          - java-1_8_0-openjdk
-          - jq
-          - libffi-devel
-          - libopenssl-devel
-          - libtool
-          - lsb-release
-          - make
-          - patch
-          - pkg-config
-          - python2-pip
-          - python2-virtualenv
-          - python3-pip
-          - python3-virtualenv
-          - rpm-build
-          - rpmdevtools
-          - tig
-          - wget 
-          # obs requirements
-          - osc
-          - build
-        tmp_cleaner_name: tmpwatch
-        tmp_cleaner_args: "14d /tmp/"
-      when: ansible_os_family == "Suse"
-      tags: always
-
-    # OpenSUSE Libvirt RPMs (We've never tried this to date so more might be needed)
-    - set_fact:
-        zypper_libvirt_rpms:
-          - libvirt
-          - libvirt-devel
-          - qemu
-          - kvm
-          - vagrant
-          - ruby-devel
-      when:
-        - ansible_os_family == "Suse"
-        - libvirt|bool
-      tags: always
-
-    ## Let's make sure we don't accidentally set up a permanent slave from Sepia as ephemeral
-    - set_fact:
-        permanent: true
-      with_items: "{{ ansible_all_ipv4_addresses }}"
-      when: "item.startswith('172.21.')"
-      tags: always
-
-    ## Let's make sure nodename gets set using our Sepia hostnames if the builder's in Sepia
-    - set_fact:
-        nodename: "{{ ansible_hostname }}"
-      with_items: "{{ ansible_all_ipv4_addresses }}"
-      when: "item.startswith('172.21.')"
-      tags: always
-
-    ## EPHEMERAL SLAVE TASKS
-    # We would occasionally have issues with name resolution on the Ephemeral slaves
-    # so we force them to use Google's DNS servers. This has to be done before
-    # package-related tasks to avoid communication errors with various repos.
-    - name: Ephemeral Slave Tasks
-      block:
-        - name: Uninstall resolvconf on Ubuntu to manually manage resolv.conf
-          apt:
-            name: resolvconf
-            state: absent
-          when: ansible_os_family == "Debian"
-    
-        - name: Check for NetworkManager conf
-          stat:
-            path: /etc/NetworkManager/NetworkManager.conf
-          register: nm_conf
-    
-        - name: Tell NetworkManager to leave resolv.conf alone on CentOS
-          lineinfile:
-            dest: /etc/NetworkManager/NetworkManager.conf
-            regexp: '^dns='
-            line: 'dns=none'
-            state: present
-          when: ansible_os_family == "RedHat" and nm_conf.stat.exists
-    
-        - name: Tell dhclient to leave resolv.conf alone on Ubuntu
-          lineinfile:
-            dest: /etc/dhcp/dhclient.conf
-            regexp: 'prepend domain-name-servers'
-            line: 'supersede domain-name-servers 8.8.8.8;'
-            state: present
-          when: ansible_os_family == "Debian"
-    
-        - name: Use Google DNS for name resolution
-          lineinfile:
-            dest: /etc/resolv.conf
-            regexp: '^nameserver'
-            line: 'nameserver 8.8.8.8'
-            state: present
-
-        - name: Set Hostname with hostname command
-          hostname:
-            name: "ceph-builders"
-          when: ansible_os_family != "Suse"
-    
-        # https://github.com/ansible/ansible/issues/42726
-        - name: Set Hostname on OpenSUSE Leap
-          command: 'hostname ceph-builders'
-          when: ansible_os_family == "Suse"
-    
-        - name: Ensure that 127.0.1.1 is present with an actual hostname
-          lineinfile:
-            backup: yes
-            dest: /etc/hosts
-            line: '127.0.1.1 ceph-builders'
-    
-        - name: Update etc cloud templates for debian /etc/hosts
-          lineinfile:
-            backup: yes
-            dest: /etc/cloud/templates/hosts.debian.tmpl
-            line: '127.0.1.1 ceph-builders'
-          when: ansible_os_family  == "Debian"
-    
-        - name: Update /etc/cloud templates for Red Hat /etc/hosts
-          lineinfile:
-            backup: yes
-            dest: /etc/cloud/templates/hosts.redhat.tmpl
-            line: '127.0.1.1 ceph-builders'
-          failed_when: false
-          when: ansible_os_family == "RedHat"
-    
-        - name: Update /etc/cloud templates for Suse /etc/hosts
-          lineinfile:
-            backup: yes
-            dest: /etc/cloud/templates/hosts.suse.tmpl
-            line: '127.0.1.1 ceph-builders'
-          failed_when: false
-          when: ansible_os_family == "Suse"
-
-        - name: Stop and disable daily apt activities
-          command: "{{ item }}"
-          with_items:
-            - systemctl stop apt-daily.timer
-            - systemctl disable apt-daily.timer
-            - systemctl disable apt-daily.service
-            - systemctl daemon-reload
-          when: ansible_os_family == "Debian"
-          # Just in case.  This isn't a super important task and might not even be required.
-          ignore_errors: true
-      when: not permanent|bool
-
-    ## VAGRANT REPO TASKS (for libvirt slaves)
-    # vagrant doesn't have repositories, this chacra repo will be better to have
-    # around and can get updates as soon as a new vagrant version is published via
-    # chacractl
-    - name: Vagrant/Libvirt Repo Tasks
-      block:
-        - name: Add our vagrant DEB repository
-          apt_repository:
-            repo: "deb [trusted=yes] https://chacra.ceph.com/r/vagrant/latest/HEAD/ubuntu/{{ ansible_distribution_release }}/flavors/default/ {{ ansible_distribution_release }} main"
-            state: present
-          when: ansible_os_family == "Debian"
-
-        - name: Add our vagrant RPM repository
-          yum_repository:
-            name: vagrant
-            description: self-hosted vagrant repo
-            # Although this is a 'CentOS7' repo, the vagrant RPM is OS-version agnostic
-            baseurl: "https://chacra.ceph.com/r/vagrant/latest/HEAD/centos/7/flavors/default/x86_64/"
-            enabled: yes
-            gpgcheck: no
-          when: ansible_os_family == "RedHat"
-      when: libvirt|bool
-
-    ## PACKAGE INSTALLATION TASKS
-    # We do this in one big task to save time and avoid using `with` loops.  If a variable isn't defined, it's fine because of the |defaults.
-    - name: Install DEBs
-      apt:
-        name: "{{ universal_debs + libvirt_debs|default([]) + python2_debs|default([]) + python3_debs|default([]) + [ chroot_deb|default('') ] }}"
-        state: latest
-        update_cache: yes
-      when: ansible_os_family == "Debian"
-
-    # Sometimes, slaves would connect to Jenkins and try to run an apt transaction right away.  Except apt-daily/unattended-upgrades has the dpkg lock so the Jenkins job would fail.
-    - name: Uninstall unattended-upgrades
-      package:
-        name: unattended-upgrades
-        state: absent
-      when: ansible_os_family == "Debian"
-
-    - name: Install EPEL repo
-      yum:
-        name: epel-release
-        state: latest
-      when:
-        - ansible_os_family == "RedHat"
-        - ansible_distribution_major_version|int <= 8
-
-    - name: Install RPMs without EPEL
-      yum:
-        name: "{{ universal_rpms + libvirt_rpms|default([]) + lsb_package|default([]) }}"
-        state: present
-        disablerepo: epel
-      when: ansible_os_family == "RedHat"
-
-    - name: Install RPMs with EPEL
-      yum:
-        name: "{{ epel_rpms|default([]) }}"
-        state: latest
-        enablerepo: epel
-      when: ansible_os_family == "RedHat"
-
-    - name: Install Suse RPMs
-      zypper:
-        name: "{{ zypper_rpms + zypper_libvirt_rpms|default([]) }}"
-        state: latest
-        update_cache: yes
-      when: ansible_os_family == "Suse"
-
-    ## JENKINS USER TASKS
-    - set_fact:
-        jenkins_groups:
-          - "{{ jenkins_user }}"
-          - libvirtd
-      when:
-        - ansible_os_family == "Debian"
-        - ansible_distribution_version == '16.04'
-        - libvirt|bool
-
-    # The group name changed to 'libvirt' in Ubuntu 16.10 and is already 'libvirt' everywhere else
-    - set_fact:
-        jenkins_groups:
-          - "{{ jenkins_user }}"
-          - libvirt
-      when:
-        - not (ansible_os_family == "Debian" and ansible_distribution_version == '16.04')
-        - libvirt|bool
-
-    - name: "Create a {{ jenkins_user }} group"
-      group:
-        name: "{{ jenkins_user }}"
-        state: present
-
-    - name: "Create a {{ jenkins_user }} user"
-      user:
-        name: "{{ jenkins_user }}"
-        # This will add to the jenkins_user and appropriate libvirt group if jenkins_groups is defined.
-        # Otherwise, default to just adding to {{ jenkins_user }} group.
-        groups: "{{ jenkins_groups|default(jenkins_user) }}"
-        state: present
-        comment: "Jenkins Build Slave User"
-
-    - name: "Add {{ jenkins_user }} to mock group"
-      user:
-        name: "{{ jenkins_user }}"
-        groups: mock
-        append: yes
-      when:
-        - ansible_os_family == "RedHat"
-        - ansible_distribution_major_version|int <= 8
-
-    - name: "Create a {{ jenkins_user }} home directory"
-      file:
-        path: "/home/{{ jenkins_user }}/"
-        state: directory
-        owner: "{{ jenkins_user }}"
-
-    - name: Create .ssh directory
-      file:
-        path: "/home/{{ jenkins_user }}/.ssh"
-        state: directory
-        owner: "{{ jenkins_user }}"
-
-    # On a mita/prado provisioned slave, everything gets put into a 'playbook' dir.
-    # Otherwise it can be found in files/ssh/...
-    - set_fact:
-        jenkins_key: "{{ lookup('first_found', key_locations) }}"
-      vars:
-        key_locations:
-          - "playbook/files/ssh/keys/jenkins_build.pub"
-          - "files/ssh/keys/jenkins_build.pub"
-
-    # And worst case scenario, we just pull the key from github.
-    - name: Set the authorized keys
-      authorized_key:
-        user: "{{ jenkins_user }}"
-        key: "{{ lookup('file', '{{ jenkins_key }}')|default('https://raw.githubusercontent.com/ceph/ceph-build/master/ansible/files/ssh/keys/jenkins_build.pub') }}"
-
-    - name: "Ensure {{ jenkins_user }} can sudo without a prompt"
-      lineinfile:
-        dest: /etc/sudoers
-        regexp: '^{{ jenkins_user }} ALL'
-        line: '{{ jenkins_user }}   ALL=(ALL:ALL) NOPASSWD:ALL'
-        validate: 'visudo -cf %s'
-      when: grant_sudo|bool
-
-    - name: Set utf-8 for LC_ALL
-      lineinfile:
-        dest: "/home/{{ jenkins_user }}/.bashrc"
-        regexp: '^export LC_ALL='
-        line: "export LC_ALL=en_US.UTF-8"
-        create: true
-        state: present
-
-    - name: Set utf-8 for LANG
-      lineinfile:
-        dest: "/home/{{ jenkins_user }}/.bashrc"
-        regexp: '^export LANG='
-        line: "export LANG=en_US.UTF-8"
-
-    - name: Set utf-8 for LANGUAGE
-      lineinfile:
-        dest: "/home/{{ jenkins_user }}/.bashrc"
-        regexp: '^export LANGUAGE='
-        line: "export LANGUAGE=en_US.UTF-8"
-
-    - name: Ensure the build dir exists
-      file:
-        path: "/home/{{ jenkins_user }}/build"
-        state: directory
-        owner: "{{ jenkins_user }}"
-
-    - name: Create .config/osc directory
-      file:
-        path: "/home/{{ jenkins_user }}/.config/osc"
-        state: directory
-        owner: "{{ jenkins_user }}"
-      when: ansible_os_family == "Suse"
-
-    - name: Add oscrc file
-      blockinfile:
-        create: yes
-        block: |
-          [general]
-          apiurl = https://api.opensuse.org
-          build-root = /home/{{ jenkins_user }}/osc/%(repo)s-%(arch)s
-          [https://api.opensuse.org]
-          user = {{ osc_user }}
-          pass = {{ osc_pass }}
-        path: "/home/{{ jenkins_user }}/.config/osc/oscrc"
-      become_user: "{{ jenkins_user }}"
-      when: ansible_os_family == "Suse"
-
-    - name: Ensure the home dir has the right owner permissions
-      file:
-        path: "/home/{{ jenkins_user }}"
-        state: directory
-        owner: "{{ jenkins_user }}"
-        group: "{{ jenkins_user }}"
-        recurse: yes
-        follow: no
-
-    ## DEBIAN GPG KEY TASKS
-    - name: Install Debian GPG Keys on Ubuntu
-      block:
-        - name: Add the Debian Buster Key
-          apt_key:
-           id: 3CBBABEE
-           url: https://ftp-master.debian.org/keys/archive-key-10.asc
-           keyring: /etc/apt/trusted.gpg
-           state: present
-      
-        - name: Add the Debian Security Buster Key
-          apt_key:
-            id: CAA96DFA
-            url: https://ftp-master.debian.org/keys/archive-key-10-security.asc
-            keyring: /etc/apt/trusted.gpg
-            state: present
-      
-        - name: Add the Debian Buster Stable Key
-          apt_key:
-            id: 77E11517
-            url: https://ftp-master.debian.org/keys/release-10.asc
-            keyring: /etc/apt/trusted.gpg
-            state: present
-      when: ansible_os_family == "Debian"
-
-    ## VAGRANT PLUGIN TASKS
-    - name: Install vagrant-libvirt plugin
-      block:
-        - name: Install the vagrant-libvirt plugin (without args)
-          shell: vagrant plugin install vagrant-libvirt --plugin-version 0.3.0
-          become_user: "{{ jenkins_user }}"
-          when: (ansible_os_family == "RedHat" and ansible_distribution_major_version|int <= 7) or
-                (ansible_os_family == "Debian" and ansible_distribution_major_version|int <= 18)
-
-        - name: Install packages needed to build krb5 from source (EL8)
-          dnf:
-            name: "{{ hackery_packages }}"
-            state: present
-          when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 8
-
-        - name: Build krb5 library from source (EL8)
-          shell: |
-            cd $(mktemp -d)
-            wget https://vault.centos.org/8.4.2105/BaseOS/Source/SPackages/krb5-1.18.2-8.el8.src.rpm
-            rpm2cpio krb5-1.18.2-8.el8.src.rpm | cpio -imdV
-            tar xf krb5-1.18.2.tar.gz; cd krb5-1.18.2/src
-            LDFLAGS='-L/opt/vagrant/embedded/' ./configure
-            make
-            sudo cp lib/libk5crypto.* /opt/vagrant/embedded/lib/
-            wget https://vault.centos.org/8.4.2105/BaseOS/Source/SPackages/libssh-0.9.4-2.el8.src.rpm
-            rpm2cpio libssh-0.9.4-2.el8.src.rpm | cpio -imdV
-            tar xf libssh-0.9.4.tar.xz
-            mkdir build
-            cd build
-            cmake ../libssh-0.9.4 -DOPENSSL_ROOT_DIR=/opt/vagrant/embedded/
-            make
-            cp lib/libssh* /opt/vagrant/embedded/lib64
-          when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 8
-
-        # https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1127#issuecomment-713651332
-        - name: Install the vagrant-libvirt plugin (EL8)
-          command: vagrant plugin install vagrant-libvirt --plugin-version 0.3.0
-          become_user: "{{ jenkins_user }}"
-          environment:
-            CONFIGURE_ARGS: 'with-ldflags=-L/opt/vagrant/embedded/lib with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib'
-            GEM_HOME: '~/.vagrant.d/gems'
-            GEM_PATH: '$GEM_HOME:/opt/vagrant/embedded/gems'
-          when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 8
-
-        - name: Install the vagrant-libvirt plugin (Suse)
-          command: vagrant plugin install vagrant-libvirt
-          become_user: "{{ jenkins_user }}"
-          environment:
-            CONFIGURE_ARGS: 'with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib64'
-          when: ansible_os_family == "Suse"
-
-        - name: Install the vagrant-libvirt plugin (Focal)
-          command: vagrant plugin install vagrant-libvirt
-          become_user: "{{ jenkins_user }}"
-          environment:
-            CONFIGURE_ARGS: 'with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib'
-          when: ansible_os_family == "Debian" and ansible_distribution_major_version|int >= 20
-      when: libvirt|bool
-
-    ## RPMMACROS TASKS
-    - name: rpmmacros Tasks
-      block:
-        - name: Ensure the rpmmacros file exists to fix centos builds
-          file:
-            path: "/home/{{ jenkins_user }}/.rpmmacros"
-            owner: "{{ jenkins_user }}"
-            state: touch
-    
-        - name: Write the rpmmacros needed in centos
-          lineinfile:
-            dest: "/home/{{ jenkins_user }}/.rpmmacros"
-            regexp: '^%dist'
-            line: '%dist .el{{ ansible_distribution_major_version }}'
-      when: ansible_os_family == "RedHat"
-
-    ## tmpwatch/tmpreaper TASKS
-    - name: tmpwatch/tmpreaper Tasks
-      block:
-        # In case we're running 'ansible-playbook --tags tmp'
-        - name: "Make sure {{ tmp_cleaner_name }} is installed"
-          package:
-            name: "{{ tmp_cleaner_name }}"
-            state: present
-
-        - name: Disable tmpreaper cron.daily timer
-          file:
-            path: /etc/cron.daily/tmpreaper
-            state: absent
-          when: ansible_os_family == "Debian"
-
-        - name: Create tmp cleaning cronjob
-          cron:
-            name: "Delete /tmp files that have not been accessed in 14 days"
-            special_time: daily
-            job: "{{ tmp_cleaner_name }} {{ tmp_cleaner_args }}"
-      when: permanent|bool
-      tags: tmp
-
-    ## GITCONFIG TASKS
-    - name: Ensure the gitconfig file exists
-      shell: printf "[user]\name=Ceph CI\nemail=ceph-release-team@redhat.com\n" > /home/{{ jenkins_user }}/.gitconfig
-      tags: github
-
-    - name: Ensure the gitconfig file has right permissions
-      file:
-        path: "/home/{{ jenkins_user }}/.gitconfig"
-        owner: "{{ jenkins_user }}"
-      tags: github
-
-    # On a mita/prado provisioned slave, everything gets put into a 'playbook' dir.
-    # If all else fails, get it from github (using the |default)
-    - set_fact:
-        github_key: "{{ lookup('first_found', key_locations) }}"
-      vars:
-        key_locations:
-          # github.com.pub is the output of `ssh-keyscan github.com`
-          - "playbook/files/ssh/hostkeys/github.com.pub"
-          - "files/ssh/hostkeys/github.com.pub"
-      tags: github
-
-    - name: Add github.com host key
-      known_hosts:
-        name: github.com
-        path: '/etc/ssh/ssh_known_hosts'
-        key: "{{ lookup('file', '{{ github_key }}')|default('https://raw.githubusercontent.com/ceph/ceph-build/master/ansible/files/ssh/hostkeys/github.com.pub') }}"
-      tags: github
-
-    ## PIP TASKS
-    - set_fact:
-        pip_version: pip
-        ansible_python_interpreter: /usr/bin/python
-      when: (ansible_os_family == "RedHat" and ansible_distribution_major_version|int <= 7) or
-            (ansible_os_family == "Debian" and ansible_distribution_major_version|int <= 16)
-      tags:
-        - register
-
-    - set_fact:
-        pip_version: pip3
-        ansible_python_interpreter: /usr/bin/python3
-      when: (ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 8) or
-            (ansible_os_family == "Debian" and ansible_distribution_major_version|int >= 18) or
-            ansible_os_family == "Suse"
-      tags:
-        - register
-
-    - name: Install six, latest one
-      pip:
-        name: six
-        state: latest
-        executable: "{{ pip_version }}"
-      when: ansible_os_family != "Suse"
-      tags:
-        - register
-
-    - name: Install python-jenkins
-      # https://review.openstack.org/460363
-      pip:
-        name: python-jenkins
-        version: 0.4.15
-        executable: "{{ pip_version }}"
-      tags:
-        - register
-
-    ## LIBVIRT SERVICE TASKS
-    - name: start libvirt services
-      service:
-        name: "{{ item }}"
-        state: restarted
-      with_items:
-        - libvirtd
-        - libvirt-guests
-      when: libvirt|bool
-
-    ## CONTAINER SERVICE TASKS
-    - name: Container Tasks
-      block:
-        - name: "Create {{ container_certs_path }}"
-          file:
-            path: "{{ container_certs_path }}"
-            state: directory
-
-        - name: "Copy {{ container_mirror }} self-signed cert"
-          copy:
-            dest: "{{ container_certs_path }}/docker-mirror.crt"
-            content: |
-              -----BEGIN CERTIFICATE-----
-              MIIGRTCCBC2gAwIBAgIUPCTsbv8FMCQdzmusdvXTdO8UaKMwDQYJKoZIhvcNAQEL
-              BQAwgbExCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJOQzEUMBIGA1UEBwwLTW9ycmlz
-              dmlsbGUxFjAUBgNVBAoMDVJlZCBIYXQsIEluYy4xDTALBgNVBAsMBENlcGgxKzAp
-              BgNVBAMMImRvY2tlci1taXJyb3IuZnJvbnQuc2VwaWEuY2VwaC5jb20xKzApBgkq
-              hkiG9w0BCQEWHGNlcGgtaW5mcmEtYWRtaW5zQHJlZGhhdC5jb20wHhcNMjAxMTEy
-              MDAwMjM1WhcNMjAxMjEyMDAwMjM1WjCBsTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM
-              Ak5DMRQwEgYDVQQHDAtNb3JyaXN2aWxsZTEWMBQGA1UECgwNUmVkIEhhdCwgSW5j
-              LjENMAsGA1UECwwEQ2VwaDErMCkGA1UEAwwiZG9ja2VyLW1pcnJvci5mcm9udC5z
-              ZXBpYS5jZXBoLmNvbTErMCkGCSqGSIb3DQEJARYcY2VwaC1pbmZyYS1hZG1pbnNA
-              cmVkaGF0LmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALUfPWaA
-              Gyuu+McgrPmPBafco3NjOQ2Na8rfLA5X0pz1tTfWgmtwuzhgKR674Nh6yz1WKXmS
-              ic5416dSx6r8NnBXkPSVLP3HlejPki1ohrqm9M1rXdPqvdmzV5TcRvmmLljo1IjI
-              Glwhv+XjJlKPLOUmi4Yk8cmgwVThc9OGC67sve2oDY0+JufFdiMPB5OLi13t9vPz
-              lixFzHXsss4KgD95Ou2PVLQpPCJ4Bxyar5BR0sb4+b2J0b3V3sxg/bvuOdlUuxAy
-              yCogtCTVXCBsERJ3wVI28MsibfBy+tLbNMbIJTZC+LblFOKfxbNiLGNv6z2NQ12h
-              S9C3YCxmgs8b3h9dkQtTj0/7/kpOppLPTvU9v/MOt177biTlbw8QQAjYyZYdXkZT
-              6LwdQmQQGCIQUUaMoeZgIplxEu7My1Gk3M2dfy/c36+r/olfbuTxPav2y9/wwjV2
-              2TrmbSTrAxZwFVvlb9wJCpW6jKh+Cl55XS4wFmEdgf5OJC8W2Rsa69pUmFnro+2z
-              d6zXlDXj5lxdqwSu6FF/PkImToUJ2J9hvotejIdRIJ/TfowwVygqC9k3wgRDYRut
-              q/tmorElTMDmwt1sATuvK81WkTZ28d3hcg5Xu9o1qwCQnKRHUeOOyP4M6c0lSvLb
-              lkZsptmUHyslGBlc9MOd6kH4REZH9x2pga2nAgMBAAGjUzBRMB0GA1UdDgQWBBSk
-              4Vk1KYHJ4VmDAorKCtSx5RVD7TAfBgNVHSMEGDAWgBSk4Vk1KYHJ4VmDAorKCtSx
-              5RVD7TAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4ICAQBYaG8PFoE5
-              PSdIwjT2NRV0ARC+xkM/P8Vo4H2tYewSz/wGwdfjpz7NJD/os6Tiff6BWBaD75t0
-              2X2MLXeGT2vOJ05hoETCJ1PqHSSlBXkH8De925lGfz4lTeS0gz6qZuEWxeN0Utib
-              5Q3hq7OByS6I8L5kE6L9acFzKqbIOtJOWXXx9J4B7GEUoE+Jk5Vm6yfH4AeGhEbT
-              bQ8J5FbP+zk6iPkXGQdb/3aUBbOCn5OCSmERcTPyK9XzuyBz6wkFjZ9PAvbFLvOI
-              bD1KGIte1Np4jrM4ur924vjZTxm+wVKFDNS64J8t48yN2LUS2pV2zfwC6ACHypf4
-              WhsGpd1hNy+ZGt0dIrgRgKkttNx5VoVaLgzn3ozFz5BXbdHRCXV2BmY36QDzGQqw
-              2BdKeJ/7INdB9NkGSkJYTvkNAS9YixqATxNsaOMt35HRADUlPQoUqzxIEujJzYdz
-              LVpzeTMNDxASqDG1MRIjNDp6l2xgC+H5wVpm5wn4eGvf4A7GXr35Q1TNRzmHayiP
-              FBp0Epiy+oFS1Xd/WQvMHCQMT4HoKSGf5u0++DpU1E5vN29vrxIOZ4+a9a5kZA95
-              QnsemvTiYf3C1xktkYR9AmUqYqCDTp/5nfqbQibRO0Chpy5UnhAXujkL0ABeaSaz
-              MViiJ2AX7vk2E++MXkBhi4IMyz0Vw2lPhg==
-              -----END CERTIFICATE-----
-      when: ansible_os_family == "RedHat"
-
-    ## JENKINS SLAVE AGENT TASKS
-    # We use SSH for ephemeral slaves
-    - name: Register ephemeral slave using SSH
-      jenkins_node:
-        username: "{{ api_user }}"
-        uri: "{{ api_uri }}"
-        password: "{{ token }}"
-        # relies on a convention to set a unique name that allows a reverse
-        # mapping from Jenkins back to whatever service created the current
-        # node
-        name: "{{ ansible_default_ipv4.address }}+{{ nodename }}"
-        labels: "{{ labels }}"
-        host: "{{ ansible_default_ipv4.address }}"
-        credentialsId: "{{ jenkins_credentials_uuid }}"
-        remoteFS: '/home/{{ jenkins_user }}/build'
-        executors: '{{ executors|default(1) }}'
-        exclusive: true
-      when: not permanent|bool
-      tags: register
-
-    - name: Register Permanent Slave
-      block:
-        - name: Register permenant slave using JNLP
-          jenkins_node:
-            username: "{{ api_user }}"
-            uri: "{{ api_uri }}"
-            password: "{{ token }}"
-            # relies on a convention to set a unique name that allows a reverse
-            # mapping from Jenkins back to whatever service created the current
-            # node
-            name: "{{ ansible_default_ipv4.address }}+{{ ansible_hostname }}"
-            labels: "{{ labels }}"
-            host: "{{ ansible_default_ipv4.address }}"
-            credentialsId: "{{ jenkins_credentials_uuid }}"
-            launcher: 'hudson.slaves.JNLPLauncher'
-            remoteFS: '/home/{{ jenkins_user }}/build'
-            executors: '{{ executors|default(1) }}'
-            exclusive: true
-
-        - name: Download slave.jar
-          get_url:
-            url: "{{ api_uri }}/jnlpJars/slave.jar"
-            dest: "/home/{{ jenkins_user }}/slave.jar"
-            force: yes
-          register: jar_changed
-
-        - name: Install the systemd unit files for jenkins
-          template:
-            src: "templates/systemd/jenkins.{{ item }}.j2"
-            dest: "/etc/systemd/system/jenkins.{{ item }}"
-          with_items:
-            - service
-            - secret
-          register: unit_files_changed
-
-        - name: Reload systemd unit files (to pick up potential changes)
-          systemd:
-            daemon_reload: yes
-
-        - name: Start jenkins service
-          service:
-            name: jenkins
-            state: started
-            enabled: yes
-
-        - name: REstart jenkins service (if necessary)
-          service:
-            name: jenkins
-            state: restarted
-            enabled: yes
-          when: jar_changed is changed or unit_files_changed is changed
-      when: permanent|bool
-      tags: register
index 64ac95d292376c408b365bb8c83e5b62b267d3f1..5292433fd688bcd319b5850aed4fc0846a3a67d0 100644 (file)
@@ -84,7 +84,7 @@ options:
 
   host:
     description:
-      - hostname or IP for the host to connect to the slave
+      - hostname or IP for the host to connect to the builder
 
 requirements: ['python-jenkins']
 author:
index e6c57edb94c14e1503ccf05984bc3a2a295fb4a8..09c54816957fde55a7e2fa2610a351fbba036a5f 100644 (file)
@@ -2,9 +2,9 @@
 
 - hosts: localhost
   vars:
-    # should be passed in the CLI like `--extra-vars "version=1.23.45 branch=master"`
+    # should be passed in the CLI like `--extra-vars "version=1.23.45 branch=main"`
     version: 0-dev # e.g. 0.78
-    branch: master # any existing branch on Github
+    branch: main # any existing branch on Github
     release: STABLE # STABLE, RELEASE_CANDIDATE, HOTFIX, and SECURITY are valid options
     tag_name: "v{{ version}}"
     project: "ceph"
index c3f646f43c11946f328058ad81f0fc7c861ab2f7..dd78bf6bfd5410b6366eefc1b5827bc2569768bd 100644 (file)
@@ -1,7 +1,7 @@
 ansible-jenkins
 ===============
 
-This role will allow you to install a new Jenkins master from scratch or manage an existing instance.
+This role will allow you to install a new Jenkins server from scratch or manage an existing instance.
 
 It assumes the following:
 
@@ -15,9 +15,9 @@ The role is idempotent but it should be noted that the Jenkins service will be r
 Initial Installation
 --------------------
 
-To set up a new Jenkins master from scratch:
+To set up a new Jenkins server from scratch:
 
 1. ``cd ceph-build/ansible``
-2. ``cp examples/master.yml .``
-3. ``ansible-playbook master.yml --limit="new.jenkins.example.com" --extra-vars="{github_oauth_client: 'foo',github_oauth_secret: 'bar'}"``
-4. Continue with https://github.com/ceph/ceph-sepia-secrets/blob/master/jenkins-master.rst
+2. ``cp examples/controller.yml .``
+3. ``ansible-playbook controller.yml --limit="new.jenkins.example.com" --extra-vars="{github_oauth_client: 'foo',github_oauth_secret: 'bar'}"``
+4. Continue with https://github.com/ceph/ceph-sepia-secrets/blob/main/jenkins-controller.rst
index 26056d2dfc9b52272833914b3443f26f5ca70851..e7d7b58b73a93ae7368a710f1c505eb409cb3059 100644 (file)
@@ -23,7 +23,7 @@
     </userRemoteConfigs>
     <branches>
       <hudson.plugins.git.BranchSpec>
-        <name>master</name>
+        <name>main</name>
       </hudson.plugins.git.BranchSpec>
     </branches>
     <excludedUsers/>
index b9862807d031311e9fff7f60ac70785efa8529de..82278e9a956e78f5c57df2f2fa2b5a4ed983e17b 120000 (symlink)
@@ -1 +1 @@
-examples/slave.yml
\ No newline at end of file
+builder.yml
\ No newline at end of file
diff --git a/ansible/slaves/hosts b/ansible/slaves/hosts
deleted file mode 100644 (file)
index 5b50447..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[rpm]
-jenkins-centos6-5.front.sepia.ceph.com
-jenkins-centos7.front.sepia.ceph.com
-jenkins-centos6-5b.front.sepia.ceph.com
-jenkins-centos7b.front.sepia.ceph.com
-
-[deb]
-mira062.front.sepia.ceph.com 
index 3daf5a97f1299b9bb90b8eedeb784f544849c3d8..d0408a023418ec29e22b12509615327fc126aecc 100644 (file)
@@ -1,6 +1,6 @@
 - project:
     name: ceph-ansible-prs-braggi-adami
-    slave_labels: 'vagrant && libvirt && (braggi||adami)'
+    builder_labels: 'vagrant && libvirt && (braggi||adami)'
     distribution:
       - centos
     deployment:
@@ -23,7 +23,7 @@
 
 - project:
     name: ceph-ansible-prs
-    slave_labels: 'vagrant && libvirt && (smithi || braggi || centos8)'
+    builder_labels: 'vagrant && libvirt && (smithi || braggi || centos8)'
     distribution:
       - centos
     deployment:
@@ -39,7 +39,7 @@
 
 - project:
     name: ceph-ansible-prs-docker2podman
-    slave_labels: 'vagrant && libvirt && (smithi || braggi || centos8)'
+    builder_labels: 'vagrant && libvirt && (smithi || braggi || centos8)'
     distribution:
       - centos
     deployment:
@@ -51,7 +51,7 @@
 
 - project:
     name: ceph-ansible-prs-cephadm
-    slave_labels: 'vagrant && libvirt && (adami || braggi)'
+    builder_labels: 'vagrant && libvirt && (adami || braggi)'
     distribution:
       - centos
     deployment:
@@ -64,7 +64,7 @@
 
 - project:
     name: ceph-ansible-prs-purge-dashboard
-    slave_labels: 'vagrant && libvirt && (adami || braggi)'
+    builder_labels: 'vagrant && libvirt && (adami || braggi)'
     distribution:
       - centos
     deployment:
@@ -77,7 +77,7 @@
 
 - project:
     name: ceph-ansible-prs-common-trigger
-    slave_labels: 'vagrant && libvirt && (smithi || braggi || centos8)'
+    builder_labels: 'vagrant && libvirt && (smithi || braggi || centos8)'
     distribution:
       - centos
     deployment:
 - job-template:
     name: 'ceph-ansible-prs-{distribution}-{deployment}-{scenario}'
     id: 'ceph-ansible-prs-auto'
-    node: '{slave_labels}'
+    node: '{builder_labels}'
     concurrent: true
     defaults: global
     display-name: 'ceph-ansible: Pull Requests [{distribution}-{deployment}-{scenario}]'
 - job-template:
     name: 'ceph-ansible-prs-{distribution}-{deployment}-{scenario}'
     id: 'ceph-ansible-prs-common-trigger'
-    node: '{slave_labels}'
+    node: '{builder_labels}'
     concurrent: true
     defaults: global
     display-name: 'ceph-ansible: Pull Requests [{distribution}-{deployment}-{scenario}]'
index e97b399a51491945af3fb7845c16463562a1a65b..6c09fc93aa88820ae6d728b7c95e88941b96f594 100755 (executable)
@@ -28,7 +28,7 @@ function check(){
 }
 
 function main() {
-    # install some of our dependencies if running on a jenkins slave
+    # install some of our dependencies if running on a jenkins builder
     if [[ -n "$HUDSON_URL" ]]
     then
         sudo yum -y install epel-release
index 03e5d4714f371681ddd8903c2065e879b10493f2..e6e606d8316149822d6f2c8682a2d5f61e6df672 100755 (executable)
@@ -31,7 +31,7 @@ function check(){
 }
 
 function main() {
-    # install some of our dependencies if running on a jenkins slave
+    # install some of our dependencies if running on a jenkins builder
     if [[ -n "$HUDSON_URL" ]]
     then
         sudo yum -y install epel-release
index 1ee340dc12de75435c001ad55347550a2d230230..8c3fa746f11ec0d1a82ea544b7c21653ea9960e3 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: ceph-dev-build
-    node: master
+    node: controller
     project-type: matrix
     defaults: global
     display-name: 'ceph-dev-build'
index 101835303ac52f4386f7c2a427a37c3abdf94757..c7641624e82cbe93f46210ac5b6e0fafa89443ae 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: 'ceph-dev-cron'
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     concurrent: true
index 493907e551138bd0f899d0020553119b47579338..d89ac302b1af4d24e91564d32f77646107313756 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: ceph-dev-new-build
-    node: master
+    node: controller
     project-type: matrix
     defaults: global
     display-name: 'ceph-dev-new-build'
index 40528314a7aaa3d329053e8445095fb39f461bd1..f65f4179bc2667ee9d8545f7781f595b6c324c83 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: ceph-dev-new-trigger
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     quiet-period: 5
index f1ddaad6df6a4fc53c481ec9e4ad3d33c97e4409..87f10cca241853e87d0ed5e9f956758e513356c2 100644 (file)
@@ -1,7 +1,7 @@
 - job:
     name: ceph-dev-new
     description: 'This job builds branches from https://github.com/ceph/ceph-ci for testing purposes.'
-    node: master
+    node: controller
     project-type: multijob
     defaults: global
     concurrent: true
index 2405e3a2868be3e93fdafa9a4d4b510ddfdc6092..221f5cd5c5fbb96722bb04f78ee577247a6955be 100644 (file)
@@ -1,7 +1,7 @@
 - job:
     disabled: true
     name: ceph-dev-trigger
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     quiet-period: 5
index 3c8a0b4d5d7ad4a5a44e62664d0a099316d5c70a..b246249cf65e0b97d70f6407aba0f4ea3efbb3d7 100644 (file)
@@ -1,7 +1,7 @@
 - job:
     name: ceph-dev
     description: 'This job builds branches from https://github.com/ceph/ceph for testing purposes.'
-    node: master
+    node: controller
     project-type: multijob
     defaults: global
     concurrent: true
index 15e25d1250dd5e17bbc5f392753903032325c6a5..1718132175fdb7b116420c2b022f2f64e47445cb 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: ceph-iscsi-cli-trigger
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     quiet-period: 5
index dd51a99a7eb9d1f6e49015c327ee4e04a9089f84..23274c0ebfa0e7acae57b3d23b3d34e78107810a 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: ceph-iscsi-config-trigger
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     quiet-period: 5
index 5db7fcd4574b68ec13a0220c575ded654a703e30..bd9ba0967cb5f8b065b40432d40dfc3cc6f3a1c7 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: ceph-iscsi-tools-trigger
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     quiet-period: 5
index e738b1ac38ec6c1e7a4b77f835285d98bf11e4ea..b34c429645d1d21c602346af51e9004585392c06 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: ceph-iscsi-trigger
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     quiet-period: 5
index bbea12bc78604bfb21bed07421c38f3735bb0fa3..ff13b19b908ffbc9dddee3be60c80357ffd62484 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: ceph-pr-arm-trigger
-    node: master
+    node: controller
     # disabled for now because this is not passing the right BRANCH to
     # `ceph-dev` which causes failures there
     disabled: true
index 957dc9f02db4c167ffd9eb8fed8a79a9a50824ae..b9b6b04e550aaf065630bb4c727947cefb144ab8 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: kernel-trigger
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     quiet-period: 5
index 813a2b214baf52d986e4215bf552ce38e63346f3..01ddb1e4305e9d945bca5f2282ada84bfaaff7b4 100644 (file)
@@ -12,7 +12,7 @@
 
 - job:
     name: mita-deploy
-    node: master
+    node: controller
     description: "This job clones mita and deploys it to its production server based on the BRANCH value"
     display-name: 'mita-deploy'
     block-downstream: false
index cd1ae371ddd40a823b72c156ef8c1f64a61bf25c..980447af8db3d45bc2b43a500d82a69d87362090 100644 (file)
@@ -21,7 +21,7 @@ then
        sudo yum-config-manager --enable PowerTools || sudo yum-config-manager --enable powertools
 fi
 
-# Clean up Jenkins slave before each build
+# Clean up Jenkins builder before each build
 sudo rm -rf /var/cache/yum/*
 sudo yum -y clean all
 sudo yum -y remove librgw-devel librgw2 librados-devel librados3 libcephfs-devel libcephfs2
index 3500acd2164e737fb37ccbaf928b608c5ac511a7..b56288d98f817cfc445d9ba7faf689c5d4b9c55e 100644 (file)
@@ -14,7 +14,7 @@ install_python_packages $TEMPVENV "pkgs[@]"
 # 2.6 and 2.7)
 #
 # These job-specific requirements aren't met by the services in charge of
-# creating slaves (mainly prado.ceph.com) because those slaves have "generic"
+# creating Jenkins builders (mainly prado.ceph.com) because those slaves have "generic"
 # requirements and usually do not care about specific needs like Python 2.6
 
 cd "$WORKSPACE/ceph-build/ceph-deploy-pull-requests/setup/playbooks"
index b14d216775a872a63bb108eae89633fa502dd757..13bef3c25dbf617a871f9c5a16913267950a4f55 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: rtslib-fb-trigger
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     quiet-period: 5
index 907bcf3fb1de66584e933f8f7f448977e862f76d..1e34674b1a27548e5015f01e5c6fdcf8d3cd93e0 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: samba-trigger
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     quiet-period: 5
index 60d8d558a8590eecd6bbd3c3fa460083a13093e2..37944c8595f4967f78719ad4623ced006a9df8f5 100644 (file)
@@ -144,7 +144,7 @@ install_python_packages_no_binary () {
     mkdir -p $PIP_SDIST_INDEX
 
     # We started pinning pip to 10.0.0 as the default to prevent mismatching
-    # versions on non-ephemeral slaves.  Some jobs require different or latest
+    # versions on non-ephemeral Jenkins builders.  Some jobs require different or latest
     # pip though so these if statements allow for that.
     # Updated to 20.3.4 in March 2021 because 10.0.0 is just too old.
     if [ "$2" == "latest" ]; then
@@ -207,7 +207,7 @@ install_python_packages () {
     export LC_ALL=en_US.UTF-8
 
     # We started pinning pip to 10.0.0 as the default to prevent mismatching
-    # versions on non-ephemeral slaves.  Some jobs require different or latest
+    # versions on non-ephemeral Jenkins builders.  Some jobs require different or latest
     # pip though so these if statements allow for that.
     # Updated to 20.3.4 in March 2021 because 10.0.0 is just too old.
     if [ "$2" == "latest" ]; then
@@ -546,7 +546,7 @@ setup_pbuilder() {
         else
           # this assumes that newer Debian releases are being added to
           # /etc/apt/trusted.gpg that is also the default location for Ubuntu trusted
-          # keys. The slave should ensure that the needed keys are added accordingly
+          # keys. The Jenkins builder should ensure that the needed keys are added accordingly
           # to this location.
           debootstrapopts='DEBOOTSTRAPOPTS=( "--keyring" "/etc/apt/trusted.gpg" )'
         fi
@@ -1101,7 +1101,7 @@ restart_libvirt_services() {
     sudo service libvirt-guests restart
 }
 
-# Function to update vagrant boxes on static libvirt slaves used for ceph-ansible and ceph-docker testing
+# Function to update vagrant boxes on static libvirt Jenkins builders used for ceph-ansible and ceph-docker testing
 update_vagrant_boxes() {
     outdated_boxes=`vagrant box outdated --global | grep 'is outdated' | awk '{ print $2 }' | tr -d "'"`
     if [ -n "$outdated_boxes" ]; then
@@ -1264,7 +1264,7 @@ collect_ceph_logs() {
     # this is meant to be run in a testing scenario directory
     # with running vagrant vms. the ansible playbook will connect
     # to your test nodes and fetch any ceph logs that are present
-    # in /var/log/ceph and store them on the jenkins slave.
+    # in /var/log/ceph and store them on the jenkins builder.
     # these logs can then be archived using the JJB archive publisher
     limit=$1
 
index 9239fb6bbabb2bca2dfeb3b2fd8a1365b41b0a95..e10a1993525a9982fdc22d06600bff9fe558d71b 100644 (file)
@@ -1,6 +1,6 @@
 - job:
     name: tcmu-runner-trigger
-    node: master
+    node: controller
     project-type: freestyle
     defaults: global
     quiet-period: 5