Skip to content
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 cli profile #48

Merged
merged 1 commit into from
Oct 4, 2022
Merged

Add cli profile #48

merged 1 commit into from
Oct 4, 2022

Conversation

mdellweg
Copy link
Member

fixes #46

I figured, a profile would be a good match for this functionality. WDYT?


if ! pulp --refresh-api status
then
pip3 install --prefix /usr/local/ --no-cache-dir --editable /src/pulp-cli
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where #47 would come in handy.

@newswangerd
Copy link
Collaborator

I would prefer to just add this to the base container, rather than in a profile. The profiles are intended to provide preconfigured options for different deployment modes (such as using an s3 backend) as well as extra configurations that are required for plugins to run (such as setting up token auth for the container registry in pulp_container). The environment tooling (such as setting up pulpcore manager and tests) are intended to be pre loaded into the base container because all of the plugins and deployment modes can potentially benefit from them.

Copy link
Collaborator

@newswangerd newswangerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a lot better!

You might also consider adding the CLI as a dev dependency at container build time: https://github.com/pulp/oci_env/blob/main/base/dev_requirements.txt

You can still run it from source by adding it to your DEV_SOURCE_PATH, since any dependencies added there will take precedence over the pre-installed ones, and this will make it so that it doesn't have to be installed each time a new environment is initialized.

base/init.sh Outdated
if ! pulp --refresh-api status
then
pulp config create --overwrite --base-url "http://localhost:5001" --username "admin" --password "password"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the nginx port, username and password are configurable. You can read these values from these environment variables which get passed into the container: https://github.com/pulp/oci_env/blob/main/client/oci_env/utils.py#L46

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this?

@newswangerd newswangerd merged commit f5aace2 into pulp:main Oct 4, 2022
@mdellweg mdellweg deleted the install_cli branch October 5, 2022 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a plugin writer, I want to use the pulp cli
2 participants