reedmaniac.com
– the blog –

Server Environments - PuPHPet

For the past few months I have been exclusively using Laravel Homestead for all of my personal and professional development, mostly because when combined with Forge it greatly reduces my need to focus on server setup and deployment. Honestly, considering how much I have to keep in my head for web development, it is nice when I can simplify and reduce what I need to know for getting a site up and working. And, let's be honest, even with Homebrew setting up even anything more than a basic web development environment on a Mac was never the most relaxing task.

I recently took on a project that already had its own development setup using PuPHPet, which uses Puppet and Vagrant to create the development environment. While I have had to play with the nginx configuration and add a few items to my deploy scripts, I have not had to tinker too deeply with Homestead. It just works. Well...for the most part. I doubt there will ever be a piece of technology that does not give me a bit of lip service, from time to time.

Now with PuPHPet, I have had to actually learn how Vagrant works in a bit more detail. Having two different VMs running has caused issues with port forwarding, for example. Accessing MySQL through an SSH tunnel required understanding that PuPHPet was creating a new SSH key each time the machine was created. And, if trying to log into MySQL via an SSH tunnel, you logged into SSH via the Local VM IP Address (not with localhost and the VM forwarded port). The article that pointed out that last tidbit of information was from 2014 and half of its information was already out of date. A very common occurrence in this line of work.

It's weird. Maybe it is old(er) age but I am slightly nostalgic for the days when development felt a bit simpler. I spend so much time doing research and figuring things out now. Make an image into a vector so I can export it as an SVG to upload it to an icon creator to have a font library so all of the icons can be colored, styled, and animated using CSS. Use an MVC Javascript Framework that requires gulp, elixir, underscore, dotenv, etc. to build a Single Page Application using individual components that all need to be browserify'ed into a single JS file with an automatically versioned file. Let's not forget that RESTful API on the backend that has access via OAuth2, outputs via JSON (or is that JSONP?), and has auto discovery thanks to it following HATEOAS.

Aside: I'd like to take a moment to point out that OS X's autocorrect gave me hell writing that last paragraph. So many unfamiliar words!

As usual, no real conclusion just a contemplation about how this increase in complexity may actually be a drain on the web. My vendor directories are rarely under 35MB. It is a rare modern website that has a page under 1.5MB in files. And it takes a team of JS engineers, PHP wizards, and server gurus to build a web application. Has it all been worth it?