loopabull: farewell loopabull, you served us well.

Loopabull is being replaced by toddlers in openshift.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2020-07-09 16:51:46 -07:00
parent 6371dd26c3
commit 882d31edae
17 changed files with 0 additions and 470 deletions

View file

@ -1,17 +0,0 @@
[Unit]
Description=loopabull worker #%i
After=network.target
Documentation=https://github.com/maxamillion/loopabull
[Service]
ExecStart=/usr/bin/loopabull $CONFIG_FILE
User=root
Group=root
Restart=on-failure
Type=simple
EnvironmentFile=-/etc/sysconfig/loopabull
Restart=on-failure
PrivateTmp=yes
[Install]
WantedBy=multi-user.target

View file

@ -1 +0,0 @@
config = { "rabbitmq.serializer.enabled": True }

View file

@ -1,15 +0,0 @@
---
# Define resources for this group of hosts here.
lvm_size: 20000
mem_size: 2048
num_cpus: 4
fas_client_groups: sysadmin-loopabull
sudoers: "{{ private }}/files/sudo/mm2-sudoers"
fedmsg_loglevel: WARN
# For the MOTD
csi_security_category: High
csi_primary_contact: admin@fedoraproject.org / sysadmin-main-members
csi_purpose: Release Engineering automation hosts

View file

@ -1,15 +0,0 @@
---
# Define resources for this group of hosts here.
lvm_size: 20000
mem_size: 4096
num_cpus: 2
fas_client_groups: sysadmin-loopabull
sudoers: "{{ private }}/files/sudo/mm2-sudoers"
fedmsg_loglevel: WARN
# For the MOTD
csi_security_category: High
csi_primary_contact: admin@fedoraproject.org / sysadmin-main-members
csi_purpose: Release Engineering automation hosts

View file

@ -1,10 +0,0 @@
---
eth0_ip: 10.3.163.56
nm: 255.255.255.0
gw: 10.3.163.254
dns: 10.3.163.33
ks_url: http://10.3.163.35/repo/rhel/ks/kvm-rhel-7-iad2
ks_repo: http://10.3.163.35/repo/rhel/RHEL7-x86_64/
volgroup: /dev/vg_guests
vmhost: vmhost-x86-06.iad2.fedoraproject.org
datacenter: iad2

View file

@ -1,10 +0,0 @@
---
eth0_ip: 10.5.128.142
nm: 255.255.255.0
gw: 10.5.128.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
volgroup: /dev/vg_guests
vmhost: virthost03.stg.phx2.fedoraproject.org
datacenter: phx2

View file

@ -461,12 +461,6 @@ pkgs01.iad2.fedoraproject.org
[pkgs_stg]
# pkgs01.stg.iad2.fedoraproject.org
[loopabull]
loopabull01.iad2.fedoraproject.org
[loopabull_stg]
# loopabull01.stg.iad2.fedoraproject.org
[proxies_external]
proxy01.iad2.fedoraproject.org
proxy02.fedoraproject.org
@ -579,7 +573,6 @@ copr-keygen-dev.aws.fedoraproject.org
# github2fedmsg01.stg.iad2.fedoraproject.org
# ipa01.stg.iad2.fedoraproject.org
# koji01.stg.iad2.fedoraproject.org
# loopabull01.stg.iad2.fedoraproject.org
# mailman01.stg.iad2.fedoraproject.org
# mbs-backend01.stg.iad2.fedoraproject.org
# mbs-frontend01.stg.iad2.fedoraproject.org
@ -1313,7 +1306,6 @@ koji02.iad2.fedoraproject.org
kojipkgs01.iad2.fedoraproject.org
kojipkgs02.iad2.fedoraproject.org
log01.iad2.fedoraproject.org
loopabull01.iad2.fedoraproject.org
mbs-backend01.iad2.fedoraproject.org
mbs-frontend01.iad2.fedoraproject.org
memcached01.iad2.fedoraproject.org

View file

@ -45,7 +45,6 @@
- import_playbook: /srv/web/infra/ansible/playbooks/groups/koji-hub.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/kojipkgs.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/logserver.yml
#- import_playbook: /srv/web/infra/ansible/playbooks/groups/loopabull.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/mailman.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/maintainer-test.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/mariadb-server.yml

View file

