Installing Vagrant on CentOS

Get Started
1 hour
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you will take on the role of a DevOps Engineer working for OmniCorp. The Dev team needs Vagrant installed on one of their dev servers. The server already has Docker installed. Your mission is to install Vagrant and create a Vagrantfile that will install Ghost Blog.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install Vagrant

Install Vagrant:

yum -y install https://releases.hashicorp.com/vagrant/2.0.3/vagrant_2.0.3_x86_64.rpm
Create a Vagrantfile

Create a Vagrantfile:

 Vagrant.configure("2") do |config|
    config.vm.provider "docker" do |d|
    d.image = "ghost"
    d.ports = ["80:2368"]
  end
end
Deploy a Ghost Blog

Additional Resources

All work should be done in /root/.

Install Vagrant:

  1. In /root/, create a Vagrantfile. Your Vagrantfile should contain the following:

    • The file should be using the Docker provider.
    • The image should be set to use ghost.
    • The host port should be 80 which maps to 2368 on the container.
  2. Validate the Vagrantfile using the Vagrant CLI.

  3. Create a Docker container using the Vagrant CLI.

  4. Verify that your name shows when visiting the app in a browser.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!
Thanks for reaching out!

You’ll hear from us shortly. In the meantime, why not check out what our customers have to say about ACG?