diff -uNr modules/smolt/files/client/add_json modules-staging/smolt/files/client/add_json --- modules/smolt/files/client/add_json 1970-01-01 00:00:00.000000000 +0000 +++ modules-staging/smolt/files/client/add_json 2012-10-18 21:36:06.000000000 +0000 @@ -0,0 +1 @@ +UUID: retired diff -uNr modules/smolt/files/client/batch_add_json modules-staging/smolt/files/client/batch_add_json --- modules/smolt/files/client/batch_add_json 1970-01-01 00:00:00.000000000 +0000 +++ modules-staging/smolt/files/client/batch_add_json 2012-10-18 20:01:39.000000000 +0000 @@ -0,0 +1 @@ + diff -uNr modules/smolt/files/client/host_rating modules-staging/smolt/files/client/host_rating --- modules/smolt/files/client/host_rating 1970-01-01 00:00:00.000000000 +0000 +++ modules-staging/smolt/files/client/host_rating 2012-10-18 21:22:57.000000000 +0000 @@ -0,0 +1 @@ +{"ratings": {}} diff -uNr modules/smolt/files/client/pub_uuid modules-staging/smolt/files/client/pub_uuid --- modules/smolt/files/client/pub_uuid 1970-01-01 00:00:00.000000000 +0000 +++ modules-staging/smolt/files/client/pub_uuid 2012-10-18 21:30:54.000000000 +0000 @@ -0,0 +1 @@ +{"pub_uuid": "retired"} diff -uNr modules/smolt/files/client/regenerate_pub_uuid modules-staging/smolt/files/client/regenerate_pub_uuid --- modules/smolt/files/client/regenerate_pub_uuid 1970-01-01 00:00:00.000000000 +0000 +++ modules-staging/smolt/files/client/regenerate_pub_uuid 2012-10-18 21:31:00.000000000 +0000 @@ -0,0 +1 @@ +{"pub_uuid": "retired"} diff -uNr modules/smolt/files/index.html modules-staging/smolt/files/index.html --- modules/smolt/files/index.html 1970-01-01 00:00:00.000000000 +0000 +++ modules-staging/smolt/files/index.html 2012-11-21 01:15:14.198772506 +0000 @@ -0,0 +1,13 @@ + + + +Former home of smolt + + +Smolt has been retired + +

Please check out the +census project +if you are interested in working on a replacement.

