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
=== modified file '.bzrignore'
--- .bzrignore 2012-04-11 13:55:33 +0000
+++ .bzrignore 2013-01-19 15:57:18 +0000
@@ -11,3 +11,4 @@
11README11README
12env12env
13.idea13.idea
14.vagrant
14\ No newline at end of file15\ No newline at end of file
1516
=== added file 'Vagrantfile'
--- Vagrantfile 1970-01-01 00:00:00 +0000
+++ Vagrantfile 2013-01-19 15:57:18 +0000
@@ -0,0 +1,22 @@
1# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4Vagrant::Config.run do |summit|
5 summit.vm.box = "summit-devserver"
6 summit.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-i386-vagrant-disk1.box"
7 summit.vm.forward_port 8000, 8000
8 summit.vm.network :hostonly, "33.33.33.10"
9 summit.vm.customize ["modifyvm", :id, "--memory", 512]
10
11 summit.ssh.max_tries = 50
12 summit.ssh.timeout = 300
13
14 MOUNT_POINT = '/home/vagrant/summit'
15
16 summit.vm.share_folder("v-root", MOUNT_POINT, ".")
17
18 summit.vm.provision :puppet do |puppet|
19 puppet.manifests_path = "puppet/manifests"
20 puppet.manifest_file = "vagrant.pp"
21 end
22end
023
=== added directory 'puppet'
=== added directory 'puppet/manifests'
=== added directory 'puppet/manifests/classes'
=== added file 'puppet/manifests/classes/init.pp'
--- puppet/manifests/classes/init.pp 1970-01-01 00:00:00 +0000
+++ puppet/manifests/classes/init.pp 2013-01-19 15:57:18 +0000
@@ -0,0 +1,27 @@
1# Commands to run before all others in puppet.
2class init {
3
4 group { "puppet":
5 ensure => "present",
6 }
7
8 exec { "update-apt":
9 command => "sudo apt-get update",
10
11 }
12
13 package {
14 ["python", "python-dev", "libjs-jquery", "libjs-jquery-ui", "iso-codes", "gettext", "python-tz", "python-vobject", "python-pip", "python-beautifulsoup", "python-simplejson", "python-openid"]:
15 ensure => installed,
16 require => Exec['update-apt']
17 }
18
19 exec { "pip-install-requirements":
20 command => "sudo /usr/bin/pip install -r $PROJ_DIR/requirements.txt",
21 tries => 2,
22 timeout => 600, # Too long, but this can take awhile
23 require => Package['python-pip', 'python-dev'],
24 logoutput => on_failure
25 }
26
27}
0\ No newline at end of file28\ No newline at end of file
129
=== added file 'puppet/manifests/classes/summit.pp'
--- puppet/manifests/classes/summit.pp 1970-01-01 00:00:00 +0000
+++ puppet/manifests/classes/summit.pp 2013-01-19 15:57:18 +0000
@@ -0,0 +1,22 @@
1# summit specific commands.
2
3class summit {
4
5 file { "$PROJ_DIR/summit/local_settings.py":
6 ensure => file,
7 source => "$PROJ_DIR/summit/local_settings.py.sample",
8 replace => false;
9 }
10
11 exec {
12 "managepy_syncdb":
13 cwd => "$PROJ_DIR/summit",
14 command => "/usr/bin/python manage.py syncdb --noinput",
15 }
16
17 exec {
18 "managepy_migratedb":
19 cwd => "$PROJ_DIR/summit",
20 command => "/usr/bin/python manage.py migrate",
21 }
22}
0\ No newline at end of file23\ No newline at end of file
124
=== added file 'puppet/manifests/vagrant.pp'
--- puppet/manifests/vagrant.pp 1970-01-01 00:00:00 +0000
+++ puppet/manifests/vagrant.pp 2013-01-19 15:57:18 +0000
@@ -0,0 +1,20 @@
1#
2# Summit puppet magic for dev boxes
3#
4import "classes/*.pp"
5
6$PROJ_DIR = "/home/vagrant/summit"
7
8Exec {
9 path => "/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin",
10}
11
12class dev {
13
14 class {
15 init: before => Class[summit];
16 summit:;
17 }
18}
19
20include dev

Subscribers

People subscribed via source and target branches