Re: [foreman-users] Re: Katello 3.4.4 Released

2017-08-09 Thread Mario Gamboa
i have same issue

no redhat repos and no access to them neither

On Wednesday, August 9, 2017 at 1:54:04 PM UTC+2, Eric Helms wrote:
>
> Few questions to help us debug:
>
>  1) Are all repos missing from the UI? Just custom? Just red hat repos?
>  2) Do clients have repo access still?
>
> On Aug 9, 2017 3:31 AM, "'Denis Müller' via Foreman users" <
> forema...@googlegroups.com > wrote:
>
>> Hello and thank you for the release. But after i did the update to the 
>> latest version, i can't see and access any repos anymore. I can see the 
>> product but no repos.
>>
>> Am Mittwoch, 2. August 2017 17:51:15 UTC+2 schrieb Eric Helms:
>>>
>>> We are happy to announce the GA of Katello 3.4.4. This release contains 
>>> a large number of bug fixes for both small UI issues, user issues found 
>>> while using 3.4.4 and developer found issues that we felt would bring more 
>>> stability to users.
>>>
>>> The highlights are too numerous to outline here, so I would recommend to 
>>> please look at the changelog for a full list of changes:
>>>
>>> https://github.com/Katello/katello/blob/KATELLO-3.4/CHANGELOG.md  
>>>
>>> Installation:
>>> https://theforeman.org/plugins/katello/3.4/installation/index.html
>>>
>>> Upgrade:
>>> https://theforeman.org/plugins/katello/3.4/upgrade/index.html
>>>
>>>
>>> Bug reporting
>>> =
>>> If you come across a bug in your testing, please file it and note the
>>> version of Katello or Foreman that you're using in the report.
>>>
>>> http://projects.theforeman.org/projects/katello/issues/new
>>>
>>> -- 
>>> Eric D. Helms
>>> Red Hat Engineering
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Foreman users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to foreman-user...@googlegroups.com .
>> To post to this group, send email to forema...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/foreman-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


[foreman-users] Re: Puppet querying Foreman

2017-08-09 Thread Matt Shields
After a lot of trial and error here's what I came up with.  It may not be 
elegant, but it works.  It will pull in all hosts that match on the 
${environment} in this case "test", so it pulled in test-search001, 
test-search002, test-search003 & test-search004.

#Custom function searchparse
module Puppet::Parser::Functions
  newfunction(:searchparse, :type => :rvalue) do |args|
oldarray  = args[0]
newarray = Array.new
pos = 0 
oldarray.each do |value|
  newarray.push(value['name'])
  pos = pos + 1 
end 
return newarray
  end 
end

#Final puppet code
$cluster_name = "${environment}-search"
  class { 'java':
package => 'java-1.8.0-openjdk',
  }

  package { 'java-1.7.0-openjdk':
ensure  => absent,
require => Class['java'],
  }

  package { 'jq':
ensure => present,
  }

  $f = {
item   => 'hosts',
search => "${cluster_name}",
filter_results => 'fqdn',
per_page   => '20',
foreman_user   =>  "${puppet_user}",
foreman_pass   =>  "${puppet_pass}"
  }
  $hostlist = foreman($f)
  $hostlist2 = $hostlist['results']
  $hostlist3 = searchparse($hostlist2)

#from this site: https://github.com/elastic/puppet-elasticsearch/issues/647
  file { '/usr/local/bin/checklicense.sh':
ensure  => present,
owner   => 'root',
group   => 'root',
mode=> '0755',
source  => 'puppet:///modules/fm_search/checklicense.sh',
require => Package['jq'],
  }

  file { '/etc/elasticsearch/license.json':
ensure  => present,
content => "${elastic_license}",
require => Class['elasticsearch'],
  }

  class { 'elasticsearch':
repo_version => '5.x',
manage_repo  => true,
java_install => false,
jvm_options  => [
  "-Xms${xms}",
  "-Xmx${xmx}"
],
config => { 'cluster.name' => $cluster_name }
  }

  $elastic_config = {
'node.name'  => $hostname,
'network.host'   => '0.0.0.0',
'discovery.zen.ping.unicast.hosts'   => $hostlist3,
'xpack.security.enabled' => 'false',
'discovery.zen.minimum_master_nodes' => '2',
'bootstrap.memory_lock'  => 'true',
  }

  elasticsearch::instance { $hostname:
config => $elastic_config
  }

  Elasticsearch::Plugin { instances => $hostname }
  elasticsearch::plugin { 'x-pack': }

  class { 'kibana':
config  => {
  'server.host' => '0.0.0.0',
},
require => Class['elasticsearch'],
  }

  kibana_plugin { 'x-pack': }

  exec { 'install license':
command  => 'curl -XPUT http://localhost:9200/_xpack/license -d 
@/etc/elasticsearch/license
.json ; sleep 5; /etc/init.d/kibana restart',
onlyif   => '/etc/elasticsearch/checklicense.sh',
provider => 'shell',
require  => 
[File['/etc/elasticsearch/license.json'],File['/usr/local/bin/checklicense.sh']
,Class['elasticsearch'],Class['kibana']]
  }

Matt


