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:
parent
1516393f04
commit
cc95c6482b
5 changed files with 43 additions and 30 deletions
roles/openqa
dispatcher
server
|
@ -16,8 +16,10 @@
|
||||||
# - wikitcms_password
|
# - wikitcms_password
|
||||||
## string - password for relval_user
|
## string - password for relval_user
|
||||||
# - deployment_type
|
# - deployment_type
|
||||||
## string - Fedora Infrastructure thing; for this role, decides
|
## string - Fedora Infrastructure thing; for this role, the
|
||||||
## whether and where to submit wiki results
|
## 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
|
# When all of the above are set, a wikitcms 'credentials' file will
|
||||||
# be created and result submission to the wiki will be enabled. If
|
# be created and result submission to the wiki will be enabled. If
|
||||||
|
@ -75,25 +77,29 @@
|
||||||
chdir: /root/openQA-python-client
|
chdir: /root/openQA-python-client
|
||||||
when: "gitclient|changed or instclient.rc > 0"
|
when: "gitclient|changed or instclient.rc > 0"
|
||||||
|
|
||||||
# We check this out to a different place from the 'server' task, because
|
- name: Remove old openqa_fedora_tools checkout
|
||||||
# otherwise it's hard to make sure we install each time it changes.
|
file: path=/root/openqa_fedora_tools-dispatcher state=absent
|
||||||
- name: Check out openqa_fedora_tools
|
|
||||||
|
- 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:
|
git:
|
||||||
repo: https://bitbucket.org/rajcze/openqa_fedora_tools
|
repo: https://pagure.io/fedora-qa/fedora_openqa.git
|
||||||
dest: /root/openqa_fedora_tools-dispatcher
|
dest: /root/fedora_openqa
|
||||||
register: gittools
|
register: gittools
|
||||||
|
|
||||||
- name: Check if openqa_fedora_tools has ever been installed
|
- name: Check if fedora_openqa has ever been installed
|
||||||
stat: path=/usr/bin/fedora-openqa-schedule
|
stat: path=/usr/bin/fedora-openqa
|
||||||
register: insttools
|
register: insttools
|
||||||
changed_when: "1 != 1"
|
changed_when: "1 != 1"
|
||||||
failed_when: "1 != 1"
|
failed_when: "1 != 1"
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
- name: Install openqa_fedora_tools
|
- name: Install fedora_openqa
|
||||||
command: "python setup.py install"
|
command: "python setup.py install"
|
||||||
args:
|
args:
|
||||||
chdir: /root/openqa_fedora_tools-dispatcher/scheduler
|
chdir: /root/fedora_openqa
|
||||||
when: "gittools|changed or not insttools.stat.exists"
|
when: "gittools|changed or not insttools.stat.exists"
|
||||||
notify:
|
notify:
|
||||||
- restart fedmsg-hub
|
- restart fedmsg-hub
|
||||||
|
@ -103,7 +109,7 @@
|
||||||
tags:
|
tags:
|
||||||
- config
|
- 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
|
file: path=/etc/fedora-openqa state=directory owner=root group=root mode=0755
|
||||||
|
|
||||||
- name: Write schedule.conf
|
- name: Write schedule.conf
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
config = {
|
config = {
|
||||||
{% if openqa_consumer %}
|
{% if openqa_consumer %}
|
||||||
'fedora_openqa_schedule.consumer.enabled': True,
|
'fedora_openqa.scheduler.prod.enabled': True,
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if wikitcms_user is defined and wikitcms_password is defined %}
|
{% if wikitcms_user is defined and wikitcms_password is defined %}
|
||||||
{% if deployment_type is defined and deployment_type == 'prod' %}
|
{% if deployment_type is defined and deployment_type == 'prod' %}
|
||||||
'fedora_openqa_schedule.wiki.consumer.prod.enabled': True,
|
'fedora_openqa.reporter.wiki.prod.enabled': True,
|
||||||
'fedora_openqa_schedule.resultsdb.reporter.prod.enabled': True,
|
'fedora_openqa.reporter.resultsdb.prod.enabled': True,
|
||||||
{% elif deployment_type is defined and deployment_type == 'stg' %}
|
{% 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 %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
[report]
|
[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' %}
|
{% if deployment_type is defined and deployment_type == 'prod' %}
|
||||||
resultsdb_url: http://resultsdb01.qa.fedoraproject.org/resultsdb_api/api/v2.0/
|
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' %}
|
{% elif deployment_type is defined and deployment_type == 'stg' %}
|
||||||
resultsdb_url: http://resultsdb-stg01.qa.fedoraproject.org/resultsdb_api/api/v2.0/
|
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 %}
|
{% endif %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
cd /var/lib/openqa/share/factory/hdd/fixed
|
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
|
||||||
|
|
|
@ -120,11 +120,13 @@
|
||||||
become_user: geekotest
|
become_user: geekotest
|
||||||
when: "(testsbranch.stdout.find('Not a git repository') != -1) or (testsbranch.stdout.find('On branch master') != -1)"
|
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:
|
git:
|
||||||
repo: https://bitbucket.org/rajcze/openqa_fedora_tools
|
repo: https://pagure.io/fedora-qa/createhdds.git
|
||||||
dest: /root/openqa_fedora_tools
|
dest: /root/createhdds
|
||||||
register: git_result
|
|
||||||
|
|
||||||
- name: Create asset directories
|
- name: Create asset directories
|
||||||
file: path={{ item }} state=directory owner=geekotest group=root mode=0755
|
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
|
copy: src=createhdds dest=/etc/cron.daily/createhdds owner=root group=root mode=0755
|
||||||
|
|
||||||
- name: Check if any hard disk images need (re)building
|
- 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:
|
args:
|
||||||
chdir: /var/lib/openqa/share/factory/hdd/fixed
|
chdir: /var/lib/openqa/share/factory/hdd/fixed
|
||||||
register: diskcheck
|
register: diskcheck
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue