Initial stubbing for the new hotness node(s).

This commit is contained in:
Ralph Bean 2014-11-17 19:30:42 +00:00
parent 872ef50b9e
commit 31e9f72fdd
11 changed files with 261 additions and 0 deletions

View file

@ -0,0 +1,21 @@
---
# Define resources for this group of hosts here.
lvm_size: 20000
mem_size: 1024
num_cpus: 2
# for systems that do not match the above - specify the same parameter in
# the host_vars/$hostname file
tcp_ports: [ 3000, 3001, 3002, 3003 ]
fas_client_groups: sysadmin-noc
# These are consumed by a task in roles/fedmsg/base/main.yml
fedmsg_certs:
- service: shell
owner: root
group: sysadmin
- service: hotness
owner: root
group: fedmsg

View file

@ -0,0 +1,21 @@
---
# Define resources for this group of hosts here.
lvm_size: 20000
mem_size: 1024
num_cpus: 1
# for systems that do not match the above - specify the same parameter in
# the host_vars/$hostname file
tcp_ports: [ 3000, 3001, 3002, 3003 ]
fas_client_groups: sysadmin-noc
# These are consumed by a task in roles/fedmsg/base/main.yml
fedmsg_certs:
- service: shell
owner: root
group: sysadmin
- service: hotness
owner: root
group: fedmsg

View file

@ -0,0 +1,14 @@
---
nm: 255.255.255.0
gw: 10.5.126.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/
eth0_ip: 10.5.126.5
volgroup: /dev/vg_virthost01
vmhost: virthost01.phx2.fedoraproject.org
datacenter: phx2

View file

@ -0,0 +1,13 @@
---
nm: 255.255.255.0
gw: 10.5.126.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/
eth0_ip: 10.5.126.4
volgroup: /dev/vg_guests00
vmhost: virthost07.phx2.fedoraproject.org
datacenter: phx2

View file

@ -258,6 +258,12 @@ hosted03.fedoraproject.org
hosted04.fedoraproject.org
hosted-lists01.fedoraproject.org
[hotness]
hotness01.phx2.fedoraproject.org
[hotness-stg]
hotness01.stg.phx2.fedoraproject.org
[kerneltest]
kerneltest01.phx2.fedoraproject.org
#kerneltest02.phx2.fedoraproject.org
@ -444,6 +450,7 @@ fedoauth01.stg.phx2.fedoraproject.org
fedocal01.stg.phx2.fedoraproject.org
github2fedmsg01.stg.phx2.fedoraproject.org
gallery01.stg.phx2.fedoraproject.org
hotness01.stg.phx2.fedoraproject.org
kerneltest01.stg.phx2.fedoraproject.org
koji01.stg.phx2.fedoraproject.org
mailman01.stg.phx2.fedoraproject.org
@ -580,6 +587,7 @@ wiki02.phx2.fedoraproject.org
badges-backend01.phx2.fedoraproject.org
busgateway01.phx2.fedoraproject.org
fedimg01.phx2.fedoraproject.org
hotness01.phx2.fedoraproject.org
notifs-backend01.phx2.fedoraproject.org
pkgs01.phx2.fedoraproject.org
summershum01.phx2.fedoraproject.org
@ -588,6 +596,7 @@ summershum01.phx2.fedoraproject.org
badges-backend01.stg.phx2.fedoraproject.org
busgateway01.stg.phx2.fedoraproject.org
fedimg01.stg.phx2.fedoraproject.org
hotness01.stg.phx2.fedoraproject.org
notifs-backend01.stg.phx2.fedoraproject.org
pkgs01.stg.phx2.fedoraproject.org
summershum01.stg.phx2.fedoraproject.org

View file

