space, → | next slide |
← | previous slide |
d | debug mode |
## <ret> | go to slide # |
c | table of contents (vi) |
f | toggle footer |
r | reload slides |
z | toggle help (this) |
sudo apt-get update
sudo apt-get -y install ruby ruby-dev \
rubygems libopenssl-ruby \
libshadow-ruby1.8
sudo gem install rubygems-update
PATH=$PATH:/var/lib/gems/1.8/bin \
sudo update_rubygems
sudo gem install puppet
package { "nginx":
ensure => "0.7.65-1ubuntu2",
}
package {
"mysql2":
ensure => "0.2.4",
provider => gem;
"rails":
ensure => "3.0.0",
provider => gem;
}
package {
"mysql2":
ensure => "0.2.4",
provider => gem;
}
libmysqlclient-dev
package which is needed to build mysql2
gem.package {
"libmysqlclient-dev":
ensure => "5.1.41-3ubuntu12.3";
"mysql2":
ensure => "0.2.4",
provider => gem;
}
package {
"libmysqlclient-dev":
ensure => "5.1.41-3ubuntu12.3";
"mysql2":
ensure => "0.2.4",
provider => gem;
}
package {
"libmysqlclient-dev":
before => Package["mysql2"],
ensure => "5.1.41-3ubuntu12.3";
"mysql2":
ensure => "0.2.4",
provider => gem;
}
class
class rubygems {
package {
"build-essential":
ensure => latest;
"ruby":
ensure => "4.2"; # 1.8.7
"ruby-dev":
ensure => "4.2",
require => Package["build-essential"];
"rubygems":
ensure => latest;
"rubygems-update":
ensure => latest,
provider => gem,
require => Package["rubygems"];
}
exec { "/bin/sh -c 'PATH=$PATH:/var/lib/gems/1.8/bin
update_rubygems'":
before => Class["deps"],
require => Package["rubygems-update"],
}
}
(master) rcrowley@wd-40:~/work/example$ ls -al
total 44
drwxr-xr-x 5 rcrowley rcrowley 4096 Sep 29 23:02 .
drwxr-xr-x 3 rcrowley rcrowley 4096 Sep 29 22:42 ..
drwxr-xr-x 7 rcrowley rcrowley 4096 Sep 29 22:42 .git
-rw-r--r-- 1 rcrowley rcrowley 6 Sep 29 22:59 .gitignore
-rw-r--r-- 1 rcrowley rcrowley 1672 Sep 29 23:00 Capfile
-rw-r--r-- 1 rcrowley rcrowley 2986 Sep 29 23:02 app.rb
-rw-r--r-- 1 rcrowley rcrowley 179 Sep 29 23:01 config.ru
-rw-r--r-- 1 rcrowley rcrowley 38 Sep 29 22:58 deps.pp
drwxr-xr-x 2 rcrowley rcrowley 4096 Sep 29 23:01 public
-rw-r--r-- 1 rcrowley rcrowley 798 Sep 29 23:01 unicorn.conf.rb
drwxr-xr-x 2 rcrowley rcrowley 4096 Sep 29 23:01 views
(master) rcrowley@wd-40:~/work/example$
deps.pp
# Put the rubygems class from above here.
include rubygems
class deps {
"json":
ensure => "1.4.2",
provider => gem;
"libmysqlclient-dev":
ensure => "5.1.41-3ubuntu12.3";
"mysql2":
ensure => "0.2.4",
provider => gem,
require => Package["libmysqlclient-dev"];
"nginx":
ensure => "0.7.65-1ubuntu2";
"sinatra":
ensure => "1.0",
provider => gem;
}
include deps
sudo puppet apply deps.pp