-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
consul_ui resource does not work #255
Comments
Had the same issue. This should be fixed with #252. |
@Ginja Not quite, the download piece will fix my needing to override the binary_url attribute, but it doesn't fix the primary issue with the consul_ui resource. The resource is not finding the checksum so it's failing, if you see in the error it's saying the key doesn't exist even though the attribute does exist for 0.6.0_web_ui |
@nicxvan do you have a fix ? I'll try to get to it next week if not. |
@nicxvan I still believe #252 does fix your issue. The reason it couldn't find the checksum was because they started prefixing their download URLs with # attributes/default.rb
default['consul']['checksums'] = {
...,
...,
'consul_0.6.0_web_ui' => '73c5e7ee50bb4a2efe56331d330e6d7dbf46335599c028344ccc4031c0c32eb0'
}
# libraries/consul_ui.rb
def binary_checksum
# binary_filename will return 'consul_0.6.0_web_ui'
node['consul']['checksums'].fetch(binary_filename)
end
def binary_filename
['consul', version, 'web_ui'].join('_')
end Try using the latest code from the master branch, and let me know if it doesn't work. EDIT: Hold up, I didn't see PR #253 was merged. I believe your issue is once again valid. The default value for # libraries/consul_ui.rb
attribute(:binary_url, kind_of: String, default: 'https://releases.hashicorp.com/consul/%{version}/consul_%{filename}.zip')
remote_url new_resource.binary_url % { version: new_resource.version, filename: new_resource.binary_filename } If you're going to test #252, use the commit before that PR was merged (ede4642). |
@Ginja What you said is partially right, if I download the web_ui manually I get an archive with the dist folder and the ui works, if I use the resource I end up with another binary in the location I specify in the directory attribute. |
@nicxvan Could you elaborate (e.g. show your resources & properties/attributes set in both examples)? |
Attributes:
Recipe / resource:
Thanks! |
@nicxvan any chance you can use markdown ? just add ```ruby at top and 3 backticks at bottom. Thanks! |
Sorry @scalp42 It's now formatted. |
I think you need to change your node['consul']['config']['ui_dir'] = '/opt/consul-ui/current'
# "/#{node['consul']['config']['ui_dir'].split('/')[1]}" == '/opt'
consul_ui 'consul-ui' do
install_path "/#{node['consul']['config']['ui_dir'].split('/')[1]}"
owner node['consul']['service_user']
group node['consul']['service_group']
version node['consul']['version']
end After Chef runs, the directory layout on my filesystem looks like:
|
Thanks @Ginja I tried that but it didn't work. I ended up trying this:
And get this structure with no response on 8500 after converging:
|
A couple of things to check:
|
Hmm sometimes is the most obvious things, consul is not running, how do you kick off the start with chef? I thought the config_resource took care of that. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When attempting to converge my wrapper cookbook I get an error:
Here is my resource declaration:
Note that I overrode the binary url as well since the resource generates the wrong url, I did see a pull request to fix that though.
The key does exist in the attributes file under ['consul']['checksums']
and the attribute is called in the resource definition:
The text was updated successfully, but these errors were encountered: