Comprehensive DevOps guide for beginners! Dive into the world of DevOps with step-by-step tutorials, best practices, and hands-on exercises. Elevate your skills in automation, CI/CD, and cloud technologies. Perfect for those starting their DevOps journey!
git clone https://github.com/fessy1der/Learning-Devops-Guide-for-beginners.gitThis DevOps guide is designed for anyone starting their DevOps journey, whether you're non-technical, transitioning from another field, or already working in tech. It covers foundational theory, prerequisites including Linux, Git, networking, and SDLC, plus programming fundamentals in Python, Go, and Bash scripting. The guide emphasizes that automation is central to DevOps work, requiring coding knowledge to automate repetitive tasks. All curated materials are free, compiled from professionals and major tech platforms, helping learners build the essential skills and knowledge needed to enter DevOps engineering roles.
["Identify your learning goal: Choose a specific DevOps topic (e.g., 'Docker basics' or 'Terraform for AWS') and replace [TOPIC_AREA] in the prompt with it.","Customize the project: Replace [PROJECT_NAME] with your desired project name (e.g., 'TodoApp' or 'WeatherService'). Adjust the example code/files to match your project type (e.g., use Node.js instead of Python if needed).","Follow the 5-step exercise: Copy-paste the prompt into your AI assistant (Claude/ChatGPT) and execute each step sequentially. Use the provided code snippets and commands directly in your terminal/IDE.","Iterate and experiment: After completing the guide, modify the project (e.g., add a database, switch to Kubernetes) to deepen your understanding. Use the 'Common Pitfalls' section to troubleshoot issues.","Share and get feedback: Post your project on GitHub or a DevOps community (e.g., r/devops) and ask for reviews. Use the 'Next Steps' section to plan your next learning milestone."]
Learning DevOps theory and foundational concepts from scratch
Acquiring prerequisite knowledge in Linux, Git, and networking
Building automation skills through Python, Go, or Bash scripting
Preparing for DevOps role transitions from other technical roles
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/fessy1der/Learning-Devops-Guide-for-beginnersCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Create a beginner-friendly DevOps learning guide that covers [TOPIC_AREA: e.g., 'CI/CD pipelines', 'containerization with Docker', 'Kubernetes basics', 'infrastructure as code with Terraform', 'monitoring with Prometheus/Grafana']. Include: (1) A 5-step hands-on exercise to implement the concept, (2) Common pitfalls and how to avoid them, (3) Recommended free tools/resources to practice. Structure the guide as a step-by-step tutorial with code snippets, terminal commands, and visual diagrams where applicable. Use [PROJECT_NAME] as the placeholder for the example project you'll build throughout the guide. Example: 'Create a beginner-friendly DevOps learning guide for setting up a CI/CD pipeline using GitHub Actions. Include a 5-step exercise to deploy a [PROJECT_NAME] web app to AWS, common CI/CD mistakes, and free tools like GitHub, AWS Free Tier, and VS Code.'
### **Beginner's Guide to CI/CD with GitHub Actions: Deploying a Flask App to AWS**
Welcome to your first DevOps project! In this guide, we'll build a **continuous integration and continuous deployment (CI/CD) pipeline** using GitHub Actions to automatically test and deploy a simple [PROJECT_NAME] Flask web application to AWS Elastic Beanstalk. By the end, you'll have a fully automated workflow that runs tests on every code push and deploys to production with zero manual steps.
---
### **Step 1: Set Up Your Project Structure**
First, create a new GitHub repository for your [PROJECT_NAME] app. Clone it locally and set up the following structure:
```
[PROJECT_NAME]/
├── app.py # Flask application
├── requirements.txt # Python dependencies
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Actions workflow
└── README.md # Project documentation
```
**Key Files:**
- `app.py`: A simple Flask app with one endpoint (`/`).
```python
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return "Hello from [PROJECT_NAME]! CI/CD is working!"
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)
```
- `requirements.txt`:
```
flask==2.3.2
```
---
### **Step 2: Configure AWS Elastic Beanstalk**
1. **Sign up for AWS Free Tier** (if you don’t have an account): [AWS Free Tier](https://aws.amazon.com/free/).
2. **Create an Elastic Beanstalk environment**:
- Go to the [AWS Elastic Beanstalk Console](https://console.aws.amazon.com/elasticbeanstalk/).
- Click **Create Application** and name it `[PROJECT_NAME]-prod`.
- Choose **Python** as the platform and **Python 3.8** as the version.
- Select **Free Tier eligible** instance type (e.g., `t3.micro`).
- Configure the environment with default settings and **Create**.
3. **Note your environment URL** (e.g., `http://[PROJECT_NAME]-prod.elasticbeanstalk.com`).
---
### **Step 3: Create GitHub Secrets for AWS Credentials**
To securely connect GitHub Actions to AWS, store your AWS credentials as secrets in your GitHub repository:
1. Go to your repo **Settings > Secrets and variables > Actions > New repository secret**.
2. Add these secrets:
- `AWS_ACCESS_KEY_ID`: Your AWS access key (create one in IAM if needed).
- `AWS_SECRET_ACCESS_KEY`: Your AWS secret key.
- `AWS_REGION`: Your AWS region (e.g., `us-east-1`).
- `EB_APPLICATION_NAME`: Your Elastic Beanstalk app name (`[PROJECT_NAME]-prod`).
- `EB_ENVIRONMENT_NAME`: Your Elastic Beanstalk environment name (same as above).
---
### **Step 4: Write the GitHub Actions Workflow**
Create `.github/workflows/deploy.yml` with this YAML:
```yaml
name: CI/CD Pipeline for [PROJECT_NAME]
on:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
python -m pytest # Add pytest if you write tests
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Deploy to Elastic Beanstalk
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: ${{ secrets.EB_APPLICATION_NAME }}
environment_name: ${{ secrets.EB_ENVIRONMENT_NAME }}
version_label: ${{ github.sha }}
region: ${{ secrets.AWS_REGION }}
deployment_package: deploy.zip
```
**Key Notes:**
- The workflow runs on every push to `main`.
- The `test` job runs first to ensure code quality.
- The `deploy` job only runs if tests pass (`needs: test`).
- Secrets are used to avoid hardcoding credentials.
---
### **Step 5: Test and Deploy!**
1. **Push your code**:
```bash
git add .
git commit -m "Initial CI/CD setup"
git push origin main
```
2. **Monitor the workflow**: Go to your repo’s **Actions** tab to see the pipeline in action. You should see:
- A green checkmark if tests pass.
- A deployment to Elastic Beanstalk if tests succeed.
3. **Verify the deployment**: Visit your Elastic Beanstalk environment URL. You should see:
```
Hello from [PROJECT_NAME]! CI/CD is working!
```
---
### **Common Pitfalls and Fixes**
| **Pitfall** | **Solution** |
|---------------------------------------|--------------------------------------------------------------------------------------------------|
| AWS credentials not working | Double-check secrets in GitHub and IAM permissions (ensure the user has `AWSElasticBeanstalkFullAccess`). |
| Flask app not responding | Check Elastic Beanstalk logs (go to **Logs** in the AWS console) for errors. |
| Workflow failing silently | Add debug steps (e.g., `echo "Deploying..."`) to see where it breaks. |
| Slow deployments | Use Elastic Beanstalk’s **Saved Configurations** to pre-configure your environment. |
---
### **Next Steps and Resources**
**To Level Up:**
1. Add automated testing with `pytest` (e.g., test the `/` endpoint).
2. Use **Docker** to containerize your app for consistent deployments.
3. Implement **blue-green deployments** for zero-downtime updates.
**Free Tools/Resources:**
- [GitHub Actions Documentation](https://docs.github.com/en/actions)
- [AWS Elastic Beanstalk Tutorials](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/tutorials.html)
- [Flask Testing Guide](https://flask.palletsprojects.com/en/2.3.x/testing/)
- [DevOps Roadmap for Beginners](https://github.com/milanm/DevOps-Roadmap)
---
**You’ve just built your first CI/CD pipeline!** 🎉 This is the foundation for modern DevOps practices. Try modifying the workflow to add more steps (e.g., linting, security scans) or deploy to a different cloud provider like Azure or GCP. Happy automating!Automate your browser workflows effortlessly
Manage microservices traffic and enhance security with comprehensive observability features.
Get more done every day with Microsoft Teams – powered by AI
Orchestrate workloads with multi-cloud support, job scheduling, and integrated service discovery features.
Monitor frontend performance and debug effectively with session replay and analytics.
Cloud computing platform with 200+ services
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan