hello

kskndoiasudfau

jjsdfiosajdfoa

oisurwe9

🚀 Introduction to DevOps

DevOps is a set of practices that combines software development (Dev) and IT operations (Ops). It aims to shorten the system development life cycle and provide continuous delivery with high software quality.

🔧 Installing Jenkins on Ubuntu

To get started with DevOps automation, Jenkins is one of the most popular tools. You can install Jenkins on Ubuntu by running the following commands:


sudo wget -O /etc/apt/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian/jenkins.io-2023.key
echo "deb [signed-by=/etc/apt/keyrings/jenkins-keyring.asc]" \
  https://pkg.jenkins.io/debian binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins
  

⚙️ Setting Up a CI/CD Pipeline

Continuous Integration and Continuous Deployment (CI/CD) are key DevOps practices. With Jenkins installed, you can now set up a pipeline:


pipeline {
  agent any
  stages {
    stage('Build') {
      steps {
        echo 'Building...'
      }
    }
    stage('Test') {
      steps {
        echo 'Running tests...'
      }
    }
    stage('Deploy') {
      steps {
        echo 'Deploying application...'
      }
    }
  }
}
  

🐳 Docker in DevOps

Docker is used to containerize applications. Here’s a sample Dockerfile to run a Node.js app:


FROM node:18
WORKDIR /app
COPY . .
RUN npm install
EXPOSE 3000
CMD ["npm", "start"]
  

📦 Conclusion

DevOps streamlines the development and deployment process, leading to faster delivery and better quality software. Mastering tools like Jenkins, Docker, and CI/CD pipelines is essential for any modern DevOps engineer.