Renamed the master_source script to
indicate that it is only intended to
be used for development/testing.

Added more logic for installing the
dashboard for testing.

Signed-off-by: Dan Bode <[email protected]>
---
 .../{master_source.erb => master_source_dev.erb}   |   35 +++++++++++++++++++-
 1 files changed, 34 insertions(+), 1 deletions(-)
 rename lib/puppet/cloudpack/scripts/{master_source.erb => 
master_source_dev.erb} (66%)

diff --git a/lib/puppet/cloudpack/scripts/master_source.erb 
b/lib/puppet/cloudpack/scripts/master_source_dev.erb
similarity index 66%
rename from lib/puppet/cloudpack/scripts/master_source.erb
rename to lib/puppet/cloudpack/scripts/master_source_dev.erb
index 6d3e9c7..d642ad4 100644
--- a/lib/puppet/cloudpack/scripts/master_source.erb
+++ b/lib/puppet/cloudpack/scripts/master_source_dev.erb
@@ -18,13 +18,16 @@ gpgcheck=1
 EOF
   yum install -y ruby rubygems git
 elif [ -f /etc/debian_version ]; then
-  apt-get -y install ruby rubygems git
+  # install all of the packages required for puppet and dashbaord
+  export DEBIAN_FRONTEND=noninteractive
+  apt-get -y -q install build-essential libmysql-ruby libopenssl-ruby 
libreadline-ruby mysql-server rake ruby rubygems git
 fi
 gem install facter <% if options[:facter_version] %>-v<%= 
options[:facter_version] %><% end %> --no-ri --no-rdoc
 export PATH="$PATH:/var/lib/gems/1.8/bin"
 mkdir -p /usr/local/dev
 cd /usr/local/dev
 git clone git://github.com/puppetlabs/puppet.git
+git clone git://github.com/puppetlabs/puppet-dashboard.git
 cd puppet
 <% if options[:puppet_version] %>
 git checkout option[:puppet_version]
@@ -40,6 +43,9 @@ cat >/etc/puppet/puppet.conf <<EOF
 
   pluginsync = true
 
+  reports = store,http
+  node_terminus = exec
+  external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://localhost:3000 
/usr/local/dev/puppet-dashboard/bin/external_node
   environment = <%= options[:environment] %>
   certname = <%= options[:certname] %>
   certdnsnames = <%= options[:public_dns_name] %>:$(facter fqdn)
@@ -105,3 +111,30 @@ EOF
 echo 'Authorized <%= `hostname`.chomp %> to be remotely sign certificates'
 
 puppet master --mkuser
+
+# install a module
+mkdir /etc/puppet/modules
+cd /etc/puppet/modules
+git clone git://github.com/puppetlabs/puppetlabs-rabbitmq.git
+mv puppetlabs-rabbitmq rabbitmq
+
+# install dashboard
+
+cd /usr/local/dev/puppet-dashboard
+cat > config/database.yml <<EOF
+production:
+  database: dashboard_development
+  username: root
+  password:
+  encoding: utf8
+  adapter: mysql
+EOF
+rake RAILS_ENV=production db:create
+rake RAILS_ENV=production db:migrate
+mkdir tmp
+#env CPUS=4 RAILS_ENV=production ./script/delayed_job -p dashboard -n 1 -m 
start
+# set up a class and nodegroup in dashboard
+rake RAILS_ENV=production nodeclass:add name=rabbitmq::server
+rake RAILS_ENV=production nodegroup:add name=rabbit_server 
classes=rabbitmq::server
+sleep 5
+nohup ./script/server -e production &
-- 
1.7.5.4

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev?hl=en.

Reply via email to