-
Notifications
You must be signed in to change notification settings - Fork 81
Adds pulp-content role for the pulp_content_app #64
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
- pulp3-workers | ||
- pulp3-resource-manager | ||
- pulp3-webserver | ||
- pulp3-content | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
pulp3-content | ||
============= | ||
|
||
Install, configure, and set the state of pulp content app. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should also document the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of using and documenting the variable, I removed it |
||
Shared variables: | ||
----------------- | ||
|
||
* `ansible_python_interpreter`: **Required**. Path to the Python interpreter. | ||
|
||
This role **is not tightly coupled** with the `pulp3` role, but it does use some of the same | ||
variables. When used together, the values are inherited from the role. When not used together, | ||
these values are **required**. | ||
|
||
* `pulp_user` | ||
* `pulp_install_dir` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Reload systemd and restart pulp content app | ||
systemd: | ||
daemon_reload: true | ||
name: pulp_content_app.service | ||
state: restarted | ||
become: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
galaxy_info: | ||
author: Pulp | ||
description: Pulp content app | ||
company: Red Hat | ||
min_ansible_version: 2.4 | ||
platforms: | ||
- name: Fedora | ||
versions: | ||
- 28 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since our tests use f27 and centos, I think we should include them too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I realize that you probably did it this way to mirror the workers role, which is also missing those platforms. Would you mind changing that as well while we are thinking about it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fedora 27 is end of life, IMO we should disinclude it both here and with the tests, and use F28+ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call. Filed: https://pulp.plan.io/issues/4334 |
||
license: GPL-3.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
- block: | ||
- name: Install pulp_content_app service file | ||
template: | ||
src: pulp_content_app.service.j2 | ||
dest: /lib/systemd/system/pulp_content_app.service | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
notify: Reload systemd and restart pulp content app | ||
|
||
- name: Set state of pulp content app | ||
systemd: | ||
daemon_reload: true | ||
name: pulp_content_app.service | ||
state: started | ||
enabled: true | ||
become: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[Unit] | ||
Description=Pulp Content App | ||
After=network-online.target | ||
Wants=network-online.target | ||
|
||
# This service will break if left running while PostgreSQL restarts. | ||
BindsTo=postgresql.service | ||
After=postgresql.service | ||
|
||
[Service] | ||
Environment="DJANGO_SETTINGS_MODULE=pulpcore.app.settings" | ||
User={{ pulp_user }} | ||
WorkingDirectory=/var/run/pulp_content_app/ | ||
RuntimeDirectory=pulp_content_app | ||
ExecStart={{ pulp_install_dir }}/bin/gunicorn pulpcore.content:server \ | ||
--bind 'localhost:8080' \ | ||
--worker-class 'aiohttp.GunicornWebWorker' \ | ||
-w 2 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,5 @@ | |
- pulp3-workers | ||
- pulp3-resource-manager | ||
- pulp3-webserver | ||
- pulp3-content | ||
- pulp3-devel |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ | |
- pulp3-workers | ||
- pulp3-resource-manager | ||
- pulp3-webserver | ||
- pulp3-content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A+