initial ansible config for openqa, openqa-stg, openqa workers
This commit is contained in:
parent
5bd2413fa3
commit
6bce843a11
10 changed files with 201 additions and 5 deletions
0
inventory/group_vars/openqa
Normal file
0
inventory/group_vars/openqa
Normal file
0
inventory/group_vars/openqa-stg
Normal file
0
inventory/group_vars/openqa-stg
Normal file
40
inventory/host_vars/openqa-stg01.qa.fedoraproject.org
Normal file
40
inventory/host_vars/openqa-stg01.qa.fedoraproject.org
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
---
|
||||||
|
############################################################
|
||||||
|
# networking
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
nm: 255.255.255.0
|
||||||
|
gw: 10.5.131.254
|
||||||
|
dns: 10.5.126.21
|
||||||
|
eth0_ip: 10.5.131.72
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# install
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-23
|
||||||
|
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/23/Server/x86_64/os/
|
||||||
|
volgroup: /dev/VirtGuests
|
||||||
|
vmhost: virthost-comm03.qa.fedoraproject.org
|
||||||
|
datacenter: phx2
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# virtual machine
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
fas_client_groups: sysadmin-qa,sysadmin-main,fi-apprentice
|
||||||
|
|
||||||
|
lvm_size: 30720
|
||||||
|
mem_size: 4096
|
||||||
|
num_cpus: 4
|
||||||
|
|
||||||
|
nrpe_procs_warn: 250
|
||||||
|
nrpe_procs_crit: 300
|
||||||
|
|
||||||
|
virt_install_command: /usr/bin/virt-install -n {{ inventory_hostname }} -r {{ mem_size }}
|
||||||
|
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
|
||||||
|
--vcpus={{ num_cpus }} -l {{ ks_repo }} -x
|
||||||
|
"ksdevice=eth0 ks={{ ks_url }} console=tty0 console=ttyS0
|
||||||
|
hostname={{ inventory_hostname }} nameserver={{ dns }}
|
||||||
|
ip={{ eth0_ip }}::{{ gw }}:{{ nm }}:{{ inventory_hostname }}:eth0:none"
|
||||||
|
--network=bridge=br0,model=virtio --autostart --noautoconsole
|
40
inventory/host_vars/openqa01.qa.fedoraproject.org
Normal file
40
inventory/host_vars/openqa01.qa.fedoraproject.org
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
---
|
||||||
|
############################################################
|
||||||
|
# networking
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
nm: 255.255.255.0
|
||||||
|
gw: 10.5.131.254
|
||||||
|
dns: 10.5.126.21
|
||||||
|
eth0_ip: 10.5.131.71
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# install
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-23-openqa
|
||||||
|
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/23/Server/x86_64/os/
|
||||||
|
volgroup: /dev/VirtGuests
|
||||||
|
vmhost: virthost-comm03.qa.fedoraproject.org
|
||||||
|
datacenter: phx2
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# virtual machine
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
fas_client_groups: sysadmin-qa,sysadmin-main,fi-apprentice
|
||||||
|
|
||||||
|
lvm_size: 768000
|
||||||
|
mem_size: 4096
|
||||||
|
num_cpus: 4
|
||||||
|
|
||||||
|
nrpe_procs_warn: 250
|
||||||
|
nrpe_procs_crit: 300
|
||||||
|
|
||||||
|
virt_install_command: /usr/bin/virt-install -n {{ inventory_hostname }} -r {{ mem_size }}
|
||||||
|
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
|
||||||
|
--vcpus={{ num_cpus }} -l {{ ks_repo }} -x
|
||||||
|
"ksdevice=eth0 ks={{ ks_url }} console=tty0 console=ttyS0
|
||||||
|
hostname={{ inventory_hostname }} nameserver={{ dns }}
|
||||||
|
ip={{ eth0_ip }}::{{ gw }}:{{ nm }}:{{ inventory_hostname }}:eth0:none"
|
||||||
|
--network=bridge=br0,model=virtio --autostart --noautoconsole
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
freezes: false
|
freezes: true
|
||||||
fas_client_groups: sysadmin-qa,sysadmin-main
|
fas_client_groups: sysadmin-qa,sysadmin-main
|
||||||
sudoers: "{{ private }}/files/sudo/qavirt-sudoers"
|
sudoers: "{{ private }}/files/sudo/qavirt-sudoers"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
freezes: false
|
freezes: true
|
||||||
fas_client_groups: sysadmin-qa,sysadmin-main
|
fas_client_groups: sysadmin-qa,sysadmin-main
|
||||||
sudoers: "{{ private }}/files/sudo/qavirt-sudoers"
|
sudoers: "{{ private }}/files/sudo/qavirt-sudoers"
|
||||||
|
|
|
@ -475,6 +475,19 @@ ns03.phx2.fedoraproject.org
|
||||||
ns04.phx2.fedoraproject.org
|
ns04.phx2.fedoraproject.org
|
||||||
ns05.fedoraproject.org
|
ns05.fedoraproject.org
|
||||||
|
|
||||||
|
[openqa]
|
||||||
|
openqa01.qa.fedoraproject.org
|
||||||
|
|
||||||
|
[openqa-workers]
|
||||||
|
qa05.qa.fedoraproject.org
|
||||||
|
qa06.qa.fedoraproject.org
|
||||||
|
|
||||||
|
[openqa-stg]
|
||||||
|
openqa-stg01.qa.fedoraproject.org
|
||||||
|
|
||||||
|
[openqa-stg-workers]
|
||||||
|
qa07.qa.fedoraproject.org
|
||||||
|
|
||||||
[packages]
|
[packages]
|
||||||
packages03.phx2.fedoraproject.org
|
packages03.phx2.fedoraproject.org
|
||||||
packages04.phx2.fedoraproject.org
|
packages04.phx2.fedoraproject.org
|
||||||
|
@ -740,9 +753,6 @@ virthost21.phx2.fedoraproject.org
|
||||||
virthost22.phx2.fedoraproject.org
|
virthost22.phx2.fedoraproject.org
|
||||||
qa03.qa.fedoraproject.org
|
qa03.qa.fedoraproject.org
|
||||||
qa04.qa.fedoraproject.org
|
qa04.qa.fedoraproject.org
|
||||||
qa05.qa.fedoraproject.org
|
|
||||||
qa06.qa.fedoraproject.org
|
|
||||||
qa07.qa.fedoraproject.org
|
|
||||||
qa09.qa.fedoraproject.org
|
qa09.qa.fedoraproject.org
|
||||||
qa10.qa.fedoraproject.org
|
qa10.qa.fedoraproject.org
|
||||||
qa11.qa.fedoraproject.org
|
qa11.qa.fedoraproject.org
|
||||||
|
|
|
@ -74,6 +74,8 @@
|
||||||
- include: /srv/web/infra/ansible/playbooks/groups/notifs-web.yml
|
- include: /srv/web/infra/ansible/playbooks/groups/notifs-web.yml
|
||||||
- include: /srv/web/infra/ansible/playbooks/groups/nuancier.yml
|
- include: /srv/web/infra/ansible/playbooks/groups/nuancier.yml
|
||||||
- include: /srv/web/infra/ansible/playbooks/groups/openstack-compute-nodes.yml
|
- include: /srv/web/infra/ansible/playbooks/groups/openstack-compute-nodes.yml
|
||||||
|
#- include: /srv/web/infra/ansible/playbooks/groups/openqa.yml
|
||||||
|
#- include: /srv/web/infra/ansible/playbooks/groups/openqa-workers.yml
|
||||||
#- include: /srv/web/infra/ansible/playbooks/groups/osbs.yml
|
#- include: /srv/web/infra/ansible/playbooks/groups/osbs.yml
|
||||||
- include: /srv/web/infra/ansible/playbooks/groups/packages.yml
|
- include: /srv/web/infra/ansible/playbooks/groups/packages.yml
|
||||||
- include: /srv/web/infra/ansible/playbooks/groups/pagure.yml
|
- include: /srv/web/infra/ansible/playbooks/groups/pagure.yml
|
||||||
|
|
52
playbooks/groups/openqa-workers.yml
Normal file
52
playbooks/groups/openqa-workers.yml
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
# create a new openqa worker server system
|
||||||
|
# NOTE: should be used with --limit most of the time
|
||||||
|
# NOTE: most of these vars_path come from group_vars/backup_server or from hostvars
|
||||||
|
# This has an extra role that configures the virthost to be used with beaker for
|
||||||
|
# virtual machine clients
|
||||||
|
|
||||||
|
- name: basic configuration
|
||||||
|
hosts: openqa-workers,openqa-stg-workers
|
||||||
|
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
|
||||||
|
- hosts
|
||||||
|
- fas_client
|
||||||
|
- collectd/base
|
||||||
|
- { role: iscsi_client, when: datacenter == "phx2" }
|
||||||
|
- sudo
|
||||||
|
- { role: openvpn/client, when: datacenter != "phx2" }
|
||||||
|
- { role: beaker/virthost, tags: ['beakervirthost'] }
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- include: "{{ tasks }}/yumrepos.yml"
|
||||||
|
- include: "{{ tasks }}/2fa_client.yml"
|
||||||
|
- include: "{{ tasks }}/motd.yml"
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
- include: "{{ handlers }}/restart_services.yml"
|
||||||
|
|
||||||
|
#- name: configure openqa workers
|
||||||
|
# hosts: openqa-workers, openqa-stg-workers
|
||||||
|
# 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:
|
||||||
|
# - { role: openqa/something, tags: ['something'] }
|
||||||
|
#
|
||||||
|
# handlers:
|
||||||
|
# - include: "{{ handlers }}/restart_services.yml"
|
52
playbooks/groups/openqa.yml
Normal file
52
playbooks/groups/openqa.yml
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
---
|
||||||
|
# create a new taskotron staging server
|
||||||
|
# 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=openqa,openqa-stg"
|
||||||
|
|
||||||
|
- name: make the box be real
|
||||||
|
hosts: openqa, openqa-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:
|
||||||
|
- { role: base, tags: ['base'] }
|
||||||
|
- { role: rkhunter, tags: ['rkhunter'] }
|
||||||
|
- { role: nagios_client, tags: ['nagios_client'] }
|
||||||
|
- { role: hosts, tags: ['hosts']}
|
||||||
|
- { role: fas_client, tags: ['fas_client'] }
|
||||||
|
- { role: collectd/base, tags: ['collectd_base'] }
|
||||||
|
- { role: yum-cron, tags: ['yumcron'] }
|
||||||
|
- { role: sudo, tags: ['sudo'] }
|
||||||
|
- apache
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
# this is how you include other task lists
|
||||||
|
- include: "{{ tasks }}/yumrepos.yml"
|
||||||
|
- include: "{{ tasks }}/2fa_client.yml"
|
||||||
|
- include: "{{ tasks }}/motd.yml"
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
- include: "{{ handlers }}/restart_services.yml"
|
||||||
|
|
||||||
|
#- name: configure openqa
|
||||||
|
# hosts: openqa, openqa-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:
|
||||||
|
# - { role: openqa/something, tags: ['something'] }
|
||||||
|
#
|
||||||
|
# handlers:
|
||||||
|
# - include: "{{ handlers }}/restart_services.yml"
|
Loading…
Add table
Add a link
Reference in a new issue