Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit b464dd3

Browse files
author
Steven Rombauts
committed
Merge branch 'release/1.3.0'
2 parents 222ebbc + 8b92631 commit b464dd3

File tree

149 files changed

+7889
-471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+7889
-471
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
www/*
44
!www/logs/tail
55
!www/index.php
6-
config.custom.yaml
6+
config.custom.yaml
7+
/packer_cache

CHANGELOG.md

+24
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,30 @@ in 1.x versions.
77
To get the diff for a specific change, go to https://github.com/joomlatools/joomla-vagrant/commit/xxx where xxx is the change hash.
88
To view the diff between two versions, go to https://github.com/joomlatools/joomla-vagrant/compare/v1.0.0...v1.0.1
99

10+
* 1.3.0 (2015-06-01)
11+
* Improved - Upgraded default PHP to 5.5
12+
* Improved - Upgraded OS and stack: Ubuntu 14.04, Apache 2.4, Puppet 3.4, Ruby 2.2
13+
* Improved - Add "getting started" instructions to MOTD
14+
* Added - Created the box dashboard available joomla.box
15+
* Added - Installed Wetty (web terminal)
16+
* Added - Installed PimpMyLog for access to server logs via browser
17+
* Added - Installed PhpMetrics
18+
* Added - Create a Packer template
19+
* Removed - Removed XHProf
20+
* Added - Enable SSL by default to joomla.box and all newly created hosts
21+
* Improved - Installed RVM for the `vagrant` user
22+
* Improved - Install mailcatcher for the vagrant user instead of globally
23+
* Added - Capistrano gem
24+
* Added - Bundler gem
25+
* Improved - Consolidated all server-related commands into a single `box` command. (apc, xdebug, phpmanager, ..)
26+
* Fixed - Fix gsub error when adding incorrect shared folders
27+
* Fixed - Broken dependencies for Mailcatcher
28+
* Fixed - Fix phpmyadmin puppet manifest on Windows (#8)
29+
* Fixed - Suppress STDERR output when restarting Apache
30+
* Fixed - Compile and configure Opcache and APCu by default when building PHP versions greater than 5.5
31+
* Fixed - Use Xdebug v2.2.7 for PHP versions older than 5.4.0
32+
* Fixed - Do not delete php binaries on `phpmanager restore` if using system default
33+
1034
* 1.2.2 (2014-08-21)
1135
* Added - Share the path mappings with guest box through BOX_SHARED_PATHS environment variable.
1236
* Added - Install PECL yaml by default.

README.md

+30-150
Original file line numberDiff line numberDiff line change
@@ -5,189 +5,67 @@ This project automates the setup of a Joomla development environment.
55

66
It is capable of running a full featured LAMP stack with a single command so that you can start working on your Joomla projects quickly.
77

8-
The setup includes:
9-
-------------------
10-
* LAMP (Ubuntu 12.10, Apache, MySQL 5.5, PHP 5.4)
11-
* Phpmyadmin
12-
* Composer
13-
* Xdebug
14-
* Webgrind
15-
* Mailcatcher
16-
* Less and SASS compilers
17-
* UglifyJS
18-
198
Installation
209
------------
2110

22-
Install [VirtualBox](http://www.virtualbox.org/)
11+
1. Install [VirtualBox](http://www.virtualbox.org/)
2312

24-
Install [Vagrant](http://www.vagrantup.com/)
13+
1. Install [Vagrant](http://www.vagrantup.com/)
2514

26-
Run the following commands in a folder of your choice:
15+
1. Run the following commands in a folder of your choice:
2716

2817
$ vagrant init joomlatools/box
2918
$ vagrant up
3019

31-
This will download the Vagrant box and get it running.
32-
33-
Note that this requires a 700 MB download for the first run and Vagrant version 1.5 or later. If you want to perform an offline installation or on an older Vagrant version, [download the box here](https://vagrantcloud.com/joomlatools/box/version/3/provider/virtualbox.box) and run the following commands instead:
34-
35-
$ vagrant init joomlatools/box /path/to/download/joomlatools-box-1.2.box
36-
$ vagrant up
20+
This will download the Vagrant box and get it running.
3721

38-
Add the following line into your ***hosts file*** (/etc/hosts on Linux and MacOS, for other operating systems see [here](http://en.wikipedia.org/wiki/Hosts_(file)#Location_in_the_file_system))
22+
1. Add the following line into your ***hosts file*** (/etc/hosts on Linux and MacOS, for other operating systems see [here](http://en.wikipedia.org/wiki/Hosts_(file)#Location_in_the_file_system))
3923

4024
33.33.33.58 joomla.box webgrind.joomla.box phpmyadmin.joomla.box
4125

42-
And you are done. There will be two new folders created called www and Projects.
43-
44-
For hacking on the box
45-
----------------------
46-
47-
Clone this repository
48-
49-
$ git clone https://github.com/joomlatools/joomla-vagrant.git
50-
51-
Go to the repository folder and provision the box
52-
53-
$ cd joomla-vagrant
54-
$ vagrant up
55-
56-
Apache
57-
------
58-
59-
Apache serves files from the www/ folder using the IP:
60-
61-
http://33.33.33.58/
62-
63-
If you have setup your hosts file correctly as shown above, you can now also access the default www/ folder at:
64-
65-
http://joomla.box/
66-
67-
It is advised to use virtual hosts for development. See below for our virtual host manager.
68-
69-
SSH
70-
---
71-
You can reach the box by using the command:
72-
73-
$ vagrant ssh
74-
75-
Joomla Site Manager
76-
-------------------
77-
78-
The Vagrant box has our [Joomla Console](https://github.com/joomlatools/joomla-console) script pre-installed.
79-
To create a site with the latest Joomla version, run:
80-
81-
joomla site:create testsite
82-
83-
The newly installed site will be available in the /testsite subfolder at http://joomla.box/testsite after that. The files are located at /var/www/testsite.
84-
You can login into your fresh Joomla installation using these credentials: `admin` / `admin`.
85-
86-
For more information, please refer to the [Joomla Console](https://github.com/joomlatools/joomla-console) repository.
87-
88-
*Note*: The script also creates a new virtual host when creating a new site. If you add the following line into your /etc/hosts file on your host machine:
89-
90-
33.33.33.58 testsite.dev
91-
92-
you can access it directly at http://testsite.dev.
26+
1. The dashboard is now available at [joomla.box](http://joomla.box)
9327

94-
Symlink your code into a Joomla installation
95-
--------------------------------------------
96-
Let's say you are working on your own Joomla component called _Awesome_ and want to continue working on it using the Vagrant box. You can use the _Projects_ folder in the repository root for your projects.
28+
There will be two new folders created called `www` and `Projects`. These folders act as shared folders between your host computer and the box.
9729

98-
But if you would like to use a custom folder we should start by making the source code available to the Vagrant box. Let's assume the source code is located at _/Users/myname/Projects/awesome_ :
30+
Getting started
31+
---------------
9932

100-
Copy the ```config.custom.yaml-dist``` file to ```config.custom.yaml``` and edit with your favorite text editor. Make it look like this:
33+
1. Once you have installed the box as described above, SSH into the box:
10134

102-
synced_folders:
103-
/home/vagrant/Projects: /Users/myname/Projects
35+
$ vagrant ssh
10436

105-
Save this file and restart the Vagrant box. (```vagrant reload```)
37+
1. Create your first Joomla website with this command:
10638

107-
The "Projects" folder from your host machine will now be available inside the Vagrant box through _/home/vagrant/Projects_.
39+
$ joomla site:create mysite
10840

109-
Next step is to create the new site you'll be working on. SSH into the box (```vagrant ssh```) and execute the following command:
41+
1. Your new site is available at [joomla.box/mysite](http://joomla.box/mysite). You can login using the credentials `admin` / `admin`.
11042

111-
joomla site:create testsite --joomla=3.2 --symlink=awesome
43+
1. You can now symlink and install your custom extensions into the site, manage PHP versions and much more. Head over to our [documentation pages](http://developer.joomlatools.com/tools/vagrant/introduction.html) to learn more about the box and its possibilities.
11244

113-
Or to symlink your code into an existing site:
11445

115-
joomla extension:symlink testsite awesome
116-
117-
Run discover install to make your component available to Joomla and you are good to go!
118-
119-
For more information on the symlinker, refer to the [Joomla Console README](https://github.com/joomlatools/joomla-console) or run:
120-
121-
joomla extension:symlink --help
122-
123-
124-
MySQL
125-
-----
126-
127-
After you modify /etc/hosts as shown above you can use phpMyAdmin at
128-
129-
http://phpmyadmin.joomla.box
130-
131-
You can also connect using any MySQL client with these details:
132-
133-
Host: 33.33.33.58
134-
User: root
135-
Password: root
136-
137-
138-
Managing multiple PHP Versions
139-
------------------------------
140-
141-
We have included a script that can build and install any PHP version from 5.2.0 and up automatically. This is ideal to try out your code on new PHP releases or to fix bugs that have been reported on older PHP installations.
142-
143-
To get a list of available PHP versions, SSH into the box and run:
144-
145-
phpmanager versions
146-
147-
To install one of the available versions, for example 5.2.16, execute:
148-
149-
phpmanager use 5.2.16
150-
151-
The script will check if this version has been installed and if not, will attempt to build it. Please note that building PHP might take a while. Depending on your system, this could take between 5 and 45 minutes.
152-
153-
If you want to test your code against the latest and greatest of PHP, you can call ```phpmanager use master```. Each time you build the master branch the script will pull in the latest changes from the PHP Git repository.
154-
155-
To restore the original PHP installation again, run:
156-
157-
phpmanager restore
158-
159-
For more options, run ```phpmanager --help```. To see this script in action, refer to this [screencast](http://quick.as/5aw1ulxx).
160-
161-
APC and XDebug
162-
--------------
163-
164-
You can easily turn XDebug and APC on or off after SSHing into the Vagrant box:
46+
For hacking on the box
47+
----------------------
16548

166-
xdebug enable|disable
167-
apc enable|disable
49+
If you want to make changes to the box's infrastructure, you can do so by building the box from scratch. Follow these steps to get started:
16850

169-
To clear the APC cache, run:
51+
1. Clone this repository:
17052

171-
apc clear
53+
$ git clone https://github.com/joomlatools/joomla-vagrant.git
17254

173-
You can always access the APC dashboard through the /apc folder. (```http://joomla.box/apc```)
55+
1. Install required Vagrant plugins
17456

175-
Webgrind
176-
--------
57+
$ vagrant plugin install vagrant-puppet-install
58+
$ vagrant plugin install vagrant-vbguest
17759

178-
After you modify /etc/hosts as shown above go to
60+
1. Go to the repository folder and provision the box:
17961

180-
http://webgrind.joomla.box
62+
$ cd joomla-vagrant
63+
$ vagrant up
18164

182-
SFTP
183-
----
65+
1. You can now edit the Puppet configuration. To apply your changes, provision the box again:
18466

185-
Use following details to connect:
67+
$ vagrant provision
18668

187-
Host: 127.0.0.1
188-
Port: 2222
189-
User: vagrant
190-
Password: vagrant
19169

19270
Reporting issues
19371
----------------
@@ -196,11 +74,13 @@ We deliberately keep the Issues section on Github closed for now as we want to e
19674

19775
Of course, it's not always easy to fix an obscure bug in someone else's code, but we still want to encourage everyone to make an effort. We do not have the intention to maintain a support forum here just yet!
19876

77+
19978
Contributing
20079
------------
20180

20281
Fork the project, create a feature branch from the `develop` branch, and send us a pull request.
20382

83+
20484
Authors
20585
-------
20686

Vagrantfile

+6-7
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ end
2626
CONF = _config
2727

2828
Vagrant.configure("2") do |config|
29-
config.vm.box = "precise64"
30-
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
29+
config.vm.box = "ubuntu/trusty64"
3130
config.vm.hostname = "joomlatools.dev"
3231

3332
config.vm.network :private_network, ip: "33.33.33.58"
@@ -54,18 +53,18 @@ Vagrant.configure("2") do |config|
5453

5554
json = mapping.to_json.gsub(/"/, '\\\\\\\\\"')
5655
paths = 'SetEnv BOX_SHARED_PATHS \"' + json + '\"'
57-
shell_cmd = '[ -d /etc/apache2/conf.d ] && { echo "' + paths + '" > /etc/apache2/conf.d/shared_paths && service apache2 restart; } || echo "Apache2 is not installed yet"'
56+
shell_cmd = '[ -d /etc/apache2/conf.d ] && { echo "' + paths + '" > /etc/apache2/conf-available/shared_paths.conf && service apache2 restart; } || echo "Apache2 is not installed yet"'
5857

5958
config.vm.provision :shell, :inline => shell_cmd, :run => "always"
6059
end
6160

62-
config.vm.provision :shell, :inline => "sudo apt-get update"
63-
config.vm.provision :shell, :inline => 'echo -e "mysql_root_password=root
64-
controluser_password=awesome" > /etc/phpmyadmin.facts;'
65-
6661
config.vm.provision :puppet do |puppet|
6762
puppet.manifests_path = "puppet/manifests"
6863
puppet.module_path = "puppet/modules"
6964
puppet.options = ['--verbose']
65+
puppet.facter = {
66+
"pma_mysql_root_password" => "root",
67+
"pma_controluser_password" => "awesome"
68+
}
7069
end
7170
end

Vagrantfile.pkg

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Vagrant.configure("2") do |config|
3131

3232
config.vm.provider :virtualbox do |v|
3333
v.customize ["modifyvm", :id, "--name", "joomlatools-box"]
34+
v.customize ["modifyvm", :id, "--memory", 1024]
3435
end
3536

3637
if CONF.has_key?('synced_folders')
@@ -48,7 +49,7 @@ Vagrant.configure("2") do |config|
4849

4950
json = mapping.to_json.gsub(/"/, '\\\\\\\\\"')
5051
paths = 'SetEnv BOX_SHARED_PATHS \"' + json + '\"'
51-
shell_cmd = 'echo "' + paths + '" > /etc/apache2/conf.d/shared_paths && service apache2 restart'
52+
shell_cmd = 'echo "' + paths + '" > /etc/apache2/conf-available/shared_paths.conf && service apache2 restart'
5253

5354
config.vm.provision :shell, :inline => shell_cmd, :run => "always"
5455
end

0 commit comments

Comments
 (0)