
Stop using latest for packages installed by puppet. This way, all system packages get updated, not just some random ones. The unattended-upgrades config will email root. It is configured for openstack servers and jenkins slaves, but not template hosts so that it doesn't interfere with spin-up. Also, fix some bits in the gerrit module that were causing continuous restarts on gerrit-dev. Install emacs. Change-Id: I51c9083ccd3669f284fce4b50c36a37a0cac92d8
62 lines
1.3 KiB
Puppet
62 lines
1.3 KiB
Puppet
class lodgeit {
|
|
$packages = [ "nginx",
|
|
"python-imaging",
|
|
"python-pip",
|
|
"python-jinja2",
|
|
"python-pybabel",
|
|
"python-werkzeug",
|
|
"python-simplejson",
|
|
"python-pygments",
|
|
"mercurial",
|
|
"drizzle",
|
|
"python-mysqldb" ]
|
|
|
|
package { $packages: ensure => present }
|
|
|
|
package { 'SQLAlchemy':
|
|
provider => pip,
|
|
ensure => present,
|
|
require => Package[python-pip]
|
|
}
|
|
|
|
file { '/srv/lodgeit':
|
|
ensure => directory
|
|
}
|
|
|
|
service { 'drizzle':
|
|
ensure => running,
|
|
hasrestart => true
|
|
}
|
|
|
|
service { "nginx":
|
|
ensure => running,
|
|
hasrestart => true
|
|
}
|
|
|
|
# if we already have the git repo the pull updates
|
|
|
|
exec { "update_lodgeit":
|
|
command => "git pull --ff-only",
|
|
cwd => "/tmp/lodgeit-main",
|
|
path => "/bin:/usr/bin",
|
|
onlyif => "test -d /tmp/lodgeit-main"
|
|
}
|
|
|
|
# otherwise get a new clone of it
|
|
|
|
exec { "get_lodgeit":
|
|
command => "git clone git://github.com/openstack-ci/lodgeit.git /tmp/lodgeit-main",
|
|
path => "/bin:/usr/bin",
|
|
onlyif => "test ! -d /tmp/lodgeit-main"
|
|
}
|
|
|
|
# create initial git DB backup location
|
|
|
|
exec { "create_db_backup":
|
|
command => "git init /var/backups/lodgeit_db",
|
|
path => "/bin:/usr/bin",
|
|
onlyif => "test ! -d /var/backups/lodgeit_db"
|
|
}
|
|
|
|
}
|