• This repository has been archived on 25/Sep/2023
  • Stars
    star
    100
  • Rank 340,703 (Top 7 %)
  • Language
  • Created almost 10 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

One-stop Neos and TYPO3 development and review environment. Effortlessly test one site against multiple PHP versions and hhvm.

TYPO3 Homestead

I now use https://github.com/Tuurlijk/docker-local for local development instead.

Warning . . . .

The TYPO3 versions in the latest box build are a bit outdated. This is due to the fact that my patched 
composer version that supports shallow clones, is outdated.

It should not be too hard to set up fresh installs of the TYPO3 versions you wish hovever.

If you wish to try TYPO3 8.6, go here: [https://github.com/Tuurlijk/TYPOTry]

TYPO3 Homestead is your one-stop TYPO3 and Neos development and review environment. Just run vagrant up and a full Linux Ubuntu distribution will be downloaded with all the packages and configuration needed to start development right away.

This environment is intended as as a local environment. Security-wise it is in NO WAY fit for production.

Effortlessly test one site against multiple PHP versions and hhvm.

Flattr this git repo

Requirements

  • Virtualbox - Version 5.* - or another virtualization product - Free!
  • Vagrant - Version 1.7.* is needed - Free!

Installation

Installation is pretty straight forward. You're just a few steps away from 'great success'.

without git

  • Download the latest TYPO3.Homestead zip file
  • Extract the zip file
  • Open a command shell
  • Go into the new directory
  • Run vagrant up

with git

  • Open a command shell
  • Clone the repository: git clone https://github.com/Tuurlijk/TYPO3.Homestead.git
  • Go into the new directory: cd TYPO3.Homestead
  • Start the machine: vagrant up

When the machine has booted, you can visit http://local.typo3.org. And also any of the pre-configured sites or any site you configured. The default sites are:

All TYPO3 and Neos installation are fully set-up. You can login to the backend with: admin/supersecret.

The error log can be inspected using: multitail /var/log/nginx/error.log.

MySQL can be accessed by vagrant as typo3 with password supersecret. It can also be accessed by root as root using password supersecret. You can become root by doing sudo su -. The typo3 user has access to all databases. The install tool password is the TYPO3 default.

The amount of CPUs available on the host machine will also be available on the guest machine. 25% of the available host machine memory will be made available on the guest machine. The minimum amount of memory will be enforced to 1024 MB. You should not have to pass any extra parameters when starting the box.

The CNAME *.local.typo3.org resolves to the IP 192.168.144.120. This means you will have magic auto-resolving hostnames. So if you change the IP, you will need to take care of your hostname resolving yourself, either by hardcoding all the hostnames you wish to use or by some other means.

To reduce the box size, all git sources are now 'shallow' clones. You will find only a single branch and a history of the last 100 commits. You can fetch the full history by doing a git fetch --unshallow.

SSH Access

You can find a terminal on: http://shell.local.typo3.org

If you set up a box without a file share, you will want to access the box using ssh. To add your public ssh key to the authorized_keys file of the vagrant user, you can execute the following command:

 cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> .ssh/authorized_keys'

You will now need to enter the password for the 'vagrant' user. It is 'vagrant'. Now you will be able to get into the box as user vagrant without supplying a password.

Multiple PHP versions

If you prefix your site name with hhvm, php55, php56 or php70; your request will be served by that backend:

You can see what backend is used by inspecting the X-Powered-By response header.

On the commandline these php versions are available as:

  • php55
  • php56
  • php70

The box currently has PHP 7.0.3 as base PHP version.

Reviews

The TYPO3 Review box makes reviewing patches for TYPO3 as easy as possible. You do not have to set up anything else than this review box to get started reviewing for the TYPO3 development.

This review box includes 3 TYPO3 web sites. First is the last released version (7.5 in time of writing this), second is the development version of the master for reference and the third is the master for doing the reviews.

All sites have an installed introduction package to have a running website out of the box. Also the Styleguide and IconAPI extensions are installed.

Using the Chrome Helper

If you don't want to manually copy and paste the cherry-pick commands you can use the TYPO3 Review Chrome extension. You're just a couple of clicks away from reviewing your first change.

Now you can view the „old“ version without the patch at dev-master.local.typo3.org and the „new“ version with the patch at review.local.typo3.org. It is easy to switch between the two browser tabs (or windows) to see what has been changed with the patch.

Using the review.php script

Open your browser and go to local.typo3.org

You can see a list of links to the backends of the installed sites and some buttons for resetting, updating and reviewing.

Before you start, the first action is to update the sites. Pressing the „Update“ button gets the latest commits from the repository and flushes the cache to get a clean system to work with. You should update the sites on a regular base, best is every time before starting to review something. Always both sites, the dev-master and review are updated to have them in identical state.

Now you have to search at Gerrit or even better at Forger for a review you want to test. On the web page of the selected review item there is a dropdown on the upper right corner called „download“. Drop the list down, click on the line beginning with „Cherry pick“ and copy the line to the clipboard.

Then go to the web site local.typo3.org. Put the clipboard content into the input field „Cherry pick“ and press the „Do a review“ button.

The patch is then applied to review.local.typo3.org.

Now you can view the „old“ version without the patch at dev-master.local.typo3.org and the „new“ version with the patch at review.local.typo3.org. It is easy to switch between the two browser tabs (or windows) to see what has been changed with the patch.

Profiling

XHProf is a Hierarchical Profiler for PHP. Facebook developed it for in-house use and made it open-source in 2009. It is a powerful tool if you need to know exactly what your PHP code is doing. When you prefix any TYPO3 site name with 'xhprof'; [http://xhprof.7.6.local.typo3.org/](http://xhprof.7.6.local.typo3.org/) (and set the magic cookie _profile — use the XHProf Helper extension for Chrome), profiles will be created.

You can view the profiles on the XHGui site http://xhprof.local.typo3.org/. Here you can see beautiful internals of your code doing it’s weird dance. Now it’s time to zoom in on some of the bottlenecks and start fixing the code.

Synced folders

Edit the vagrant.yml file in Configuration/. Setup a shared directory to hold your TYPO3 sources and sites in the Configuration/vagrant.yml file:

synced_folders:
  - name: Development
    src: ~/Projects/TYPO3/Review
    target: /var/www

Make sure the src directory exists on your host machine!

If you use shared folders, the contents of the shared src folder will replace the the content of the target folder on the Vagrant box. You will need to take care of setting up the MySQL databases inside of the Vagrant box. Or you can send me a pull request with some fancy lightweight provisioning code ;-).

Make sure the vagrant box can make a nfs connection to the host. Check your firewall settings if the host cannot connect to the shared folder. Enable access to nfsd and rpc.*.

If you don't do this, you may want to add your public ssh key to the authorized_keys file of the vagrant user. Read the section SSH Access.

MailHog

MailHog runs a super simple SMTP server which catches any message sent to it to display in a web interface. This makes it easy to test forms without actually sending mail to the 'real' mail address. Set your favourite app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server, then check out http://mail.local.typo3.org to see the mail that's arrived so far.

MailHog has been set up for TYPO3 CMS. For Neos, you may be interested in the Langeland.SwiftBox package. It is a package that can override the swiftmailer setting to send to that instead and you can browse all the emails with the included flow application.

Features

TYPO3 Homestead comes with the following stack:

  • TYPO3 CMS
  • NEOS CMS
  • composer
  • elasticsearch
  • hhvm
  • multiple PHP versions Current versions
  • MailHog
  • mariadb
  • memcached
  • nginx + http2
  • nodejs
  • php-apcu
  • php-fpm
  • postfix nullmailer (outgoing only)
  • rabbitMQ
  • redis
  • self signed ssl certificates
  • shellinabox http://shell.local.typo3.org
  • xdebug
  • xhprof / blackfire
  • zsh

The flexible configuration allows you to create any combination of TYPO3 source and PHP backend with or without SSL.

Can't connect after the vagrant up?

This box needs internet connectivity to resolve the local.neos.io domain name to the IP of the box. If you are not connected to the Internet you will need to add the following entries to your hosts file:

  • 192.168.144.120 1.2.local.neos.io
  • 192.168.144.120 2.0.local.neos.io
  • 192.168.144.120 dev-master.local.neos.io
  • 192.168.144.120 6.2.local.typo3.org
  • 192.168.144.120 7.6.local.typo3.org
  • 192.168.144.120 8.0.local.typo3.org
  • 192.168.144.120 dev-master.local.typo3.org
  • 192.168.144.120 review.local.typo3.org

Contributing

Built with Packer: patches are welcome ;-).

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests and examples for any new or changed functionality.

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

