Issue #3003 has been updated by Spawn kid.

Status changed from Unreviewed to Closed

Hello, sorry for the Priority "urgent". Anyway after hours of trial and error I 
found out that its much better to compile puppet/puppetmaster,facter and 
rubygems manually than installing it from Debian repos (apt-get). Here is my 
final script and I hope it would be useful in the community. Thank You.

##################################
useradd puppet;

#install puppet server
apt-get install -y build-essential pkg-config bison sudo;
apt-get install ruby irb ri rdoc libxmlrpc-ruby libopenssl-ruby libstrscan-ruby 
libsyslog-ruby libwebrick-ruby ruby1.8-dev -y;
#apt-get install puppetmaster -y; <-- This is the issue.

cd /tmp;
wget http://reductivelabs.com/downloads/facter/facter-latest.tgz;
tar -xzvf facter-latest.tgz;
cd facter-*;
ruby install.rb;

cd /tmp;
wget http://reductivelabs.com/downloads/puppet/puppet-latest.tgz;
tar -xzvf puppet-latest.tgz;
cd puppet-*;
ruby install.rb;

#install gem
cd /tmp;
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz;
tar -xzvf rubygems-1.3.5.tgz;
cd /tmp/rubygems-1.3.5;
ruby setup.rb all;

# start for the first time puppet server daemon to create needed folders/files
/usr/sbin/puppetmasterd --mkusers

#install mysql server (if not yet installed)
apt-get install mysql-server mysql-client libmysqlclient15-dev -y;

#install puppet dashboard
cd /tmp;
wget http://github.com/reductivelabs/puppet-dashboard/tarball/0.2.1;
tar -xzvf reductivelabs-puppet-dashboard-773bc5f.tar.gz;
cd /tmp/reductivelabs-puppet-dashboard-773bc5f;

# FYI: Please change your MySQL root password here before executing this script
echo '
development:
  adapter: mysql
  database: dashboard_development
  user: root
  host: localhost
  password: password
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: mysql
  database: dashboard_test
  user: root
  host: localhost
  password: password

production:
  adapter: mysql
  database: dashboard_production
  user: root
  host: localhost
  password: password' > 
/tmp/reductivelabs-puppet-dashboard-773bc5f/config/database.yml.example
  
/usr/bin/gem1.8 install rake-compiler;

#create mysql gem
/usr/bin/gem1.8 install mysql;

#install dashboard
rake install --trace; 

#########################3

However, as you noticed it is running inside /tmp folder and might loose this 
after server restart. Its much better for you to experiment and improve this 
script (if possible append in this page or anywhere here in the site).

Thanks and Good Luck!
----------------------------------------
Bug #3003: rake install failing on debian lenny x86
http://projects.reductivelabs.com/issues/3003

Author: Spawn kid
Status: Closed
Priority: Normal
Assigned to: 
Category: 
Target version: 
Keywords: 
Branch: 


Hi, I am trying to install puppet dashboard on a fresh install of debian lenny 
and it gets me error when running rake install. I've make a install script for 
these (including pupper master).

apt-get install -y build-essential pkg-config bison sudo;
apt-get install puppetmaster -y;
apt-get install ruby1.8-dev -y;

# fixup permissions on sudo
echo '
class sudo {
    file { "/etc/sudoers":
        owner => root,
        group => root,
        mode => 440,
    }
}

node default {
     include sudo
}' > /etc/puppet/manifests/site.pp

apt-get install mysql-server mysql-client libmysqlclient15-dev -y;

#install gem
cd /tmp;
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz;
tar -xzvf rubygems-1.3.5.tgz;
cd /tmp/rubygems-1.3.5;
ruby setup.rb all;

cd /tmp;
wget http://github.com/reductivelabs/puppet-dashboard/zipball/0.2.1;
unzip -o reductivelabs-puppet-dashboard-773bc5f.zip;
cd /tmp/reductivelabs-puppet-dashboard-773bc5f;

gem install rake-compiler;

#create mysql gem
gem install mysql;

#install dashboard
rake install --trace;
************************************************************** END OF SCRIPT 
*******************************
Here is the log...

/tmp/reductivelabs-puppet-dashboard-773bc5f# rake install --trace
(in /tmp/reductivelabs-puppet-dashboard-773bc5f)
** Invoke install (first_time)
** Invoke copy_config (first_time)
** Invoke config/database.yml (first_time, not_needed)
** Invoke config/database.yml.example (first_time, not_needed)
** Execute copy_config
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:create
** Invoke db:schema:load (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:schema:load
-- create_table("assignments", {:force=>true})
   -> 0.0148s
-- create_table("node_class_memberships", {:force=>true})
   -> 0.0053s
-- create_table("node_classes", {:force=>true})
   -> 0.0298s
-- create_table("node_group_class_memberships", {:force=>true})
   -> 0.0097s
-- create_table("node_group_edges", {:force=>true})
   -> 0.0068s
-- create_table("node_group_memberships", {:force=>true})
   -> 0.0049s
-- create_table("node_groups", {:force=>true})
   -> 0.0053s
-- create_table("nodes", {:force=>true})
   -> 0.0043s
-- create_table("parameters", {:force=>true})
   -> 0.0055s
-- create_table("reports", {:force=>true})
   -> 0.0056s
-- create_table("services", {:force=>true})
   -> 0.0054s
-- create_table("timeline_events", {:force=>true})
   -> 0.0053s
-- create_table("users", {:force=>true})
   -> 0.0786s
-- initialize_schema_migrations_table()
   -> 0.0124s
-- assume_migrated_upto_version(20091217212330)
   -> 0.0161s
** Invoke db:seed (first_time)
** Invoke environment
** Execute db:seed
rake aborted!
undefined method `[]' for #<Puppet::Util::Metric:0xb6db3308>
/tmp/reductivelabs-puppet-dashboard-773bc5f/app/models/report.rb:17:in 
`succeeded?'
/tmp/reductivelabs-puppet-dashboard-773bc5f/app/models/report.rb:47:in 
`set_success'
/tmp/reductivelabs-puppet-dashboard-773bc5f/app/models/report.rb:42:in 
`set_attributes'
/tmp/reductivelabs-puppet-dashboard-773bc5f/app/models/report.rb:31:in 
`process_report'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in
 `send'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in
 `evaluate_method'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in
 `call'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/callbacks.rb:93:in
 `run'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in
 `each'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in
 `send'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in
 `run'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in
 `run_callbacks'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/callbacks.rb:344:in
 `callback'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/callbacks.rb:311:in
 `valid?'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/validations.rb:1077:in
 `save_without_dirty'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/dirty.rb:79:in
 `save_without_transactions'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in
 `send'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in
 `with_transaction_returning_status'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in
 `transaction'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in
 `transaction'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/transactions.rb:228:in
 `with_transaction_returning_status'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in
 `save'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/transactions.rb:208:in
 `rollback_active_record_state!'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in
 `save'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activerecord/lib/active_record/base.rb:723:in
 `create'
/tmp/reductivelabs-puppet-dashboard-773bc5f/db/seeds.rb:5
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:in
 `load_without_new_constant_marking'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:in
 `load'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in
 `new_constants_in'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:in
 `load'
/tmp/reductivelabs-puppet-dashboard-773bc5f/vendor/rails/railties/lib/tasks/databases.rake:215
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in 
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in 
`invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in 
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in 
`invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in 
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in 
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
================================================ END OF LOG 
==========================================

I'm trying to google'd it out but no luck. Please help. Advance Thanks!


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account
--
You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en.

Reply via email to