{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/prosvcs-node_manager/issues/14","labels_url":"https://api.github.com/repos/puppetlabs/prosvcs-node_manager/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/prosvcs-node_manager/issues/14/comments","events_url":"https://api.github.com/repos/puppetlabs/prosvcs-node_manager/issues/14/events","html_url":"https://github.com/puppetlabs/prosvcs-node_manager/issues/14","id":111914851,"number":14,"title":"Remove dependency on puppet_classify","user":{"login":"jolshevski","id":7576912,"avatar_url":"https://avatars.githubusercontent.com/u/7576912?v=3","gravatar_id":"","url":"https://api.github.com/users/jolshevski","html_url":"https://github.com/jolshevski","followers_url":"https://api.github.com/users/jolshevski/followers","following_url":"https://api.github.com/users/jolshevski/following{/other_user}","gists_url":"https://api.github.com/users/jolshevski/gists{/gist_id}","starred_url":"https://api.github.com/users/jolshevski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolshevski/subscriptions","organizations_url":"https://api.github.com/users/jolshevski/orgs","repos_url":"https://api.github.com/users/jolshevski/repos","events_url":"https://api.github.com/users/jolshevski/events{/privacy}","received_events_url":"https://api.github.com/users/jolshevski/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/puppetlabs/prosvcs-node_manager/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-16T21:31:37Z","updated_at":"2015-10-28T17:47:27Z","closed_at":null,"body":"For ease of use, we should remove the dependency on the puppet_classify gem. This will reduce the amount of effort required to use the module by removing a manual installation step. \r\n\r\nAccomplishing this will require reimplementing communications with the node classifier service. See the PuppetDB terminus for reference, and leverage Puppet internal network communications scaffolding instead of raw Net::HTTP."},"comment":{"url":"https://api.github.com/repos/puppetlabs/prosvcs-node_manager/issues/comments/151927976","html_url":"https://github.com/puppetlabs/prosvcs-node_manager/issues/14#issuecomment-151927976","issue_url":"https://api.github.com/repos/puppetlabs/prosvcs-node_manager/issues/14","id":151927976,"user":{"login":"Sharpie","id":54181,"avatar_url":"https://avatars.githubusercontent.com/u/54181?v=3","gravatar_id":"","url":"https://api.github.com/users/Sharpie","html_url":"https://github.com/Sharpie","followers_url":"https://api.github.com/users/Sharpie/followers","following_url":"https://api.github.com/users/Sharpie/following{/other_user}","gists_url":"https://api.github.com/users/Sharpie/gists{/gist_id}","starred_url":"https://api.github.com/users/Sharpie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sharpie/subscriptions","organizations_url":"https://api.github.com/users/Sharpie/orgs","repos_url":"https://api.github.com/users/Sharpie/repos","events_url":"https://api.github.com/users/Sharpie/events{/privacy}","received_events_url":"https://api.github.com/users/Sharpie/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T17:47:27Z","updated_at":"2015-10-28T17:47:27Z","body":"> but at the cost of an additional manual installation step for the user? \r\n\r\nNow that #10 is merged, Puppet can install the gem and then manage `node_group` resources --- all in one run. For example, on PE 3.8:\r\n\r\n```puppet\r\nclass profile::pe::node_groups {\r\n\r\n\r\n  # FIXME: When 4.0 ships, the pe_puppetserver_gem provider can be used to do\r\n  # this.\r\n  exec {'install puppetclassify for pe-puppetserver':\r\n    command => 'puppetserver gem install puppetclassify',\r\n    path    => \"/opt/puppet/bin:${::path}\",\r\n    # This is more efficient than running `puppetserver gem list`\r\n    unless  => '/bin/ls /var/opt/lib/pe-puppet-server/jruby-gems/gems/puppetclassify*',\r\n  }\r\n\r\n  # FIXME: When 4.0 ships, the puppet_gem provider can be used to do this.\r\n  package {'puppetclassify':\r\n    ensure   => present,\r\n    provider => pe_gem,\r\n  }\r\n\r\n  create_resources(node_group, hiera_hash('node_groups'), {\r\n    ensure => present,\r\n  })\r\n\r\n}\r\n```\r\n\r\nThe Transaction will defer `node_group` resources until the `puppetclassify` gem is installed --- but an explicit `require` could be thrown in to make things less magical."}}