simple-koji-ci: retire

simple-koji-ci (currently) is a aws instance that listens to the
fedora-messaging bus and when a PR is filed on src.fedoraproject.org it
takes that PR, applies it to the package git repo and does a scratch
build. It then reports this back to the PR.

However, now we have zuul and fedora-ci doing this (and much more).
simple-koji-ci is a fedora-30 instanced (yes, way eol!)
It's token to talk to src.fedoraproject.org expired long ago and no one
really noticed, so it's not been reporting anything at all for a long
time.

So, lets remove it and let it rest in peace.

Thanks simple-koji-ci! You did great!

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2021-10-14 13:32:44 -07:00
parent a5cf3c4728
commit 94c115f58b
12 changed files with 0 additions and 477 deletions

View file

@ -46,7 +46,6 @@ iddev.fedorainfracloud.org
retrace-stg.aws.fedoraproject.org
# This is not in aws, but here is good enough for now
ppc64le-test.fedorainfracloud.org
simple-koji-ci-prod.fedorainfracloud.org
[cloud:children]
cloud_aws

View file

@ -1,44 +0,0 @@
- name: check/create instance
hosts: simple-koji-ci-prod.fedorainfracloud.org
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
- /srv/private/ansible/files/openstack/passwords.yml
tasks:
- import_tasks: "{{ tasks_path }}/persistent_cloud.yml"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: setup all the things
hosts: simple-koji-ci-prod.fedorainfracloud.org
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
- /srv/private/ansible/files/openstack/passwords.yml
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
pre_tasks:
- import_tasks: "{{ tasks_path }}/cloud_setup_basic.yml"
- name: set hostname (required by some services, at least postfix need it)
hostname: name="{{inventory_hostname}}"
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
# - base
- rkhunter
- nagios_client
- role: simple-koji-ci
- role: keytab/service
service: simple-koji-ci
owner_user: fedmsg
- role: chrony

View file

@ -1,25 +0,0 @@
apiVersion: v1
kind: BuildConfig
metadata:
name: simple-koji-ci-build
labels:
environment: "simple-koji-ci"
spec:
source:
git:
{% if env == 'staging' %}
uri: https://pagure.io/forks/pingou/fedora-ci/simple-koji-ci.git
ref: "staging"
{% else %}
uri: https://pagure.io/fedora-ci/simple-koji-ci/.git
ref: "production"
{% endif %}
strategy:
type: Docker
triggers:
- type: ConfigChange
- type: ImageChange
output:
to:
kind: ImageStreamTag
name: simple-koji-ci:latest

View file

