diff --git a/inventory/group_vars/qa-stg b/inventory/group_vars/qa-stg index dfbcd25160..1c1a8d6efd 100644 --- a/inventory/group_vars/qa-stg +++ b/inventory/group_vars/qa-stg @@ -62,8 +62,9 @@ buildslave_port: 9989 buildmaster_dir: /home/buildmaster/master buildslave_dir: /home/buildslave/slave buildslave_poll_interval: 1800 -master_dir: /home/buildmaster/master -master_user: buildmaster +buildmaster_home: /home/buildmaster +buildmaster_dir: /home/buildmaster/master +buildmaster_user: buildmaster # build details repo_base: 'https://git.qadevel-stg.cloud.fedoraproject.org/diffusion' diff --git a/inventory/group_vars/qadevel b/inventory/group_vars/qadevel index f0327b7243..7f6f21259a 100644 --- a/inventory/group_vars/qadevel +++ b/inventory/group_vars/qadevel @@ -33,8 +33,9 @@ buildslave_port: 9989 buildmaster_dir: /home/buildmaster/master buildslave_dir: /home/buildslave/slave buildslave_poll_interval: 1800 -master_dir: /home/buildmaster/master -master_user: buildmaster +buildmaster_home: /home/buildmaster +buildmaster_dir: /home/buildmaster/master +buildmaster_user: buildmaster external_hostname: qadevel.cloud.fedoraproject.org # for now, we're just doing a local slave so we need the slave vars in here diff --git a/inventory/group_vars/taskotron-dev b/inventory/group_vars/taskotron-dev index cbfe764fa1..e8599e93c2 100644 --- a/inventory/group_vars/taskotron-dev +++ b/inventory/group_vars/taskotron-dev @@ -67,9 +67,10 @@ buildmaster_endpoint: taskmaster buildslave_ssh_pubkey: 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4EOTNfPIvIjCLNRYauVquS2LA8CZvCi6f87TASDZv4moFTv3mrCIdA3ycYLg+r+ODdPDjF9Cjpw1os/8L07XegTt9gAJVIpxzu3ZgQDkSQbx/hlDi+RG4EOIHL8nNJmu27dOVd1tb3k3aOkP5twO4uEq9RygrQBWMZTmOHdS/q8ZVUQG0d1sKv2J8EuBENgICjjIhhYvdvluu3G65jKxMgDbSXjkK6vZpbDbS2d6JI3VeLbVGlyFbHkTu7vH/vzTJZfOYgp0ZbvW9Wo3VSq/ia5qtrLKwRcBkpyCkP6uOQ14zqj4zJd/Hv7qhEcUhC8Jsb7d/Z6b3q5ID0s/9nuHdQ== buildslave@taskotron-dev01.qa.fedoraproject.org' buildslave_port: 9989 cgit_root_title: "Taskotron Dev Server Git Mirror" +buildmaster_user: buildmaster +buildmaster_home: /srv/buildmaster buildmaster_dir: /srv/buildmaster/master buildslave_dir: /home/buildslave/slave -master_user: buildmaster ############################################################ diff --git a/inventory/group_vars/taskotron-prod b/inventory/group_vars/taskotron-prod index f63af06b30..7c1e5c7cb9 100644 --- a/inventory/group_vars/taskotron-prod +++ b/inventory/group_vars/taskotron-prod @@ -15,8 +15,9 @@ buildslave_port: 9989 cgit_root_title: "Taskotron Git Mirror" buildmaster_dir: /home/buildmaster/master buildslave_dir: /home/buildslave/slave -master_dir: /home/buildmaster/master -master_user: buildmaster +buildmaster_home: /home/buildmaster +buildmaster_dir: /home/buildmaster/master +buildmaster_user: buildmaster external_hostname: taskotron.fedoraproject.org resultsdb_url: http://resultsdb01.qa.fedoraproject.org/resultsdb_api/api/v1.0 resultsdb_frontend_url: http://resultsdb01.qa.fedoraproject.org/resultsdb diff --git a/inventory/group_vars/taskotron-stg b/inventory/group_vars/taskotron-stg index 8c3f4ae279..6d2f842e7c 100644 --- a/inventory/group_vars/taskotron-stg +++ b/inventory/group_vars/taskotron-stg @@ -15,8 +15,9 @@ buildslave_port: 9989 cgit_root_title: "Taskotron Stg Server Git Mirror" buildmaster_dir: /home/buildmaster/master buildslave_dir: /home/buildslave/slave -master_dir: /home/buildmaster/master -master_user: buildmaster +buildmaster_home: /home/buildmaster/master +buildmaster_dir: /home/buildmaster/master +buildmaster_user: buildmaster external_hostname: taskotron.stg.fedoraproject.org resultsdb_url: http://resultsdb-stg01.qa.fedoraproject.org/resultsdb_api/api/v1.0 resultsdb_frontend_url: http://resultsdb-stg01.qa.fedoraproject.org/ diff --git a/playbooks/groups/taskotron-dev.yml b/playbooks/groups/taskotron-dev.yml index d6e59d2de6..d5224fd9ed 100644 --- a/playbooks/groups/taskotron-dev.yml +++ b/playbooks/groups/taskotron-dev.yml @@ -57,31 +57,3 @@ handlers: - include: "{{ handlers }}/restart_services.yml" - - -############################################################ -# buildbot master setup -# -# Since the buildmaster runs as non-root, do the config as -# the appropriate non-root user -############################################################ - -# all the bits needed for this are not in this repo yet -#- name: buildbot master setup -# hosts: taskotron-dev -# sudo: yes -# sudo_user: "{{ master_user }}" -# tags: -# - buildmasterconfig -# -# # this eventually needs to differentiate between staging and production cedrts -# vars_files: -# - /srv/web/infra/ansible/vars/global.yml -# - "/srv/private/ansible/vars.yml" -# - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml -# -# tasks: -# - include: "{{ tasks }}/buildmaster-config.yml" -# -# handlers: -# - include: "{{ handlers }}/restart_services.yml" diff --git a/roles/batcave/files/sync-rhn b/roles/batcave/files/sync-rhn index ceb6cbe2b4..1da20513f6 100644 --- a/roles/batcave/files/sync-rhn +++ b/roles/batcave/files/sync-rhn @@ -1,3 +1,4 @@ -30 1 * * * root /mnt/fedora/app/fi-repo/rhel/do-rhel-sync 2> /dev/null MAILTO=kevin@fedoraproject.org +30 1 * * * root /mnt/fedora/app/fi-repo/rhel/rhel5/rhel5-sync +30 2 * * * root /mnt/fedora/app/fi-repo/rhel/rhel6/rhel6-sync 30 3 * * * root /mnt/fedora/app/fi-repo/rhel/rhel7/rhel7-sync diff --git a/roles/fedmsg/base/templates/logging.py.j2 b/roles/fedmsg/base/templates/logging.py.j2 index 5eaf87d459..a29096ba4b 100644 --- a/roles/fedmsg/base/templates/logging.py.j2 +++ b/roles/fedmsg/base/templates/logging.py.j2 @@ -140,7 +140,15 @@ config = dict( formatters=dict( bare={ "datefmt": "%Y-%m-%d %H:%M:%S", + {% if inventory_hostname.startswith('bodhi-backend01') %} + # Here we use a different format just so we can include + # threadName. We set the threadName in the bodhi masher to some + # useful strings that will tell us which branch is doing what. + # See https://github.com/fedora-infra/bodhi/commit/66d94094 + "format": "[%(asctime)s][%(name)10s %(levelname)7s]%(threadName)s %(message)s" + {% else %} "format": "[%(asctime)s][%(name)10s %(levelname)7s] %(message)s" + {% endif %} }, hefty={ "datefmt": "%Y-%m-%d %H:%M:%S", diff --git a/roles/taskotron/buildmaster-configure/tasks/main.yml b/roles/taskotron/buildmaster-configure/tasks/main.yml index 73673cf7bb..328aa3ee31 100644 --- a/roles/taskotron/buildmaster-configure/tasks/main.yml +++ b/roles/taskotron/buildmaster-configure/tasks/main.yml @@ -1,16 +1,16 @@ - name: create master sudo: true - sudo_user: "{{ master_user }}" + sudo_user: "{{ buildmaster_user }}" command: creates={{ buildmaster_dir }} buildbot create-master -r {{ buildmaster_dir }} - name: upload master config sudo: true - sudo_user: "{{ master_user }}" - template: src={{ buildmaster_template }} dest={{ buildmaster_dir }}/master.cfg owner={{ master_user }} group={{ master_user }} + sudo_user: "{{ buildmaster_user }}" + template: src={{ buildmaster_template }} dest={{ buildmaster_dir }}/master.cfg owner={{ buildmaster_user }} group={{ buildmaster_user }} - name: check master config sudo: true - sudo_user: "{{ master_user }}" + sudo_user: "{{ buildmaster_user }}" command: buildbot checkconfig {{ buildmaster_dir }} #- name: upgrade master @@ -24,5 +24,5 @@ - name: reconfig master sudo: true - sudo_user: "{{ master_user }}" + sudo_user: "{{ buildmaster_user }}" command: buildbot reconfig {{ buildmaster_dir }} diff --git a/roles/taskotron/buildmaster/tasks/main.yml b/roles/taskotron/buildmaster/tasks/main.yml index 385e2836b0..ecde63cb8e 100644 --- a/roles/taskotron/buildmaster/tasks/main.yml +++ b/roles/taskotron/buildmaster/tasks/main.yml @@ -23,7 +23,12 @@ - python-novaclient - name: add the buildmaster user - user: name={{ master_user }} + user: name={{ buildmaster_user }} home={{ buildmaster_home }} + + +- name: ensure buildmaster user can use home directory + file: path="{{ buildmaster_home }}" state=directory owner=buildmaster group=buildmaster mode=0775 setype=user_home_t + when: deployment_type == 'prod' or deployment_type == 'stg' or deployment_type == 'dev' or deployment_type == 'local' - name: allow httpd tcp connections with selinux seboolean: name=httpd_can_network_connect state=true persistent=yes @@ -84,7 +89,3 @@ - name: put robots.txt at web root of external hostname when: robots_path is defined template: src=robots.txt.j2 dest={{ robots_path }}/robots.txt owner=apache group=apache mode=0644 - -- name: ensure buildmaster user can use parent of buildmaster dir - file: path="{{ buildmaster_dir }}/.." state=directory owner=buildmaster group=buildmaster mode=0775 - when: deployment_type == 'prod' or deployment_type == 'stg' or deployment_type == 'dev' or deployment_type == 'local'