This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds pulp-content role for the pulp_content_app
closes #4302 https://pulp.plan.io/issues/4302
- Loading branch information
Showing
8 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
- pulp3-workers | ||
- pulp3-resource-manager | ||
- pulp3-webserver | ||
- pulp3-content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
Shared variables: | ||
----------------- | ||
|
||
* `ansible_python_interpreter`: **Required**. Path to the Python interpreter. | ||
|
||
This role **is not tightly coupled** with the `pulp3-postgresql` 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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
pulp_content_app: | ||
state: started | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
license: GPL-3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
- 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 | ||
become: true | ||
|
||
- name: Set state of pulp content app | ||
systemd: | ||
daemon_reload: true | ||
name: pulp_content_app.service | ||
state: started | ||
enabled: true | ||
become: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[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] | ||
EnvironmentFile=-/etc/default/pulp_workers | ||
EnvironmentFile=-/etc/default/pulp_workers_%i | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,5 @@ | |
- pulp3-workers | ||
- pulp3-resource-manager | ||
- pulp3-webserver | ||
- pulp3-content | ||
- pulp3-devel |