Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7ff55d7
Update README.md
Cre-eD May 15, 2025
a057c02
Publish labs 01-06
Cre-eD Jan 7, 2026
2fbd476
Add lectures 11-16, quizzes & update lab18 landing page
Cre-eD Jan 17, 2026
9a363bf
Updated Looking Ahead with correct lab descriptions
Cre-eD Jan 17, 2026
e391e97
Updated the Course Completion section to mention 16-18 labs
Cre-eD Jan 17, 2026
888cd53
Updated the duration badge
Cre-eD Jan 17, 2026
2b850a9
Removed duplicates and updated all references
Cre-eD Jan 17, 2026
c871131
Updated lab1
Cre-eD Jan 18, 2026
d57fde0
Update lecs
Cre-eD Jan 22, 2026
712fbed
Complete lab1
ostxxp Jan 27, 2026
93475b6
complete lab 2
ostxxp Feb 4, 2026
514face
feat(lab03): add CI and badge
ostxxp Feb 11, 2026
6669194
docs(lab03): complete documentation
ostxxp Feb 11, 2026
e62d7d6
Add lab4
ostxxp Feb 16, 2026
c8eea87
chore: remove terraform providers from repo and update gitignore
ostxxp Feb 16, 2026
821ffe8
edit `.gitignore`
ostxxp Feb 16, 2026
dde21db
complete lab05
ostxxp Feb 22, 2026
0bd2b31
Complete Lab 6: Advanced Ansible & CI/CD
ostxxp Feb 24, 2026
4d8d5c7
feat: add centralized logging stack with grafana loki and promtail
ostxxp Mar 11, 2026
63bd08b
fix: update github actions triggers for labs 4-7
ostxxp Mar 11, 2026
5c61016
ci: add ansible and terraform workflows
ostxxp Mar 11, 2026
cd91b83
fix: add ansible vault password to deploy workflow
ostxxp Mar 11, 2026
c5d5233
fix: use webservers group in ansible deploy workflow
ostxxp Mar 11, 2026
ccb1122
fix: build amd64 docker image with correct app name
ostxxp Mar 11, 2026
03cae13
fix: increase app startup wait time in ansible deploy
ostxxp Mar 11, 2026
52c87f8
fix: use repo ssh public key for terraform validate
ostxxp Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions .github/workflows/ansible-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Ansible Deploy

on:
push:
branches:
- main
- master
- lab6
- lab06
- lab7
- lab07
paths:
- "ansible/**"
- ".github/workflows/ansible-deploy.yml"
pull_request:
paths:
- "ansible/**"
- ".github/workflows/ansible-deploy.yml"

concurrency:
group: ansible-deploy-${{ github.ref }}
cancel-in-progress: true

jobs:
syntax-check:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Ansible
run: |
python -m pip install --upgrade pip
pip install ansible

- name: Write vault password file
run: |
echo "${{ secrets.ANSIBLE_VAULT_PASSWORD }}" > ~/.vault_pass.txt
chmod 600 ~/.vault_pass.txt

- name: Show Ansible version
run: ansible --version

- name: Syntax check provision playbook
working-directory: ansible
run: ansible-playbook -i inventory/hosts.ini playbooks/provision.yml --syntax-check --vault-password-file ~/.vault_pass.txt

- name: Syntax check deploy playbook
working-directory: ansible
run: ansible-playbook -i inventory/hosts.ini playbooks/deploy.yml --syntax-check --vault-password-file ~/.vault_pass.txt

deploy:
needs: syntax-check
if: github.event_name == 'push'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H "${{ secrets.SERVER_HOST }}" >> ~/.ssh/known_hosts

- name: Write vault password file
run: |
echo "${{ secrets.ANSIBLE_VAULT_PASSWORD }}" > ~/.vault_pass.txt
chmod 600 ~/.vault_pass.txt

- name: Write inventory from secrets
run: |
cat > ansible/inventory/hosts.ini <<INVENTORY
[webservers]
app-server ansible_host=${{ secrets.SERVER_HOST }} ansible_user=${{ secrets.SERVER_USER }} ansible_ssh_private_key_file=~/.ssh/id_rsa
INVENTORY

- name: Install Ansible
run: |
python -m pip install --upgrade pip
pip install ansible

- name: Run provision playbook
working-directory: ansible
run: ansible-playbook -i inventory/hosts.ini playbooks/provision.yml --vault-password-file ~/.vault_pass.txt

- name: Run deploy playbook
working-directory: ansible
run: ansible-playbook -i inventory/hosts.ini playbooks/deploy.yml --vault-password-file ~/.vault_pass.txt
108 changes: 108 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Python CI (Lab03)

on:
push:
branches:
- main
- master
- lab3
- lab03
- lab4
- lab04
- lab5
- lab05
- lab6
- lab06
- lab7
- lab07
paths:
- "app_python/**"
- "monitoring/**"
- "ansible/**"
- "playbooks/**"
- ".github/workflows/python-ci.yml"
pull_request:
paths:
- "app_python/**"
- "monitoring/**"
- "ansible/**"
- "playbooks/**"
- ".github/workflows/python-ci.yml"

concurrency:
group: python-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
test-lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: app_python

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "app_python/requirements.txt"

- name: Install deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Lint (ruff)
run: ruff check .

- name: Tests
run: pytest -q

docker-build-push:
needs: test-lint
runs-on: ubuntu-latest
if: github.event_name == 'push' && (
github.ref_name == 'main' ||
github.ref_name == 'master' ||
github.ref_name == 'lab3' ||
github.ref_name == 'lab03' ||
github.ref_name == 'lab4' ||
github.ref_name == 'lab04' ||
github.ref_name == 'lab5' ||
github.ref_name == 'lab05' ||
github.ref_name == 'lab6' ||
github.ref_name == 'lab06' ||
github.ref_name == 'lab7' ||
github.ref_name == 'lab07'
)

steps:
- uses: actions/checkout@v4

- name: Set version (CalVer)
run: |
echo "CALVER=$(date +%Y.%m)" >> $GITHUB_ENV
echo "BUILD=${{ github.run_number }}" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build & Push
uses: docker/build-push-action@v6
with:
context: ./app_python
file: ./app_python/Dockerfile
platforms: linux/amd64
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/devops-lab02-python:${{ env.CALVER }}.${{ env.BUILD }}
${{ secrets.DOCKER_USERNAME }}/devops-lab02-python:latest
49 changes: 49 additions & 0 deletions .github/workflows/terraform-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Terraform CI

on:
push:
branches:
- main
- master
- lab4
- lab04
- lab5
- lab05
- lab6
- lab06
- lab7
- lab07
paths:
- "terraform/**"
- ".github/workflows/terraform-ci.yml"
pull_request:
paths:
- "terraform/**"
- ".github/workflows/terraform-ci.yml"

concurrency:
group: terraform-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
terraform-checks:
runs-on: ubuntu-latest
defaults:
run:
working-directory: terraform

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Terraform
uses: hashicorp/setup-terraform@v3

- name: Terraform fmt check
run: terraform fmt -check -recursive

- name: Terraform init
run: terraform init -input=false

- name: Terraform validate
run: terraform validate
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
__pycache__/
*.py[cod]
venv/
__MACOSX/
*.log

.vscode/
.idea/

.obsidian

.DS_Store
.env

terraform/.terraform/
terraform/.terraform.lock.hcl
terraform/terraform.tfstate
terraform/terraform.tfstate.*
**/.terraform/*
**/*.tfstate
**/*.tfstate.*

pulumi/venv/
Loading
Loading