diff --git a/inventory/group_vars/bugyou b/inventory/group_vars/bugyou new file mode 100644 index 0000000000..f302196a63 --- /dev/null +++ b/inventory/group_vars/bugyou @@ -0,0 +1,24 @@ +--- +# 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: [] + +fas_client_groups: sysadmin-noc,sysadmin-releng,sysadmin-fedimg,sysadmin-datanommer + +# For the MOTD +csi_security_category: Moderate +csi_primary_contact: Fedora admins - admin@fedoraproject.org +csi_purpose: Run the 'bugyou' fedmsg process that files automatic bugs in pagure +csi_relationship: | + This node runs 'bugyou', a fedmsg consumer that files pagure bugs in + response to fedmsg bus activity. + + It is primarily used to file bugs when automatic releng processes fail. + + See https://pagure.io/bugyou for more information. diff --git a/inventory/group_vars/bugyou-stg b/inventory/group_vars/bugyou-stg new file mode 100644 index 0000000000..4d75bafe31 --- /dev/null +++ b/inventory/group_vars/bugyou-stg @@ -0,0 +1,24 @@ +--- +# 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: [] + +fas_client_groups: sysadmin-noc,sysadmin-releng,sysadmin-fedimg,sysadmin-datanommer + +# For the MOTD +csi_security_category: Moderate +csi_primary_contact: Fedora admins - admin@fedoraproject.org +csi_purpose: Run the 'bugyou' fedmsg process that files automatic bugs in pagure +csi_relationship: | + This node runs 'bugyou', a fedmsg consumer that files pagure bugs in + response to fedmsg bus activity. + + It is primarily used to file bugs when automatic releng processes fail. + + See https://pagure.io/bugyou for more information. diff --git a/inventory/host_vars/bugyou01.phx2.fedoraproject.org b/inventory/host_vars/bugyou01.phx2.fedoraproject.org new file mode 100644 index 0000000000..3d42330c02 --- /dev/null +++ b/inventory/host_vars/bugyou01.phx2.fedoraproject.org @@ -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.129 + +volgroup: /dev/vg_guests +vmhost: virthost22.phx2.fedoraproject.org +datacenter: phx2 +freezes: true diff --git a/inventory/host_vars/bugyou01.stg.phx2.fedoraproject.org b/inventory/host_vars/bugyou01.stg.phx2.fedoraproject.org new file mode 100644 index 0000000000..ff9adaa3ff --- /dev/null +++ b/inventory/host_vars/bugyou01.stg.phx2.fedoraproject.org @@ -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.130 + +volgroup: /dev/vg_virthost16 +vmhost: virthost16.phx2.fedoraproject.org +datacenter: phx2 diff --git a/inventory/inventory b/inventory/inventory index f958b928b6..a478288db0 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -90,6 +90,12 @@ bodhi04.phx2.fedoraproject.org [bodhi2-stg] bodhi02.stg.phx2.fedoraproject.org +[bugyou] +bugyou01.phx2.fedoraproject.org + +[bugyou-stg] +bugyou01.stg.phx2.fedoraproject.org + [bugzilla2fedmsg] bugzilla2fedmsg01.phx2.fedoraproject.org @@ -588,6 +594,7 @@ badges-web01.stg.phx2.fedoraproject.org blockerbugs01.stg.phx2.fedoraproject.org bodhi02.stg.phx2.fedoraproject.org bodhi-backend01.stg.phx2.fedoraproject.org +bugyou01.stg.phx2.fedoraproject.org bugzilla2fedmsg01.stg.phx2.fedoraproject.org buildvm-01.stg.phx2.fedoraproject.org busgateway01.stg.phx2.fedoraproject.org @@ -809,6 +816,7 @@ resultsdb-stg01.qa.fedoraproject.org autocloud-backend badges-backend busgateway +bugyou fedimg hotness notifs-backend @@ -820,6 +828,7 @@ summershum autocloud-backend-stg badges-backend-stg busgateway-stg +bugyou-stg fedimg-stg hotness-stg notifs-backend-stg diff --git a/playbooks/groups/bugyou.yml b/playbooks/groups/bugyou.yml new file mode 100644 index 0000000000..d1e8dc5cc0 --- /dev/null +++ b/playbooks/groups/bugyou.yml @@ -0,0 +1,69 @@ +# create a new bugyou 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 + +- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=bugyou:bugyou-stg" + +- name: dole out the generic configuration + hosts: bugyou;bugyou-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 + + roles: + - base + - rkhunter + - { role: denyhosts, when: ansible_distribution_major_version|int != 7 } + - nagios_client + - collectd/base + - hosts + - fas_client + - sudo + + 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: bugyou;bugyou-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 + + roles: + - fedmsg/base + + handlers: + - include: "{{ handlers }}/restart_services.yml" + +- name: dole out the service-specific config + hosts: bugyou;bugyou-stg + user: root + gather_facts: True + + roles: + - fedmsg/hub + #- bugyou # TODO -- we still have to write this role. + - role: collectd/fedmsg-service + process: fedmsg-hub + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + handlers: + - include: "{{ handlers }}/restart_services.yml"