openqa: update roles for openqa_fedora_tools repo split

We split fedora_openqa and createhdds out into their own repos,
this should adapt to the change (I hope).
This commit is contained in:
Adam Williamson 2017-02-14 16:57:23 -08:00
parent 1516393f04
commit cc95c6482b
5 changed files with 43 additions and 30 deletions

View file

@ -16,8 +16,10 @@
# - wikitcms_password
## string - password for relval_user
# - deployment_type
## string - Fedora Infrastructure thing; for this role, decides
## whether and where to submit wiki results
## string - Fedora Infrastructure thing; for this role, the
## fedora_openqa config file will be set appropriately
## for infra deployments if this is set, so don't set
## it for private deployments
#
# When all of the above are set, a wikitcms 'credentials' file will
# be created and result submission to the wiki will be enabled. If
@ -75,25 +77,29 @@
chdir: /root/openQA-python-client
when: "gitclient|changed or instclient.rc > 0"
# We check this out to a different place from the 'server' task, because
# otherwise it's hard to make sure we install each time it changes.
- name: Check out openqa_fedora_tools
- name: Remove old openqa_fedora_tools checkout
file: path=/root/openqa_fedora_tools-dispatcher state=absent
- name: Remove old fedora-openqa-schedule script
file: path=/usr/bin/fedora-openqa-schedule state=absent
- name: Check out fedora_openqa (scheduler / reporter tool)
git:
repo: https://bitbucket.org/rajcze/openqa_fedora_tools
dest: /root/openqa_fedora_tools-dispatcher
repo: https://pagure.io/fedora-qa/fedora_openqa.git
dest: /root/fedora_openqa
register: gittools
- name: Check if openqa_fedora_tools has ever been installed
stat: path=/usr/bin/fedora-openqa-schedule
- name: Check if fedora_openqa has ever been installed
stat: path=/usr/bin/fedora-openqa
register: insttools
changed_when: "1 != 1"
failed_when: "1 != 1"
check_mode: no
- name: Install openqa_fedora_tools
- name: Install fedora_openqa
command: "python setup.py install"
args:
chdir: /root/openqa_fedora_tools-dispatcher/scheduler
chdir: /root/fedora_openqa
when: "gittools|changed or not insttools.stat.exists"
notify:
- restart fedmsg-hub
@ -103,7 +109,7 @@
tags:
- config
- name: Create fedora-openqa-schedule config directory
- name: Create fedora_openqa config directory
file: path=/etc/fedora-openqa state=directory owner=root group=root mode=0755
- name: Write schedule.conf

View file

@ -1,13 +1,14 @@
config = {
{% if openqa_consumer %}
'fedora_openqa_schedule.consumer.enabled': True,
'fedora_openqa.scheduler.prod.enabled': True,
{% endif %}
{% if wikitcms_user is defined and wikitcms_password is defined %}
{% if deployment_type is defined and deployment_type == 'prod' %}
'fedora_openqa_schedule.wiki.consumer.prod.enabled': True,
'fedora_openqa_schedule.resultsdb.reporter.prod.enabled': True,
'fedora_openqa.reporter.wiki.prod.enabled': True,
'fedora_openqa.reporter.resultsdb.prod.enabled': True,
{% elif deployment_type is defined and deployment_type == 'stg' %}
'fedora_openqa_schedule.wiki.consumer.stg.enabled': True,
'fedora_openqa.reporter.wiki.stg.enabled': True,
'fedora_openqa.reporter.resultsdb.stg.enabled': True,
{% endif %}
{% endif %}
}

View file

@ -1,14 +1,18 @@
[report]
openqa_url: https://{{ external_hostname|default(ansible_nodename) }}
{% if wikitcms_user is defined and wikitcms_password is defined %}
submit_wiki: true
submit_resultsdb: true
{% else %}
submit_wiki: false
submit_resultsdb: false
{% endif %}
{% if deployment_type is defined and deployment_type == 'prod' %}
resultsdb_url: http://resultsdb01.qa.fedoraproject.org/resultsdb_api/api/v2.0/
wiki_hostname: fedoraproject.org
prod_oqa_baseurl: https://{{ external_hostname|default(ansible_nodename) }}
prod_wiki_hostname: fedoraproject.org
prod_wiki_report: true
prod_rdb_url: http://resultsdb01.qa.fedoraproject.org/resultsdb_api/api/v2.0/
prod_rdb_report: true
{% elif deployment_type is defined and deployment_type == 'stg' %}
resultsdb_url: http://resultsdb-stg01.qa.fedoraproject.org/resultsdb_api/api/v2.0/
wiki_hostname: stg.fedoraproject.org
stg_oqa_baseurl: https://{{ external_hostname|default(ansible_nodename) }}
stg_wiki_hostname: stg.fedoraproject.org
stg_wiki_report: true
stg_rdb_url: http://resultsdb-stg01.qa.fedoraproject.org/resultsdb_api/api/v2.0/
stg_rdb_report: true
{% endif %}

View file

@ -1,4 +1,4 @@
#!/bin/sh
cd /var/lib/openqa/share/factory/hdd/fixed
LIBGUESTFS_BACKEND=direct withlock /var/lock/createhdds.lock /root/openqa_fedora_tools/tools/createhdds.py all --clean
LIBGUESTFS_BACKEND=direct withlock /var/lock/createhdds.lock /root/createhdds/createhdds.py all --clean

View file

@ -120,11 +120,13 @@
become_user: geekotest
when: "(testsbranch.stdout.find('Not a git repository') != -1) or (testsbranch.stdout.find('On branch master') != -1)"
- name: Check out openqa_fedora_tools
- name: Remove old openqa_fedora_tools checkout
file: path=/root/openqa_fedora_tools state=absent
- name: Check out createhdds
git:
repo: https://bitbucket.org/rajcze/openqa_fedora_tools
dest: /root/openqa_fedora_tools
register: git_result
repo: https://pagure.io/fedora-qa/createhdds.git
dest: /root/createhdds
- name: Create asset directories
file: path={{ item }} state=directory owner=geekotest group=root mode=0755
@ -139,7 +141,7 @@
copy: src=createhdds dest=/etc/cron.daily/createhdds owner=root group=root mode=0755
- name: Check if any hard disk images need (re)building
command: "/root/openqa_fedora_tools/tools/createhdds.py check"
command: "/root/createhdds/createhdds.py check"
args:
chdir: /var/lib/openqa/share/factory/hdd/fixed
register: diskcheck