-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Upgrade via URL method #178
Conversation
56b824e
to
b27a4a3
Compare
Hmm. I'm happy to see this issue fixed, but I'm sad that |
Ok thanks. I forgot to mention this, another issue with |
I can see that the On the other hand, we are going to have more control with this thing and it is nice not to have any other dependencies. If we did move to Let me think just a little more. |
Yup, no doubt. I was thinking at first to just submit a PR with them but then figured why not put that effort into writing our own which we can have more control over 😄 Thanks. |
What did we decide on this particular issue? This will circle around again with the recent release of Consul 0.6.0 so wondering what the agreed upon solution was for this. |
I was thinking about this as well but recently I came to know about https://github.com/llinder/deb-consul-template. You can either add the ppa to your apt repos I think managing upgrades/rollbacks via |
Yes I would agree they can be clumsy with staging, but take a look at the pull request I just added #202 and see if we think that it can meet the needs of handling upgrading/downgrading via the URL. |
Woo! |
Ok. I spent some time on this today. First there is the bad news, then lots of good news, then some unfortunate caveats.
The bad news is I didn't use
camptocamp/archive
module. Similar tonanliu/staging
it did only some stuff well, like checksums. But getting it to do exactly the right thing could more or less be summed up by the gif below, just replace "css" with "archive" lol.I was just as frustrated as this guy ^^^
That being said, the good news is I implemented all the goodies of
camptocamp/archive
and fine tuned it to our needs.present
,installed
orabsent
, they can use it for both URL and package methods.puppet-stdlib
.staging
andarchive
.Caveats:
zip
. With so manyexec
s it would've been way too complicated. I don't think this would be a problem for majority of the users.package_*
tocore_package_*
andui_download_*
toui_package_*
to matchcore_package_*
params, all for the sake of clarity. These changes will not affect users who use the default parameters. If they use a custom download URL it would break for them unfortunately.ensure
for packages fromlatest
toinstalled
since URL doesn't supportlatest
but its the default install method, you see the dilemma 😅.A big caveat
Even if the version is the same, when users use this branch for the first time, and only for the very first time, the module will upgrade consul and restart, because it doesn't know the existing version. This is mostly important for masters but I would not want clients restarting either. There are 2 ways to mitigate this:
with the following permissions
0644
and whatever consul user/group is used:❗ Be sure to update
<version>
and<data_dir>
with appropriate values.This prevents puppet from notifying the rest of the install process. I would recommend this to be done on clients as well.
OR
restart_on_change
tofalse
and it will only replace the existing binary with an identical one, thats it, no restarts.I don't know if one is better than the other, but I would do option 1. Is there a better way to do this? I'm all ears.
I would appreciate if everyone tests this branch and let me know if there is anything else I missed.
Ok, lets take a breather, here's a few 🍻
Thoughts? Concerns? Fears?
cc @solarkennedy