@ -1,23 +0,0 @@
{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: simple-koji-ci-fedmsg
labels:
app: simple-koji-ci
data:
endpoints.py: |-
{{ load_file('endpoints.py') | indent }}
simple_koji_ci.py: |-
{{ load_file('simple_koji_ci.py') | indent }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: simple-koji-ci-krb
labels:
app: simple-koji-ci
data:
krb5.conf: |
{{ lookup('template', roles_path + '/base/templates/krb5.conf.j2') | indent }}

View file

@ -1,66 +0,0 @@
---
apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: simple-koji-ci
name: simple-koji-ci
spec:
replicas: 1
selector:
app: simple-koji-ci
deploymentconfig: simple-koji-ci
strategy:
type: Recreate
template:
metadata:
labels:
app: simple-koji-ci
deploymentconfig: simple-koji-ci
spec:
hostAliases:
- hostnames:
- apps.stg.fedoraproject.org
ip: 10.5.128.177
containers:
- name: simple-koji-ci
image: simple-koji-ci:latest
resources: {}
env:
- name: KRB5_CONFIG
value: /etc/krb/krb5.conf
- name: KRB5_CLIENT_KTNAME
value: /etc/keytab/koji-keytab
- name: OPENSHIFT
value: "True"
volumeMounts:
- name: keytab-volume
mountPath: /etc/keytabs
readOnly: true
- name: simple-koji-ci-krb-volume
mountPath: /etc/krb/
readOnly: true
- name: simple-koji-ci-fedmsg-volume
mountPath: /opt/config
readOnly: true
volumes:
- name: keytab-volume
secret:
secretName: simple-koji-ci-keytab
- name: simple-koji-ci-krb-volume
configMap:
name: simple-koji-ci-krb
- name: simple-koji-ci-fedmsg-volume
configMap:
name: simple-koji-ci-fedmsg
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- simple-koji-ci
from:
kind: ImageStreamTag
name: simple-koji-ci:latest

View file

@ -1,35 +0,0 @@
# This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# fedmsg is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with fedmsg; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Authors: Ralph Bean <rbean@redhat.com>
#
config = dict(
# This is a dict of possible addresses from which fedmsg can send
# messages. fedmsg.init(...) requires that a 'name' argument be passed
# to it which corresponds with one of the keys in this dict.
endpoints={
# These are here so your local box can listen to the upstream
# infrastructure's bus. Cool, right? :)
"fedora-infrastructure": [
{% if env == 'staging' %}
"tcp://stg.fedoraproject.org:9940",
{% else %}
"tcp://hub.fedoraproject.org:9940",
{% endif %}
],
},
)

View file

@ -1,4 +0,0 @@
apiVersion: v1
kind: ImageStream
metadata:
name: "simple-koji-ci"

View file

@ -1,83 +0,0 @@
class TargetTagsDict(dict):
"""A dict that returns the key for missing values"""
def __missing__(self, key):
return key
def get(self, key, default):
"""Normally, get() doesn't go trough __missing__"""
return self[key]
config = {
'simple-koji-ci.enabled': True,
'simple-koji-ci.koji': {
{% if env == 'staging' %}
'server': 'https://koji.stg.fedoraproject.org/kojihub',
'weburl': 'https://koji.stg.fedoraproject.org/koji',
'git_url': 'https://src.stg.fedoraproject.org/rpms/{package}.git',
'krb_principal': 'simple-koji-ci/simple-koji-ci-dev.fedorainfracloud.org@STG.FEDORAPROJECT.ORG',
'krb_keytab': '/etc/krb5.simple-koji-ci_simple-koji-ci-dev.fedorainfracloud.org.keytab',
{% else %}
'server': 'https://koji.fedoraproject.org/kojihub',
'weburl': 'https://koji.fedoraproject.org/koji',
'git_url': 'https://src.fedoraproject.org/rpms/{package}.git',
'krb_principal': 'simple-koji-ci/simple-koji-ci-prod.fedorainfracloud.org@FEDORAPROJECT.ORG',
'krb_keytab': '/etc/krb5.simple-koji-ci_simple-koji-ci-prod.fedorainfracloud.org.keytab',
{% endif %}
# Kerberos configuration to authenticate with Koji. In development
# environments, use `kinit <fas-name>@FEDORAPROJECT.ORG` to get a
# Kerberos ticket and use the default settings below.
'krb_ccache': None,
'krb_proxyuser': None,
'krb_sessionopts': {'timeout': 3600, 'krb_rdns': False},
'opts': {'scratch': True},
'priority': 30,
'target_tags': TargetTagsDict(master='rawhide'),
},
"simple-koji-ci.cache": {
"backend": "dogpile.cache.dbm",
"expiration_time": 300,
"arguments": {
"filename": "/var/tmp/simple-koji-ci-cache.dbm",
},
},
{% if env == 'staging' %}
"simple-koji-ci.pagure_url" : "https://src.stg.fedoraproject.org",
"simple-koji-ci.pagure_token" : "{{ simple_koji_ci_pagure_token_stg }}",
{% else %}
"simple-koji-ci.pagure_url" : "https://src.fedoraproject.org",
"simple-koji-ci.pagure_token" : "{{ simple_koji_ci_pagure_token }}",
{% endif %}
# The time in seconds the-new-hotness should wait for a socket to connect
# before giving up.
'simple-koji-ci.connect_timeout': 15,
# The time in seconds the-new-hotness should wait for a read from a socket
# before giving up.
'simple-koji-ci.read_timeout': 15,
# The number of times the-new-hotness should retry a network request that
# that failed for any reason (e.g. read timeout, DNS error, etc)
'simple-koji-ci.requests_retries': 3,
"logging": {
"handlers": {
"console": {
"class": "logging.StreamHandler",
"formatter": "bare",
"level": "DEBUG",
"stream": "ext://sys.stdout",
},
},
"loggers": {
"simple_koji_ci": {
"level": "DEBUG",
"propagate": True,
"handlers": ["console"],
},
},
}
}

View file

@ -1,50 +0,0 @@
---
# Configuration for simple-koji-ci
- name: install needed packages
package:
name: ["simple-koji-ci", "python-qpid", "python2-koji", "git", "fedpkg", "mock"]
state: present
tags:
- packages
- simple-koji-ci
- name: copy simple-koji-ci configuration
template: src={{ item.file }}
dest={{ item.location }}/{{ item.file }}
owner=root group=fedmsg mode=0640
with_items:
- { file: simple_koji_ci.py, location: /etc/fedmsg.d }
- { file: endpoints.py, location: /etc/fedmsg.d }
- { file: krb5.conf, location: /etc/ }
changed_when: "1 != 1"
tags:
- config
- simple-koji-ci
notify:
- restart fedmsg-hub
- user:
name: fedmsg
groups: mock
append: yes
tags:
- config
- simple-koji-ci
- name: Create /usr/share/fedmsg since apparently fedmsg doesn't do it anymore
file: state=directory
path=/usr/share/fedmsg
owner=fedmsg group=fedmsg mode=0775
tags:
- config
- simple-koji-ci
- name: Start and enable the services we want
service: name={{ item }} enabled=yes state=started
with_items:
- fedmsg-hub
tags:
- service
- simple-koji-ci

View file

@ -1,36 +0,0 @@
# This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# fedmsg is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with fedmsg; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Authors: Ralph Bean <rbean@redhat.com>
#
config = dict(
# This is a dict of possible addresses from which fedmsg can send
# messages. fedmsg.init(...) requires that a 'name' argument be passed
# to it which corresponds with one of the keys in this dict.
endpoints={
# These are here so your local box can listen to the upstream
# infrastructure's bus. Cool, right? :)
"fedora-infrastructure": [
{% if env == 'staging' %}
"tcp://stg.fedoraproject.org:9940",
{% else %}
"tcp://hub.fedoraproject.org:9940",
{% endif %}
],
},
)

View file

@ -1,35 +0,0 @@
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
{% if env == 'staging' %}
default_realm = STG.FEDORAPROJECT.ORG
{% else %}
default_realm = FEDORAPROJECT.ORG
{% endif %}
rdns = false
dns_canonicalize_hostname = false
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
[realms]
{% if env == 'staging' %}
STG.FEDORAPROJECT.ORG = {
kdc = https://id.stg.fedoraproject.org/KdcProxy
}
{% else %}
FEDORAPROJECT.ORG = {
kdc = https://id.fedoraproject.org/KdcProxy
}
{% endif %}
[domain_realm]
.fedoraproject.org = FEDORAPROJECT.ORG
fedoraproject.org = FEDORAPROJECT.ORG
.stg.fedoraproject.org = STG.FEDORAPROJECT.ORG
stg.fedoraproject.org = STG.FEDORAPROJECT.ORG

View file

@ -1,75 +0,0 @@
class TargetTagsDict(dict):
"""A dict that returns the key for missing values"""
def __missing__(self, key):
return key
def get(self, key, default):
"""Normally, get() doesn't go trough __missing__"""
return self[key]
config = {
'simple-koji-ci.enabled': True,
'simple-koji-ci.koji': {
{% if env == 'staging' %}
'server': 'https://koji.stg.fedoraproject.org/kojihub',
'weburl': 'https://koji.stg.fedoraproject.org/koji',
'git_url': 'https://src.stg.fedoraproject.org/rpms/{package}.git',
'krb_principal': 'simple-koji-ci/simple-koji-ci-dev.fedorainfracloud.org@STG.FEDORAPROJECT.ORG',
'krb_keytab': '/etc/krb5.simple-koji-ci_simple-koji-ci-dev.fedorainfracloud.org.keytab',
{% else %}
'server': 'https://koji.fedoraproject.org/kojihub',
'weburl': 'https://koji.fedoraproject.org/koji',
'git_url': 'https://src.fedoraproject.org/rpms/{package}.git',
'krb_principal': 'simple-koji-ci/simple-koji-ci-prod.fedorainfracloud.org@FEDORAPROJECT.ORG',
'krb_keytab': '/etc/krb5.simple-koji-ci_simple-koji-ci-prod.fedorainfracloud.org.keytab',
{% endif %}
# Kerberos configuration to authenticate with Koji. In development
# environments, use `kinit <fas-name>@FEDORAPROJECT.ORG` to get a
# Kerberos ticket and use the default settings below.
'krb_ccache': None,
'krb_proxyuser': None,
'krb_sessionopts': {'timeout': 3600, 'krb_rdns': False},
'opts': {'scratch': True},
'priority': 30,
'target_tags': TargetTagsDict(master='rawhide'),
},
"simple-koji-ci.cache": {
"backend": "dogpile.cache.dbm",
"expiration_time": 300,
"arguments": {
"filename": "/var/tmp/simple-koji-ci-cache.dbm",
},
},
{% if env == 'staging' %}
"simple-koji-ci.pagure_url" : "https://src.stg.fedoraproject.org",
"simple-koji-ci.pagure_token" : "{{ simple_koji_ci_pagure_token_stg }}",
{% else %}
"simple-koji-ci.pagure_url" : "https://src.fedoraproject.org",
"simple-koji-ci.pagure_token" : "{{ simple_koji_ci_pagure_token }}",
{% endif %}
# The time in seconds the-new-hotness should wait for a socket to connect
# before giving up.
'simple-koji-ci.connect_timeout': 15,
# The time in seconds the-new-hotness should wait for a read from a socket
# before giving up.
'simple-koji-ci.read_timeout': 15,
# The number of times the-new-hotness should retry a network request that
# that failed for any reason (e.g. read timeout, DNS error, etc)
'simple-koji-ci.requests_retries': 3,
"logging": {
"loggers": {
"simple_koji_ci": {
"level": "DEBUG",
"propagate": True,
"handlers": ["console"],
},
},
}
}