@ -0,0 +1,87 @@
# create a new hotness server
# NOTE: should be used with --limit most of the time
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/mirrorlist or from hostvars
- name: make hotness server
hosts: hotness;hotness-stg
user: root
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "{{ private }}/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- include: "{{ tasks }}/virt_instance_create.yml"
handlers:
- include: "{{ handlers }}/restart_services.yml"
- name: dole out the generic configuration
hosts: hotness;hotness-stg
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "{{ private }}/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles:
- base
- rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
- nagios_client
- collectd/base
- hosts
- fas_client
- sudo
# The proxies don't actually need to talk to these hosts so we won't bother
# putting them on the vpn.
#- { role: openvpn/client,
# when: env != "staging" }
tasks:
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"
handlers:
- include: "{{ handlers }}/restart_services.yml"
- name: set up fedmsg basics
hosts: hotness;hotness-stg
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "{{ private }}/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles:
- fedmsg/base
handlers:
- include: "{{ handlers }}/restart_services.yml"
- name: dole out the service-specific config (STAGING ONLY FOR NOW)
hosts: hotness-stg
user: root
gather_facts: True
roles:
- fedmsg/hub
- hotness
- role: collectd/fedmsg-service
process: fedmsg-hub
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "{{ private }}/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- include: "{{ handlers }}/restart_services.yml"

View file

@ -56,6 +56,7 @@
- endpoints-fedbadges.py
- endpoints-fmn-web.py
- endpoints-fmn-backend.py
- endpoints-hotness.py
- endpoints-nuancier.py
- endpoints-mailman.py
- endpoints-summershum.py

View file

@ -0,0 +1,16 @@
{% if env == 'staging' %}
suffix = 'stg.phx2.fedoraproject.org'
{% else %}
suffix = 'phx2.fedoraproject.org'
{% endif %}
config = dict(
endpoints={
"hotness.hotness01": [
"tcp://hotness01.%s:3000" % suffix,
"tcp://hotness01.%s:3001" % suffix,
"tcp://hotness01.%s:3002" % suffix,
"tcp://hotness01.%s:3003" % suffix,
],
},
)

View file

@ -141,6 +141,9 @@ config = dict(
("fedbadges.badges-backend01", "fedbadges-badges-backend01.%s" % suffix),
("shell.badges-backend01", "shell-badges-backend01.%s" % suffix),
("hotness.hotness01", "hotness-hotness01.%s" % suffix),
("shell.hotness01", "shell-hotness01.%s" % suffix),
("summershum.summershum01", "summershum-summershum01.%s" % suffix),
("shell.summershum01", "shell-summershum01.%s" % suffix),

View file

@ -0,0 +1,17 @@
---
# Configuration for the the-new-hotness consumer
- name: install needed packages
yum: pkg={{ item }} state=present
with_items:
- the-new-hotness
- python-psycopg2
- name: copy database configuration
template: >
src={{ item }} dest=/etc/fedmsg.d/{{ item }}
owner=fedmsg group=fedmsg mode=0600
with_items:
- hotness.py
notify:
- restart fedmsg-hub

View file

@ -0,0 +1,59 @@
import os
import socket
hostname = socket.gethostname().split('.', 1)[0]
description_template = """Latest upstream release: %(latest_upstream)s
Current version/release in %(repo_name)s: %(repo_version)s-%(repo_release)s
URL: %(url)s
Please consult the package updates policy before you
issue an update to a stable branch:
https://fedoraproject.org/wiki/Updates_Policy
More information about the service that created this bug can be found at:
%(explanation_url)s
"""
config = {
'hotness.bugzilla.enabled': True,
'hotness.bugzilla': {
#'user': None,
#'password': None,
'url': 'https://partner-bugzilla.redhat.com',
'product': 'Fedora',
'version': 'rawhide',
'keywords': 'FutureFeature,Triaged',
'bug_status': 'NEW',
'explanation_url': 'https://fedoraproject.org/wiki/Upstream_release_monitoring',
'short_desc_template': "%(name)s-%(latest_upstream)s is available",
'description_template': description_template,
},
'hotness.koji': {
'server': 'https://koji.fedoraproject.org/kojihub',
'weburl': 'http://koji.fedoraproject.org/koji',
'cert': os.path.expanduser('~/.fedora.cert'),
'ca_cert': os.path.expanduser('~/.fedora-server-ca.cert'),
'git_url': 'http://pkgs.fedoraproject.org/cgit/{package}.git',
'userstring': ('Fedora Release Monitoring '
'<release-monitoring@fedoraproject.org>'),
'opts': {'scratch': True},
'priority': 30,
'target_tag': 'rawhide',
},
"hotness.cache": {
"backend": "dogpile.cache.dbm",
"expiration_time": 300,
"arguments": {
"filename": "/var/tmp/the-new-hotness-cache.dbm",
},
},
}