diff --git a/files/pagure_ci.service b/files/pagure_ci.service new file mode 100644 index 0000000..853c474 --- /dev/null +++ b/files/pagure_ci.service @@ -0,0 +1,19 @@ +# This is a systemd's service file for the logcom service, if you change +# the default value of the CI_CELERY_QUEUE configuration key, do not +# forget to edit it in the ExecStart line below + +[Unit] +Description=Pagure service integrating CI services with pagure +After=redis.target +Documentation=https://pagure.io/pagure + +[Service] +ExecStart=/usr/bin/celery worker -A pagure.lib.tasks_services --loglevel=info -Q pagure_ci +Environment="PAGURE_CONFIG=/etc/pagure/pagure.cfg" +Type=simple +User=git +Group=git +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/files/pagure_loadjson.service b/files/pagure_loadjson.service new file mode 100644 index 0000000..414d318 --- /dev/null +++ b/files/pagure_loadjson.service @@ -0,0 +1,19 @@ +# This is a systemd's service file for the loadjson service, if you change +# the default value of the LOADJSON_CELERY_QUEUE configuration key, do not +# forget to edit it in the ExecStart line below + +[Unit] +Description=Pagure service loading JSON files into the DB +After=redis.target +Documentation=https://pagure.io/pagure + +[Service] +ExecStart=/usr/bin/celery worker -A pagure.lib.tasks_services --loglevel=info -Q pagure_loadjson +Environment="PAGURE_CONFIG=/etc/pagure/pagure.cfg" +Type=simple +User=git +Group=git +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/files/pagure_logcom.service b/files/pagure_logcom.service new file mode 100644 index 0000000..360bf9d --- /dev/null +++ b/files/pagure_logcom.service @@ -0,0 +1,19 @@ +# This is a systemd's service file for the logcom service, if you change +# the default value of the LOGCOM_CELERY_QUEUE configuration key, do not +# forget to edit it in the ExecStart line below + +[Unit] +Description=Pagure service logging commits into the database +After=redis.target +Documentation=https://pagure.io/pagure + +[Service] +ExecStart=/usr/bin/celery worker -A pagure.lib.tasks_services --loglevel=info -Q pagure_logcom +Environment="PAGURE_CONFIG=/etc/pagure/pagure.cfg" +Type=simple +User=git +Group=git +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/files/pagure_webhook.service b/files/pagure_webhook.service new file mode 100644 index 0000000..fc5fc1c --- /dev/null +++ b/files/pagure_webhook.service @@ -0,0 +1,19 @@ +# This is a systemd's service file for the logcom service, if you change +# the default value of the WEBHOOK_CELERY_QUEUE configuration key, do not +# forget to edit it in the ExecStart line below + +[Unit] +Description=Pagure service sending web-hook notifications +After=redis.target +Documentation=https://pagure.io/pagure + +[Service] +ExecStart=/usr/bin/celery worker -A pagure.lib.tasks_services --loglevel=info -Q pagure_webhook +Environment="PAGURE_CONFIG=/etc/pagure/pagure.cfg" +Type=simple +User=git +Group=git +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/pagure-ci/README.rst b/pagure-ci/README.rst deleted file mode 100644 index 9dac42e..0000000 --- a/pagure-ci/README.rst +++ /dev/null @@ -1,13 +0,0 @@ -Pagure CI -========= - -This is to setup Pagure CI for development. It is assumed that all the -dependencies are resolved. - - * Run:: - - PAGURE_CONFIG=/path/to/config PYTHONPATH=. python pagure-ci/pagure_ci_server.py - - -Check `doc/usage/pagure_ci.rst` for further information on how to set up -and configure your project on both pagure and the CI services diff --git a/pagure-ci/pagure_ci.service b/pagure-ci/pagure_ci.service deleted file mode 100644 index b93c675..0000000 --- a/pagure-ci/pagure_ci.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Pagure Continuous Integration service -After=redis.target -Documentation=https://pagure.io/pagure - -[Service] -ExecStart=/usr/libexec/pagure-ci/pagure_ci_server.py -Type=simple -User=git -Group=git -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/pagure-loadjson/README.rst b/pagure-loadjson/README.rst deleted file mode 100644 index 10c1827..0000000 --- a/pagure-loadjson/README.rst +++ /dev/null @@ -1,13 +0,0 @@ -Pagure loadjson -=============== - -This is the service loads into the database the JSON files representing -issues (and in the future also the pull-requests). - -This service is triggered by a git hook, sending a notification that a push -happened. This service receive the notification and find the list of file -that changed and load them into the database. - - * Run:: - - PAGURE_CONFIG=/path/to/config PYTHONPATH=. python pagure-loadjson/pagure_loadjson_server.py diff --git a/pagure-loadjson/pagure_loadjson.service b/pagure-loadjson/pagure_loadjson.service deleted file mode 100644 index 2c963a6..0000000 --- a/pagure-loadjson/pagure_loadjson.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Pagure service loading JSON files into the DB -After=redis.target -Documentation=https://pagure.io/pagure - -[Service] -ExecStart=/usr/libexec/pagure-loadjson/pagure_loadjson_server.py -Type=simple -User=git -Group=git -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/pagure-logcom/pagure_logcom.service b/pagure-logcom/pagure_logcom.service deleted file mode 100644 index 577c775..0000000 --- a/pagure-logcom/pagure_logcom.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Pagure Logging Commit service -After=redis.target -Documentation=https://pagure.io/pagure - -[Service] -ExecStart=/usr/libexec/pagure-logcom/pagure_logcom_server.py -Type=simple -User=git -Group=git -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/pagure-webhook/pagure_webhook.service b/pagure-webhook/pagure_webhook.service deleted file mode 100644 index e9d0512..0000000 --- a/pagure-webhook/pagure_webhook.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Pagure WebHook server (Allowing web-hook notifications) -After=redis.target -Documentation=https://pagure.io/pagure - -[Service] -ExecStart=/usr/libexec/pagure-webhook/pagure-webhook-server.py -Type=simple -User=git -Group=git -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/pagure/default_config.py b/pagure/default_config.py index 43a12fe..d28ed40 100644 --- a/pagure/default_config.py +++ b/pagure/default_config.py @@ -84,6 +84,11 @@ SHOW_PROJECTS_INDEX = ['repos', 'myrepos', 'myforks'] GIT_URL_SSH = 'ssh://git@pagure.org/' GIT_URL_GIT = 'git://pagure.org/' +# Default queue names for the different services +WEBHOOK_CELERY_QUEUE = 'pagure_webhook' +LOGCOM_CELERY_QUEUE = 'pagure_logcom' +LOADJSON_CELERY_QUEUE = 'pagure_loadjson' +CI_CELERY_QUEUE = 'pagure_ci' # Number of items displayed per page ITEM_PER_PAGE = 48