[copr] master: maintain apache configuration on one place only (601dfc9)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 601dfc973cb2330c13863be6644d00004aa8aef8
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jun 21 10:26:56 2013 +0200
maintain apache configuration on one place only
the ultimate source will coprs_frontend/coprs.conf.example now
rpm package put it in /usr/share/doc/copr-frontend-*/coprs.conf.example
>---------------------------------------------------------------
copr-setup.txt | 21 ++-------------------
1 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/copr-setup.txt b/copr-setup.txt
index 9047dae..a3a2275 100644
--- a/copr-setup.txt
+++ b/copr-setup.txt
@@ -62,25 +62,8 @@ Required pkgs:
- 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>
+ cp /usr/share/doc/copr-frontend-*/coprs.conf.example /etc/httpd/conf.d/coprs.conf
+ and edit it to your needs - at least ServerName, port and WSGIScriptAlias
- virtenv of flask and friends
- virtualenv --distribute virtenv
10 years, 10 months
[copr] master: apache 2.4 changed access control (d9be056)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit d9be056d5e6e7919ea90a6bd5be1622546bc5de6
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jun 21 10:21:29 2013 +0200
apache 2.4 changed access control
see https://httpd.apache.org/docs/2.4/upgrading.html#run-time
addressing:
AH01630: client denied by server configuration: /usr/share/copr/coprs_frontend/application
>---------------------------------------------------------------
coprs_frontend/coprs.conf.example | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/coprs_frontend/coprs.conf.example b/coprs_frontend/coprs.conf.example
index ca49306..7162d5f 100644
--- a/coprs_frontend/coprs.conf.example
+++ b/coprs_frontend/coprs.conf.example
@@ -9,9 +9,12 @@
ErrorLog logs/error_coprs
CustomLog logs/access_coprs common
- <Directory /usr/share/copr/coprs_frontend>
+ <Directory /usr/share/copr>
WSGIApplicationGroup %{GLOBAL}
- Order deny,allow
- Allow from all
+ # apache 2.2 (el6, F17)
+ #Order deny,allow
+ #Allow from all
+ # apache 2.4 (F18+)
+ Require all granted
</Directory>
</VirtualHost>
10 years, 10 months
[copr] master: require python-psycopg2 (28e2649)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 28e264924af4fc3b3ad4ae19f999d16c3b9e50c3
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jun 20 12:07:40 2013 +0200
require python-psycopg2
in case you use python db backend you have to have psycopg driver
addressing:
Traceback (most recent call last):
File "./manage.py", line 190, in <module>
manager.run()
File "/usr/lib/python2.7/site-packages/flask_script/__init__.py", line 351, in run
result = self.handle(sys.argv[0], command, sys.argv[2:])
File "/usr/lib/python2.7/site-packages/flask_script/__init__.py", line 324, in handle
return command.handle(app, *positional_args, **command_namespace.__dict__)
File "/usr/lib/python2.7/site-packages/flask_script/commands.py", line 143, in handle
return self.run(*args, **kwargs)
File "./manage.py", line 41, in run
db.create_all()
File "/usr/lib/python2.7/site-packages/flask_sqlalchemy.py", line 822, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/usr/lib/python2.7/site-packages/flask_sqlalchemy.py", line 814, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), tables=tables)
File "/usr/lib/python2.7/site-packages/flask_sqlalchemy.py", line 763, in get_engine
return connector.get_engine()
File "/usr/lib/python2.7/site-packages/flask_sqlalchemy.py", line 443, in get_engine
self._engine = rv = sqlalchemy.create_engine(info, **options)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 338, in create_engine
return strategy.create(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 64, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 312, in dbapi
psycopg = __import__('psycopg2')
ImportError: No module named psycopg2
>---------------------------------------------------------------
copr.spec | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/copr.spec b/copr.spec
index 4ce0a5f..b2be868 100644
--- a/copr.spec
+++ b/copr.spec
@@ -50,6 +50,7 @@ Requires: python-flask-script
Requires: python-flask-whooshee
#Requires: python-virtualenv
Requires: python-blinker
+Requires: python-psycopg2
Requires: python-whoosh
# for tests:
Requires: pytest
10 years, 10 months
[copr] master: postgresql server is not needed (8e072e9)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 8e072e9cfe8e3e33467c6dc5ea15fcab48986014
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jun 20 12:06:03 2013 +0200
postgresql server is not needed
a) you can use sqlite
b) even if you use PG, it can be on different machine
>---------------------------------------------------------------
copr.spec | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/copr.spec b/copr.spec
index 082c14b..4ce0a5f 100644
--- a/copr.spec
+++ b/copr.spec
@@ -40,8 +40,6 @@ This package contains backend.
Summary: Frontend for COPR
Requires: httpd
Requires: mod_wsgi
-Requires: postgresql-server
-Requires: postgresql-devel
Requires: gcc
Requires: python-alembic
Requires: python-flask
10 years, 10 months
[copr] master: document how to create db (d968f78)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit d968f78351281c1e7aecab8e04e0f467aa17c61a
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jun 20 12:04:56 2013 +0200
document how to create db
>---------------------------------------------------------------
copr-setup.txt | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/copr-setup.txt b/copr-setup.txt
index ca5703d..9047dae 100644
--- a/copr-setup.txt
+++ b/copr-setup.txt
@@ -91,5 +91,56 @@ Required pkgs:
- edit credentials in coprs_frontend/coprs/config.py
- cd /usr/share/copr/coprs_frontend
+- configure DB first - see DB section below
+# for develop setup do:
- ./manage.py create_db --alembic alembic.ini
+# for production setup do:
+COPRS_ENVIRON_PRODUCTION=1 ./manage.py create_db --alembic alembic.ini
+- for developing you can run:
+ ./manage.py runserver -t <FQDN>
+ and this will load DevelopmentConfig from coprs_frontend/coprs/config.py
+
+- for production is used ProductionConfig from coprs_frontend/coprs/config.py
+
+
+DB config
+=========
+
+Copr can use either SQLite or PostgreSQL. Choose one.
+
+SQLite
+~~~~~~
+
+- yum install sqlite
+- in file coprs_frontend/coprs/config.py put:
+ SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.abspath(DATABASE)
+This will use sqlite db file in /usr/share/copr/data/copr.db (manage.py will create that file)
+
+PostgreSQL
+~~~~~~~~~~
+
+- yum install -y postgresql-server
+- chkconfig postgresql on
+- on Fedoras, run:
+ postgresql-setup initdb
+- everywhere else run:
+ service postgresql initdb
+
+- service postgresql start
+- su - postgres -c 'PGPASSWORD=coprpass ; createdb -E UTF8 coprdb ; yes $PGPASSWORD | createuser -P -sDR copr-fe'
+
+Configure the user to use md5 password to connect to that database. Put the lines like following to /var/lib/pgsql/data/pg_hba.conf. Avoid the common pitfall: Make sure you put them *before* those existing lines that are for all..
+
+local coprdb copr-fe md5
+host coprdb copr-fe 127.0.0.1/8 md5
+host coprdb copr-fe ::1/128 md5
+local coprdb postgres ident
+
+Then reload PostgreSQL:
+ service postgresql reload
+
+and test the connection:
+
+PGPASSWORD=coprpass psql -a -U copr-fe coprdb
+PGPASSWORD=coprpass psql -a -h localhost -U copr-fe coprdb
10 years, 10 months
Code Review
by Tomas Radej
Hi,
I was thinking that it would be beneficial for the development of Copr
to use some sort of a code review tool. Since the number of people
working on Copr should rise in the future, nobody will be able to
really keep an eye and review what the others are committing. Doing the
reviews on the mailing list works now, but it isn't really convenient,
and IMHO it distracts subscribers already. Not to mention that most of
the codebase isn't being reviewed at all. We have ReviewBoard packaged
in Fedora, so I'd like to know if you'd be in favor of using that or
something else.
Cheers, TR
--
Tomas Radej <tradej(a)redhat.com> a.k.a. sheldon (IRC)
10 years, 10 months
Why postgresql-devel?
by Miroslav Suchý
Does somebody know why we have in requirements (in copr-setup.txt)
postgresql-devel?
--
Miroslav Suchy
Red Hat Systems Management Engineering
10 years, 10 months
API token expiration time
by Miroslav Suchý
I wonder why API token has expiration time just 30 days?
It seems too short for me.
E.g. Amazon have token without expiration (AFAIK). Fedora koji cert is
valid for one year.
Can we have expiration time longer? E.g. one year? Objections?
Mirek
10 years, 10 months
[copr] master: add to HOWTO how to create db (ff50b3a)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit ff50b3aa6c6ce8e7aa409cbf7986d623b668e92b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Jun 19 12:36:24 2013 +0200
add to HOWTO how to create db
>---------------------------------------------------------------
copr-setup.txt | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/copr-setup.txt b/copr-setup.txt
index 7e34082..ca5703d 100644
--- a/copr-setup.txt
+++ b/copr-setup.txt
@@ -90,4 +90,6 @@ Required pkgs:
- pip install pytest
- edit credentials in coprs_frontend/coprs/config.py
+- cd /usr/share/copr/coprs_frontend
+- ./manage.py create_db --alembic alembic.ini
10 years, 10 months