update playbooks for copr-be-dev
This commit is contained in:
parent
7a309f3f86
commit
c0d3729ce2
7 changed files with 141 additions and 38 deletions
57
files/copr/copr-be.conf
Normal file
57
files/copr/copr-be.conf
Normal file
|
@ -0,0 +1,57 @@
|
|||
[backend]
|
||||
|
||||
# URL where are results visible
|
||||
# default is http://copr
|
||||
results_baseurl=http://copr-be.cloud.fedoraproject.org/results
|
||||
|
||||
# ??? What is this
|
||||
# default is http://coprs/rest/api
|
||||
frontend_url=http://copr-fe.cloud.fedoraproject.org/backend
|
||||
|
||||
# must have same value as BACKEND_PASSWORD from have frontend in /etc/copr/copr.conf
|
||||
# default is PASSWORDHERE but you really should change it. really.
|
||||
frontend_auth=PASSWORDHERE
|
||||
|
||||
# path to ansible playbook which spawns builder
|
||||
# see /usr/share/copr*/playbooks/ for examples
|
||||
# default is /etc/copr/builder_playbook.yml
|
||||
spawn_playbook=/home/copr/provision/builderpb.yml
|
||||
|
||||
# path to ansible playbook which terminate builder
|
||||
# default is /etc/copr/terminate_playbook.yml
|
||||
terminate_playbook=/home/copr/provision/terminatepb.yml
|
||||
|
||||
# directory where jobs are stored
|
||||
# no defaults
|
||||
jobsdir=/var/lib/copr/jobs
|
||||
|
||||
# directory where results are stored
|
||||
# should be accessible from web using 'results_baseurl' URL
|
||||
# no default
|
||||
destdir=/var/lib/copr/public_html/results
|
||||
|
||||
# default is 10
|
||||
sleeptime=30
|
||||
|
||||
# default is 8
|
||||
num_workers=5
|
||||
|
||||
# path to log file
|
||||
# default is /var/log/copr/backend.log
|
||||
logfile=/var/log/copr/backend.log
|
||||
|
||||
# default is /var/log/copr/workers/
|
||||
worker_logdir=/var/log/copr/workers/
|
||||
|
||||
# exit on worker failure
|
||||
# default is false
|
||||
#exit_on_worker=false
|
||||
|
||||
# publish fedmsg notifications from workers if true
|
||||
# default is false
|
||||
#fedmsg_enabled=false
|
||||
|
||||
|
||||
[builder]
|
||||
# default is 1800
|
||||
timeout=3600
|
57
files/copr/copr-be.conf-dev
Normal file
57
files/copr/copr-be.conf-dev
Normal file
|
@ -0,0 +1,57 @@
|
|||
[backend]
|
||||
|
||||
# URL where are results visible
|
||||
# default is http://copr
|
||||
results_baseurl=http://copr-be-dev.cloud.fedoraproject.org/results
|
||||
|
||||
# ??? What is this
|
||||
# default is http://coprs/rest/api
|
||||
frontend_url=http://copr-fe-dev.cloud.fedoraproject.org/backend
|
||||
|
||||
# must have same value as BACKEND_PASSWORD from have frontend in /etc/copr/copr.conf
|
||||
# default is PASSWORDHERE but you really should change it. really.
|
||||
frontend_auth=PASSWORDHERE
|
||||
|
||||
# path to ansible playbook which spawns builder
|
||||
# see /usr/share/copr*/playbooks/ for examples
|
||||
# default is /etc/copr/builder_playbook.yml
|
||||
spawn_playbook=/home/copr/provision/builderpb.yml
|
||||
|
||||
# path to ansible playbook which terminate builder
|
||||
# default is /etc/copr/terminate_playbook.yml
|
||||
terminate_playbook=/home/copr/provision/terminatepb.yml
|
||||
|
||||
# directory where jobs are stored
|
||||
# no defaults
|
||||
jobsdir=/var/lib/copr/jobs
|
||||
|
||||
# directory where results are stored
|
||||
# should be accessible from web using 'results_baseurl' URL
|
||||
# no default
|
||||
destdir=/var/lib/copr/public_html/results
|
||||
|
||||
# default is 10
|
||||
sleeptime=30
|
||||
|
||||
# default is 8
|
||||
num_workers=5
|
||||
|
||||
# path to log file
|
||||
# default is /var/log/copr/backend.log
|
||||
logfile=/var/log/copr/backend.log
|
||||
|
||||
# default is /var/log/copr/workers/
|
||||
worker_logdir=/var/log/copr/workers/
|
||||
|
||||
# exit on worker failure
|
||||
# default is false
|
||||
#exit_on_worker=false
|
||||
|
||||
# publish fedmsg notifications from workers if true
|
||||
# default is false
|
||||
#fedmsg_enabled=false
|
||||
|
||||
|
||||
[builder]
|
||||
# default is 1800
|
||||
timeout=3600
|
|
@ -5,6 +5,6 @@ if [ -f /etc/bashrc ]; then
|
|||
. /etc/bashrc
|
||||
fi
|
||||
|
||||
if [ -f /srv/copr-work/copr/cloud/ec2rc.sh ]; then
|
||||
. /srv/copr-work/copr/cloud/ec2rc.sh
|
||||
if [ -f /home/copr/cloud/ec2rc.sh ]; then
|
||||
. /home/copr/cloud/ec2rc.sh
|
||||
fi
|
||||
|
|
|
@ -112,7 +112,7 @@ server.groupname = "lighttpd"
|
|||
##
|
||||
## Document root
|
||||
##
|
||||
server.document-root = "/srv/copr-repo"
|
||||
server.document-root = "/var/lib/copr/public_html/results"
|
||||
|
||||
##
|
||||
## The value for the "Server:" response field.
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
# location of inventory file, eliminates need to specify -i
|
||||
|
||||
hostfile = /srv/copr-work/provision/inventory
|
||||
hostfile = /home/copr/provision/inventory
|
||||
|
||||
# location of ansible library, eliminates need to specify --module-path
|
||||
|
||||
library = /srv/copr-work/provision/library:/usr/share/ansible
|
||||
library = /home/copr/provision/library:/usr/share/ansible
|
||||
|
||||
# default module name used in /usr/bin/ansible when -m is not specified
|
||||
|
||||
|
@ -69,7 +69,7 @@ remote_user=root
|
|||
|
||||
# additional plugin paths for non-core plugins
|
||||
|
||||
action_plugins = /usr/lib/python2.6/site-packages/ansible/runner/action_plugins:/srv/copr-work/provision/action_plugins/
|
||||
action_plugins = /usr/lib/python2.7/site-packages/ansible/runner/action_plugins:/home/copr/provision/action_plugins/
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
instance_type: m1.xlarge
|
||||
image: $el6_qcow_id
|
||||
image: $f19_qcow_id
|
||||
keypair: fedora-admin-20130801
|
||||
security_group: webserver
|
||||
zone: nova
|
||||
|
|
|
@ -25,20 +25,15 @@
|
|||
- include: $tasks/cloud_setup_basic.yml
|
||||
- include: $tasks/iptables.yml
|
||||
|
||||
- name: copy copr.repo
|
||||
action: copy src=$files/copr/fe/yum/copr.repo dest=/etc/yum.repos.d/copr.repo
|
||||
|
||||
# packages needed
|
||||
- name: add packages for copr-be
|
||||
action: yum state=present name=$item
|
||||
with_items:
|
||||
- ansible
|
||||
- lighttpd
|
||||
- euca2ools
|
||||
- rsync
|
||||
- openssh-clients
|
||||
- mock
|
||||
- yum-utils
|
||||
- createrepo
|
||||
- python-bunch
|
||||
- python-requests
|
||||
- copr-selinux
|
||||
- copr-backend
|
||||
- git
|
||||
- screen
|
||||
|
||||
|
@ -46,44 +41,34 @@
|
|||
- name: make /srv dirs
|
||||
file: state=directory path=$item
|
||||
with_items:
|
||||
- /srv/copr-work
|
||||
- /srv/copr-repo
|
||||
- /var/lib/copr/jobs
|
||||
- /var/lib/copr/public_html/results
|
||||
|
||||
|
||||
- name: make copr account
|
||||
action: user name=copr state=present system=yes home=/srv/copr-work/copr
|
||||
|
||||
|
||||
- name: setup dirs there
|
||||
action: file state=directory path=/srv/copr-work/copr/$item owner=copr group=copr mode=0700
|
||||
action: file state=directory path=/home/copr/$item owner=copr group=copr mode=0700
|
||||
with_items:
|
||||
- cloud
|
||||
- .ssh
|
||||
|
||||
- name: add copr-buildsys keys to copr user path
|
||||
action: copy src=$item dest=/srv/copr-work/copr/cloud/ owner=copr group=copr mode=0600
|
||||
action: copy src=$item dest=/home/copr/cloud/ owner=copr group=copr mode=0600
|
||||
with_fileglob: $private/files/openstack/copr-copr/*
|
||||
|
||||
- name: setup privkey for copr user
|
||||
action: copy src=$private/files/copr/buildsys.priv dest=/srv/copr-work/copr/.ssh/id_rsa owner=copr group=copr mode=600
|
||||
action: copy src=$private/files/copr/buildsys.priv dest=/home/copr/.ssh/id_rsa owner=copr group=copr mode=600
|
||||
|
||||
- name: setup copr user ssh config file
|
||||
action: copy src=$files/copr/ssh_config dest=/srv/copr-work/copr/.ssh/config owner=copr group=copr mode=600
|
||||
action: copy src=$files/copr/ssh_config dest=/home/copr/.ssh/config owner=copr group=copr mode=600
|
||||
|
||||
- name: replace bashrc for copr user
|
||||
action: copy src=$files/copr/copr_bashrc dest=/srv/copr-work/copr/.bashrc owner=copr group=copr mode=600
|
||||
action: copy src=$files/copr/copr_bashrc dest=/home/copr/.bashrc owner=copr group=copr mode=600
|
||||
|
||||
- name: auth_key so we can login to localhost as the copr user from the copr user
|
||||
action: authorized_key user=copr key="{{ item }}"
|
||||
with_file:
|
||||
- ${files}/copr/provision/files/buildsys.pub
|
||||
|
||||
- name: set dir ownership for copr-work and copr-repo
|
||||
action: file state=directory path=$item owner=copr group=copr
|
||||
with_items:
|
||||
- /srv/copr-work
|
||||
- /srv/copr-work/copr
|
||||
|
||||
# setup webserver
|
||||
- name: add config for copr-repo path
|
||||
action: copy src=$files/copr/lighttpd/lighttpd.conf dest=/etc/lighttpd/lighttpd.conf owner=root group=root mode=0644
|
||||
|
@ -104,7 +89,7 @@
|
|||
|
||||
# setup dirs for the ansible execution off of provisioning
|
||||
- name: dirs from provision
|
||||
action: file state=directory path=/srv/copr-work/provision/$item owner=copr group=copr
|
||||
action: file state=directory path=/home/copr/provision/$item owner=copr group=copr
|
||||
with_items:
|
||||
- action_plugins
|
||||
- library
|
||||
|
@ -120,7 +105,7 @@
|
|||
|
||||
|
||||
- name: put some files into the provision subdir
|
||||
action: copy src=$files/copr/provision/$item dest=/srv/copr-work/provision/$item
|
||||
action: copy src=$files/copr/provision/$item dest=/home/copr/provision/$item
|
||||
with_items:
|
||||
- inventory
|
||||
- builderpb.yml
|
||||
|
@ -129,17 +114,21 @@
|
|||
- provision_config
|
||||
|
||||
- name: put files into the files subdir off of provisioning
|
||||
action: copy src=$item dest=/srv/copr-work/provision/files/
|
||||
action: copy src=$item dest=/home/copr/provision/files/
|
||||
with_fileglob: $files/copr/provision/files/*
|
||||
tags:
|
||||
- provision_config
|
||||
|
||||
# ansible lacks a recurse - so we need this until then
|
||||
- name: put files into the files/mock subdir off of provisioning
|
||||
action: copy src=$item dest=/srv/copr-work/provision/files/mock
|
||||
action: copy src=$item dest=/home/copr/provision/files/mock
|
||||
with_fileglob: $files/copr/provision/files/mock/*
|
||||
tags:
|
||||
- provision_config
|
||||
|
||||
- name: copy copr-be.conf
|
||||
action: copy src=$files/copr/copr-be.conf-dev dest=/etc/copr/copr-be.conf
|
||||
|
||||
handlers:
|
||||
- include: $handlers/restart_services.yml
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue