[copr] master: Merge branch 'master' of ssh://git.fedorahosted.org/git/copr (a4715bf)
bkabrda at fedoraproject.org
bkabrda at fedoraproject.org
Tue Jan 15 11:07:03 UTC 2013
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit a4715bf1373275cb43b853c32a7f5231e9584ae1
Merge: cbaa66e 03fe7f8
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date: Tue Jan 15 12:05:05 2013 +0100
Merge branch 'master' of ssh://git.fedorahosted.org/git/copr
>---------------------------------------------------------------
backend/dispatcher.py | 6 ++-
copr-setup.txt | 92 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 96 insertions(+), 2 deletions(-)
diff --git a/backend/dispatcher.py b/backend/dispatcher.py
index d5bc7be..92395ce 100644
--- a/backend/dispatcher.py
+++ b/backend/dispatcher.py
@@ -163,6 +163,8 @@ class Worker(multiprocessing.Process):
jobdata.destdir = self.opts.destdir + '/' + build['copr']['owner']['name'] + '/' + build['copr']['name'] + '/'
jobdata.build_id = build['id']
jobdata.results = self.opts.results_baseurl + '/' + build['copr']['owner']['name'] + '/' + build['copr']['name'] + '/'
+ # add the results dir to the jobdata.repos
+ jobdata.repos.append(jobdata.results)
jobdata.copr_id = build['copr']['id']
jobdata.user_id = build['user_id']
return jobdata
@@ -278,7 +280,7 @@ class Worker(multiprocessing.Process):
self.callback.log('Starting build: id=%r builder=%r timeout=%r destdir=%r chroot=%r repos=%r' % (job.build_id,ip, job.timeout, job.destdir, chroot, str(job.repos)))
self.callback.log('building pkgs: %s' % ' '.join(job.pkgs))
try:
- chrootlogfile = chroot_destdir + '/mockremote-%s.log' % job.build_id
+ chrootlogfile = chroot_destdir + '/build-%s.log' % job.build_id
mr = mockremote.MockRemote(builder=ip, timeout=job.timeout,
destdir=job.destdir, chroot=chroot, cont=True, recurse=True,
repos=job.repos,
@@ -293,7 +295,7 @@ class Worker(multiprocessing.Process):
# check if any pkgs didn't build
if mr.failed:
status = 0
- self.callback.log('Finished build: builder=%r timeout=%r destdir=%r chroot=%r repos=%r' % (ip, job.timeout, job.destdir, chroot, str(job.repos)))
+ self.callback.log('Finished build: id=%r builder=%r timeout=%r destdir=%r chroot=%r repos=%r' % (job.build_id, ip, job.timeout, job.destdir, chroot, str(job.repos)))
job.ended_on = time.time()
diff --git a/copr-setup.txt b/copr-setup.txt
new file mode 100644
index 0000000..72305d4
--- /dev/null
+++ b/copr-setup.txt
@@ -0,0 +1,92 @@
+WORK IN PROGRESS
+
+- How coprs works
+ - SEE README FOR OVERVIEW
+
+
+
+- need at least 1 server
+- some instances/systems for builders
+
+Backend:
+ansible playbook:
+ http://infrastructure.fedoraproject.org/infra/ansible/playbooks/hosts/copr-be.cloud.fedoraproject.org.yml
+
+Required pkgs:
+ - ansible - 0.9 or higher
+ - [lig]httpd
+ - euca2ools (or other cloud tools)
+ - rsync
+ - openssh-clients
+ - mock - recent - from epel - including mockchain
+ - yum-utils
+ - createrepo
+ - python-bunch
+ - python-requests
+
+
+- add copr user
+- give write access to a dir somewhere not in your homedir
+- git clone git://git.fedorahosted.org/copr.git into that dir
+- setup copr-be.conf
+- dirs needed to be setup?
+- setup webserver - point to results path from copr-be.conf
+- dirindexes enabled
+
+- builder provisioning
+3. spawn instance playbook -
+ http://infrastructure.fedoraproject.org/infra/ansible/files/copr/provision/builderpb.yml
+ - just an ansible playbook which sets up and provisions an instance
+ in our case it is using eucalyptus but it doesn't have to be
+ any cloud provider - it just needs to be able to get an ip an
+ ssh into it - cloud providers or private clouds just make more
+ sense
+4. provisioning dir
+ http://infrastructure.fedoraproject.org/infra/ansible/files/copr/provision/files/
+ - what gets pushed to the other side - ssh keys, users, mock
+ configs, etc
+5. terminate instance playbook -
+ http://infrastructure.fedoraproject.org/infra/ansible/files/copr/provision/terminatepb.yml
+
+
+
+Frontend:
+rhel6ish - add epel
+
+Required pkgs:
+ - httpd
+ - mod_wsgi
+ - postgresql-server
+ - postgresql-devel
+ - python-virtualenv
+ - gcc
+
+- apache setup
+ coprs.conf:
+
+<VirtualHost *:80>
+ ServerName yourservername.here
+
+ WSGIDaemonProcess yourservername.hereuser=copr-fe group=copr-fe threads=5
+ WSGIScriptAlias / /path/to/coprs_git_tree/coprs_frontend/application
+ WSGIProcessGroup yourservername.here
+ WSGIPassAuthorization On
+
+ ErrorLog logs/error_coprs
+ CustomLog logs/access_coprs common
+
+ <Directory /var/www/coprs_frontend>
+ WSGIApplicationGroup %{GLOBAL}
+ Order deny,allow
+ Allow from all
+ </Directory>
+</VirtualHost>
+
+- virtenv of flask and friends
+ - virtualenv --distribute virtenv
+ - source virtenv/bin/activate
+ - pip install flask flask-sqlalchemy flask-openid flask-wtf alembic
+ - pip install -I SQLAlchemy MarkupSafe
+ - pip install pytest
+
+
More information about the copr-devel
mailing list