Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincej's avatar
Level 15

@bashy

Hi Bashy ! As you know I am no expert in these matters and more than likely I am missing something here. Sure, I understand that people can recompile, but people often don't want the hassle, they just want it to work out of the box. If you are a Linux user already, I just don't see the point of layering another whole Linux OS on top of a Linux OS through a VM ... I mean Linux works pretty amazingly most of the time ... well, almost most of the time ...except when you want to run Laracasts/flash on 5.1 .... :o)

Say, could you be a real mate, a look at the problem I am having with Flash .. it really has me stumped and no one see's an answer- it's probably me .. it nearly always is :o)

https://laracasts.com/discuss/channels/laravel/laracastsflash-gives-error-on-l51?page=1

ian_h's avatar

@vincej I used to run FreeBSD as my desktop for ~18 months back in FBSD4.4 days.. but alas, being an "all round" web bod, I needed to run the likes of Photoshop / Illustrator (Gimp etc don't cut it for me) so I switched back to windows.

I also have 5 dedicated Debian boxes sitting in my home office, one as a dev box I've been using for years, and the others are performing various other tasks, but have recently just started running Homestead (and will run some "generic" vagrant VMs too).. why's this? well my current work place, I'm stuck on PHP 5.3.3 (don't ask!).. and my Debian dev box is running 5.6.10 currently, and there has been some cross-over issues that I hadn't noticed until I'd pushed things into the test environment at work (a couple of places I'd used short array notation, or short echo notations (<?=).. with running multiple VMs, I can set up an environment to "exactly" fit (even down to the OS) my "real world" environments to help catch these kind of things during the development stage.

Granted, I'm developing on a windows box, but seeing as I have many *nix boxes around my feet, I feel it's somewhat similar... why would I want to run a VM when I have plenty of other choices on my local network?

Cheers..

Ian

bashy's avatar

I just don't see the point of layering another whole Linux OS on top of a Linux OS through a VM

@vincej The point of layering it on top is that you can make sure code works on multiple OS distros and you can also install extra entensions/packages (linux)/etc and not have to worry about resetting your environment each time.

I use a VM for testing install scripts on fresh Debian images to make sure they install from scratch. As for PHP developing, it's great since you can test it similar to that.

vincej's avatar
Level 15

@bashy I can only guess that I am not that picky or maybe not smart enough to be doing the stuff you are doing :o)

I still don't get it. Homestead, deploys Ubuntu, so I don't understand how it helps to test on multiple distro's eg Suse, Centos or Red Hat which are what the ISP's use.

Testing small scripts .. I get that, but I will just create a new Virtual Server and do my testing on that Apache / Ubuntu server.

I have Virtualbox installed on my Linux machine, where I can run up a Win7, Suse and Red Hat environment. I have even thought of splashing out $26 on MacOs just for fun and giggles.

I'm an independent guy building business apps for small / medium companies, mostly ERP stuff. 99% of my focus is on the business issues rather than the infrastructure. All I really care about is will it run on my ISP's Centos and so far zero problems with Linux Mint / Ubuntu.

Anyway - Ben, I can only dream of having your skills, so I can only assume that I am working in a much more simplistic manner than than yourself.

On other topics - I am going to delete and reinstall Flash. Is there a best practice for uninstalling a service provider ?

Cheers Vince

vincej's avatar
Level 15

@lancebutler2

Hi Lance - nope not yet, but I always give my apps a whirl on Centos over VirtualBox just for fun.

jekinney's avatar

@vincej

I completely understand your quandary. It has been stated already, but at first I had your same thought process until I deployed an app and embarrassed myself with huge issues that cost me hours of not paid time to fix.

Here is my opinion that has been stated: a) don't want to really change my os per project, much faster and efficient to utilize a vm b) you can cfg the vm exactly as your deployment server before starting the app which insures proper testing for code errors and performance (keep in mind a vm seems slower then an actual server, so if your vm performance is good probably better on the real deal) c) mess something up usually just a few minutes to fresh install with out any real data lose (second biggest one imo).

You really don't need to us a vagrant, you can just use virtual box and install an os that way and use it with a GUI. Vagrant can be a bit of a learning curve and homestead isn't the easiest to get going the first time either, but once you do it becomes extremely covenant. Far better the wamp, mamp etc.

