Complete environment for TYPO3 Neos using Vagrant + Chef + Berkshelf provisioning.
Nowadays I advocate for running TYPO3 inside Docker containers. Please have a look at million12/typo3-flow-neos-abstract and million12/typo3-neos Docker images. This repository is not maintained any longer.
To make sure this VM setup suits TYPO3 Flow/Neos development, the following are included in the setup:
-
machine CentOS 6.5 based
-
Vagrant provisioning done by Chef + Berkshelf. Tested by kitchen.ci
-
Vagrant configuration for VirtualBox / Parallels Desktop / DigitalOcean.com / Rackspace providers. Same with kitchen.ci tests.
-
LEMP stack (Linux/Nginx/MySQL/PHP) environment installed/configured using parent ryzy/vc-lemp-server cookbook:
- MySQL 5.5 (+tuning)
- Nginx (latest 1.4.x)
- PHP (latest 5.5.x)
- phpMyAdmin, OpCacheGUI installed
-
TYPO3 Neos installed (into /var/www/neos)
- vhosts
neos
,neos.dev
andneos.test
available (configured with FLOW_CONTEXT set to Production, Development, Testing respectively) - user
admin
with passwordpassword
already added to TYPO3 Neos
- vhosts
- Install Vagrant
- Depends on your chosen Vagrant provider: install VirtualBox OR Parallels Desktop OR set up an account on DigitalOcean.com / Rackspace
- Make sure you have Ruby 2.x installed.
- Make sure you have Ruby Bundler installed:
[sudo] gem install bundler
-
Install required gems (specified in Gemfile) and vagrant plugins:
bundle install vagrant plugin install vagrant-berkshelf vagrant plugin install vagrant-omnibus
- (Optional) If you're using VirtualBox provider, also install vagrant-vbguest plugin:
vagrant plugin install vagrant-vbguest
- (Optional) If you're using VirtualBox provider, also install vagrant-vbguest plugin:
-
Run
vagrant up
to kick off your machine:vagrant up # or, if you want to use provider different than VirtualBox: vagrant up --provider=CHOSEN_PROVIDER
It might happen that
vagrant up
fails due to temporary reasons. Just try again withvagrant provision
(to just re-provision the server) orvagrant reload --provision
(to reboot and then re-provision VM).Another reason for failures during
vagrant up
might be the vagrant-berkshelf plugin. Here are some examples of error messages:Could not open library dep_gecode.bundle
orcannot load such file -- hashie/hash_extensions
It might help then to reinstall vagrant-berkshelf:
vagrant plugin install vagrant-berkshelf --plugin-version '>= 2.0.1'
-
Go to VM_IP_ADDRESS to see VM's default vhost. You'll see there phpinfo() and link to phpMyAdmin, OpCacheGUI.
- Note: if you're not sure about the VM IP address, just log in there using
vagrant ssh
and runifconfig
.
- Note: if you're not sure about the VM IP address, just log in there using
-
Map
neos
,neos.dev
,neos.test
in yourhosts
file to your VM_IP_ADDRESS address, e.g.1.2.3.4 neos neos.dev neos.test
-
Go to neos.dev to see TYPO3 Neos page.
-
Start happy coding!
- You'll probably download/upload files via SFTP, mapping your local project paths to the remote paths.
All passwords (apart of the root
) are defined in attributes/default.rb:
- ssh: user: root, passw:
vagrant
(or: your private SSH key in case of DigitalOcean, Rackspace providers) - ssh: user: vagrant, passw:
vagrant
(or: same as above) - mysql: user: root, passw:
password
- typo3: user: admin, passsw:
password
You can connect to MySQL from outside VM machine as user root is added with '%' host. And there's no iptables running, so no firewall setup.
Why bother, if VirtualBox is so cool, free and there's plenty of ready to use image boxes? Well, look up some benchmarks - I'm sure you'll appreciate 3-digit % difference in Neos performance. E.g. during the tests on the same machine, Neos back-end loaded in 800..1000ms for VB, vs 300..500ms for PD9 (values for Development context).
vagrant plugin install vagrant-parallels
vagrant up --provider=parallels
- Optionally, add line with
export VAGRANT_DEFAULT_PROVIDER=parallels
to your .bash_profile to use this provider as default.
DigitalOcean configuration is already included in Vagrantfile. After vagrant up --provider=digital_ocean
you'll have up & running droplet there, provisioned and ready to use, as you'd have it locally.
-
Provide your Client ID and API key (grab them from DigitalOcean Control Panel, API section) into Vagrant file options,
provider.client_id
andprovider.api_key
respectively. -
Optionally configure other parameters, like size, region etc.
Note that this configuration is only tested with CentOS 6 - there why you should stick with it. Also, because rsync is missing in DigitalOcean CentOS 6.5 box and it's required by vagrant-digitalocean plugin - we stick at this moment to CentOS 6.4.
-
As mentioned in the plugin's doc, on Mac you might need to install curl-ca-bundle:
brew install curl-ca-bundle
-
Install vagrant-digitalocean plugin and run vagrant up with --provider param:
vagrant plugin install vagrant-digitalocean vagrant up --provider=digital_ocean
More detailed instruction and config options available on vagrant-digitalocean plugin page.
Rackspace configuration is already included in Vagrantfile. After vagrant up --provider=rackspace
you'll have up & running droplet there, provisioned and ready to use, as you'd have it locally.
You'll need to install vagrant-rackspace plugin:
vagrant plugin install vagrant-rackspace
More detailed instruction and config options available on vagrant-rackspace plugin page.
Add e.g. export VAGRANT_DEFAULT_PROVIDER=parallels
to your .bash_profile
Author: ryzy marcin@m12.io
Sponsored by Typostrap.io - the new prototyping tool for building highly-interactive prototypes of your website or web app. Built on top of TYPO3 Neos CMS and Zurb Foundation framework.