@ -1,113 +0,0 @@
# create a new loopabull server
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=loopabull:loopabull_stg"
- name: make the box be real
hosts: loopabull:loopabull_stg
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- "/srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml"
pre_tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
roles:
- base
- rkhunter
- nagios_client
- hosts
- fas_client
- collectd/base
- sudo
tasks:
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
- import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: Deploy and configure loopabull
hosts: loopabull:loopabull_stg
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- "/srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks:
- name: ensure ~/.ssh dir exists
file:
path: "/home/root/.ssh/"
state: directory
- name: place loopabull_ociimage user private keys
copy:
src: "{{ private }}/files/loopabull/keys/{{ env }}_ociimage"
dest: "/home/root/.ssh/id_rsa.loopabull_ociimage"
mode: 0600
- name: Install required packages
package:
name: python-fedmsg-rabbitmq-serializer
roles:
- rabbitmq
- fedmsg/base
- fedmsg/hub
- {
role: loopabull,
loglevel: info,
plugin: fedmsgrabbitmq,
routing_keys: [
"org.fedoraproject.prod.buildsys.build.state.change",
"org.centos.prod.ci.dist-git-pr.test.complete",
"org.centos.prod.ci.dist-git-pr.test.error",
"org.centos.prod.ci.dist-git-pr.test.running"
],
playbooks_dir: /srv/loopabull-tasks/playbooks,
ansible_cfg_path: /etc/ansible/ansible.cfg,
playbook_cmd: /usr/bin/ansible-playbook,
when: env != 'staging',
}
- {
role: loopabull,
loglevel: info,
plugin: fedmsgrabbitmq,
routing_keys: [
"org.fedoraproject.stg.buildsys.build.state.change",
"org.centos.stage.ci.dist-git-pr.test.complete",
"org.centos.stage.ci.dist-git-pr.test.error",
"org.centos.stage.ci.dist-git-pr.test.running"
],
playbooks_dir: /srv/loopabull-tasks/playbooks,
ansible_cfg_path: /etc/ansible/ansible.cfg,
playbook_cmd: /usr/bin/ansible-playbook,
when: env == 'staging',
}
- name: Post Loopabull install configuration
hosts: loopabull:loopabull_stg
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- "/srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks:
- name: Enable fedmsg-rabbitmq-serializer
copy:
src: "{{files}}/loopabull/serializer.py"
dest: "/etc/fedmsg.d/serializer.py"
notify: restart fedmsg-hub

View file

@ -39,12 +39,6 @@
- role: keytab/service
service: mash
host: "koji{{env_suffix}}.fedoraproject.org"
- role: loopabull/target
loopabull_role: koji
when: inventory_hostname == 'composer.stg.iad2.fedoraproject.org'
- role: loopabull/target
loopabull_role: ociimage
when: inventory_hostname == 'composer.stg.iad2.fedoraproject.org'
- role: nfs/client
mnt_dir: '/mnt/fedora_koji'

View file

@ -1,39 +0,0 @@
Loopabull
=========
Fedora's deployment of [loopabull](https://github.com/maxamillion/loopabull)
Role Variables
--------------
See defaults/main.yml for full docs on role variables
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- {
role: loopabull,
plugin: fedmsg,
routing_keys: [
"org.fedoraproject.prod.buildsys.build.state.change"
],
playbooks_dir: /usr/local/loopabull-playbooks/,
ansible_cfg_path: /etc/ansible/ansible.cfg,
playbook_cmd: /usr/bin/ansible-playbook
}
License
-------
GPLv3+
Author Information
------------------
Adam Miller (maxamillion@fedoraproject.org)

View file

@ -1,40 +0,0 @@
---
# defaults file for loopabull
#
loglevel: warn
# playbooks git repo
#
# URL to the git repo to clone that contains loopabull playbooks
playbooks_repo: "https://pagure.io/Fedora-Infra/loopabull-tasks.git"
# plugin
#
# This is the selected plugin that will interface with your prefered origin of
# events (message bus or otherwise).
plugin: fedmsg
# routing_keys
#
# This is a list of routing keys that will be yielded by your selected plugin
# that should be acted upon (i.e. - these keys should trigger an ansible
# playbook by the same name).
routing_keys:
- org.fedoraproject.prod.buildsys.build.state.change
# playbooks_dir
#
# The full path location of the directory containing your playbooks that
# coorelate to the routing_keys
playbooks_dir: /srv/loopabull-tasks/playbooks
# ansible_cfg_path
#
# Full path location of the ansible configuration to use
ansible_cfg_path: /etc/ansible/ansible.cfg
# playbook_cmd
#
# Command to use in place of ansible-playbook (for those that want to use
# Ansible Tower commands or custom wrappers of their own)
playbook_cmd: /usr/bin/rbac-playbook

View file

@ -1,17 +0,0 @@
[Unit]
Description=loopabull worker #%i
After=network.target
Documentation=https://github.com/maxamillion/loopabull
[Service]
ExecStart=/usr/bin/loopabull $CONFIG_FILE
User=root
Group=root
Restart=on-failure
Type=simple
EnvironmentFile=-/etc/sysconfig/loopabull
Restart=on-failure
PrivateTmp=yes
[Install]
WantedBy=multi-user.target

