-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pulp services #34
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
8577568
add pulp services
archanaserver 266dfc6
stop managing etc pulp and pgsql, disable selinux labeling
evgeni 1d08e23
run podman with label=disable to avoid permission errors
evgeni 9f99f69
manually create tmp and asset dirs for pulp
evgeni 06378a7
get the encryption key from the vm
evgeni e9541cc
use host networking so that the containers can reach psql on localhost
evgeni 94328d4
manually migrate the database
evgeni a36e0ac
use the right container name when reseting the password
evgeni c0a052c
wait for api later
evgeni ced9c95
use right ports for pulp in http config
evgeni 992a6f8
added restart option
archanaserver 675a2ee
fix volume mapping
archanaserver 846263c
add test to check pulp service health
archanaserver 84a5a67
add task to create pulp tem dir
archanaserver f87525f
update CONTENT_ORIGIN config
archanaserver 78ca43a
update migrate task
archanaserver 3a92635
remove unused pulp_api_ports and pulp_content_ports variables
archanaserver 3d1f220
update the PORT value to empty string
archanaserver File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
httpd_ssl_dir: /etc/pki/httpd | ||
httpd_pulp_api_backend: http://localhost:8080 | ||
httpd_pulp_content_backend: http://localhost:8080 | ||
httpd_pulp_api_backend: http://localhost:24817 | ||
httpd_pulp_content_backend: http://localhost:24816 | ||
httpd_foreman_backend: http://localhost:3000 |
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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
--- | ||
pulp_image: quay.io/pulp/pulp:stable | ||
pulp_ports: | ||
- "8080:80" | ||
pulp_image: quay.io/pulp/pulp-minimal:stable | ||
pulp_api_image: "{{ pulp_image }}" | ||
pulp_content_image: "{{ pulp_image }}" | ||
pulp_worker_image: "{{ pulp_image }}" | ||
|
||
pulp_worker_count: 2 | ||
|
||
pulp_volumes: | ||
- /var/lib/pulp/settings:/etc/pulp:Z | ||
- /var/lib/pulp/pulp_storage:/var/lib/pulp:Z | ||
- /var/lib/pulp/pgsql:/var/lib/pgsql:Z | ||
- /var/lib/pulp/containers:/var/lib/containers:Z | ||
pulp_container_name: pulp | ||
- /var/lib/pulp:/var/lib/pulp | ||
|
||
pulp_api_container_name: pulp-api | ||
pulp_content_container_name: pulp-content | ||
pulp_worker_container_name: pulp-worker |
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
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 |
---|---|---|
@@ -1,7 +1,20 @@ | ||
CONTENT_ORIGIN="http://{{ ansible_hostname }}:8080" | ||
CONTENT_ORIGIN="http://{{ ansible_fqdn }}:24816" | ||
CACHE_ENABLED=True | ||
REDIS_HOST="localhost" | ||
REDIS_PORT=6379 | ||
ekohl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
REDIS_DB=8 | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.postgresql', | ||
'NAME': 'pulp', | ||
'USER': 'pulp', | ||
'PASSWORD': '{{ pulp_db_password }}', | ||
'HOST': 'localhost', | ||
evgeni marked this conversation as resolved.
Show resolved
Hide resolved
|
||
'PORT': '', | ||
} | ||
} | ||
|
||
AUTHENTICATION_BACKENDS=['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend'] | ||
REMOTE_USER_ENVIRON_NAME="HTTP_REMOTE_USER" | ||
REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES=('rest_framework.authentication.SessionAuthentication', 'pulpcore.app.authentication.PulpRemoteUserAuthentication') |
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 |
---|---|---|
@@ -1,38 +1,45 @@ | ||
import json | ||
|
||
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. This empty line is common in Python. It separates the built in modules ( |
||
import pytest | ||
|
||
|
||
PULP_HOST = 'localhost' | ||
PULP_PORT = 8080 | ||
|
||
PULP_API_PORT = 24817 | ||
PULP_CONTENT_PORT = 24816 | ||
|
||
@pytest.fixture(scope="module") | ||
def pulp_status_curl(host): | ||
return host.run(f"curl -k -s -w '%{{stderr}}%{{http_code}}' http://{PULP_HOST}:{PULP_PORT}/pulp/api/v3/status/") | ||
|
||
return host.run(f"curl -k -s -w '%{{stderr}}%{{http_code}}' http://{PULP_HOST}:{PULP_API_PORT}/pulp/api/v3/status/") | ||
|
||
@pytest.fixture(scope="module") | ||
def pulp_status(pulp_status_curl): | ||
return json.loads(pulp_status_curl.stdout) | ||
|
||
def test_pulp_api_service(host): | ||
pulp_api = host.service("pulp-api") | ||
assert pulp_api.is_running | ||
assert pulp_api.is_enabled | ||
|
||
def test_pulp_service(host): | ||
pulp = host.service("pulp") | ||
assert pulp.is_running | ||
assert pulp.is_enabled | ||
def test_pulp_content_service(host): | ||
pulp_content = host.service("pulp-content") | ||
assert pulp_content.is_running | ||
assert pulp_content.is_enabled | ||
|
||
def test_pulp_worker_service(host): | ||
pulp_worker = host.service("pulp-worker") | ||
assert pulp_worker.is_running | ||
assert pulp_worker.is_enabled | ||
|
||
def test_pulp_port(host): | ||
pulp = host.addr(PULP_HOST) | ||
assert pulp.port(PULP_PORT).is_reachable | ||
def test_pulp_api_port(host): | ||
pulp_api = host.addr(PULP_HOST) | ||
assert pulp_api.port(PULP_API_PORT).is_reachable | ||
|
||
def test_pulp_content_port(host): | ||
pulp_content = host.addr(PULP_HOST) | ||
assert pulp_content.port(PULP_CONTENT_PORT).is_reachable | ||
|
||
def test_pulp_status(pulp_status_curl): | ||
assert pulp_status_curl.succeeded | ||
assert pulp_status_curl.stderr == '200' | ||
|
||
|
||
def test_pulp_status_database_connection(pulp_status): | ||
assert pulp_status['database_connection']['connected'] | ||
|
||
|
@@ -54,6 +61,9 @@ def test_pulp_status_workers(pulp_status): | |
|
||
@pytest.mark.xfail(reason='password auth is deactivated when we use cert auth') | ||
def test_pulp_admin_auth(host): | ||
cmd = host.run(f"curl --silent --write-out '%{{stderr}}%{{http_code}}' --user admin:CHANGEME http://{PULP_HOST}:{PULP_PORT}/pulp/api/v3/users/") | ||
cmd = host.run(f"curl --silent --write-out '%{{stderr}}%{{http_code}}' --user admin:CHANGEME http://{PULP_HOST}:{PULP_API_PORT}/pulp/api/v3/users/") | ||
assert cmd.succeeded | ||
assert cmd.stderr == '200' | ||
|
||
def test_pulp_volumes(host): | ||
assert host.file("/var/lib/pulp").is_directory |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is also unused, but I think this could still be needed to tune the worker count.