Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Portus configuration #710

Closed
opichon opened this issue Feb 5, 2016 · 5 comments
Closed

Portus configuration #710

opichon opened this issue Feb 5, 2016 · 5 comments

Comments

@opichon
Copy link

opichon commented Feb 5, 2016

Can I manually update the srv/portus/config/config.yml file? What about the config-local.yml file?
Changes made to these files directly do not seem to be taken int account (e.g. ldap_enabled: true).

Do I need to run portusctl setup again after making changes to the config files?

config.yml seemes ot remain unchanged by the portusctl setup command.
but the config-local.yml file is modified by the portusctl setup command.

@opichon
Copy link
Author

opichon commented Feb 5, 2016

It appears that portusctl setup has to be run. Direct edits to the config files are not taken into account.

But since portusctl overwrites the config-local.yml file, some settings MUST be passed on the command line every single time.

For example, if the ldap settings are not passed to portusctl setup on the command line, then config-local.yml will be written with ldap_enabled: false.

ALL the ldap settings need to be passed on the command line, or they will get written with default values in config-local.yml.

This is incredible inconvenient. I suggest the following handling of defaults:

defaults are set in config.yml
anything NOT defined via a command line argument remains undefined in config-local.yml (which means that the default values in config.yml will apply).

@opichon
Copy link
Author

opichon commented Feb 5, 2016

It gets worse! portusctl setup will override the storage settings in /etc/registry/config.yml.

@mssola
Copy link
Collaborator

mssola commented Feb 5, 2016

Configuration of Portus on the RPM has to be more clear, that's for sure :)

portusctl setup is meant to get you started from scratch. We will try to accommodate portusctl in situations where:

  • Some pieces already exist.
  • The user is just upgrading.

For now this is just too cumbersome.

Can I manually update the srv/portus/config/config.yml file? What about the config-local.yml file?
Changes made to these files directly do not seem to be taken int account (e.g. ldap_enabled: true).

As explained here, you should never do that. The config.yml file contains the default configuration values. You can either directly edit the config-local.yml file or provide the proper environment variables. After doing that, you have to restart Portus.

This is incredible inconvenient. I suggest the following handling of defaults:

defaults are set in config.yml
anything NOT defined via a command line argument remains undefined in config-local.yml (which means that the default values in config.yml will apply).

Bear in mind that this is indeed the current behavior. Take a look at this. So, in portusctl what you provide is what you want to be different from the default settings.

I will close this issue since all the valid concerns are already being tracked in one of these issues: #709, #711 and #712. Thanks for reporting all these issues. We are well aware that there are tons of things that can be improved in the RPM setup of Portus.

@mssola mssola closed this as completed Feb 5, 2016
@opichon
Copy link
Author

opichon commented Feb 5, 2016

"this i indeed the current behavior" : well, for example, the ldap settings are always overwritten in config-local.yml when running portusctl setup, unless the appropriate command-line argument is supplied. I should be able to set them once and for all in either config.yml or config-local.yml, and not have them change when I run portusctl setup again, unless I explicitly provide a command line argument.

"you have to restart portus": How do you restart portus? is this the portusctl setup command? Something else (could not see it in the docs) ? If portusctl setup is meant to be run once only, that is rather dangerous. It would be better if the command was safe to run repeatedly.

@flavio
Copy link
Member

flavio commented Feb 5, 2016

The config.yml file is shipped with the RPM and is a 1:1 copy of what we have in master. This file contains the default configuration for a generic Portus project. We need to overwrite this file from release to release to provide the settings for the new values we are going to add.

you have to restart portus": How do you restart portus? is this the portusctl setup command?

There's no command for that. That's a good point, we should create a portusctl restart which just restarts apache.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants