0% found this document useful (0 votes)
57 views9 pages

Lab2 Vagrant

The document discusses using Vagrant to set up and manage virtual machine environments. It covers installing Vagrant and cloning a Git repo, configuring single-node and multi-node Vagrantfiles, starting and provisioning VMs, connecting to VMs via SSH, and stopping and destroying VMs.

Uploaded by

Aymen CHABBOUH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views9 pages

Lab2 Vagrant

The document discusses using Vagrant to set up and manage virtual machine environments. It covers installing Vagrant and cloning a Git repo, configuring single-node and multi-node Vagrantfiles, starting and provisioning VMs, connecting to VMs via SSH, and stopping and destroying VMs.

Uploaded by

Aymen CHABBOUH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

LPI DevOps Tools Engineer Labs

Lab2 - Vagrant
Lab environment setup
1. Make sure all the required softwares are installed :
◦ Git
◦ Vagrant
2. Clone the git repository : https://github.com/brahimhamdi/devops-lab

Vagrant with one node


3. cd to : devops-lab/vagrant-centos7-single
◦ Describe the content of Vagrantfile file .

1/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

4. Start and provision the vagrant environment with the command :


vagrant up

2/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

5. Output status of the vagrant machine with command :


vagrant status

◦ What is the VM hash ?

6. Connect to the VM with SSH


vagrant ssh or vagrant ssh <hash>

3/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

◦ What is the authentication method ? Keys pair : public + private


◦ What is the name and path of private key ?

7. Exit and stop the vagrant VM with the command:


vagrant halt or vagrant halt <hash>

Vagrant with multi-nodes


8. cd to ls devops-lab/vagrant-ubuntu20-multiple/

◦ Describe the content of Vagrantfile file.

4/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

◦ What is the difference between this Vagrantfile and that described in question 4 ?
9. Start and provision the vagrant environment.

5/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

6/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

10. Connect to each vagrant VM via SSH.

11. Exit and stop the each vagrant VM.

Other vagrant commands


12. Output global status Vagrant environments.

7/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

13. Stop and destroy all traces of the centos7 single-node vagrant machine.

8/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

◦ Is centos7 box deleted too ? List the vagrant boxes.

9/9 Brahim HAMDI

You might also like