-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add cli profile #48
Conversation
profiles/cli/init.sh
Outdated
|
||
if ! pulp --refresh-api status | ||
then | ||
pip3 install --prefix /usr/local/ --no-cache-dir --editable /src/pulp-cli |
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 where #47 would come in handy.
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. |
421d4cf
to
82e3e7e
Compare
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 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" |
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.
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
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.
Like this?
82e3e7e
to
dfc9ab1
Compare
fixes #46
I figured, a profile would be a good match for this functionality. WDYT?