Compare commits
No commits in common. "70eaaf01121cb7646ac5b6215d5d481224e979bd" and "f6cb7f343ade5050f4b411bd510c2d687a05443b" have entirely different histories.
70eaaf0112
...
f6cb7f343a
@ -13,10 +13,3 @@
|
|||||||
# range "end" parameter is exclusive, so add 1
|
# range "end" parameter is exclusive, so add 1
|
||||||
loop: "{{ range(1, (openqa_worker_count | int + 1)) | list }}"
|
loop: "{{ range(1, (openqa_worker_count | int + 1)) | list }}"
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
ignore_errors: "{{ ansible_check_mode }}"
|
||||||
|
|
||||||
- name: Restart httpd
|
|
||||||
ansible.builtin.service:
|
|
||||||
name: httpd
|
|
||||||
state: restarted
|
|
||||||
enabled: true
|
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
# Configure an openQA worker host
|
# Configure an openQA worker host
|
||||||
#
|
# This playbook is *NOT* intended for WAN-facing systems!
|
||||||
# Usages:
|
|
||||||
# # Install and configure an openQA worker-only host
|
|
||||||
# ansible-playbook init-rocky-openqa-worker-host.yml
|
|
||||||
#
|
|
||||||
# # Install and configure an openQA worker-only host with a parameters file
|
|
||||||
# ansible-playbook init-rocky-openqa-worker-host.yml -e @my-worker-host.yml
|
|
||||||
#
|
#
|
||||||
# Created: @akatch
|
# Created: @akatch
|
||||||
---
|
---
|
||||||
|
@ -11,16 +11,15 @@
|
|||||||
remote_src: true
|
remote_src: true
|
||||||
src: /etc/httpd/conf.d/{{ item }}.template
|
src: /etc/httpd/conf.d/{{ item }}.template
|
||||||
dest: /etc/httpd/conf.d/{{ item }}
|
dest: /etc/httpd/conf.d/{{ item }}
|
||||||
mode: "0644"
|
mode: '0644'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
loop:
|
loop:
|
||||||
- openqa.conf
|
- openqa.conf
|
||||||
- openqa-ssl.conf
|
- openqa-ssl.conf
|
||||||
notify: Restart httpd
|
notify: restart_httpd
|
||||||
tags:
|
tags:
|
||||||
- configure
|
- configure
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
|
||||||
|
|
||||||
- name: Template OpenQA configuration files
|
- name: Template OpenQA configuration files
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
@ -34,11 +33,9 @@
|
|||||||
- client.conf
|
- client.conf
|
||||||
tags:
|
tags:
|
||||||
- configure
|
- configure
|
||||||
notify: Restart openQA workers
|
|
||||||
|
|
||||||
- name: Get service facts
|
- name: Get service facts
|
||||||
ansible.builtin.service_facts:
|
ansible.builtin.service_facts:
|
||||||
check_mode: false
|
|
||||||
|
|
||||||
- name: Check for non-empty postgres data directory
|
- name: Check for non-empty postgres data directory
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
@ -50,7 +47,6 @@
|
|||||||
when: not ( ansible_facts.services["postgresql.service"]["state"] == "running" )
|
when: not ( ansible_facts.services["postgresql.service"]["state"] == "running" )
|
||||||
and not postgres_data_dir.stat.exists
|
and not postgres_data_dir.stat.exists
|
||||||
changed_when: true
|
changed_when: true
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
|
||||||
|
|
||||||
- name: Enable and start postgresql service
|
- name: Enable and start postgresql service
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
@ -59,7 +55,6 @@
|
|||||||
enabled: true
|
enabled: true
|
||||||
when: not ( ansible_facts.services["postgresql.service"]["state"] == "running" )
|
when: not ( ansible_facts.services["postgresql.service"]["state"] == "running" )
|
||||||
and not postgres_data_dir.stat.exists
|
and not postgres_data_dir.stat.exists
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
|
||||||
|
|
||||||
- name: Configure SELinux to allow httpd connection to network
|
- name: Configure SELinux to allow httpd connection to network
|
||||||
ansible.posix.seboolean:
|
ansible.posix.seboolean:
|
||||||
@ -77,7 +72,6 @@
|
|||||||
loop: "{{ openqa_services }}"
|
loop: "{{ openqa_services }}"
|
||||||
tags:
|
tags:
|
||||||
- configure
|
- configure
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
|
||||||
|
|
||||||
- name: Create openqa-vnc firewalld service
|
- name: Create openqa-vnc firewalld service
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
@ -88,11 +82,13 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- configure
|
- configure
|
||||||
notify: Reload firewalld
|
|
||||||
|
|
||||||
- name: Systemctl daemon-reload
|
- name: Load openqa-vnc firewalld service
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
name: firewalld
|
||||||
|
state: reloaded
|
||||||
|
tags:
|
||||||
|
- configure
|
||||||
|
|
||||||
- name: Permit traffic for http and openqa-vnc services
|
- name: Permit traffic for http and openqa-vnc services
|
||||||
ansible.posix.firewalld:
|
ansible.posix.firewalld:
|
||||||
@ -104,7 +100,13 @@
|
|||||||
- openqa-vnc
|
- openqa-vnc
|
||||||
tags:
|
tags:
|
||||||
- configure
|
- configure
|
||||||
notify: Reload firewalld
|
|
||||||
|
- name: Reload FirewallD
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: firewalld
|
||||||
|
state: reloaded
|
||||||
|
tags:
|
||||||
|
- configure
|
||||||
|
|
||||||
- name: Check for existing repository
|
- name: Check for existing repository
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
@ -129,18 +131,63 @@
|
|||||||
recurse: true
|
recurse: true
|
||||||
owner: "{{ openqa_user }}"
|
owner: "{{ openqa_user }}"
|
||||||
group: "{{ openqa_group }}"
|
group: "{{ openqa_group }}"
|
||||||
mode: "0775"
|
mode: "u+rwX,g+rwX,o+rX,o-w"
|
||||||
tags:
|
tags:
|
||||||
- configure
|
- configure
|
||||||
|
|
||||||
- name: Create asset directories
|
# fifloader.py will fail if the Demo user is not logged in
|
||||||
|
- name: Authenticate to web UI the first time
|
||||||
|
ansible.builtin.uri:
|
||||||
|
url: "http://{{ openqa_host }}/login"
|
||||||
|
|
||||||
|
- name: Run fifloader.py
|
||||||
|
ansible.builtin.command: ./fifloader.py -l -c templates.fif.json templates-updates.fif.json
|
||||||
|
changed_when: "1 != 1"
|
||||||
|
args:
|
||||||
|
chdir: "{{ openqa_homedir }}/share/tests/rocky"
|
||||||
|
|
||||||
|
- name: Create ISO directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ openqa_homedir }}/share/factory/{{ item }}/fixed"
|
path: "{{ openqa_homedir }}/share/factory/iso/fixed"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ openqa_user }}"
|
owner: "{{ openqa_user }}"
|
||||||
group: "{{ openqa_group }}"
|
group: "{{ openqa_group }}"
|
||||||
mode: "0775"
|
mode: "0775"
|
||||||
loop:
|
tags:
|
||||||
- iso
|
- download_isos
|
||||||
- hdd
|
|
||||||
|
- name: Download ISOs
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
dest: "{{ openqa_homedir }}/share/factory/iso/fixed/{{ item.name }}"
|
||||||
|
url: "{{ rocky_iso_download_url }}/{{ item.name }}"
|
||||||
|
checksum: "{{ item.checksum }}"
|
||||||
|
owner: "{{ openqa_user }}"
|
||||||
|
group: "{{ openqa_group }}"
|
||||||
|
tmp_dest: "/var/tmp"
|
||||||
|
mode: "0644"
|
||||||
|
loop: "{{ openqa_isos }}"
|
||||||
|
tags:
|
||||||
|
- download_isos
|
||||||
|
|
||||||
|
- name: Start OpenQA workers
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: "openqa-worker@{{ item }}"
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
# range 'end' parameter is exclusive, so add 1
|
||||||
|
loop: "{{ range(1, (openqa_worker_count | int + 1)) | list }}"
|
||||||
|
tags:
|
||||||
|
- start_workers
|
||||||
|
- configure
|
||||||
|
|
||||||
|
- name: POST a job
|
||||||
|
ansible.builtin.command: |
|
||||||
|
openqa-cli api -X POST isos \
|
||||||
|
ISO=Rocky-{{ rocky_version }}-{{ rocky_arch }}-minimal.iso \
|
||||||
|
ARCH={{ rocky_arch }} \
|
||||||
|
DISTRI=rocky \
|
||||||
|
FLAVOR=minimal-iso \
|
||||||
|
VERSION={{ rocky_version }} \
|
||||||
|
BUILD="{{ '%Y%m%d.%H%M%S' | strftime }}.0"
|
||||||
|
changed_when: "1 != 1"
|
||||||
...
|
...
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
[global]
|
[global]
|
||||||
HOST = https://{{ openqa_host }}
|
HOST = https://{{ openqa_host }}
|
||||||
CACHEDIRECTORY = /var/lib/openqa/cache
|
CACHEDIRECTORY = /var/lib/openqa/cache # desired cache location
|
||||||
CACHE_MIN_FREE_PERCENTAGE = 10
|
CACHELIMIT = 50 # max. cache size in GiB, defaults to 50
|
||||||
|
CACHE_MIN_FREE_PERCENTAGE = 10 # min. free disk space to preserve in percent
|
||||||
|
CACHEWORKERS = 5 # number of parallel cache minion workers, defaults to 5
|
||||||
|
|
||||||
[https://{{ openqa_host }}]
|
[https://{{ openqa_host }}]
|
||||||
TESTPOOLSERVER = rsync://{{ openqa_host }}/tests
|
TESTPOOLSERVER = rsync://{{ openqa_host }}/tests # also cache tests (via rsync)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
# The primary openQA host
|
# The primary openQA host
|
||||||
openqa_host: localhost
|
openqa_host: openqa.rockylinux.org
|
||||||
openqa_client_key: 1234567890ABCDEF
|
openqa_client_key: 1234567890ABCDEF
|
||||||
openqa_client_secret: 1234567890ABCDEF
|
openqa_client_secret: 1234567890ABCDEF
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ openqa_user: geekotest
|
|||||||
openqa_group: geekotest
|
openqa_group: geekotest
|
||||||
|
|
||||||
# The number of workers to enable on this system
|
# The number of workers to enable on this system
|
||||||
openqa_worker_count: 1
|
openqa_worker_count: 2
|
||||||
|
|
||||||
# Port range to open for VNC access to local workers.
|
# Port range to open for VNC access to local workers.
|
||||||
# The max port should be 5990 + n where n is the total
|
# The max port should be 5990 + n where n is the total
|
||||||
|
Loading…
Reference in New Issue
Block a user