Laravel Homestead: An Introduction
Homestead is a project designed to facilitate the work of programmers creating applications and websites in the Laravel framework. Its main task is to save time by testing the product at its creation stage. Homestead in English means farm (farm) or home. Thus, it is a collection of functional packages that make up the whole system designed to serve human beings during programming.
Homestead is a ready-to-use operating system with installed programs that you need to run your application. The configured system is started by Virtualbox. This creates a virtual system available via the graphical interface or SSH connection. Homestead on the day of this article is a collection of programs PHP7.0, MySQL, Composer, Redis and other programs installed on Linux Ubuntu 14. Homestead programs are installed to support the applications developed in the Laravel framework. Setting up a ready, configured, and operating system other than a working workstation takes just minutes.
Imagine a simple example of life taken. There is a project written in Laravel. Programming and coding is done in a local Windows environment, while the application runs on a production server running Linux. Therefore, it is necessary to localize the application in Linux before the application is released to the production server. Local application testing on Linux, among other things, will exclude unexpected errors that occur when running applications on a production server. Therefore, it is necessary to have a local Linux system to test the applications created in the Laravel framework. Instead of installing Linux locally next to Windows for testing purposes, you just need to install Virtualbox and Vagrant,
Imagine that the developer creates several serious and elaborate projects. Each project will run on a production server with individual program configurations. To have many local systems with different configurations of programs will simply put a lot of virtual systems.
Vagrant a Homestead
Vagrant is a program that supports the creation of virtual systems in Virtualbox. Vagrant, based on a package (containing a configured system image with installed programs) and a configuration file (usually VagrantFile), creates a new virtual system in Virtualbox. Homestead is a program to simplify the launch and configuration of Vagrant's virtual system. Full configuration through Vagrant for beginners is often difficult. Against this difficulty was implemented Homestead project.
Running a virtual system consists of several simple steps. The basic and one-off operation is to install Virtualbox and Vagrant. These programs are available on Windows and Linux. Following are the steps for starting a virtual system:
- Download the Homestead program.
- Virtual System Configuration.
- Launch Vagrant, which creates a virtual system in Virtualbox based on configuration.
- DNS configuration.
- Running an application running on a virtual system.
These are the general steps for starting a virtual server. Installing Virtualbox, Vagrant, and a short Homestead configuration, and several commands replace slow-paced and long-standing preparation of local Linux systems, such as Windows.
Knowing the virtual system and its general application, it is easier to start a tooling adventure that greatly facilitates the developer's work. Homestead is being developed and supported by many people from all over the world. At the time of writing this article, the discussed virtual system is available with the latest programs such as PHP7.0 installed. Also note that Virtualbox and Vagrant are free programs, including commercial applications.