Merge lp:~daker/summit/vagrant-support into lp:summit

Proposed by Adnane Belmadiaf
Status: Needs review
Proposed branch: lp:~daker/summit/vagrant-support
Merge into: lp:summit
Diff against target: 125 lines (+92/-0)
5 files modified
.bzrignore (+1/-0)
Vagrantfile (+22/-0)
puppet/manifests/classes/init.pp (+27/-0)
puppet/manifests/classes/summit.pp (+22/-0)
puppet/manifests/vagrant.pp (+20/-0)
To merge this branch: bzr merge lp:~daker/summit/vagrant-support
Reviewer Review Type Date Requested Status
Chris Johnston Needs Fixing
Review via email: mp+128129@code.launchpad.net

Commit message

Added support for vagrant

To post a comment you must log in.
Revision history for this message
Chris Johnston (cjohnston) wrote :

107 +# LoCo Team Portal puppet magic for dev boxes

review: Needs Fixing
lp:~daker/summit/vagrant-support updated
453. By Adnane Belmadiaf

Fixed vagrant to use the official box

454. By Adnane Belmadiaf

Fixed migrate command
Other fixes

Revision history for this message
Chris Johnston (cjohnston) wrote :

Should get rid of the requirement to use pip and install the correct packages and versions via apt.

Revision history for this message
Chris Johnston (cjohnston) wrote :

Would also be nice if a user was able to specify additional packages that they would like installed that shouldn't be added to the default setup.. Example would be editors.

Unmerged revisions

454. By Adnane Belmadiaf

Fixed migrate command
Other fixes

453. By Adnane Belmadiaf

Fixed vagrant to use the official box

452. By Adnane Belmadiaf

* Added vagrant support

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2012-04-11 13:55:33 +0000
3+++ .bzrignore 2013-01-19 15:57:18 +0000
4@@ -11,3 +11,4 @@
5 README
6 env
7 .idea
8+.vagrant
9\ No newline at end of file
10
11=== added file 'Vagrantfile'
12--- Vagrantfile 1970-01-01 00:00:00 +0000
13+++ Vagrantfile 2013-01-19 15:57:18 +0000
14@@ -0,0 +1,22 @@
15+# -*- mode: ruby -*-
16+# vi: set ft=ruby :
17+
18+Vagrant::Config.run do |summit|
19+ summit.vm.box = "summit-devserver"
20+ summit.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-i386-vagrant-disk1.box"
21+ summit.vm.forward_port 8000, 8000
22+ summit.vm.network :hostonly, "33.33.33.10"
23+ summit.vm.customize ["modifyvm", :id, "--memory", 512]
24+
25+ summit.ssh.max_tries = 50
26+ summit.ssh.timeout = 300
27+
28+ MOUNT_POINT = '/home/vagrant/summit'
29+
30+ summit.vm.share_folder("v-root", MOUNT_POINT, ".")
31+
32+ summit.vm.provision :puppet do |puppet|
33+ puppet.manifests_path = "puppet/manifests"
34+ puppet.manifest_file = "vagrant.pp"
35+ end
36+end
37
38=== added directory 'puppet'
39=== added directory 'puppet/manifests'
40=== added directory 'puppet/manifests/classes'
41=== added file 'puppet/manifests/classes/init.pp'
42--- puppet/manifests/classes/init.pp 1970-01-01 00:00:00 +0000
43+++ puppet/manifests/classes/init.pp 2013-01-19 15:57:18 +0000
44@@ -0,0 +1,27 @@
45+# Commands to run before all others in puppet.
46+class init {
47+
48+ group { "puppet":
49+ ensure => "present",
50+ }
51+
52+ exec { "update-apt":
53+ command => "sudo apt-get update",
54+
55+ }
56+
57+ package {
58+ ["python", "python-dev", "libjs-jquery", "libjs-jquery-ui", "iso-codes", "gettext", "python-tz", "python-vobject", "python-pip", "python-beautifulsoup", "python-simplejson", "python-openid"]:
59+ ensure => installed,
60+ require => Exec['update-apt']
61+ }
62+
63+ exec { "pip-install-requirements":
64+ command => "sudo /usr/bin/pip install -r $PROJ_DIR/requirements.txt",
65+ tries => 2,
66+ timeout => 600, # Too long, but this can take awhile
67+ require => Package['python-pip', 'python-dev'],
68+ logoutput => on_failure
69+ }
70+
71+}
72\ No newline at end of file
73
74=== added file 'puppet/manifests/classes/summit.pp'
75--- puppet/manifests/classes/summit.pp 1970-01-01 00:00:00 +0000
76+++ puppet/manifests/classes/summit.pp 2013-01-19 15:57:18 +0000
77@@ -0,0 +1,22 @@
78+# summit specific commands.
79+
80+class summit {
81+
82+ file { "$PROJ_DIR/summit/local_settings.py":
83+ ensure => file,
84+ source => "$PROJ_DIR/summit/local_settings.py.sample",
85+ replace => false;
86+ }
87+
88+ exec {
89+ "managepy_syncdb":
90+ cwd => "$PROJ_DIR/summit",
91+ command => "/usr/bin/python manage.py syncdb --noinput",
92+ }
93+
94+ exec {
95+ "managepy_migratedb":
96+ cwd => "$PROJ_DIR/summit",
97+ command => "/usr/bin/python manage.py migrate",
98+ }
99+}
100\ No newline at end of file
101
102=== added file 'puppet/manifests/vagrant.pp'
103--- puppet/manifests/vagrant.pp 1970-01-01 00:00:00 +0000
104+++ puppet/manifests/vagrant.pp 2013-01-19 15:57:18 +0000
105@@ -0,0 +1,20 @@
106+#
107+# Summit puppet magic for dev boxes
108+#
109+import "classes/*.pp"
110+
111+$PROJ_DIR = "/home/vagrant/summit"
112+
113+Exec {
114+ path => "/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin",
115+}
116+
117+class dev {
118+
119+ class {
120+ init: before => Class[summit];
121+ summit:;
122+ }
123+}
124+
125+include dev

Subscribers

People subscribed via source and target branches