]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/keystone/manifests/dev/install.pp
try with modules from master
[dsa-puppet.git] / 3rdparty / modules / keystone / manifests / dev / install.pp
1 #
2 # Installs keystone from source. This is not yet fully implemented
3 #
4 # == Parameters
5 #
6 # [*source_dir*]
7 #   (optional) The source dire for dev installation
8 #   Defaults to '/usr/local/keystone'
9 #
10 # == Dependencies
11 # == Examples
12 # == Authors
13 #
14 #   Dan Bode dan@puppetlabs.com
15 #
16 # == Copyright
17 #
18 # Copyright 2012 Puppetlabs Inc, unless otherwise noted.
19 #
20 class keystone::dev::install(
21   $source_dir = '/usr/local/keystone'
22 ) {
23   # make sure that I have python 2.7 installed
24
25   Class['openstack::dev'] -> Class['keystone::dev::install']
26
27   # there are likely conficts with other packages
28   # introduced by these resources
29   package { [
30       'python-dev',
31       'libxml2-dev',
32       'libxslt1-dev',
33       'libsasl2-dev',
34       'libsqlite3-dev',
35       'libssl-dev',
36       'libldap2-dev',
37       'sqlite3'
38     ]:
39       ensure => latest,
40   }
41
42   vcsrepo { $source_dir:
43     ensure   => present,
44     provider => git,
45     source   => 'git://github.com/openstack/keystone.git',
46   }
47
48   Exec {
49     cwd         => $source_dir,
50     path        => '/usr/bin',
51     refreshonly => true,
52     subscribe   => Vcsrepo[$source_dir],
53     logoutput   => true,
54     # I have disabled timeout since this seems to take forever
55     # this may be a bad idea :)
56     timeout     => 0,
57   }
58
59   # TODO - really, I need a way to take this file and
60   # convert it into package resources
61   exec { 'install_dev_deps':
62     command => 'pip install -r tools/pip-requires',
63   }
64
65   exec { 'install_keystone_source':
66     command => 'python setup.py develop',
67     require => Exec['install_dev_deps'],
68   }
69
70 }