Skip to content
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

Add custom resource for installing the Web UI. #298

Merged
merged 2 commits into from
Mar 18, 2016
Merged

Conversation

johnbellone
Copy link
Contributor

/cc @sh9189 @acaiafa

Fixes #297.

This was definitely something that was missed from 2.0.

John Bellone and others added 2 commits March 18, 2016 16:14
Fixes #297.

This was definitely something that was missed from 2.0.
@Ginja
Copy link
Contributor

Ginja commented Mar 18, 2016

Consul agent now has a built-in UI config flag:

https://www.consul.io/docs/agent/options.html#_ui

Should we be leveraging it instead?

@johnbellone
Copy link
Contributor Author

Isn't the flag the same as writing config?

@Ginja
Copy link
Contributor

Ginja commented Mar 18, 2016

I think it's built-in now (i.e. doesn't require a separate download). I may be misreading the docs though.

johnbellone added a commit that referenced this pull request Mar 18, 2016
Add custom resource for installing the Web UI.
@johnbellone johnbellone merged commit 03210cf into master Mar 18, 2016
@legal90
Copy link
Contributor

legal90 commented Mar 22, 2016

@Ginja You are right. Since v0.6.1 Consul UI is built-in: hashicorp/consul#1543
So, it isn't necessary to deploy a UI separately (thus it is still supported).

@johnbellone In few words there are two different config options (and CLI flags):

  • ui. Being set to true, it enables the built-in UI.
  • ui_dir. It configures Consul to use a separated Consul UI installed to the specified path.

I think it is reasonable to change default recipe a little bit. If I set ['consul']['config']['ui'] = true, I want to use the built-in UI, not the separated one.

@rossedman
Copy link

Has anyone else here tried to use the new cookbook with just setting ui to true? I am receiving errors when doing that. I think its great to use the internal UI unless customizing. Just looking for some feedback.

{
    "consul": {
        "config": {
            "ui": true
        }
    }
}

Error Log

module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     * link[/var/lib/consul/ui] action create
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       ================================================================================
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       Error executing action `create` on resource 'link[/var/lib/consul/ui]'
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       ================================================================================

module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       Errno::ENOENT
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       -------------
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       No such file or directory @ sys_fail2 - (/opt/consul-webui/0.6.4, /var/lib/consul/ui)

module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       Cookbook Trace:
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       ---------------
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       /var/chef/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       /var/chef/cookbooks/consul/libraries/consul_installation_webui.rb:45:in `action_create'

module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       Resource Declaration:
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       ---------------------
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       # In /var/chef/cookbooks/consul/libraries/consul_installation_webui.rb
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):        58:           link options[:symlink_to] do
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):        59:             to ::File.join(options[:extract_to], new_resource.version)
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):        60:             action :nothing
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):        61:           end
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):        62:         end
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       Compiled Resource:
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       ------------------
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       # Declared in /var/chef/cookbooks/consul/libraries/consul_installation_webui.rb:58:in `block in action_create'
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       link("/var/lib/consul/ui") do
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):         action [:nothing]
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):         retries 0
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):         retry_delay 2
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):         default_guard_interpreter :default
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):         to "/opt/consul-webui/0.6.4"
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):         link_type :symbolic
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):         target_file "/var/lib/consul/ui"
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):         declared_type :link
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):         cookbook_name :consul
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       end
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     ================================================================================
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     Error executing action `create` on resource 'consul_installation[Consul WebUI: 0.6.4]'
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     ================================================================================

module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     Errno::ENOENT
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     -------------
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     link[/var/lib/consul/ui] (/var/chef/cookbooks/consul/libraries/consul_installation_webui.rb line 58) had an error: Errno::ENOENT: No such file or directory @ sys_fail2 - (/opt/consul-webui/0.6.4, /var/lib/consul/ui)

module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     Cookbook Trace:
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     ---------------
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     /var/chef/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     /var/chef/cookbooks/consul/libraries/consul_installation_webui.rb:45:in `action_create'

module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     Resource Declaration:
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     ---------------------
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     # In /var/chef/cookbooks/consul/recipes/default.rb
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):      58: consul_installation "Consul WebUI: #{node['consul']['version']}" do
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):      59:   provider :webui
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):      60:   version node['consul']['version']
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):      61:   options symlink_to: config.ui_dir if config.ui_dir
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):      62:   only_if { config.ui == true }
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):      63: end
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):      64:
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     Compiled Resource:
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     ------------------
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     # Declared in /var/chef/cookbooks/consul/recipes/default.rb:58:in `from_file'
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     consul_installation("Consul WebUI: 0.6.4") do
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       provider ConsulCookbook::Provider::ConsulInstallationWebui
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       action [:create]
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       updated true
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       updated_by_last_action true
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       retries 0
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       retry_delay 2
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       default_guard_interpreter :default
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       declared_type :consul_installation
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       cookbook_name :consul
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       recipe_name "default"
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       version "0.6.4"
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       options {"symlink_to"=>"/var/lib/consul/ui"}
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       only_if { #code block }
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     end
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec): Recipe: consul::default
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):   * consul_service[consul] action reload
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):     * poise_service[consul] action reload
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):       * service[consul] action reload (up to date)
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):        (up to date)
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):      (up to date)
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec):
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec): Running handlers:
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec): [2016-03-31T17:39:11+00:00] ERROR: Running exception handlers
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec): Running handlers complete
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec): [2016-03-31T17:39:11+00:00] ERROR: Exception handlers complete
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec): Chef Client failed. 10 resources updated in 08 seconds
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec): [2016-03-31T17:39:11+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec): [2016-03-31T17:39:11+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec): [2016-03-31T17:39:11+00:00] ERROR: consul_installation[Consul WebUI: 0.6.4] (consul::default line 58) had an error: Errno::ENOENT: link[/var/lib/consul/ui] (/var/chef/cookbooks/consul/libraries/consul_installation_webui.rb line 58) had an error: Errno::ENOENT: No such file or directory @ sys_fail2 - (/opt/consul-webui/0.6.4, /var/lib/consul/ui)
module.consul_cluster.vsphere_virtual_machine.consul_leader (remote-exec): [2016-03-31T17:39:11+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

@lock
Copy link

lock bot commented Apr 25, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no more web ui?
4 participants