|
a/vagrant/manifests/ubuntu-1110-server-amd64.pp |
|
b/vagrant/manifests/ubuntu-1110-server-amd64.pp |
1 |
# create puppet group
|
1 |
# create puppet group
|
2 |
group { "puppet":
|
2 |
group { "puppet":
|
3 |
ensure => "present",
|
3 |
ensure => "present",
|
|
|
4 |
}
|
|
|
5 |
|
|
|
6 |
exec { "package index update":
|
|
|
7 |
command => "/usr/bin/apt-get update",
|
4 |
}
|
8 |
}
|
5 |
|
9 |
|
6 |
# install required system packages
|
10 |
# install required system packages
|
7 |
Package { ensure => "installed" }
|
11 |
Package { ensure => "installed" }
|
8 |
|
12 |
|
|
... |
|
... |
19 |
"zlib1g-dev",
|
23 |
"zlib1g-dev",
|
20 |
"mongodb-server",
|
24 |
"mongodb-server",
|
21 |
"python-pip"
|
25 |
"python-pip"
|
22 |
]
|
26 |
]
|
23 |
|
27 |
|
24 |
package { $packages: }
|
28 |
package { $packages:
|
|
|
29 |
require => Exec[ "package index update" ],
|
|
|
30 |
}
|
25 |
|
31 |
|
26 |
file { '/usr/lib/libz.so':
|
32 |
file { '/usr/lib/libz.so':
|
27 |
ensure => 'link',
|
33 |
ensure => 'link',
|
28 |
target => '/usr/lib/x86_64-linux-gnu/libz.so',
|
34 |
target => '/usr/lib/x86_64-linux-gnu/libz.so',
|
29 |
require => Package[ "zlib1g-dev" ],
|
35 |
require => Package[ "zlib1g-dev" ],
|
|
... |
|
... |
41 |
require => Package[ "python-pip" ],
|
47 |
require => Package[ "python-pip" ],
|
42 |
}
|
48 |
}
|
43 |
|
49 |
|
44 |
# create Allura virtualenv
|
50 |
# create Allura virtualenv
|
45 |
exec { "create allura venv":
|
51 |
exec { "create allura venv":
|
46 |
command => "/usr/local/bin/virtualenv --system-site-packages anvil && chown -R vagrant:vagrant /home/vagrant/anvil",
|
52 |
command => "/usr/local/bin/virtualenv --system-site-packages anvil",
|
47 |
cwd => "/home/vagrant",
|
53 |
cwd => "/home/vagrant",
|
48 |
creates => "/home/vagrant/anvil",
|
54 |
creates => "/home/vagrant/anvil",
|
49 |
user => "vagrant",
|
55 |
user => "vagrant",
|
50 |
group => "vagrant",
|
56 |
group => "vagrant",
|
51 |
require => Exec[ "install venv" ],
|
57 |
require => Exec[ "install venv" ],
|
|
... |
|
... |
73 |
user => "vagrant",
|
79 |
user => "vagrant",
|
74 |
group => "vagrant",
|
80 |
group => "vagrant",
|
75 |
require => [ File[ "/home/vagrant/src" ], Package[ "git-core" ] ],
|
81 |
require => [ File[ "/home/vagrant/src" ], Package[ "git-core" ] ],
|
76 |
}
|
82 |
}
|
77 |
|
83 |
|
78 |
# pre-install Paste and PasteDeploy to work around problem in TG2 install
|
|
|
79 |
exec { "prereqs":
|
|
|
80 |
command => "/home/vagrant/anvil/bin/pip install Paste==1.7.5.1 PasteDeploy==1.5.0",
|
|
|
81 |
user => "vagrant",
|
|
|
82 |
group => "vagrant",
|
|
|
83 |
require => Exec[ "create allura venv" ],
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
# install remainder of Allura dependencies
|
84 |
# install Allura dependencies
|
87 |
exec { "/usr/bin/sudo /home/vagrant/anvil/bin/pip install -r requirements.txt":
|
85 |
exec { "/home/vagrant/anvil/bin/pip install -r requirements.txt":
|
88 |
cwd => "/home/vagrant/src/forge",
|
86 |
cwd => "/home/vagrant/src/forge",
|
89 |
user => "vagrant",
|
87 |
user => "vagrant",
|
90 |
group => "vagrant",
|
88 |
group => "vagrant",
|
91 |
timeout => 0,
|
89 |
timeout => 0,
|
92 |
require => [ Exec[ "clone repo"], Exec[ "prereqs" ] ],
|
90 |
require => [ Exec[ "clone repo"], Exec[ "create allura venv" ] ],
|
93 |
}
|
91 |
}
|
94 |
|
92 |
|
95 |
# create SCM repo dirs
|
93 |
# create SCM repo dirs
|
96 |
file { [ "/home/vagrant/scm", "/home/vagrant/scm/git", "/home/vagrant/scm/hg", "/home/vagrant/scm/svn" ]:
|
94 |
file { [ "/home/vagrant/scm", "/home/vagrant/scm/git", "/home/vagrant/scm/hg", "/home/vagrant/scm/svn" ]:
|
97 |
ensure => "directory",
|
95 |
ensure => "directory",
|