Enable disposable clients on prod
This commit is contained in:
parent
848371bec2
commit
cbe667309c
10 changed files with 97 additions and 78 deletions
|
@ -51,12 +51,14 @@ settings_dir: /etc/taskotron
|
|||
|
||||
buildmaster_db_host: db-qa01.qa.fedoraproject.org
|
||||
buildmaster_db_name: buildmaster
|
||||
buildmaster_db_user: "{{ prod_buildmaster_db_user }}"
|
||||
buildmaster_db_password: "{{ prod_buildmaster_db_password }}"
|
||||
buildmaster_dir: /srv/buildmaster/master
|
||||
buildmaster_endpoint: taskmaster
|
||||
buildmaster_home: /home/buildmaster
|
||||
buildmaster_user: buildmaster
|
||||
buildmaster_template: taskotron.master.cfg.j2
|
||||
|
||||
buildslave_dir: /home/buildslave/slave
|
||||
buildslave_ssh_pubkey: 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3Fhg7qUJ1+3N2YficTWQGEPm5JYmqDE7JbnpTTjQixd51r36YJ93sMQV63UOPkVaqPHkzIETUuvWLa/fnDhyYEnLT8mSgCqGViyd93MHYFD+nIzL1OIewKPiVbBdmlDOABD+ROSkC/wAfqJMgleqdDonWC8R0Qo+Y2r4sLMF7dxdPdRe3+WIcvC5YqDUZN/2gfsZ2tnAakZ1sGcX0yPvnpF9FmtRfkNp60OK7NXMLGV7Tayhkib05rGHl0q5dK4/vxKKk/aNgIK7gE3XFF7f+S2PDjvH3q/yby2Z3Wkp61JpVl+RTGz/XKpejUSDkJyQkbIC5+QQFeei58RLDJhzLQ== tflink@lockbox01.phx2.fedoraproject.org'
|
||||
buildslave_port: 9989
|
||||
buildslave_password: "{{ prod_buildslave_password }}"
|
||||
|
|
|
@ -67,5 +67,5 @@ buildmaster_template: taskotron.master.cfg.j2
|
|||
buildmaster_user: buildmaster
|
||||
|
||||
buildslave_port: 9989
|
||||
buildslave_password: "{{ dev_buildslave_password }}"
|
||||
buildslave_password: "{{ stg_buildslave_password }}"
|
||||
buildslave_ssh_pubkey: 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4EOTNfPIvIjCLNRYauVquS2LA8CZvCi6f87TASDZv4moFTv3mrCIdA3ycYLg+r+ODdPDjF9Cjpw1os/8L07XegTt9gAJVIpxzu3ZgQDkSQbx/hlDi+RG4EOIHL8nNJmu27dOVd1tb3k3aOkP5twO4uEq9RygrQBWMZTmOHdS/q8ZVUQG0d1sKv2J8EuBENgICjjIhhYvdvluu3G65jKxMgDbSXjkK6vZpbDbS2d6JI3VeLbVGlyFbHkTu7vH/vzTJZfOYgp0ZbvW9Wo3VSq/ia5qtrLKwRcBkpyCkP6uOQ14zqj4zJd/Hv7qhEcUhC8Jsb7d/Z6b3q5ID0s/9nuHdQ== tflink@lockbox01.phx2.fedoraproject.org'
|
||||
|
|
|
@ -17,8 +17,8 @@ slaves:
|
|||
- { user: "{{ short_hostname }}-8", home: "/home/{{ short_hostname }}-8", dir: "/home/{{ short_hostname }}-8/slave" }
|
||||
- { user: "{{ short_hostname }}-9", home: "/home/{{ short_hostname }}-9", dir: "/home/{{ short_hostname }}-9/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-10", dir: "/home/{{ short_hostname }}-10/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-11", dir: "/home/{{ short_hostname }}-11/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-12", dir: "/home/{{ short_hostname }}-12/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-13", dir: "/home/{{ short_hostname }}-13/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-14", dir: "/home/{{ short_hostname }}-14/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-15", dir: "/home/{{ short_hostname }}-15/slave" }
|
||||
- { user: "{{ short_hostname }}-11", home: "/home/{{ short_hostname }}-11", dir: "/home/{{ short_hostname }}-11/slave" }
|
||||
- { user: "{{ short_hostname }}-12", home: "/home/{{ short_hostname }}-12", dir: "/home/{{ short_hostname }}-12/slave" }
|
||||
- { user: "{{ short_hostname }}-13", home: "/home/{{ short_hostname }}-13", dir: "/home/{{ short_hostname }}-13/slave" }
|
||||
- { user: "{{ short_hostname }}-14", home: "/home/{{ short_hostname }}-14", dir: "/home/{{ short_hostname }}-14/slave" }
|
||||
- { user: "{{ short_hostname }}-15", home: "/home/{{ short_hostname }}-15", dir: "/home/{{ short_hostname }}-15/slave" }
|
||||
|
|
|
@ -17,8 +17,8 @@ slaves:
|
|||
- { user: "{{ short_hostname }}-8", home: "/home/{{ short_hostname }}-8", dir: "/home/{{ short_hostname }}-8/slave" }
|
||||
- { user: "{{ short_hostname }}-9", home: "/home/{{ short_hostname }}-9", dir: "/home/{{ short_hostname }}-9/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-10", dir: "/home/{{ short_hostname }}-10/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-11", dir: "/home/{{ short_hostname }}-11/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-12", dir: "/home/{{ short_hostname }}-12/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-13", dir: "/home/{{ short_hostname }}-13/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-14", dir: "/home/{{ short_hostname }}-14/slave" }
|
||||
- { user: "{{ short_hostname }}-10", home: "/home/{{ short_hostname }}-15", dir: "/home/{{ short_hostname }}-15/slave" }
|
||||
- { user: "{{ short_hostname }}-11", home: "/home/{{ short_hostname }}-11", dir: "/home/{{ short_hostname }}-11/slave" }
|
||||
- { user: "{{ short_hostname }}-12", home: "/home/{{ short_hostname }}-12", dir: "/home/{{ short_hostname }}-12/slave" }
|
||||
- { user: "{{ short_hostname }}-13", home: "/home/{{ short_hostname }}-13", dir: "/home/{{ short_hostname }}-13/slave" }
|
||||
- { user: "{{ short_hostname }}-14", home: "/home/{{ short_hostname }}-14", dir: "/home/{{ short_hostname }}-14/slave" }
|
||||
- { user: "{{ short_hostname }}-15", home: "/home/{{ short_hostname }}-15", dir: "/home/{{ short_hostname }}-15/slave" }
|
||||
|
|
|
@ -12,8 +12,8 @@ eth0_ip: 10.5.124.207
|
|||
# install
|
||||
############################################################
|
||||
|
||||
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-22
|
||||
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/22/Server/x86_64/os/
|
||||
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
|
||||
datacenter: phx2
|
||||
|
|
|
@ -19,8 +19,8 @@ eth0_ip: 10.5.124.206
|
|||
# install
|
||||
############################################################
|
||||
|
||||
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-22-taskotron-master
|
||||
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/22/Server/x86_64/os/
|
||||
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-23-taskotron-master
|
||||
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/23/Server/x86_64/os/
|
||||
sudoers: "{{ private }}/files/sudo/qavirt-sudoers"
|
||||
vmhost: virthost-comm03.qa.fedoraproject.org
|
||||
volgroup: /dev/VirtGuests
|
||||
|
@ -39,7 +39,7 @@ virt_install_command: /usr/bin/virt-install -n {{ inventory_hostname }} -r {{ me
|
|||
# virtual machine
|
||||
############################################################
|
||||
|
||||
lvm_size: 45000
|
||||
lvm_size: 55000
|
||||
mem_size: 4096
|
||||
num_cpus: 4
|
||||
|
||||
|
@ -54,22 +54,45 @@ public_hostname: taskotron.fedoraproject.org
|
|||
buildmaster: 10.5.124.206
|
||||
|
||||
buildslaves:
|
||||
- taskotron-client07
|
||||
- taskotron-client08
|
||||
- taskotron-client09
|
||||
- taskotron-client10
|
||||
- taskotron-client22
|
||||
- taskotron-client23
|
||||
- taskotron-client24
|
||||
- taskotron-client25
|
||||
- qa12.qa-1
|
||||
- qa12.qa-2
|
||||
- qa12.qa-3
|
||||
- qa12.qa-4
|
||||
- qa12.qa-5
|
||||
- qa12.qa-6
|
||||
- qa12.qa-7
|
||||
- qa12.qa-8
|
||||
- qa12.qa-9
|
||||
- qa12.qa-10
|
||||
- qa13.qa-1
|
||||
- qa13.qa-2
|
||||
- qa13.qa-3
|
||||
- qa13.qa-4
|
||||
- qa13.qa-5
|
||||
- qa13.qa-6
|
||||
- qa13.qa-7
|
||||
- qa13.qa-8
|
||||
- qa13.qa-9
|
||||
- qa13.qa-10
|
||||
i386_buildslaves:
|
||||
- taskotron-client23
|
||||
- qa13.qa-10
|
||||
x86_64_buildslaves:
|
||||
- taskotron-client07
|
||||
- taskotron-client08
|
||||
- taskotron-client09
|
||||
- taskotron-client10
|
||||
- taskotron-client22
|
||||
- taskotron-client24
|
||||
- taskotron-client25
|
||||
|
||||
- qa12.qa-1
|
||||
- qa12.qa-2
|
||||
- qa12.qa-3
|
||||
- qa12.qa-4
|
||||
- qa12.qa-5
|
||||
- qa12.qa-6
|
||||
- qa12.qa-7
|
||||
- qa12.qa-8
|
||||
- qa12.qa-9
|
||||
- qa12.qa-10
|
||||
- qa13.qa-1
|
||||
- qa13.qa-2
|
||||
- qa13.qa-3
|
||||
- qa13.qa-4
|
||||
- qa13.qa-5
|
||||
- qa13.qa-6
|
||||
- qa13.qa-7
|
||||
- qa13.qa-8
|
||||
- qa13.qa-9
|
||||
|
|
|
@ -16,12 +16,9 @@ c = BuildmasterConfig = {}
|
|||
from buildbot.buildslave import BuildSlave
|
||||
c['slaves'] = [
|
||||
{% for buildslave in buildslaves %}
|
||||
{% if deployment_type in ['dev', 'stg'] %}
|
||||
{% if deployment_type in ['dev', 'stg', 'prod'] %}
|
||||
BuildSlave("{{ buildslave }}", "{{ buildslave_password }}"),
|
||||
{% endif %}
|
||||
{% if deployment_type == 'prod' %}
|
||||
BuildSlave("{{ buildslave }}", "{{ prod_buildslave_password }}"),
|
||||
{% endif %}
|
||||
{% if deployment_type == 'local' %}
|
||||
BuildSlave("{{ buildslave }}", "{{ local_buildslave_password }}"),
|
||||
{% endif %}
|
||||
|
@ -148,7 +145,7 @@ from buildbot.steps.master import MasterShellCommand
|
|||
|
||||
factory = BuildFactory()
|
||||
|
||||
{% if deployment_type in ['prod', 'local'] %}
|
||||
{% if deployment_type in ['local'] %}
|
||||
# clean out /var/tmp/taskotron (see T253)
|
||||
factory.addStep(ShellCommand(command="rm -rf /var/tmp/taskotron/*", name="rm_tmp", descriptionDone=['Clean tmp']))
|
||||
|
||||
|
@ -156,7 +153,7 @@ factory.addStep(ShellCommand(command="rm -rf /var/tmp/taskotron/*", name="rm_tmp
|
|||
factory.addStep(ShellCommand(command=["rm", "-f", "/var/log/taskotron/taskotron.log"], name="rm_log", descriptionDone=['Clean log']))
|
||||
{% endif %}
|
||||
|
||||
{% if deployment_type in ['dev', 'stg'] %}
|
||||
{% if deployment_type in ['dev', 'stg', 'prod'] %}
|
||||
# clean out /var/tmp/taskotron (see T253)
|
||||
factory.addStep(ShellCommand(command=Interpolate("rm -rf /var/tmp/taskotron/%(prop:slavename)s/*"), name="rm_tmp", descriptionDone=['Clean tmp']))
|
||||
{% endif %}
|
||||
|
@ -176,7 +173,7 @@ factory.addStep(ShellCommand(command=["runtask",
|
|||
descriptionDone=[Interpolate('%(prop:taskname)s on %(prop:item)s')],
|
||||
name='runtask',
|
||||
timeout=2400,
|
||||
{% if deployment_type in ['dev', 'stg'] %}
|
||||
{% if deployment_type in ['dev', 'stg', 'prod'] %}
|
||||
logfiles={
|
||||
'taskotron-initiator.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron-initiator.log')},
|
||||
'taskotron-stdio.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron-stdio.log')},
|
||||
|
@ -184,7 +181,7 @@ factory.addStep(ShellCommand(command=["runtask",
|
|||
}
|
||||
))
|
||||
{% endif %}
|
||||
{% if deployment_type in ['prod', 'local'] %}
|
||||
{% if deployment_type in ['local'] %}
|
||||
logfiles={'taskotron.log': {'filename': '/var/log/taskotron/taskotron.log', }}))
|
||||
{% endif %}
|
||||
|
||||
|
@ -197,7 +194,7 @@ factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifac
|
|||
masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/task_output')))
|
||||
|
||||
|
||||
{% if deployment_type in ['prod', 'local'] %}
|
||||
{% if deployment_type in ['local'] %}
|
||||
# copy taskotron log to master
|
||||
factory.addStep(FileUpload(slavesrc='/var/log/taskotron/taskotron.log',
|
||||
masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/taskotron.log'),
|
||||
|
@ -399,12 +396,9 @@ c['buildbotURL'] = "http://{{ external_hostname }}/{{buildmaster_endpoint}}/"
|
|||
c['db'] = {
|
||||
# This specifies what database buildbot uses to store its state. You can leave
|
||||
# this at its default for all but the largest installations.
|
||||
{% if deployment_type in ['dev', 'stg'] %}
|
||||
{% if deployment_type in ['dev', 'stg', 'prod'] %}
|
||||
'db_url' : "postgresql://{{ buildmaster_db_user }}:{{ buildmaster_db_password }}@{{ buildmaster_db_host }}/{{ buildmaster_db_name }}",
|
||||
{% endif %}
|
||||
{% if deployment_type == 'prod' %}
|
||||
'db_url' : "postgresql://{{ prod_buildmaster_db_user }}:{{ prod_buildmaster_db_password }}@{{ buildmaster_db_host }}/{{ buildmaster_db_name }}",
|
||||
{% endif %}
|
||||
{% if deployment_type == 'local' %}
|
||||
'db_url' : "postgresql://{{ local_buildmaster_db_user }}:{{ local_buildmaster_db_password }}@127.0.0.1/{{ buildmaster_db_name }}",
|
||||
{% endif %}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
sudo: true
|
||||
sudo_user: "{{ slave_user }}"
|
||||
command: creates={{ slave_dir }} buildslave create-slave {{ slave_dir }} {{ buildmaster }} buildslave passwd
|
||||
when: deployment_type in ['prod', 'stg', 'local', 'qa-stg']
|
||||
when: deployment_type in ['local', 'qa-stg']
|
||||
|
||||
- name: generate slave config
|
||||
sudo: true
|
||||
sudo_user: "{{ slave_user }}"
|
||||
template: src=buildbot.tac.j2 dest={{ slave_dir }}/buildbot.tac mode=0600 owner={{ slave_user }} group={{ slave_user }}
|
||||
when: deployment_type in ['prod', 'local', 'qa-stg']
|
||||
when: deployment_type in ['local', 'qa-stg']
|
||||
#when: deployment_type == 'prod' or deployment_type == 'stg' or deployment_type == 'local'
|
||||
|
||||
- name: generate slave info
|
||||
|
@ -18,32 +18,32 @@
|
|||
with_items:
|
||||
- admin
|
||||
- host
|
||||
when: deployment_type in ['prod', 'local', 'qa-stg']
|
||||
when: deployment_type in ['local', 'qa-stg']
|
||||
|
||||
- name: create slave ssh directory
|
||||
when: buildslave_public_sshkey_file is defined and (deployment_type in ['prod', 'local', 'qa-stg'])
|
||||
when: buildslave_public_sshkey_file is defined and (deployment_type in ['local', 'qa-stg'])
|
||||
file: path={{ slave_home }}/.ssh owner={{ slave_user }} group={{ slave_user }} mode=0700 state=directory
|
||||
#when: buildslave_public_sshkey_file is defined and (deployment_type in ['prod', 'stg', 'local', 'qa-stg'])
|
||||
|
||||
- name: install slave ssh private key
|
||||
when: buildslave_public_sshkey_file is defined and (deployment_type in ['prod', 'local', 'qa-stg'])
|
||||
when: buildslave_public_sshkey_file is defined and (deployment_type in ['local', 'qa-stg'])
|
||||
copy: src={{ private }}/files/taskotron/{{ buildslave_private_sshkey_file }} dest={{ slave_home }}/.ssh/id_rsa owner={{ slave_user }} group={{ slave_user }} mode=0600
|
||||
|
||||
- name: install slave ssh public key
|
||||
when: buildslave_public_sshkey_file is defined and (deployment_type in ['prod','local', 'qa-stg'])
|
||||
when: buildslave_public_sshkey_file is defined and (deployment_type in ['local', 'qa-stg'])
|
||||
copy: src={{ private }}/files/taskotron/{{ buildslave_public_sshkey_file }} dest={{ slave_home }}/.ssh/id_rsa.pub owner={{ slave_user }} group={{ slave_user }} mode=0644
|
||||
|
||||
- name: make sure master is in known_hosts
|
||||
when: buildslave_public_sshkey_file is defined and (deployment_type in ['prod','local', 'qa-stg'])
|
||||
when: buildslave_public_sshkey_file is defined and (deployment_type in ['local', 'qa-stg'])
|
||||
lineinfile: dest=/home/{{ slave_user }}/.ssh/known_hosts regexp='{{ buildmaster }}' line='{{ buildmaster }} {{ buildmaster_pubkey }}' create=yes owner={{ slave_user }} group={{ slave_user }}
|
||||
|
||||
- name: generate buildslave service file
|
||||
template: src=buildslave.service.j2 dest=/lib/systemd/system/buildslave.service owner=root group=root mode=0744
|
||||
when: deployment_type in ['prod', 'local', 'qa-stg']
|
||||
when: deployment_type in ['local', 'qa-stg']
|
||||
|
||||
- name: start and enable buildslave service
|
||||
service: name=buildslave enabled=yes state=started
|
||||
when: deployment_type in ['prod', 'local', 'qa-stg']
|
||||
when: deployment_type in ['local', 'qa-stg']
|
||||
|
||||
|
||||
- name: create slave
|
||||
|
@ -52,7 +52,7 @@
|
|||
command: creates={{ item.dir }} buildslave create-slave {{ item.dir }} {{ buildmaster }} buildslave passwd
|
||||
with_items:
|
||||
- '{{ slaves|default([dict(user="", home="", dir="")]) }}'
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: generate slave config
|
||||
sudo: true
|
||||
|
@ -60,7 +60,7 @@
|
|||
template: src=buildbot.tac.j2 dest={{ item.dir }}/buildbot.tac mode=0600 owner={{ item.user }} group={{ slaves_group }}
|
||||
with_items:
|
||||
- '{{ slaves|default([dict(user="", home="", dir="")]) }}'
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: generate slave admin info
|
||||
sudo: true
|
||||
|
@ -68,7 +68,7 @@
|
|||
template: src=admin.j2 dest={{ item.dir }}/info/admin mode=0644 owner={{ item.user }} group={{ slaves_group }}
|
||||
with_items:
|
||||
- '{{ slaves|default([dict(user="", home="", dir="")]) }}'
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: generate slave host info
|
||||
sudo: true
|
||||
|
@ -76,38 +76,38 @@
|
|||
template: src=host.j2 dest={{ item.dir }}/info/host mode=0644 owner={{ item.user }} group={{ slaves_group }}
|
||||
with_items:
|
||||
- '{{ slaves|default([dict(user="", home="", dir="")]) }}'
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: create slave ssh directory
|
||||
file: path={{ item.home }}/.ssh owner={{ item.user }} group={{ slaves_group }} mode=0700 state=directory
|
||||
with_items:
|
||||
- '{{ slaves|default([dict(user="", home="", dir="")]) }}'
|
||||
when: buildslave_public_sshkey_file is defined and deployment_type in ['dev', 'stg']
|
||||
when: buildslave_public_sshkey_file is defined and deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: install slave ssh private key
|
||||
copy: src={{ private }}/files/taskotron/{{ buildslave_private_sshkey_file }} dest={{ item.home }}/.ssh/id_rsa owner={{ item.user }} group={{ slaves_group }} mode=0600
|
||||
with_items:
|
||||
- '{{ slaves|default([dict(user="", home="", dir="")]) }}'
|
||||
when: buildslave_private_sshkey_file is defined and deployment_type in ['dev', 'stg']
|
||||
when: buildslave_private_sshkey_file is defined and deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: install slave ssh public key
|
||||
copy: src={{ private }}/files/taskotron/{{ buildslave_public_sshkey_file }} dest={{ item.home }}/.ssh/id_rsa.pub owner={{ item.user }} group={{ slaves_group }} mode=0644
|
||||
with_items:
|
||||
- '{{ slaves|default([dict(user="", home="", dir="")]) }}'
|
||||
when: buildslave_public_sshkey_file is defined and deployment_type in ['dev', 'stg']
|
||||
when: buildslave_public_sshkey_file is defined and deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: make sure master is in known_hosts
|
||||
lineinfile: dest={{ item.home }}/.ssh/known_hosts regexp='{{ buildmaster }}' line='{{ buildmaster }} {{ buildmaster_pubkey }}' create=yes owner={{ item.user }} group={{ slaves_group }}
|
||||
with_items:
|
||||
- '{{ slaves|default([dict(user="", home="", dir="")]) }}'
|
||||
when: buildslave_public_sshkey_file is defined and deployment_type in ['dev', 'stg']
|
||||
when: buildslave_public_sshkey_file is defined and deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: generate buildslave service file
|
||||
template: src=buildslave@.service.j2 dest=/lib/systemd/system/buildslave@.service owner=root group=root mode=0744
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: start and enable buildslave services
|
||||
service: name=buildslave@{{ item.user }} enabled=yes state=started
|
||||
with_items:
|
||||
- '{{ slaves|default([dict(user="", home="", dir="")]) }}'
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- PyYAML
|
||||
- libtaskotron
|
||||
- resultsdb_api
|
||||
when: deployment_type == 'prod' or deployment_type == 'local'
|
||||
when: deployment_type == 'local'
|
||||
|
||||
- name: ensure packages required for libtaskotron are installed (dnf)
|
||||
dnf: name={{ item }} state=present enablerepo={{ extra_enablerepos }}
|
||||
|
@ -15,7 +15,7 @@
|
|||
- resultsdb_api
|
||||
- testcloud
|
||||
- selinux-policy-devel
|
||||
when: deployment_type == 'dev' or deployment_type == 'stg'
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: ensure packages required for taskotron tasks are installed (yum)
|
||||
yum: name={{ item }} state=present enablerepo={{ extra_enablerepos }}
|
||||
|
@ -37,7 +37,7 @@
|
|||
template: src=taskotron.yaml.j2 dest=/etc/taskotron/taskotron.yaml owner=root group=root mode=0644
|
||||
|
||||
- name: generate testcloud config file
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
template: src=settings.py.testcloud.j2 dest=/etc/testcloud/settings.py owner=root group=root mode=0644
|
||||
|
||||
# hotfixing correct yumrepoinfo until libtaskotron is updated
|
||||
|
@ -49,28 +49,28 @@
|
|||
|
||||
- name: create /var/log/taskotron for task logfiles
|
||||
file: path=/var/log/taskotron state=directory owner={{ slave_user }} group={{ slave_user }} mode=1755
|
||||
when: deployment_type == 'prod' or deployment_type == 'local'
|
||||
when: deployment_type == 'local'
|
||||
|
||||
- name: ensure buildslaves group exists
|
||||
group: name={{ slaves_group }}
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: create /var/log/taskotron for task logfiles
|
||||
file: path=/var/log/taskotron state=directory owner=root group={{ slaves_group }} mode=1775
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: upload custom selinux policy to allow buildslaves to use qemu-kvm
|
||||
copy: src=service-virt-transition.te dest=/root/service-virt-transition.te owner=root group=root mode=0644
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: compile selinux policy
|
||||
command: chdir=/root/ creates=/root/service-virt-transition.pp make -f /usr/share/selinux/devel/Makefile
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: load custom selinux policy for qemu-kvm from buildslaves
|
||||
command: chdir=/root/ semodule -i /root/service-virt-transition.pp
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
||||
- name: enable libvirtd
|
||||
service: name=libvirtd state=started enabled=yes
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
when: deployment_type in ['dev', 'stg', 'prod']
|
||||
|
|
|
@ -32,9 +32,9 @@ profile: production
|
|||
## Local execution is the default mode for development profile and remote
|
||||
## execution for production profile.
|
||||
## [choices: local, libvirt; default: local for development, libvirt for production]
|
||||
{% if deployment_type in ['dev', 'stg'] %}
|
||||
{% if deployment_type in ['dev', 'stg', 'prod'] %}
|
||||
runtask_mode: libvirt
|
||||
{% elif deployment_type in ['prod', 'local'] %}
|
||||
{% elif deployment_type in ['local'] %}
|
||||
runtask_mode: local
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue