Contents of DevOps

Essential DevOps tips, tricks, and best practices to improve your coding skills and write more efficient code.

DevOps Tools Setup Guide

βœ… 1. Tools Prerequisite Information

Q1. What are the common prerequisites required before installing DevOps tools on any OS?
A: Common prerequisites include:

  • Package manager installed (e.g., apt, yum, brew, choco)
  • Internet connectivity
  • Admin/sudo privileges
  • Essential utilities like curl, wget, git, unzip, tar
  • Open ports and firewall rules if networking is involved

Q2. Why is it important to update the package manager before installing software?
A: Updating the package manager ensures you're pulling the latest metadata and dependencies. This avoids installation errors and ensures compatibility.

Q3. How do you verify if a tool is installed correctly?
A: By using version commands like toolname --version or checking paths with which toolname or where toolname (Windows).


πŸ’» 2. Chocolatey for Windows

Q1. What is Chocolatey?
A: Chocolatey is a Windows package manager that allows you to install software using the command line, similar to apt on Ubuntu or yum on CentOS.

Q2. How do you install Chocolatey?
A: Open PowerShell as Administrator and run:

Set-ExecutionPolicy Bypass -Scope Process -Force; ` [System.Net.ServicePointManager]::SecurityProtocol = ` [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; ` iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Q3. How do you install software with Chocolatey?
A: Example:

choco install git -y

Q4. How does Chocolatey compare to other package managers?
A: Chocolatey brings Linux-style package management to Windows. It's scriptable, supports automation, and integrates with CI/CD tools.


🍺 3. Homebrew for macOS

Q1. What is Homebrew?
A: Homebrew is a package manager for macOS that allows easy installation of software via the terminal.

Q2. How do you install Homebrew?
A: Run this in the terminal:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Q3. How do you manage packages with Homebrew?
A:

  • Install: brew install git
  • Remove: brew uninstall git
  • Search: brew search node

🧰 4. Installing Softwares

Q1. What are the challenges in installing software across OSes?
A: Challenges include dependency issues, incompatible packages, permissions, and different command syntax.

Q2. How do you handle dependency issues?
A: Use the package manager to automatically install dependencies or manually resolve them if needed.

Q3. Difference between using a package manager and compiling from source?
A:

  • Package Manager: Fast, easy, managed by OS.
  • Source Compilation: Customizable, used when packages are unavailable or need config changes.

🐧 5. Tools Prerequisites for CentOS 9 / RHEL 9 / Rocky Linux

Q1. What’s the default package manager?
A: dnf (Dandified YUM)

Q2. How do you enable EPEL on RHEL systems?
A:

sudo dnf install epel-release -y

Q3. How to install common tools?

sudo dnf install git curl wget unzip -y

🐧 6. Tools Prerequisites for Ubuntu 24

Q1. How is Ubuntu package management different?
A: Ubuntu uses apt as its package manager, which fetches packages from .deb repositories.

Q2. What’s the difference between apt update and apt upgrade?
A:

  • apt update: Updates package metadata.
  • apt upgrade: Installs latest versions of installed packages.

Q3. Install basic tools on Ubuntu 24?

sudo apt update && sudo apt install git curl wget unzip -y

🌐 7. Signups

Q1. What platforms should you sign up for in DevOps?
A: GitHub, Docker Hub, AWS, Terraform Cloud, Jenkins, and any CI/CD or container registry platforms.

Q2. Why sign up early?
A: To access APIs, create repositories, upload Docker images, and explore cloud infrastructure hands-on.

Q3. How to securely manage tokens or credentials?
A: Use password managers, .env files, secret managers like AWS Secrets Manager or HashiCorp Vault.


☁️ 8. AWS Setup

Q1. First step when setting up AWS?
A: Create an AWS account, set up billing, and create a root user with MFA enabled. Then create IAM users for daily use.

Q2. How to manage AWS credentials?
A:

  • Use aws configure to store credentials locally.
  • Store securely in .aws/credentials file.
  • Rotate and delete unused credentials.

Q3. Essential AWS services for DevOps beginner?
A:

  • EC2: Virtual servers
  • S3: Storage
  • IAM: Permissions
  • CloudWatch: Monitoring
  • CodePipeline: CI/CD

Q4. What are IAM roles and policies?
A: IAM roles are used to grant temporary access to services. Policies define what actions are allowed or denied.


🎬 9. Outro / Wrap-up

Q1. Next steps after tool setup?
A: Start learning containerization (Docker), orchestration (Kubernetes), CI/CD pipelines, IaC (Terraform), and monitoring/logging.

Q2. How to make your setup repeatable?
A: Use shell scripts, Dockerfiles, Ansible playbooks, or Terraform to automate the setup.

Q3. Example of a shell script to install common tools?

#!/bin/bash sudo apt update sudo apt install git curl wget unzip -y