|
1 |
| -Development using a virtual machine |
2 |
| -################################### |
| 1 | +# Development using a virtual machine |
3 | 2 |
|
4 | 3 | You can set up a development virtual machine for ZF1 unit testing and library
|
5 | 4 | development following these simple instructions.
|
6 | 5 |
|
7 |
| -1. Install requirements for VM. (Note: these are not required by ZF1 itself) |
8 |
| - - VirtualBox (https://www.virtualbox.org/) |
9 |
| - - Ruby (http://www.ruby-lang.org/) |
10 |
| - - Vagrant (http://vagrantup.com/) |
| 6 | +### 1. Install requirements for VM. (Note: these are not required by ZF1 itself) |
11 | 7 |
|
12 |
| -2. Checkout repository to any location |
13 |
| - > git clone git://github.com/zendframework/zf1.git zf1-dev |
14 |
| - > cd zf1-dev |
15 |
| - |
16 |
| -3. Start the process by running Vagrant. |
17 |
| - > vagrant up |
| 8 | +- VirtualBox (https://www.virtualbox.org/) |
| 9 | +- Ruby (http://www.ruby-lang.org/) |
| 10 | +- Vagrant (http://vagrantup.com/) |
| 11 | + |
| 12 | +### 2. Checkout repository to any location |
| 13 | + |
| 14 | + git clone git://github.com/zendframework/zf1.git zf1-dev |
| 15 | + cd zf1-dev |
| 16 | + |
| 17 | +### 3. Start the process by running Vagrant. |
| 18 | + |
| 19 | + vagrant up |
| 20 | + |
| 21 | +This will take a long while as it has to download a VM image and then |
| 22 | +provision it. Once it has finished, it will exit and leave you back at the |
| 23 | +command prompt. |
18 | 24 |
|
19 |
| - This will take a long while as it has to download a VM image and then |
20 |
| - provision it. Once it has finished, it will exit and leave you back at the |
21 |
| - command prompt. |
| 25 | +### 4. SSH into the VM |
22 | 26 |
|
23 |
| -4. SSH into the VM |
24 |
| - > vagrant ssh |
| 27 | + vagrant ssh |
25 | 28 |
|
26 |
| -5. Build a version of PHP. |
27 |
| - > php-build.sh 5.3.11 |
| 29 | +### 5. Build a version of PHP. |
28 | 30 |
|
29 |
| - This also takes a while as it compiles PHP for you! |
| 31 | + php-build.sh 5.3.11 |
| 32 | + |
| 33 | +This also takes a while as it compiles PHP for you! |
30 | 34 |
|
31 |
| -6. Select PHP to use: |
32 |
| - > pe 5.3.11 |
| 35 | +### 6. Select PHP to use: |
| 36 | + |
| 37 | + pe 5.3.11 |
| 38 | + |
| 39 | +### 7. Run tests |
33 | 40 |
|
34 |
| -7. Run tests |
35 |
| - > cd /vagrant/tests |
36 |
| - > phpunit --stderr -d memory_limit=-1 Zend/Acl/AclTest.php |
37 |
| - > phpunit --stderr -d memory_limit=-1 Zend/Amf/AllTests.php |
38 |
| - (etc...) |
| 41 | + cd /vagrant/tests |
| 42 | + phpunit --stderr -d memory_limit=-1 Zend/Acl/AclTest.php |
| 43 | + phpunit --stderr -d memory_limit=-1 Zend/Amf/AllTests.php |
| 44 | + (etc...) |
39 | 45 |
|
40 | 46 | Note that you can repeat items 5 and 6 to create any version if PHP.
|
41 | 47 |
|
42 |
| - |
43 |
| -Notes: |
| 48 | +## Notes: |
| 49 | + |
44 | 50 | - The VM will be running in the background as VBoxHeadless
|
45 | 51 | - HTTP and SSH ports on the VM are forwarded to localhost (22 -> 2222, 80 -> 8081)
|
46 | 52 | - The zf1-dev directory you checked out will be mounted inside the VM at /vagrant
|
47 | 53 | - You can develop by editing the files you cloned in the IDE of you choice.
|
48 |
| -- To stop the VM do one of the following: |
49 |
| - > vagrant suspend # if you plan on running it later |
50 |
| - > vagrant halt # if you wish to turn off the VM, but keep it around |
51 |
| - > vagrant destroy # if you wish to delete the VM completely |
52 |
| -- Also, when any of of the Puppet manifests change (.pp files), it is a good idea to rerun them: |
53 |
| - > vagrant provision |
54 | 54 |
|
| 55 | +To stop the VM do one of the following: |
| 56 | + |
| 57 | + vagrant suspend # if you plan on running it later |
| 58 | + vagrant halt # if you wish to turn off the VM, but keep it around |
| 59 | + vagrant destroy # if you wish to delete the VM completely |
| 60 | + |
| 61 | +Also, when any of of the Puppet manifests change (.pp files), it is a good idea to rerun them: |
55 | 62 |
|
| 63 | + vagrant provision |
0 commit comments