Building a REST API with Apigility that is built on top of Zend Framework 2 is awesome. I’m also a big fan of Doctrine. So I started with the zf-apigility-skeleton and added the zf-apigility-doctrine vendor.
I created an User API and a Doctrine REST service called “User” with the route “/users[/:userId]“. You can defined fields per REST service. Every field will become an instance of Zend\InputFilter\Input, and together they are specified in a Zend\InputFilter\InputFilter.
The username must be unique, so for the POST (adding a user) /users More >
For my projects I use the awesome tool Capistrano for deployment. In a project that uses Solr, I want to update the Solr core as a deployment step if the Solr configuration of that core is changed. After the reload of the configuration I want to do a full import with the Solr Data Import Handler.
If you have a large import then this can take a while. But it is possible to do this without any downtime! The trick is to work with two cores. A “live” core and a “on deck” core. The More >
Capistrano has the option to forward the local SSH agent to the remote server it wants to deploy on. But for this to work a SSH agent must be running and the key(s) you want to forward must be added to that SSH agent.
First I tried to start the SSH agent with the Capistrano deploy.rb recipe, but I could not get that to work and also the killing of the SSH agent afterwards could be a problem.
Eventually I solved it by adding the following line to the crontab of the deploy user. This line will be executed More >
This tutorial shows you how to install Postfix (2.9.6) with Dovecot (2.0.19), the manage tool Vimbadmin (2.2.2) and SpamAssassin (3.3.2) on Ubuntu Server 12.04 (I got feedback that this tutorial still works for Ubuntu Server 14.04).
Perform all actions as root!
You should check that your server has a valid fqdn hostname (complete with the domain part):
If you get something like “localhost” or “mail” it’s NOT OK and you have to do some work on /etc/hosts and /etc/hostname
Xdebug is a very nice extension for PHP. It makes step by step debugging possible in your IDE. For most people it’s easy to install Xdebug and start debugging their web application on localhost with some IDE, for example Netbeans. Because after installation of Xdebug, it just works.
But getting Xdebug remote to work if your website runs on a virtual machine / Vagrant box, it’s a bit trickier and requires a bit more configuration.
First let me explain how the Xdebug flow works. In my /etc/hosts file on my host machine I added the following line More >
Vagrant is a very awesome tool that makes it very easy to develop your projects in virtual machines on your laptop or PC. It’s a wrapper around VirtualBox. It also makes them very easy to maintain and they can be used by a whole group of developers. This way all the developers that work on a project keep the same development environment. So that kicks the argument “But on my machine it works” out of the door.. finally!
Read all about it at http://www.vagrantup.com/.
There are a few provisioners available like Cheff, Puppet, More >
This tutorial requires that Jetty is installed as described at http://pietervogelaar.nl/ubuntu-12-04-install-jetty-9.
This tutorial describes how to install Jenkins 1.4 with a jenkins.war file with Jetty 9. I installed it on ubuntu 12.04 but it shouldn’t be very different on other linux distributions.
Perform all steps as root.
First of all get the latest jenkins war (web archive) file!
cd /opt/jetty/webapps wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war
Jetty will probably immediately detect the war file and does a hot deploy, but to be sure restart Jetty.
service jetty restart
I configured Jetty at port 8085, so More >