What is the difference between a Vagrant Provider and a Vagrant Provisioner?
Asked Answered
M

2

6

I think the words "Provider" and "Provisioner" sound very similar which may lead to confusion especially among beginners confronted with documentation where both terms are mixed up or used synonymous (already seen on the net). Even more confusing it gets when beginners see Docker as Provider and Docker as Provisioner mentioned on Vagrant´s website.

So this question is actually about three things:

  1. What is a Vagrant Provider?

  2. What is a Vagrant Provisioner?

  3. How does Docker fit in here?

    • What could be a typical use case for Docker as Vagrant Provider?

    • What could be a typical use case for Docker as Vagrant Provisioner?

I appreciate explanations, examples and links for further reading which illustrate things clearly (even for noobs).

Mix answered 10/8, 2016 at 11:51 Comment(0)
W
7
  1. The underlying virtualization solutions are called providers. To work with Vagrant, you have to install at least one provider (e.g. Virtualbox, VMWare)

  2. Provisioning in Vagrant is the process of automatic installation and configuration of the system within during $ vagrant up and the tools to perform this operation are called provisioners (e.g. Shell scripts, Chef, Puppet).

Werewolf answered 10/8, 2016 at 12:26 Comment(2)
I added the Docker aspect to my question, so may be you want to add some notes about that to your answer, too.Mix
It is safe to say that Vagrant is a unified frontend to virtualization backends/solutions?Liddy
P
1

Provider vs Provisioner

Vagrant uses Providers such as hypervisors (e.g VirtualBox, Hyper-V) or Docker to create and run virtual environments. Vagrant uses Provisioners (e.g Ansible, Puppet, Chef) as configuration tools to customize these environments, e.g carrying out installs and starting apps.

How does Docker fit in?

If a hypervisor is used as a Provider, the environment that is created is a virtual machine based on a self-contained image of an operating system environment as provided by a “Vagrantbox” (aka “box”). The box is utilized by Vagrant to create a dedicated kernel and set of operating system processes for the virtual machine.

If Docker is used as a Provider and Docker is available on the host system, Vagrant manages and runs containers directly on the host system. Here Vagrant is not actually building and managing a virtual machine but rather is working with the Docker engine running on the host to manage and build Docker containers.

Perdita answered 26/1, 2022 at 2:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.