Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Config changes and updates #30

Open
Munsio opened this issue May 26, 2017 · 5 comments
Open

Config changes and updates #30

Munsio opened this issue May 26, 2017 · 5 comments
Milestone

Comments

@Munsio
Copy link
Member

Munsio commented May 26, 2017

One big problem i encountered is that every time we change something in our config files (bugfixes and so on) and you upgrade the stack, in the first step you need to change the name of the config folder or something like that or those files don't get overwritten.

But before we could provide an answer we need to define the behaviour we want, i have following ideas for that: (Note: these change is only for config files under /examples/rancher-gen )

  1. We don't care about changes by the user and overwrite these config files on each startup.

  2. We generate an hash from the existing file and check if it is the same hash then the version before - if thats true we overwrite it - if not we write it to the logs that some changes needs to be done. (Problem here might be that a wrong configuration don't let the container start)

One huge problem would be that if we include other config files in the current one thats not always possible (nginx.tmpl)

Input welcome

@mathuin
Copy link

mathuin commented May 27, 2017

One thought is to keep the nginx.tmpl static and have it include another user-specified template, that way you can change anything in the stock template without impacting user overrides.

Other than that, I like the idea of blowing it all away and starting over.

@Munsio
Copy link
Member Author

Munsio commented May 27, 2017

Thats the problem afaik it is not possible to include other template files - so we cant include them. (except importing the resulting config files)

What we also can do is checking if some specific user-config file is present and use this instead of the default one.

But this will have the same effect that sometimes if we change something important and the user hasn't updated his own config file the container wont start which is an bad behavior.

@mathuin
Copy link

mathuin commented May 29, 2017

https://github.com/jwilder/nginx-proxy/blob/master/nginx.tmpl#L55-L57 shows an example of nginx.tmpl including another template file if it exists.

@Munsio
Copy link
Member Author

Munsio commented May 29, 2017

yes thats true but this includes getting handeld by nginx - my problem is a level higher at rancher-gen where the nginx config gets build, and there i can't include custom templates or something like that.
If we want such a feature we have to implement it into rancher-gen

@mathuin
Copy link

mathuin commented May 29, 2017

Ah, okay, you're way ahead of me in understanding that bit of code. :-)

@emcniece emcniece added this to the MVP 1.0 milestone Jun 7, 2017
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