forked from zendframework/zf1
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Vagrantfile to use Rasmus' php7 box
This allows us to easily switch between PHP versions down to 5.3 using the `newphp nn` command. You're on your own for installing PHPUnit though, it's easy enough with `composer global require phpunit/phpunit:~4.0` or whatever though.
- Loading branch information
Showing
5 changed files
with
32 additions
and
198 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,90 +1,46 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant::Config.run do |config| | ||
# All Vagrant configuration is done here. The most common configuration | ||
# options are documented and commented below. For a complete reference, | ||
# please see the online documentation at vagrantup.com. | ||
|
||
# Every Vagrant virtual environment requires a box to build off of. | ||
config.vm.box = "lucid32" | ||
# Inline provisioning shell script | ||
@script = <<SCRIPT | ||
# The url from where the 'config.vm.box' box will be fetched if it | ||
# doesn't already exist on the user's system. | ||
config.vm.box_url = "http://files.vagrantup.com/lucid32.box" | ||
echo -e '\nexport PATH=~/.composer/vendor/bin:$PATH\n' >> ~/.bashrc | ||
# Boot with a GUI so you can see the screen. (Default is headless) | ||
#config.vm.boot_mode = :gui | ||
# Switch to PHP7 | ||
newphp 7 | ||
# Assign this VM to a host-only network IP, allowing you to access it | ||
# via the IP. Host-only networks can talk to the host machine as well as | ||
# any other machines on the same network, but cannot be accessed (through this | ||
# network interface) by any external networks. | ||
# config.vm.network :hostonly, "192.168.33.10" | ||
# rebuild PHP7 | ||
#makephp 7 | ||
# Assign this VM to a bridged network, allowing you to connect directly to a | ||
# network using the host's network device. This makes the VM appear as another | ||
# physical device on your network. | ||
# config.vm.network :bridged | ||
echo "" | ||
echo "** SSH into the box to run the tests. use newphp to switch between versions and makephp 7 to rebuld PHP 7**" | ||
echo "** Use 'newphp nn' to switch between versions (e.g. newphp 54)**" | ||
echo "** Install PHPUnit via composer global require phpunit/phpunit:~n.n for the version required**" | ||
echo "" | ||
SCRIPT | ||
|
||
# Forward a port from the guest to the host, which allows for outside | ||
# computers to access the VM, whereas host only networking does not. | ||
config.vm.forward_port 80, 8081 | ||
|
||
# Hostname | ||
config.vm.host_name = "zf1.dev" | ||
# Vagrant configuration | ||
VAGRANTFILE_API_VERSION = "2" | ||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |c| | ||
c.vm.define "zf1dev", primary: true do |config| | ||
config.vm.box = 'rasmus/php7dev' | ||
# config.vm.network :forwarded_port, guest: 80, host: 8889 | ||
config.vm.hostname = "zf1dev.localhost" | ||
|
||
config.vm.provision 'shell', inline: @script | ||
|
||
# Pass custom arguments to VBoxManage before booting VM | ||
config.vm.customize [ | ||
# 'modifyvm', :id, '--chipset', 'ich9', # solves kernel panic issue on some host machines | ||
# '--uartmode1', 'file', 'C:\\base6-console.log' # uncomment to change log location on Windows | ||
"setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1" | ||
] | ||
config.vm.provider "virtualbox" do |vb| | ||
vb.customize ["modifyvm", :id, "--memory", "1024"] | ||
end | ||
|
||
# Share an additional folder to the guest VM. The first argument is | ||
# an identifier, the second is the path on the guest to mount the | ||
# folder, and the third is the path on the host to the actual folder. | ||
# config.vm.share_folder "v-data", "/vagrant_data", "../data" | ||
|
||
# Enable provisioning with Puppet stand alone. Puppet manifests | ||
# are contained in a directory path relative to this Vagrantfile. | ||
# You will need to create the manifests directory and a manifest in | ||
# the file lucid32.pp in the manifests_path directory. | ||
# | ||
# An example Puppet manifest to provision the message of the day: | ||
# | ||
# # group { "puppet": | ||
# # ensure => "present", | ||
# # } | ||
# # | ||
# # File { owner => 0, group => 0, mode => 0644 } | ||
# # | ||
# # file { '/etc/motd': | ||
# # content => "Welcome to your Vagrant-built virtual machine! | ||
# # Managed by Puppet.\n" | ||
# # } | ||
# | ||
# config.vm.provision :puppet do |puppet| | ||
# puppet.manifests_path = "manifests" | ||
# puppet.manifest_file = "lucid32.pp" | ||
# end | ||
|
||
|
||
config.vm.provision :puppet do |puppet| | ||
puppet.manifests_path = "puppet/manifests" | ||
puppet.manifest_file = "default.pp" | ||
end | ||
end | ||
|
||
# config.vm.provision :puppet do |puppet| | ||
# puppet.manifests_path = "puppet/manifests" | ||
# puppet.module_path = "puppet/modules" | ||
# puppet.manifest_file = "zf1.pp" | ||
# puppet.options = [ | ||
# '--verbose', | ||
# #'--debug', | ||
# # '--graph', | ||
# # '--graphdir=/vagrant/puppet/graphs' | ||
# ] | ||
# end | ||
|
||
end | ||
# config.vm.customize [ | ||
# # 'modifyvm', :id, '--chipset', 'ich9', # solves kernel panic issue on some host machines | ||
# # '--uartmode1', 'file', 'C:\\base6-console.log' # uncomment to change log location on Windows | ||
# "setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1" | ||
# ] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.