vincej's avatar
Level 15

@jekinney

100% agreed. I occasionally use VirtualBox with Centos only if / when there is a config problem with my code, which is rare. I can see the point of a vm, I just struggle with the idea of putting Ubuntu on top of Ubuntu. For me it makes 1000% sense if you are a Windows user or a Mac user.

Cheers !

bashy's avatar

@vincej Yeah if you only ever create apps that use one set of tools and you'll never need to change PHP settings per app, this is fine. I couldn't be sitting there installing supervisord and beanstalkd to do queues, would much rather do that on a VM I could wipe and start fresh without having that left on my system to mess up something else.

Is there a best practice for uninstalling a service provider ?

Remove from composer.json/app.php and run composer update?

jaewun's avatar

You'll notice Laravel now supports the ability to have a separate VM per project. You can launch homestead from within your Laravel project. Check out: http://laravel.com/docs/5.1/homestead#per-project-installation

The advantage to this, is that it give you a server environment that is clean, pre-configured and repeatable. If something goes wrong, just re-provision the VM and you're away laughing. Vagrant and Homestead allow you to keep things separated. For example, I do all my Work related Laravel development using Homestead as a "container" for all my work related projects, and I do fun side projects in a separate container. Plus, now using the per-project Homestead, I can keep each project in their own bucket.

Another advantage, is that when one is working in a team, it can become frustrating and bothersome to maintain development environments. This is the hassle that Vagrant/Homestead and other alternatives try to solve. Maybe it's not for you - which is totally fine, you don't have to do things this way, your project won't fail if you don't use homestead.

As for service providers, if you buy into the whole Laravel way of life and use Forge, Homestead gives you a near identical server environment pre-provisioned so that you can be sure what works on the VM will work in the cloud.

vincej's avatar
Level 15

@bashy

Ok - I think I see what you are doing. Ubuntu / Mint does not come with Apache / Nginx. You have to set that up in your environment. I use a VM ( VirtualBox), I just don't want Ubuntu on top of Ubuntu in order to create multiple different Web server / Php / job queue etc environments. I have had a little look into the VB docs and I believe you can do what you are doing but I have never tried. My apps are not multi-tiered multi-networked apps. My apps are simple, 1 customer 1 app implementations .... although I am building my own SaaS implementation. So who knows .. maybe when I hit that wall, I will be coming to you for some advice :o)

Cheers Vince

alenabdula's avatar

I just don't want Ubuntu on top of Ubuntu

@vincej It's not Ubuntu on top of Ubuntu. Stop thinking of it like that. It's Virtual Machine on top of Ubuntu OS. The whole point of a VM is abstraction and isolation. Simple use case comes to mind: imagine you have 3 different projects that you are working on. If you are on your host machine (Ubuntu OS) developing and you do sudo apt-get update && upgrade and something breaks, or even something as simple as updating node modules or ruby gems, good luck to ya. No you have 3 projects in state of limbo. Instead of just one messed up VM that you can replicate with click of a button. Another use case: Imagine your hardware fails, yup whole computer just shit the bed, what do you do? Buy new computer, sit all day and reinstall, configure, etc... Or do you buy a new computer, install Vagrant/VirtualBox, provision, run migration or whatnot and you're good to go. Tools like VirtualBox/Vagrant were developed specifically to solve all this wasted time.

The important thing is that you are productive and feel comfortable doing what you do. If installing everything you need on your host machine feels more like you then do it (I actually do this for my personal stuff, and update and break stuff because I enjoy it and often learn great deal from it). But, for my client work it's much more controlled and I use tools like Vagrant to manage those environments individually. 1 VM / Project.

In addition, it's important to mention that there's no right or wrong way of doing this really. In reality virtualization adds another layer of complexity to already complex field. From having proper hardware to support virtualisation, utilizing that hardware appropriately and having the host operating system behave. All important things to consider and evaluate. I think you need to audit your workflow and see if this is something you truly need and/or can benefit from. It's easy for us to push you towards one solution or the other but at the end you need to make up your mind and be self aware of what you actually need. I think plenty of people have outlined pros/cons. I don't know if you have any specific questions regarding anything that was discussed thus far. Remember everything is hard before it's easy. Best of luck Vince. Cheers.

