Objective: Master Linux command line
Tasks:
- Navigate file system
- Create and manage files
- Use text processing tools
- Manage processes
- Configure networking
Commands to Practice:
# File operations
ls -lah
find /var/log -name "*.log" -mtime -7
grep -r "error" /var/log
# Process management
ps aux | grep nginx
kill -9 PID
systemctl status nginx
# Networking
ip addr show
netstat -tulpn
curl -I https://example.comObjective: Containerize an application
Tasks:
- Create Dockerfile
- Build image
- Run container
- Use volumes
- Network containers
Dockerfile Example:
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]Commands:
docker build -t myapp .
docker run -d -p 3000:3000 myapp
docker exec -it container_id shObjective: Build CI/CD pipeline
Tasks:
- Set up GitHub Actions
- Configure build steps
- Add tests
- Deploy to staging
Pipeline Example:
name: CI/CD
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: docker build -t app .
- name: Test
run: docker run app npm testObjective: Provision infrastructure with Terraform
Tasks:
- Write Terraform configuration
- Initialize Terraform
- Plan changes
- Apply infrastructure
Terraform Example:
provider "aws" {
region = "us-east-1"
}
resource "aws_instance" "web" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
}Objective: Deploy application on Kubernetes
Tasks:
- Create deployment
- Expose service
- Scale application
- View logs
Deployment Example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.21- Completed all labs
- Documented learnings
- Troubleshot issues
- Applied best practices
Next: Complete CI/CD labs.