Day 3: Exploring Vagrant and Linux Server Setup

Welcome Back to My DevOps Journey!

Hello everyone! Welcome to Day 3 of my 30-day DevOps journey. Today, I’ll share insights from section 5 of the “DevOps Beginners to Advanced with Projects” course by Imran Teli. This section covers the fundamentals o…


This content originally appeared on DEV Community and was authored by Kanavsingh

Welcome Back to My DevOps Journey!

Hello everyone! Welcome to Day 3 of my 30-day DevOps journey. Today, I'll share insights from section 5 of the "DevOps Beginners to Advanced with Projects" course by Imran Teli. This section covers the fundamentals of Vagrant and Linux Server setup, which are crucial tools for creating reproducible development environments.

Understanding Vagrant

What is Vagrant?
Vagrant is an open-source tool for building and maintaining portable virtual development environments. It provides a simple and consistent workflow for managing virtual machines, making it easy to work with different operating systems and configurations.

Why Use Vagrant?
Consistency: Vagrant ensures that your development environments are consistent across all team members and production environments.
Portability: Vagrant environments can be easily shared and replicated.
Automation: Vagrant automates the setup of development environments, saving time and reducing errors.

Getting Started with Vagrant

Installation:

Download and install Vagrant from the official website.
Install a hypervisor such as VirtualBox.
Creating a Vagrantfile:

Initialize a new Vagrant project:

vagrant init

Edit the Vagrantfile to configure your VM. For example:

In ruby

Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.network "private_network", type: "dhcp"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
end

-- Managing the VM:

  • Start the VM:

vagrant up

  • SSH into the VM:

vagrant ssh

  • Halt the VM:

vagrant halt

-- Setting Up a Linux Server

Why Linux Server?
Linux servers are widely used in the industry due to their stability, security, and performance. Understanding how to set up and manage a Linux server is essential for any DevOps professional.

Basic Linux Server Setup
Installing the Server:

Choose a Linux distribution (e.g., Ubuntu Server).
Install the server using the distribution's installation media.
Configuring the Server:

Update the system:

sudo apt update && sudo apt upgrade

  • Set up a firewall:
    sudo ufw allow OpenSSH
    sudo ufw enable

  • Create a new user:

sudo adduser newuser
sudo usermod -aG sudo newuser

  • Setting Up SSH Access:

Generate SSH keys on your local machine:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

  • Copy the public key to the server: ssh-copy-id newuser@your_server_ip

My Learning Experience:-
Exploring Vagrant and setting up a Linux server has been incredibly informative. Vagrant's ability to create consistent and portable development environments simplifies collaboration and deployment processes. Understanding Linux server setup is crucial for managing production environments and ensuring system reliability.

What's Next?
Tomorrow, I'll dive into Section 6 and maybe Section 7, a critical aspect of modern DevOps practices. Stay tuned for more exciting insights!

Connect with Me
Feel free to connect with me on LinkedIn for more updates and to join the conversation. Let's learn and grow together in this exciting field of DevOps!


This content originally appeared on DEV Community and was authored by Kanavsingh


Print Share Comment Cite Upload Translate Updates
APA

Kanavsingh | Sciencx (2024-07-31T18:08:23+00:00) Day 3: Exploring Vagrant and Linux Server Setup. Retrieved from https://www.scien.cx/2024/07/31/day-3-exploring-vagrant-and-linux-server-setup/

MLA
" » Day 3: Exploring Vagrant and Linux Server Setup." Kanavsingh | Sciencx - Wednesday July 31, 2024, https://www.scien.cx/2024/07/31/day-3-exploring-vagrant-and-linux-server-setup/
HARVARD
Kanavsingh | Sciencx Wednesday July 31, 2024 » Day 3: Exploring Vagrant and Linux Server Setup., viewed ,<https://www.scien.cx/2024/07/31/day-3-exploring-vagrant-and-linux-server-setup/>
VANCOUVER
Kanavsingh | Sciencx - » Day 3: Exploring Vagrant and Linux Server Setup. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/31/day-3-exploring-vagrant-and-linux-server-setup/
CHICAGO
" » Day 3: Exploring Vagrant and Linux Server Setup." Kanavsingh | Sciencx - Accessed . https://www.scien.cx/2024/07/31/day-3-exploring-vagrant-and-linux-server-setup/
IEEE
" » Day 3: Exploring Vagrant and Linux Server Setup." Kanavsingh | Sciencx [Online]. Available: https://www.scien.cx/2024/07/31/day-3-exploring-vagrant-and-linux-server-setup/. [Accessed: ]
rf:citation
» Day 3: Exploring Vagrant and Linux Server Setup | Kanavsingh | Sciencx | https://www.scien.cx/2024/07/31/day-3-exploring-vagrant-and-linux-server-setup/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.