forked from pool/pagure
Neal Gompa
a56c3a2481
+ Allow by default the ACL "pull_request_create" on project-less API token + Implement Pagure Git Auth + Add a new API endpoint allowing to update an existing PR + If the user doesn't have a valid ssh key inform but let them log in + Fix various UI issues + Add a button to take/drop a pull-request + Add a new API endpoint to assign pull-request to someone + Allow dots and plus signs in project names + Fix seeing releases when the reference provided returned a commit + Include the PR tags in their JSON representation + Ensure that forking does not run the hook + Deprecate fedmsg for fedora-messaging - Backport fix for pagure-ev issues in Python 3 + Patch: 0001-pagure-ev-python-3-compatibility.patch - Add patch to allow SQLAlchemy 1.3.0+ with Pagure + Patch: 0501-Revert-Add-a-upper-limit-to-sqlalchemy.patch - Update the service list to enable and start in README.SUSE OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/pagure?expand=0&rev=17
110 lines
3.3 KiB
Plaintext
110 lines
3.3 KiB
Plaintext
# Setting up pagure
|
|
|
|
0. Prepare the filesystem (this step is usually performed on package install)
|
|
|
|
mkdir -p /srv/www/pagure-releases
|
|
mkdir -p /srv/gitolite/repositories/{,docs,forks,requests,tickets}
|
|
mkdir -p /srv/gitolite/pseudo
|
|
mkdir -p /srv/gitolite/remotes
|
|
mkdir -p /srv/gitolite/.gitolite/{conf,keydir,logs}
|
|
|
|
touch /srv/gitolite/.gitolite/conf/gitolite.conf
|
|
|
|
cp /usr/share/doc/packages/pagure/gitolite3.rc /srv/gitolite/.gitolite.rc
|
|
|
|
chown git:git -R /srv/gitolite
|
|
chown git:git /srv/www/pagure-releases
|
|
|
|
mkdir -p /srv/www/run
|
|
|
|
setfacl -m user:wwwrun:rx --default /srv/gitolite
|
|
setfacl -Rdm user:wwwrun:rx /srv/gitolite
|
|
setfacl -Rm user:wwwrun:rx /srv/gitolite
|
|
|
|
1. Install and set up a database
|
|
|
|
Option A: PostgreSQL
|
|
|
|
Note: If your PostgreSQL server is not on the same machine, just install 'python3-psycopg2'
|
|
on the pagure host machine and follow the installation and database creation steps below
|
|
on the designated database server. This also requires the database port opened on the
|
|
database server's firewall.
|
|
|
|
zypper install postgresql-server
|
|
systemctl start postgresql
|
|
|
|
A1. Edit /var/lib/pgsql/data/pg_hba.conf and change auth method from `ident` to `md5` for localhost
|
|
|
|
A2. Create the pagure database
|
|
|
|
sudo -u postgres psql
|
|
|
|
CREATE DATABASE pagure;
|
|
CREATE USER pagure;
|
|
ALTER USER pagure WITH ENCRYPTED PASSWORD '--PagureDBUserPW--';
|
|
GRANT ALL PRIVILEGES ON DATABASE pagure to pagure;
|
|
GRANT ALL PRIVILEGES ON ALL tables IN SCHEMA public TO pagure;
|
|
GRANT ALL PRIVILEGES ON ALL sequences IN SCHEMA public TO pagure;
|
|
\q
|
|
|
|
A3. Enable and restart PostgreSQL
|
|
|
|
systemctl stop postgresql
|
|
systemctl enable --now postgresql
|
|
|
|
Option B: MariaDB
|
|
|
|
Note: If your MariaDB server is not on the same machine, just install 'python3-PyMySQL'
|
|
on the pagure host machine and follow the installation and database creation steps below
|
|
on the designated database server. This also requires the database port opened on the
|
|
database server's firewall.
|
|
|
|
zypper install mariadb mariadb-client
|
|
systemctl enable --now mariadb
|
|
mysql_secure_installation
|
|
|
|
B1. Create the pagure database
|
|
|
|
mysql -u root -p
|
|
|
|
mysql> create database pagure;
|
|
mysql> grant all privileges on pagure.* to pagure identified by '--PagureDBUserPW--';
|
|
mysql> flush privileges;
|
|
mysql> exit
|
|
|
|
2. Install Redis
|
|
|
|
zypper install redis
|
|
|
|
3. Configure redis
|
|
|
|
cp /etc/redis/default.conf.example /etc/redis/default.conf
|
|
chown root:redis /etc/redis/default.conf
|
|
systemctl enable --now redis@default.service
|
|
|
|
4. Edit /etc/pagure/pagure.cfg to set up pagure settings as appropriate.
|
|
|
|
For details on all the options in pagure.cfg, see https://docs.pagure.org/pagure/configuration.html
|
|
|
|
5. Populate the database
|
|
|
|
python3 /usr/share/pagure/pagure_createdb.py -c /etc/pagure/pagure.cfg -i /etc/pagure/alembic.ini
|
|
|
|
6. Edit /etc/apache2/vhosts.d/pagure.conf to set up web settings as appropriate.
|
|
|
|
7. Open ports in the firewall as appropriate
|
|
|
|
firewall-cmd --add-service=ssh
|
|
firewall-cmd --add-service=http
|
|
firewall-cmd --add-service=https
|
|
firewall-cmd --add-service=redis
|
|
firewall-cmd --runtime-to-permanent
|
|
|
|
8. Enable and start pagure services
|
|
|
|
systemctl enable --now pagure_worker pagure_gitolite_worker pagure_api_key_expire_mail.timer pagure_mirror_project_in.timer
|
|
|
|
9. Enable and start apache2, or restart if it's already running
|
|
|
|
For more details on setup, take a look at the official Pagure documentation: https://docs.pagure.org/pagure/
|