View file

@ -1,12 +0,0 @@
---
# handlers file for loopabull
- name: restart loopabull
service:
name: "{{ item }}"
state: restarted
with_items:
- loopabull@1
- loopabull@2
- loopabull@3
- loopabull@4
- loopabull@5

View file

@ -1,23 +0,0 @@
---
- name: add loopabull user loopabull_{{ loopabull_role }}
user: name=loopabull_{{ loopabull_role }}
state=present
home=/home/loopabull_{{loopabull_role}}
createhome=yes
tags:
- loopabull/target
- name: add authorized_keys for loopabull_{{ loopabull_role }}
authorized_key: key="{{ item }}" user=loopabull_{{ loopabull_role }} state=present
with_file:
- "{{private}}/files/loopabull/keys/{{env}}_{{loopabull_role}}.pub"
ignore_errors: True
tags:
- loopabull/target
- name: add loopabull_{{ loopabull_role }} sudoers file
copy: src="{{private}}/files/loopabull/sudo/{{ loopabull_role }}"
dest="/etc/sudoers.d/loopabull_{{ loopabull_role }}"
ignore_errors: True
tags:
- loopabull/target

View file

@ -1,77 +0,0 @@
---
# tasks file for loopabull
- name: Install RHOSP13 repo file
copy: src="{{ files }}/common/rhos13.repo" dest=/etc/yum.repos.d/rhos13.repo
tags:
- loopabull
- name: Install required packages
package: name="{{ item }}" state=present
with_items:
- git
- loopabull
# Required for flag_build_commits
- python2-koji
- python2-requests
tags:
- loopabull
- name: configure loopabull
template:
src: loopabull.yml.j2
dest: /etc/loopabull.yml
notify: restart loopabull
tags:
- loopabull
- name: ensure /srv/private dir exists with the expected permissions
file:
path: "/srv/private"
state: directory
mode: 0640
owner: root
group: sysadmin-main
tags:
- loopabull
- name: place the private variables file
copy:
src: "{{ private }}/vars_loopabull.yml"
dest: "/srv/private/vars_loopabull.yml"
mode: 0640
owner: root
group: sysadmin-main
tags:
- loopabull
- name: clone the playbooks repo into playbooks dir
git:
repo: "https://pagure.io/Fedora-Infra/loopabull-tasks.git"
dest: "/srv/loopabull-tasks/"
tags:
- loopabull
- name: Install the loopabull@.service template
copy:
src: "loopabull@.service"
dest: "/usr/lib/systemd/system/loopabull@.service"
notify: restart loopabull
tags:
- loopabull
- name: start and enable loopabull@
service:
name: "{{ item }}"
state: started
enabled: yes
with_items:
- loopabull
- loopabull@1
- loopabull@2
- loopabull@3
- loopabull@4
- loopabull@5
tags:
- loopabull

View file

@ -1,66 +0,0 @@
# Loopabull (https://github.com/maxamillion/loopabull) config file
#
# There are three main definitions: ansible, routing_keys, plugin. These will be
# explained in comments above each section below.
# loglevel
#
# The defaul loglevel is "info" but the following log levels are available
# - info
# - warn
# - error
# - debug
{% if loglevel is defined %}
loglevel: {{ loglevel }}
{% else %}
loglevel: info
{% endif %}
# plugin section
#
# loopabull has two types of plugins:
#
# looper: message bus python generator plugin that will interface with your
# prefered origin of events (message bus or otherwise).
#
# translator: routing key translator which allows for alternative layouts
# on-disk for routing_key mappings to playbooks the default of
# "rkname" simple means that your playbooks share the same parent
# dir and are all named after the routing_key they correspond to
# in the message bus.
#
plugins:
looper:
name: {{ plugin }}
translator:
name: rkname
# routing_keys
#
# This is a list of routing keys that will be yielded by your selected plugin
# that should be acted upon (i.e. - these keys should trigger an ansible
# playbook by the same name).
routing_keys:
{% for rkey in routing_keys %}
- {{ rkey }}
{% endfor %}
# ansible
#
# This section will tell Loopabull about information to pass to the
# ansible-playbook command.
#
# playbooks_dir
# The full path location of the directory containing your playbooks that
# coorelate to the routing_keys
#
# cfg_file_path
# Full path location of the ansible configuration to use
#
# playbook_cmd
# Command to use in place of ansible-playbook (for those that want to use
# Ansible Tower commands or custom wrappers of their own)
ansible:
playbooks_dir: {{ playbooks_dir }}
cfg_file_path: {{ ansible_cfg_path }}
playbook_cmd: {{ playbook_cmd }}