On Tuesday, August 8, 2017 at 10:13:44 AM UTC-4, Matt Shields wrote:
>
> I'm trying to get a list of hostnames to populate an array from the 
> Foreman function.  We have servers that are dedicated to clients and 
> non-production.  We use naming {clientid}-{server_type}.  So for example, 
> test1-search001, test1-search002, test2-search001, test2-search003, 
> client1-search001, client1-search002.
>
> With my code below, I'm able to get back what appears to be json with the 
> following error.  Line 111 is the discovery.zen.ping.unicast.hosts line.
>
>   $search_hostnames = "${clientid}-search"
>
>   $f = { 
> item   => 'fact_values',
> search => "${search_hostnames}",
> filter_results => 'fact = hostname',
> per_page   => '20',
> foreman_user   => "${puppet_user}",
> foreman_pass   => "${puppet_pass}"
>   }
>
>   $hostlist = foreman($f)
>
>   file { '/root/search.txt':
> ensure   => present,
> content  => "${hostlist}",
>   }
>
>   elasticsearch::instance { $hostname:
> config=> {
>   'node.name' => $hostname,
>   'network.host'  => '0.0.0.0',
>   'path.data' => '/opt/elastic/search',
>   'discovery.zen.ping.unicast.hosts'  => ${hostlist},
> },  
>   }
>
> Notice: Local environment: 'production' doesn't match server specified 
> node environment 'test', switching agent to 'test'.
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
> Server Error: Syntax error at '}' at 
> /etc/puppetlabs/code/modules/fm_search/manifests/init.pp:111:56 on node 
> test-search001.useast.mydomain.com
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
>
> {total => 0, subtotal => 4, page => 1, per_page => 20, search => 
> test-search, sort => {by => , order => }, results => {
> test-search001.useast.mydomain.com => {networking::hostname => 
> 

[foreman-users] how to block a specific fact coming to foreman

2017-08-09 Thread praveen kumar
 

  How to block a specific fact coming to foreman.
  
   Facter version is : 1.7.5

 I could see in Facter 3.6 version we have a blocklist group where we can 
add facts to block in facter.conf, but i dont know in facter 1.7.5 where or 
how we can block a fact.

 Can some one suggest or guide me on this.

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-users] Re: Katello 3.4.4 Released

2017-08-09 Thread Eric D Helms
Few questions to help us debug:

 1) Are all repos missing from the UI? Just custom? Just red hat repos?
 2) Do clients have repo access still?

On Aug 9, 2017 3:31 AM, "'Denis Müller' via Foreman users" <
foreman-users@googlegroups.com> wrote:

> Hello and thank you for the release. But after i did the update to the
> latest version, i can't see and access any repos anymore. I can see the
> product but no repos.
>
> Am Mittwoch, 2. August 2017 17:51:15 UTC+2 schrieb Eric Helms:
>>
>> We are happy to announce the GA of Katello 3.4.4. This release contains
>> a large number of bug fixes for both small UI issues, user issues found
>> while using 3.4.4 and developer found issues that we felt would bring more
>> stability to users.
>>
>> The highlights are too numerous to outline here, so I would recommend to
>> please look at the changelog for a full list of changes:
>>
>> https://github.com/Katello/katello/blob/KATELLO-3.4/CHANGELOG.md
>>
>> Installation:
>> https://theforeman.org/plugins/katello/3.4/installation/index.html
>>
>> Upgrade:
>> https://theforeman.org/plugins/katello/3.4/upgrade/index.html
>>
>>
>> Bug reporting
>> =
>> If you come across a bug in your testing, please file it and note the
>> version of Katello or Foreman that you're using in the report.
>>
>> http://projects.theforeman.org/projects/katello/issues/new
>>
>> --
>> Eric D. Helms
>> Red Hat Engineering
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to foreman-users+unsubscr...@googlegroups.com.
> To post to this group, send email to foreman-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/foreman-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


[foreman-users] Re: Katello 3.4.4 Released

2017-08-09 Thread 'Denis Müller' via Foreman users
Hello and thank you for the release. But after i did the update to the 
latest version, i can't see and access any repos anymore. I can see the 
product but no repos.

Am Mittwoch, 2. August 2017 17:51:15 UTC+2 schrieb Eric Helms:
>
> We are happy to announce the GA of Katello 3.4.4. This release contains a 
> large number of bug fixes for both small UI issues, user issues found while 
> using 3.4.4 and developer found issues that we felt would bring more 
> stability to users.
>
> The highlights are too numerous to outline here, so I would recommend to 
> please look at the changelog for a full list of changes:
>
> https://github.com/Katello/katello/blob/KATELLO-3.4/CHANGELOG.md  
>
> Installation:
> https://theforeman.org/plugins/katello/3.4/installation/index.html
>
> Upgrade:
> https://theforeman.org/plugins/katello/3.4/upgrade/index.html
>
>
> Bug reporting
> =
> If you come across a bug in your testing, please file it and note the
> version of Katello or Foreman that you're using in the report.
>
> http://projects.theforeman.org/projects/katello/issues/new
>
> -- 
> Eric D. Helms
> Red Hat Engineering
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.