+ + diff -uNr modules/smolt/files/reports/search_profiles modules-staging/smolt/files/reports/search_profiles --- modules/smolt/files/reports/search_profiles 1970-01-01 00:00:00.000000000 +0000 +++ modules-staging/smolt/files/reports/search_profiles 2012-10-18 21:06:32.000000000 +0000 @@ -0,0 +1 @@ +empty diff -uNr modules/smolt/files/smolt-app.conf modules-staging/smolt/files/smolt-app.conf --- modules/smolt/files/smolt-app.conf 2012-04-26 21:07:07.158503419 +0000 +++ modules-staging/smolt/files/smolt-app.conf 2012-11-21 16:16:24.064805930 +0000 @@ -1,30 +0,0 @@ -RewriteEngine on -RewriteRule ^/smolt/static/(.*) /usr/share/smolt/smoon/static/$1 [L] - -Alias /smolt/robots.txt /usr/share/smolt/smoon/hardware/static/robots.txt -Alias /smolt-s/static /usr/share/smolt/smoon/hardware/static - -WSGIDaemonProcess smolt user=apache group=apache maximum-requests=1000 display-name=smolt processes=6 threads=2 -WSGISocketPrefix run/wsgi -WSGIRestrictStdout On -WSGIRestrictSignal Off -WSGIPythonOptimize 1 - -WSGIScriptAlias /smolt /usr/share/smolt/smoon/smolt.wsgi - - - ExpiresActive On - ExpiresDefault "access plus 5 days" - - - - ExpiresActive On - ExpiresDefault "access plus 5 days" - - - - WSGIProcessGroup smolt - Order deny,allow - Allow from all - - diff -uNr modules/smolt/files/smoltSyncStats.sh modules-staging/smolt/files/smoltSyncStats.sh --- modules/smolt/files/smoltSyncStats.sh 2012-04-26 21:07:07.158503419 +0000 +++ modules-staging/smolt/files/smoltSyncStats.sh 2012-11-21 16:15:57.634794788 +0000 @@ -1,8 +0,0 @@ -#!/bin/bash - -URL=http://bapp02/smolt-s/static/stats -for f in /usr/share/smolt/smoon/hardware/static/stats/* -do - filename=`basename $f` - wget --timeout=30 -qO $f $URL/$filename -done diff -uNr modules/smolt/files/smolt.wsgi modules-staging/smolt/files/smolt.wsgi --- modules/smolt/files/smolt.wsgi 2011-10-24 14:51:30.504211098 +0000 +++ modules-staging/smolt/files/smolt.wsgi 2012-11-21 16:16:10.424685892 +0000 @@ -1,32 +0,0 @@ -#!/usr/bin/python -tt -import __main__ -__main__.__requires__ = ['TurboGears < 2'] -import sys -import os -sys.stdout = sys.stderr -sys.path.append(os.path.join('/usr/share/smolt', 'smoon')) - -import pkg_resources -pkg_resources.require("CherryPy<3.0") - -os.environ['PYTHON_EGG_CACHE'] = '/var/www/.python-eggs' -os.chdir('/usr/share/smolt/smoon') - -import atexit -import cherrypy -import cherrypy._cpwsgi -import turbogears -import fedora.tg.util - -turbogears.update_config(configfile=os.path.join('/usr/share/smolt/smoon', 'prod.cfg'), - modulename="hardware.config") - - -import hardware.controllers -cherrypy.root = hardware.controllers.Root() - -if cherrypy.server.state == 0: - atexit.register(cherrypy.server.stop) - cherrypy.server.start(init_only=True, server_class=None) - -application = cherrypy._cpwsgi.wsgiApp diff -uNr modules/smolt/files/tokens/admin_token_json modules-staging/smolt/files/tokens/admin_token_json --- modules/smolt/files/tokens/admin_token_json 1970-01-01 00:00:00.000000000 +0000 +++ modules-staging/smolt/files/tokens/admin_token_json 2012-10-18 21:31:22.000000000 +0000 @@ -0,0 +1 @@ +{"prefered_protocol": "0.97", "token": "retired_admin"} diff -uNr modules/smolt/files/tokens/token_json modules-staging/smolt/files/tokens/token_json --- modules/smolt/files/tokens/token_json 1970-01-01 00:00:00.000000000 +0000 +++ modules-staging/smolt/files/tokens/token_json 2012-10-18 21:31:31.000000000 +0000 @@ -0,0 +1 @@ +{"token": "retired", "prefered_protocol": "0.97"} diff -uNr modules/smolt/manifests/init.pp modules-staging/smolt/manifests/init.pp --- modules/smolt/manifests/init.pp 2012-04-26 21:39:05.734736129 +0000 +++ modules-staging/smolt/manifests/init.pp 2012-11-21 02:55:14.475642393 +0000 @@ -1,26 +1,16 @@ # Smolt app class smolt::app { - include httpd::mod_wsgi - include httpd::base - selinux-policy::custom { 'smolt': } - - package { ["MySQL-python", "python-turboflot"]: - ensure => installed, - } - - # TODO: Needs to be fixed in the smolt-server package package { "smolt-server": - ensure => installed, - require => Package["MySQL-python"], + ensure => absent, } file { "/etc/httpd/conf.d/smolt.conf": owner => "root", group => "root", mode => 0644, - source => "puppet:///smolt/smolt-app.conf", + ensure => absent, notify => Service["httpd"], require => Package["httpd"], } @@ -29,8 +19,8 @@ owner => "root", group => "root", mode => 0755, - source => "puppet:///smolt/smolt.wsgi", notify => Service["httpd"], + ensure => absent, require => Package["smolt-server"], } @@ -38,8 +28,8 @@ owner => "apache", group => "apache", mode => 0600, - content => template("smolt/prod.cfg.erb"), notify => Service["httpd"], + ensure => absent, require => [Package["smolt-server"], Package['httpd']] } @@ -47,7 +37,7 @@ owner => "root", group => "root", mode => 0755, - source => "puppet:///smolt/smoltSyncStats.sh", + ensure => absent, } } @@ -83,5 +73,89 @@ notify => Service["httpd"], require => Httpd::Website[$website], } + file { ["/srv/web/smolts.org", + "/srv/web/smolts.org/client", + "/srv/web/smolts.org/reports", + "/srv/web/smolts.org/tokens" + ]: + owner => "root", + group => "root", + mode => 0755, + ensure => directory, + seltype => "httpd_sys_content_t", + seluser => "system_u" + } + file { "/srv/web/smolts.org/index.html": + owner => "root", + group => "root", + mode => 0644, + seltype => "httpd_sys_content_t", + seluser => "system_u", + source => "puppet:///smolt/index.html" + } + file { "/srv/web/smolts.org/client/add_json": + owner => "root", + group => "root", + mode => 0644, + seltype => "httpd_sys_content_t", + seluser => "system_u", + source => "puppet:///smolt/client/add_json" + } + file { "/srv/web/smolts.org/client/batch_add_json": + owner => "root", + group => "root", + mode => 0644, + seltype => "httpd_sys_content_t", + seluser => "system_u", + source => "puppet:///smolt/client/batch_add_json" + } + file { "/srv/web/smolts.org/client/host_rating": + owner => "root", + group => "root", + mode => 0644, + seltype => "httpd_sys_content_t", + seluser => "system_u", + source => "puppet:///smolt/client/host_rating" + } + file { "/srv/web/smolts.org/client/pub_uuid": + owner => "root", + group => "root", + mode => 0644, + seltype => "httpd_sys_content_t", + seluser => "system_u", + source => "puppet:///smolt/client/pub_uuid" + } + file { "/srv/web/smolts.org/client/regenerate_pub_uuid": + owner => "root", + group => "root", + mode => 0644, + seltype => "httpd_sys_content_t", + seluser => "system_u", + source => "puppet:///smolt/client/regenerate_pub_uuid" + } + file { "/srv/web/smolts.org/reports/search_profiles": + owner => "root", + group => "root", + mode => 0644, + seltype => "httpd_sys_content_t", + seluser => "system_u", + source => "puppet:///smolt/reports/search_profiles" + } + file { "/srv/web/smolts.org/tokens/admin_token_json": + owner => "root", + group => "root", + mode => 0644, + seltype => "httpd_sys_content_t", + seluser => "system_u", + source => "puppet:///smolt/tokens/admin_token_json" + } + file { "/srv/web/smolts.org/tokens/token_json": + owner => "root", + group => "root", + mode => 0644, + seltype => "httpd_sys_content_t", + seluser => "system_u", + source => "puppet:///smolt/tokens/token_json" + } } diff -uNr modules/smolt/templates/prod.cfg.erb modules-staging/smolt/templates/prod.cfg.erb --- modules/smolt/templates/prod.cfg.erb 2012-03-29 21:02:48.828737315 +0000 +++ modules-staging/smolt/templates/prod.cfg.erb 2012-11-21 16:00:53.927027636 +0000 @@ -1,93 +0,0 @@ -[global] -# This is where all of your settings go for your development environment -# Settings that are the same for both development and production -# (such as template engine, encodings, etc.) all go in -# hardware/config/app.cfg - -server.thread_pool=50 -server.socket_queue_size=30 - -# DATABASE - -# pick the form for your database -# sqlobject.dburi="postgres://username@hostname/databasename" -# sqlobject.dburi="mysql://username:password@hostname:port/databasename" -# sqlobject.dburi="sqlite:///file_name_and_path" - -# If you have sqlite, here's a simple default to get you started -# in development -#sqlobject.dburi="sqlite://%(current_dir_uri)s/devdata.sqlite" - -# Initial number of idle db connections -#sqlalchemy.pool_size=5 -# pool_size + max_overflow = maximum number of db connections to hold at a time -# Bumped up from the default of 10 -sqlalchemy.max_overflow=27 - -# if you are using a database or table type without transactions -# (MySQL default, for example), you should turn off transactions -# by prepending notrans_ on the uri -# sqlobject.dburi="notrans_mysql://username:password@hostname:port/databasename" -#sqlobject.dburi='notrans_mysql://root:@localhost/smolt?debug=True' -#sqlobject.dburi='notrans_mysql://smolt:<%= smoltPassword %>@db01/smolt' -sqlalchemy.dburi='mysql://smolt:<%= smoltPassword %>@db05/smolt' - -sqlalchemy.echo = 0 -# Should try this in dev and make it the production setting as well -#sqlalchemy.convert_unicode = True - -# for Windows users, sqlite URIs look like: -# sqlobject.dburi="sqlite:///drive_letter:/path/to/file" - -# SERVER - -# Some server parameters that you may want to tweak -# server.socket_port=8080 - -# Enable the debug output at the end on pages. -# log_debug_info_filter.on = False - -server.environment="production" -autoreload.on = False -autoreload.package="hardware" - -server.log_to_screen = True -# session_filter.on = True - -# Set to True if you'd like to abort execution if a controller gets an -# unexpected parameter. False by default -tg.strict_parameters = True -tg.ignore_parameters = ["_csrf_token"] -tg.scheduler = True - -visit.cookie.secure = True -visit.cookie.httponly = True - -# LOGGING -# Logging configuration generally follows the style of the standard -# Python logging module configuration. Note that when specifying -# log format messages, you need to use *() for formatting variables. -# Deployment independent log configuration is in hardware/config/log.cfg -[logging] - -[[loggers]] -[[[hardware]]] -level='INFO' -qualname='hardware' -handlers=['debug_out'] - -[[[allinfo]]] -level='INFO' -handlers=['debug_out'] - -[[[access]]] -level='WARN' -qualname='turbogears.access' -handlers=['access_out'] -propagate=0 - -#[[[database]]] -#level='INFO' -#qualname='sqlalchemy.engine' -#handlers=['access_out'] -#propagate=0 diff -uNr modules/smolt/templates/smolt-proxy.conf.erb modules-staging/smolt/templates/smolt-proxy.conf.erb --- modules/smolt/templates/smolt-proxy.conf.erb 2010-09-04 15:19:34.000000000 +0000 +++ modules-staging/smolt/templates/smolt-proxy.conf.erb 2012-11-21 21:31:04.512838898 +0000 @@ -1,50 +1,7 @@ -LoadModule deflate_module modules/mod_deflate.so -SetOutputFilter DEFLATE - - - # Insert filter - SetOutputFilter DEFLATE - - # Netscape 4.x has some problems... - BrowserMatch ^Mozilla/4 gzip-only-text/html - - # Netscape 4.06-4.08 have some more problems - BrowserMatch ^Mozilla/4\.0[678] no-gzip - - # MSIE masquerades as Netscape, but it is fine - # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html - - # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 - # the above regex won't work. You can use the following - # workaround to get the desired effect: - BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html - - # Don't compress images - SetEnvIfNoCase Request_URI \ - \.(?:gif|jpe?g|png)$ no-gzip dont-vary - - # Make sure proxies don't deliver the wrong content - Header append Vary User-Agent env=!dont-vary - - +DocumentRoot /srv/web/smolts.org/ +ErrorDocument 404 /index.html RewriteEngine On -RewriteRule ^/token_json(.*) <%= proxyurl %>/smolt/tokens/token_json$1 [P,L] -RewriteRule ^/add_json(.*) <%= proxyurl %>/smolt/client/add_json$1 [P,L] -RewriteRule ^/show(.*) <%= proxyurl %>/smolt/client/show$1 [P,L] -RewriteRule ^/tokens/(.*) <%= proxyurl %>/smolt/tokens/$1 [P,L] -RewriteRule ^/stats /static/stats/stats.html [R=301,L] -RewriteRule ^/devices /static/stats/devices.html [R=301,L] -RewriteRule ^/cacti/smoltArch.png$ http://noc1/cacti/graph_image.php?local_graph_id=99&rra_id=2 [L,P] - -RewriteRule ^/wiki(.*) /smolt-wiki$1 [R=301,L] -RewriteRule ^/w/(.*) /smolt-wiki/$1 [R=301,L] - -RewriteRule ^/smolt-wiki(?:/.*)?$ - [L] -RewriteRule ^/smolt-w(?:/.*)?$ - [L] - -RewriteRule ^/static/(.*) <%= proxyurl %>/smolt-s/static/$1 [P,L] -RewriteRule ^/(.*) <%= proxyurl %>/smolt/$1 [P,L] - -ProxyPassReverse / <%= proxyurl %>/ +RewriteRule ^/token_json(.*) /tokens/token_json$1 [P,L] +RewriteRule ^/add_json(.*) /client/add_json$1 [P,L]