jekinney's avatar

Actually just dawned on me, I assume your running Ubuntu desktop where in your vm you'ld probably be running Ubuntu server. Not a huge difference from the underlying code but significantly different with included packages. Another food for thought.

Back in the day I was a C# dev and as such did a few desktop programs that interacted with web based app (soap, hate it). Obviously a installing a virtual box with the different versions of windows isolated any major errors and memory leaks. Granted an extreme case out of the main question, but food for thought.

vincej's avatar
Level 15

@alenabdula

Hi Alen - thanks very much for the clarification. I get it. Clarification: I do use a VM, just not Homestead. I use VirtualBox and I put Centos Unix as my ISP uses that, & Windows7 on top of my Ubuntu host. Having looked at Homestead, 3/4 of the stuff included, I don't use.

Question: Is the Ubuntu deployment server only or does it include the desktop ?

vincej's avatar
Level 15

@jekinney

Thanks for that. I must be way behind the technology curve, because I just don't appreciate the significance of the business / technological problem that all the bits in Homestead solve. I mean, I write my CSS, my JS - don't need a task runner to help. If my hardware blows up then I have reinstall a host and everything whatever. My apps are not multi-node, multi-tiered apps. I sell to customers with anywhere from 10 -100 users and my biggest client has 3000 users. I'm not building the stuff you guys are building. Maybe I have just been lucky not to hit a wall yet. Maybe I need to review Jeffrey's homestead video again.

cheers !

1 like
Sven2157's avatar

@vincej

Think of the Virtual Machine, like you would a Virtual Drive. Think of the BASE Box, like you would an .ISO. Essentially, you are just mounting a pre-configured web server, or image, on your computer. This pre-configured web server, can be run on any OS; Windows, Linux and MacOS. The benefit is that you can do so, utilizing the exact same web server environment, across all three OS's.

Homestead is just an image of a pre-configured server environment, that has all the necessary includes, that Laravel uses. Why Taylor chose Ubuntu, I am not sure of, as my hosting uses CentOS/RHEL, so I am not able to reliably use Homestead.

alenabdula's avatar

Question: Is the Ubuntu deployment server only or does it include the desktop ?

@vincej server edition of Ubuntu is "headless", meaning there's no graphic interface at all. Just a command line. And in most cases you would manage it by SSHing into it. I do this with my small Dell T100II media server running in my house and I'm running Ubuntu Server edition on it.

vincej's avatar
Level 15

Ok - I have done some study and I can see the benefits of Homestead over using Vagrant or vanilla VirtualBox. However, for me 80% of what it offers has no value to me. I'm a solo developer. I don't want to spend time learning NGinX, and I see no value in all the other bits and pieces. Perhaps when I have large scale complex clients, I can see that it would make sense.

Thanks for all your ideas !

jimmck's avatar

@vincej Totally agree!!! I wish it all just ran on MACs at this point (and even then). I upgraded a box to Ubuntu 15.04 just to keep in shape and its totally different everytime. Regardless of platform learn how it works to suit your needs.

vincej's avatar
Level 15

@jimmck

Hi jim ! Don't understand:

Regardless of platform learn how it works to suit your needs.

Are you telling me I should deploy anyways and learn it regardless ?

jaewun's avatar

@vincej, I believe he's saying if it's not broken, don't fix it.

If you have a platform that works for you and suits your needs then no worries.

Roni's avatar

I know this post has been beaten to death, but I'd ask a quick question along the original idea . We've got some older hardware sitting around... lots at work here. Is there an install shell script kicking around out there that would basically take your fresh install of headless ubuntu 14.04 and turn it into homestead? Before I'm burned at the stake not looking for a VM, just a possible script to make some thing useful out of a bunch of old machines.

Roni's avatar

@bashy, thanks, this is exactly what I was looking for! Great help as always.

bashy's avatar

@intrepidws Yes. All it does it run commands for you to install what you would if you did it manually. It's really not that special if you know Linux commands :)

Previous

Please or to participate in this conversation.