TODO

Known Problems

  • The sources that are fetched from github may be hard to reach when github is under a DDOS
  • If you get the error The box 'ubuntu/trusty64' could not be found, then you may have a vagrant version lower than 1.5. The stock Ubuntu vagrant version is 1.4 at the time of writing. You can get the latest vagrant version from the vagrant site. Some details can be found on vaprobash issue #322.
  • On Windows machines you may need to enable VT-X in the bios of your machine. vt-x is disabled in the BIOS, you can disable this in the image settings under system tab processor, PAE/NX disable or you can enable this setting in your BIOS. Check: http://www.sysprobs.com/disable-enable-virtualization-technology-bios and check your windows version ( minimal a Pro-edition) or Enable without BIOS.
  • Vagrant may complain about a 'space' character in your path. Ruby can't handle this. You will need to move the Vagrant box to a path without spaces and try again.
  • Windows host-only adapter creation fails due to slow background processing - Use the fix
  • If you use a shared filesystem on a Windows machine and the folder contains symlinks, you will need to run vagrant as Administrator.

License

GNU General Public License version 3

References

More Repositories

1

typo3scan

Scans TYPO3 extensions for usage of deprecated and or changed code
95
star
2

TYPOTry

A small Vagrant box to try out the most recent TYPO3 release
21
star
3

