Add imagefactory role for taskotron
This commit is contained in:
parent
3c74bfe5e3
commit
d43469d635
5 changed files with 75 additions and 0 deletions
|
@ -62,3 +62,14 @@ buildslave_pubkey: "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4EOTNfPIvIjCLNRYauVquS2L
|
|||
buildslave_private_sshkey_file: dev-buildslave-sshkey/dev_buildslave
|
||||
buildslave_public_sshkey_file: dev-buildslave-sshkey/dev_buildslave.pub
|
||||
buildmaster_pubkey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYzVmGYh6EHH8UAlgX6FIOJGHsq/63G4ryMC7VgLIwIhp+SloqMtLeQvZ2COzF+ycatlG1reY6+x0lXBlt72jyInnHy3pOKByOQPkMOS6zOLGnK1zWKjsexabgIXUKAM/dEsMJRBvVK4ZnlClZ0ol3+pqjbzT619vEiGZhUIkOXvptKVPkBFAdpiB/ehd2nqESOWa1ZId9ney4LZt7b/5krCY8RTYWQbGWvcndy6L4rRfqkfvW9t9HS6zyQfLouXCwW8QS5nTqY/kmtfse+7D6Ne+IySmaSX/kWB3YlhVOxB2DTP0pE3ZkXMJ4u04i4stySYxkajoonxAc8SUI4Djl"
|
||||
|
||||
|
||||
############################################################
|
||||
# imagefactory config
|
||||
############################################################
|
||||
|
||||
imagefactory_user: imgfac_user
|
||||
imagefactory_user_home: /home/fedora/imgfac_user
|
||||
imagefactory_shared_dir: '{{imagefactory_user_home}}/images'
|
||||
|
||||
|
||||
|
|
|
@ -50,3 +50,20 @@
|
|||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
||||
|
||||
- name: configure taskotron imagefactory
|
||||
hosts: qa11.qa.fedoraproject.org
|
||||
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: taskotron/imagefactory, tags: ['taskotronimagefactory'] }
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
||||
|
||||
|
|
2
roles/taskotron/imagefactory/defaults/main.yml
Normal file
2
roles/taskotron/imagefactory/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
extra_enablerepos: ''
|
23
roles/taskotron/imagefactory/files/imagefactory.conf
Normal file
23
roles/taskotron/imagefactory/files/imagefactory.conf
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"debug": 0,
|
||||
"no_ssl": 1,
|
||||
"no_oauth": 1,
|
||||
"imgdir": "/var/lib/imagefactory/images",
|
||||
"ec2_ami_type": "ebs",
|
||||
"rhevm_image_format": "qcow2",
|
||||
"openstack_image_format": "qcow2",
|
||||
"clients": {
|
||||
"mock-key": "mock-secret"
|
||||
},
|
||||
"proxy_ami_id": "ami-id",
|
||||
"max_concurrent_local_sessions": 2,
|
||||
"max_concurrent_ec2_sessions": 4,
|
||||
"ec2-32bit-util": "m1.small",
|
||||
"ec2-64bit-util": "m1.large",
|
||||
"image_manager": "file",
|
||||
"image_manager_args": { "storage_path": "/var/lib/imagefactory/storage" },
|
||||
"tdl_require_root_pw": 0,
|
||||
"jeos_config": [ "/etc/imagefactory/jeos_images/" ],
|
||||
"output": "json"
|
||||
}
|
||||
|
22
roles/taskotron/imagefactory/tasks/main.yml
Normal file
22
roles/taskotron/imagefactory/tasks/main.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
- name: ensure packages required for imagefactory are installed (dnf)
|
||||
dnf: name={{ item }} state=present enablerepo={{ extra_enablerepos }}
|
||||
with_items:
|
||||
- imagefactory
|
||||
- imagefactory-plugins
|
||||
- imagefactory-plugins-TinMan
|
||||
|
||||
- name: copy imagefactory.conf config file
|
||||
copy: src=imagefactory.conf dest=/etc/imagefactory/imagefactory.conf owner=root group=root mode=0644
|
||||
|
||||
- name: enable imagefactory
|
||||
service: name=imagefactoryd state=started enabled=yes
|
||||
|
||||
- name: create directory for shared built images
|
||||
file: path={{ imagefactory_shared_dir }} state=directory owner={{ imagefactory_user }} group={{ imagefactory_user }} mode=1755
|
||||
|
||||
- name: Check out our imagefactory tools
|
||||
git:
|
||||
repo: https://bitbucket.org/fedoraqa/base_images
|
||||
dest: '{{imagefactory_user_home}}/base_images'
|
||||
update: yes
|
Loading…
Add table
Add a link
Reference in a new issue