This repository was archived by the owner on Nov 27, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adding vagrant config files #407
Closed
Closed
Changes from 14 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
787c920
Add vagrant files
chregu 46c5773
use modphp
chregu cd12875
Allow 192.168.22.1 as well for vagrant
chregu 3666ef7
add .vagrant
chregu 3b39229
Merge remote-tracking branch 'origin/master' into vagrant
chregu 9303e7d
Some cleanup
chregu d750cae
Added a README about vagrant
chregu 1bed672
Added sqlite
chregu a9bbc6f
Set the timeout for composer install to 20 minutes
chregu 1291f88
add a note that it takes long to start up the machine the first time
chregu 35623bf
use UTC
chregu bdf55fb
remove dummy file
chregu 8dd00c5
make a 5_3 also possible
chregu 1ef895c
Simple Windows detection, for NFS setting
aderuwe da4ba81
Merge pull request #1 from aderuwe/vagrant-windows
chregu 91293c8
do apt-get upgrade before install of php-cli
chregu 85edbe6
don't forward mysql port
chregu 24c0c56
try something else with that xdebug.ini
chregu af85150
add a comment about PHP 5.4
chregu a68f646
Added php5-xhprof
chregu 3f9b32f
Merge remote-tracking branch 'origin/vagrant_with_5_3' into vagrant
chregu ff07d11
xhprof is only available with PHP 5.4
chregu 9e3279d
remove mod_actions.
chregu 6741ed1
clean up the manifest
chregu 5ea7e5e
Added mysql (optional)
chregu 905dba8
put the includes on top to make them more visible and update the READ…
chregu 52f58f6
add the mysql credentials to the readme
chregu bc95c76
Fixing Vagrantbox Path
dasrecht f3032cb
Merge pull request #3 from dasrecht/vagrant
chregu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ build/ | |
vendor | ||
bin | ||
composer.phar | ||
|
||
/.vagrant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Using Symfony Standard Edition with Vagrant | ||
|
||
## Get Vagrant, if you don't have already | ||
|
||
From http://vagrantup.com/ | ||
|
||
|
||
## startup vagrant | ||
|
||
vagrant up | ||
|
||
(this takes up to 15-20 minutes the first time, especially the "composer.phar install" part) | ||
|
||
## watch site | ||
|
||
go to http://192.168.22.22/app_dev.php and start playing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
def Kernel.is_windows | ||
processor, platform, *rest = RUBY_PLATFORM.split("-") | ||
platform == "mingw32" | ||
end | ||
|
||
Vagrant::Config.run do |config| | ||
config.vm.define :main do |main_config| | ||
main_config.vm.box = "liip-squeeze64" | ||
main_config.vm.box_url = "http://vagrantbox.liip.ch/liip-squeeze64.box" | ||
main_config.vm.network :hostonly, "192.168.22.22" | ||
main_config.vm.forward_port 3306, 13306 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are you forwarding port 3306, you don't have mysql-server inside the VM |
||
main_config.vm.share_folder "v-root", "/vagrant", ".", :nfs => !Kernel.is_windows | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
main_config.vm.provision :puppet, :module_path => "vagrant/puppet/modules" do |puppet| | ||
puppet.manifests_path = "vagrant/puppet/manifests" | ||
puppet.manifest_file = "main.pp" | ||
end | ||
end | ||
end | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
class apt_update { | ||
|
||
file { "dotdeb.list": | ||
path => "/etc/apt/sources.list.d/dotdeb.list", | ||
ensure => file, | ||
owner => "root", | ||
group => "root", | ||
content => "deb http://ftp.ch.debian.org/debian squeeze main contrib non-free\ndeb http://packages.dotdeb.org squeeze all\ndeb-src http://packages.dotdeb.org squeeze all\ndeb http://packages.dotdeb.org squeeze-php54 all\ndeb-src http://packages.dotdeb.org squeeze-php54 all", | ||
notify => Exec["aptGetUpdate"], | ||
} | ||
|
||
exec { "aptGetUpdate": | ||
command => "wget -q -O - http://www.dotdeb.org/dotdeb.gpg | sudo apt-key add - && sudo apt-get update", | ||
path => ["/bin", "/usr/bin"] | ||
} | ||
} | ||
|
||
class apache { | ||
package { "apache2-mpm-prefork": | ||
ensure => present, | ||
require => Exec["aptGetUpdate"] | ||
} | ||
|
||
package { "libapache2-mod-php5": | ||
ensure => present, | ||
require => Package["apache2-mpm-prefork"] | ||
} | ||
|
||
service { "apache2": | ||
ensure => running, | ||
require => Package["apache2-mpm-prefork"], | ||
subscribe => File["main-vhost.conf", "httpd.conf", "mod_rewrite", "mod_actions"] | ||
} | ||
|
||
|
||
|
||
file { "main-vhost.conf": | ||
path => '/etc/apache2/conf.d/main-vhost.conf', | ||
ensure => file, | ||
content => template('default/main-vhost.conf'), | ||
require => Package["apache2-mpm-prefork"] | ||
} | ||
|
||
file { "httpd.conf": | ||
path => "/etc/apache2/httpd.conf", | ||
ensure => file, | ||
content => template('default/httpd.conf'), | ||
require => Package["apache2-mpm-prefork"] | ||
} | ||
|
||
file { "mod_rewrite": | ||
path => "/etc/apache2/mods-enabled/rewrite.load", | ||
ensure => "link", | ||
target => "/etc/apache2/mods-available/rewrite.load", | ||
require => Package["apache2-mpm-prefork"] | ||
} | ||
|
||
file { "mod_actions": | ||
path => "/etc/apache2/mods-enabled/actions.load", | ||
ensure => "link", | ||
target => "/etc/apache2/mods-available/actions.load", | ||
require => Package["apache2-mpm-prefork"] | ||
} | ||
|
||
file { "mod_actions_conf": | ||
path => "/etc/apache2/mods-enabled/actions.conf", | ||
ensure => "link", | ||
target => "/etc/apache2/mods-available/actions.conf", | ||
require => Package["apache2-mpm-prefork"] | ||
} | ||
} | ||
|
||
class php54 { | ||
|
||
|
||
package { "php5-cli": | ||
ensure => present, | ||
} | ||
|
||
package { "php5-apc": | ||
ensure => present, | ||
require => Package["libapache2-mod-php5"] | ||
} | ||
|
||
package { "php5-xdebug": | ||
ensure => present, | ||
require => Package["libapache2-mod-php5"] | ||
} | ||
|
||
package { "php5-intl": | ||
ensure => present, | ||
require => Package["libapache2-mod-php5"] | ||
} | ||
|
||
package { "php5-sqlite": | ||
ensure => present, | ||
require => Package["libapache2-mod-php5"] | ||
} | ||
|
||
file { "php-timezone.ini": | ||
path => "/etc/php5/cli/conf.d/30-timezone.ini", | ||
ensure => file, | ||
content => template('default/php-timezone.ini'), | ||
require => Package["php5-cli"] | ||
} | ||
} | ||
|
||
class symfony { | ||
|
||
exec { "vendorsInstall": | ||
cwd => "/vagrant", | ||
command => "php composer.phar install", | ||
timeout => 1200, | ||
path => ["/bin", "/usr/bin"], | ||
creates => "/vagrant/vendor", | ||
logoutput => true, | ||
require => Exec["composerPhar"], | ||
} | ||
} | ||
|
||
class composer { | ||
exec { "composerPhar": | ||
cwd => "/vagrant", | ||
command => "curl -s http://getcomposer.org/installer | php", | ||
path => ["/bin", "/usr/bin"], | ||
creates => "/vagrant/composer.phar", | ||
require => Package["php5-cli", "curl", "git"], | ||
} | ||
} | ||
|
||
class groups { | ||
group { "puppet": | ||
ensure => present, | ||
} | ||
} | ||
|
||
class otherstuff { | ||
package { "git": | ||
ensure => present, | ||
} | ||
package { "curl": | ||
ensure => present, | ||
} | ||
package {"nfs-common": | ||
ensure => present, | ||
} | ||
} | ||
|
||
|
||
|
||
include apt_update | ||
include otherstuff | ||
include apache | ||
include php54 | ||
include groups | ||
include composer | ||
include symfony |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
User vagrant | ||
Group vagrant | ||
|
||
EnableSendfile off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<VirtualHost *:80> | ||
|
||
ServerAdmin admin@example.org | ||
DocumentRoot /vagrant/web | ||
ErrorLog /var/log/apache2/symfony-error_log | ||
CustomLog /var/log/apache2/symfony-access_log combined | ||
RewriteEngine On | ||
|
||
</VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
date.timezone = UTC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
|| isset($_SERVER['HTTP_X_FORWARDED_FOR']) | ||
|| !in_array(@$_SERVER['REMOTE_ADDR'], array( | ||
'127.0.0.1', | ||
'192.168.22.1', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could this be an ip like |
||
'::1', | ||
)) | ||
) { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have duplicated vi header here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree please remove