TYPO3.Packer

https://www.packer.io/ code to create an ubuntu based Neos and TYPO3 base boxes
Shell
14
star
4

TYPO3.Review

This project has merged with TYPO3.Homestead
12
star
5

TryNeos

A Vagrant box to try out the most recent NEOS releases.
9
star
6

HTTP-Header-Spy

HTTP Header Spy enables you to inspect request- response headers and cookies right after page load with no extra clicks.
JavaScript
9
star
7

docker-local

Docker compose development environment
Shell
6
star
8

t3ext-yaml-configuration

Generate TSConfig, user- and group- configuration using YAML files
PHP
5
star
9

t3ext-accountmanagement

Manage TYPO3 CMS users from the cli using an extbase command controller
PHP
5
star
10

t3ext-h5p

TYPO3 H5P plugin
JavaScript
4
star
11

bitbucket-chainsaw

Mass Delete branches from Bitbucket
JavaScript
4
star
12

typo3migrate

TYPO3 Migration Tools
PHP
3
star
13

t3ext-bugsnag

Bugsnag Exception Handler for TYPO3 CMS
PHP
2
star
14

typofree.vim

vim colorscheme 256 colors
Vim Script
2
star
15

Neos.NodeType.CodeMirror

A node type enabling the use of codeMirror style code snippets in TYPO3 Neos
2
star
16

XHProf-helper-webextension

XHProf helper for firefox and chrome. Enable profiling cookie with one click.
CSS
2
star
17

Pygments-TypoScript-Lexer

Pygments syntaxhighligter TypoScript Lexer
TypeScript
2
star
18

t3ext-doctor

Doctor shows you how TYPO3 is doing
PHP
2
star
19

docker-php-fpm

Stock PHP-fpm image with some additions for development
Dockerfile
2
star
20

xposer

Issue tracke rfor https://www.xposer.io/
1
star
21

composer-downloader-git-shallow

A composer downloader that enables shallow Git clones.
PHP
1
star
22

TinyTypo3TestSuite

A tiny test suite to benchmark different method implementations
PHP
1
star
23

Typo3Benchmark

Automated benchmarking setup for TYPO3
Shell
1
star
24

TYPO3-Review-helper-webextension

Review a TYPO3 patch with a single click
JavaScript
1
star