-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Support looks like it should work for upgrade/downgrade via URL. I have not finished the web_ui part yet.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,18 +18,21 @@ | |
if $::operatingsystem != 'darwin' { | ||
ensure_packages(['unzip']) | ||
} | ||
staging::file { 'consul.zip': | ||
Exec { | ||
provider => shell | ||
} | ||
staging::file { "${consul::real_download_file}": | ||
source => $consul::real_download_url | ||
} -> | ||
staging::extract { 'consul.zip': | ||
target => $consul::bin_dir, | ||
creates => "${consul::bin_dir}/consul", | ||
staging::extract { "${consul::real_download_file}": | ||
target => $consul::bin_dir, | ||
onlyif => "test `consul version | grep -m1 -o [0-9\\.] | tr -d '\\n'` != ${consul::version}; unlessval=$?; if [ \$unlessval = 0 ]; then rm -f ${consul::bin_dir}/consul; fi; test \$unlessval = 0", | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
asasfu
Author
|
||
} -> | ||
file { "${consul::bin_dir}/consul": | ||
owner => 'root', | ||
group => 0, # 0 instead of root because OS X uses "wheel". | ||
mode => '0555', | ||
} | ||
} ~> Service['consul'] | ||
This comment has been minimized.
Sorry, something went wrong.
aj-jester
|
||
|
||
if ($consul::ui_dir and $consul::data_dir) { | ||
file { "${consul::data_dir}/${consul::version}_web_ui": | ||
|
@@ -38,7 +41,7 @@ | |
group => 0, # 0 instead of root because OS X uses "wheel". | ||
mode => '0755', | ||
} -> | ||
staging::deploy { 'consul_web_ui.zip': | ||
staging::deploy { "${consul::real_ui_download_file}": | ||
source => $consul::real_ui_download_url, | ||
target => "${consul::data_dir}/${consul::version}_web_ui", | ||
creates => "${consul::data_dir}/${consul::version}_web_ui/dist", | ||
|
5 comments
on commit 8fbbf44
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 other option is to begin moving to the module that replaces staging which is archive or something, currently only version 0.3.0 and may not be stable.
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.
@asasfu Honestly, if we can use archive
that would be super awesome because Kyle (solarkennedy) and I spoke about this feature lots and we decided on archive
because it makes things so much easier 😄
I will help you with this if you'd like, don't feel like you have to do all the work
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.
Hehe :) That's good to hear. I actually only started working on Linux (other than some consulting requirements from time to time) about 5 months ago, same with Puppet. So this is me just going head down into it. I've done lots of puppet code in those 5 months too. I also just started programming as a job 5 months ago.
So I can look into converting to archive but it'll take some commit iterations to pull it off. I like this current module, it just had a few improvements :)
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.
@asasfu Were you looking at https://forge.puppetlabs.com/camptocamp/archive? Their version seems to be 0.8.0
and it looks pretty stable https://github.com/camptocamp/puppet-archive
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.
No I didn’t actually see that one. I saw puppet-community/puppet-archive
We need to think about 2 things here:
consul version
error? what would happen then?