Skip to content

Commit

Permalink
New Pulp 3 default ports
Browse files Browse the repository at this point in the history
New default Pulp 3 pulp-content port: 24816
New default Pulp 3 pulp-api port: 24817
(These 2 services now use separate ports by default)
  • Loading branch information
mikedep333 authored and kersommoura committed Jun 19, 2019
1 parent e080d98 commit 621e177
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pulp_smash/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,12 +889,12 @@ class RegistryClient:
For docker it is located in `/etc/docker/daemon.json` and content is::
{"insecure-registries": ["pulp_host:8080"]}
{"insecure-registries": ["pulp_host:24816"]}
For podman it is located in `/etc/containers/registries.conf` with::
[registries.insecure]
registries = ['pulp_host:8080']
registries = ['pulp_host:24816']
:param pulp_smash.config.PulpSmashConfig cfg: Information about the target
host.
Expand Down
26 changes: 17 additions & 9 deletions pulp_smash/pulp_smash_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _get_v3_host_properties(pulp_version):
}

if not click.confirm(
"Will the content be served on same API server and port?", True
"Will the content be served on same API server and port?", False
):
properties["roles"]["content"] = _get_content_role()

Expand Down Expand Up @@ -195,14 +195,22 @@ def _get_api_role(pulp_version):
api_role["verify"] = False

# Get "port"
click.echo(
"By default, Pulp Smash will communicate with Pulp's API on the port "
"number implied by the scheme. For example, if Pulp's API is "
"available over HTTPS, then Pulp Smash will communicate on port 443. "
"If Pulp's API is available on a non-standard port, like 8000, then "
"Pulp Smash needs to know about that."

if pulp_version < Version("3"):
default_port = 0
click.echo(
"By default, Pulp Smash will communicate with Pulp 2's API on the "
"port number implied by the scheme. For example, if Pulp 2's API "
"is available over HTTPS, then Pulp Smash will communicate on "
"port 443."
"If Pulp 2's API is available on a non-standard port, like 8000, "
"then Pulp Smash needs to know about that."
)
else:
default_port = 24817
port = click.prompt(
"Pulp API port number", default=default_port, type=click.INT
)
port = click.prompt("Pulp API port number", default=0, type=click.INT)
if port:
api_role["port"] = port

Expand Down Expand Up @@ -239,7 +247,7 @@ def _get_content_role():
content_role["verify"] = False

port = click.prompt(
"Content Host port number", default=8080, type=click.INT
"Content Host port number", default=24816, type=click.INT
)
if port:
content_role["port"] = port
Expand Down
3 changes: 2 additions & 1 deletion tests/test_pulp_smash_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,13 @@ def setUp(self):
"scheme": "https",
"service": "nginx",
"verify": True,
"port": 24817,
},
"content": {
"scheme": "https",
"service": "pulp_content_app",
"verify": True,
"port": 8080,
"port": 24816,
},
"pulp resource manager": {},
"pulp workers": {},
Expand Down

0 comments on commit 621e177

Please sign in to comment.