Jump to navigation Jump to main content

Tools That we Use – Part 2 – Virtualization

Development
Tools That we Use – Part 2 – Virtualization

This post is the second part of our blog series in where we talk about the tools we use. Last time we covered the topic of Git, and today we are talking about Virtualization.

What is virtualization and why do we use it?

Virtualization is the process of running a virtual instance of a computer system in a layer abstracted from the actual hardware. A virtual instance, also known as a virtual machine, is an emulated equivalent of a computer system that runs within another computer system.

There are two main reasons why we use virtualization. The first one is the emulation property. The virtual machine can run on any computer regardless of hardware. In other words, there is no risk of hardware variation, and software is always developed in the same conditions.

The second one is that we can store the state of a virtual machine at any time. Storing a virtual machine state (better known as a snapshot) is a useful backup technique and it also provides portability of virtual machines between different hosts.

What do we use for virtualization?

Body image 1

Our virtualization workflow is made up of three components:

  1. Hypervisor, or hardware virtualization software, is computer software that creates and runs virtual machines. A computer on which the hypervisor runs is called a host machine. A virtual machine that runs within a hypervisor is called a guest machine. The hypervisor we use is Parallels Desktop for Mac.
  2. Vagrant is open-source software for building and maintaining portable virtual software development environments. Vagrant has an easy-to-use workflow focused on automation. It provides a simple, elegant way to manage and provision virtual machines.
  3. The Vagrant box is an easy-to-configure and portable work environment. We use Laravel Homestead pre-packaged Vagrant box that provides a development environment without requiring you to install PHP, a web server, or any other server software on your local machine. Vagrant boxes are completely disposable so there is no concern about messing up your local operating system. If something goes wrong, you can destroy and re-create the box.

 

Parallels Desktop for Mac

Parallels Desktop for Mac was the first software product to bring mainstream virtualization to Macintosh computers utilizing Apple-Intel architecture. The most recent version is version 16, released on August 11th, 2020. Version 16 brings support for the new macOS “Big Sur” architecture. It also brings easier export of a virtual machine in a compressed format ready for transfer to another Mac.

All virtual machines are managed through Parallels Control Center. With Control Center you can clone a virtual machine if you need an exact copy of it. You can make backups of virtual machines to protect yourself from data loss. As already mentioned, you can save a snapshot of a virtual machine at any time. If you don’t need a virtual machine anymore, you can permanently remove it from your computer. To make virtual machines more distinctive inside the Control Center you can also change the virtual machine icon or change the virtual machine name.

Body image 2

Vagrant and Laravel Homestead

Vagrant uses provisioners and providers to manage development environments. The provider (our hypervisor) is a service that Vagrant uses to set up and create virtual environments. Provisioners are tools that help us customize the configuration of virtual environments.

Vagrant sits on top of the virtualization software as a wrapper and helps the developer to easily interact with the provider. It is useful in software development because it isolates dependencies and their configuration within a single disposable, consistent environment. To make this possible, we write a Vagrantfile.

The primary function of Vagrantfile is to describe the type of machine required for a project and how to configure and provision it. Vagrant is meant to run within one Vagrantfile per project and it is supposed to be committed to version control. If you want to learn what version control is, check part 1 of the tools we use. This allows other developers involved to run the same development environments, against the same dependencies, all configured the same way regardless of the hardware and host OS. Just run vagrant up, and you will be on your way.

Although we can use any other pre-packaged Vagrant box, we use Laravel Homestead. Homestead has proven to be the best because it comes bundled with all the software necessary for the development of web applications.

 

Conclusion

By using Vagrant we significantly reduce the time needed for the preparation of our working environments. When using a pre-packaged Vagrant box there is no need for us to download the OS, manually install it, go inside the OS, and set up applications needed for software development. The creation of the work environment is made just by running a few commands. Running existing projects is even easier. Just download project files and run vagrant up.

We use Homestead as our box of choice, but you can visit this link to find the box that best suits your needs. Also, you are not limited to using Parallels as your provider, although our experience with Parallels showed us that it is faster and more reliable than its comparable providers.


Like what you read?

Spread the knowledge and share this post
  • Facebook
  • Linkedin
  • Share

More blog posts

View all posts ->
->
->
Design

Website Redesign for Krevatin Tourist Agency from Novigrad, Istria

Did you know that a poorly designed website can hurt conversion and sales? An unattractive website deserves a website redesign in order to prevent people from leaving your site.No matter what your company size or industry is, it is important to approach redesign strategically. Explore what is not working, define your priorities, expectations, and goals.
Continue reading ->
Design

Why Should Every Designer Prototype and Which Prototyping Tools to Use

A popular phrase by IDEO company says that “If a picture is worth a thousand words, a prototype is worth 1000 meetings.”Designers are bound to design websites, web applications and all kinds of different products based on clients’ requests. Since those requests are not often clear and solutions are not always obvious, this is then followed by a series of meetings, phone calls,
Continue reading ->
View all