What happens if you have foreman listen say on port 3000 with
passenger and have ssl disabled?

On Jun 9, 3:29 pm, CraftyTech <[email protected]> wrote:
> /etc/httpd/conf.d/foreman.conf:
> <VirtualHost *:443>
>   ServerName hostnameXYZ
>   ServerAlias foreman
>
>   RailsAutoDetect On
>   DocumentRoot /var/www/html
>   RailsBaseURI /foreman
>
>   # Use puppet certi    ficates for SSL
>   SSLEngine on
>   SSLCertificateFile      /var/lib/puppet/ssl/certs/
> hostnameXYZ.pem
>   SSLCertificateKeyFile   /var/lib/puppet/ssl/private_keys/
> hostnameXYZ.pem
>   SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem
>   SSLCACertificateFile    /var/lib/puppet/ssl/ca/ca_crt.pem
>   SSLCARevocationFile     /var/lib/puppet/ssl/ca/ca_crl.pem
>   SSLVerifyClient optional
>   SSLVerifyDepth  3
>   SSLOptions +StdEnvVars
>
> </VirtualHost>
>
> /usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb:
> # copy this file to your report dir - e.g. /usr/lib/ruby/1.8/puppet/
> reports/
> # add this report in your puppetmaster reports - e.g, in your
> puppet.conf add:
> # reports=log, foreman # (or any other reports you want)
>
> # URL of your Foreman installation
> $foreman_url="https://hostnameXYZ/foreman";
>
> require 'puppet'
> require 'net/http'
> require 'uri'
>
> Puppet::Reports.register_report(:foreman) do
>     Puppet.settings.use(:reporting)
>     desc "Sends reports directly to Foreman"
>
>     def process
>       begin
>         uri = URI.parse($foreman_url)
>         http = Net::HTTP.new(uri.host, uri.port)
>         if uri.scheme == 'https' then
>           http.use_ssl = true
>           http.verify_mode = OpenSSL::SSL::VERIFY_NONE
>         end
>         req = Net::HTTP::Post.new("/reports/create?format=yml")
>         req.set_form_data({'report' => to_yaml})
>         response = http.request(req)
>       rescue Exception => e
>         raise Puppet::Error, "Could not send report to Foreman at
> #{$foreman_url}/reports/create?format=yml: #{e}"
>       end
>     end
> end
> ~
>
> /etc/puppet/puppet.conf:
> [main]
>     vardir = /var/lib/puppet
>     logdir = /var/log/puppet
>     rundir = /var/run/puppet
>     reports= log,foreman,store
>     pluginsync = true
>
> [puppetmasterd]
>     ssl_client_header = SSL_CLIENT_S_DN
>     ssl_client_verify_header = SSL_CLIENT_VERIFY
>     modulepath = $confdir/modules
>     reportdir = /var/lib/puppet/reports
>     storeconfigs = true
>     dbadapter = mysql
>     dbuser = puppet
>     dbpassword = password
>     dbserver = localhost
>     dbsocket = /sql/mysql/mysql.sock
>     rrddir=/var/lib/puppet/rrd
>     rrdinterval=$runinterval
>     rrdgraph=true
>
> [puppetd]
>     classfile = $vardir/classes.txt
>     report = true
>     localconfig = $vardir/localconfig
> *****************************************
> The reports come in fine under /var/lib/puppet/reports.  The only
> piece that's not working is the reports on foreman. Any suggestions?
>
> Thanks,
>
> Henry
>
> On Jun 9, 4:02 pm, Jacob Hunt <[email protected]> wrote:
>
> > What does your apache conf look like for foreman and the reports?
>
> > On Wed, Jun 9, 2010 at 9:09 AM, CraftyTech <[email protected]> wrote:
> > > Hello All,
>
> > >     I don't seem to be able to get reports to display on the foreman
> > > interface.  I copied extras/puppet/foreman/files/foreman-report.rb to /
> > > usr/lib/ruby/site_ruby/1.8/puppet/reportsforeman.rb, instead of /usr/
> > > lib/ruby/1.8/puppet/reports/foreman.rb. Config: Centos5.4, Apache/
> > > Passenger, Puppet 0.25.4.
>
> > >     The reports are coming from the clients, because I can see them
> > > in /var/lib/puppet/reports.  I just don't seem to be able to display
> > > them on Foreman.  Here's my puppet.conf:
>
> > > [main]
> > >    vardir = /var/lib/puppet
> > >    logdir = /var/log/puppet
> > >    rundir = /var/run/puppet
> > >    reports= log, foreman
>
> > > [puppetmasterd]
> > >    ssl_client_header = SSL_CLIENT_S_DN
> > >    ssl_client_verify_header = SSL_CLIENT_VERIFY
> > >    modulepath = $confdir/modules
> > >    #reports=log, foreman
> > >    storeconfigs = true
> > >    dbadapter = mysql
> > >    dbuser = app_puppet
> > >    dbpassword = password
> > >    dbserver = localhost
> > >    dbsocket = /sql/mysql/mysql.sock
> > >    rrddir=/var/lib/puppet/rrd
> > >    rrdinterval=$runinterval
> > >    rrdgraph=true
>
> > > [puppetd]
> > >    classfile = $vardir/classes.txt
> > >    report = true
> > >    localconfig = $vardir/localconfig
>
> > > What am I missing here?  Thanks,
>
> > > Henry
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Puppet Users" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<puppet-users%[email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/puppet-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to