Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d36d120
feat: implement lab01 devops info service
MrDeBuFF Jan 27, 2026
ad9c4b6
Merge pull request #1 from MrDeBuFF/lab01
MrDeBuFF Feb 4, 2026
9bd15ae
feat: implement lab02 docker containerization
MrDeBuFF Feb 4, 2026
a0cc17f
Merge pull request #2 from MrDeBuFF/lab02
MrDeBuFF Feb 10, 2026
6e09c97
feat: add CI/CD, add tests, start documentation (in progress)
MrDeBuFF Feb 11, 2026
d46150d
fix: change location of workflow file
MrDeBuFF Feb 11, 2026
371a805
fix: change Snyk configuration in workflow
MrDeBuFF Feb 11, 2026
3f2857d
fix: change Snyk to cli version
MrDeBuFF Feb 11, 2026
2cd9df5
docs: complete LAB03.md and README.md
MrDeBuFF Feb 11, 2026
3960809
Merge pull request #3 from MrDeBuFF/lab03
MrDeBuFF Feb 18, 2026
cad2426
Merge branch 'inno-devops-labs:master' into master
MrDeBuFF Feb 18, 2026
d6d828a
feat: add Terraform and Pulumi, add documentation and CI for Terraform
MrDeBuFF Feb 19, 2026
ff6b896
fix: fix lint in terraform file
MrDeBuFF Feb 19, 2026
870a785
fix: delete yandex plugins from TFLint checks
MrDeBuFF Feb 19, 2026
fb5c12c
fix: pass TFLint checks
MrDeBuFF Feb 19, 2026
41b8372
Merge pull request #5 from MrDeBuFF/lab04
MrDeBuFF Feb 25, 2026
0854e0f
Merge branch 'inno-devops-labs:master' into master
MrDeBuFF Feb 25, 2026
d7da405
feat: complete lab05 - ansible fundamentals
MrDeBuFF Feb 25, 2026
d8b82ad
Merge pull request #6 from MrDeBuFF/lab05
MrDeBuFF Mar 5, 2026
e3e362e
feat: add lab6 task + check CI/CD
MrDeBuFF Mar 5, 2026
89106cd
fix: fix CI/CD activation
MrDeBuFF Mar 5, 2026
dc156a1
fix: fix CI/CD mistake
MrDeBuFF Mar 5, 2026
6f4caae
fix: fix later this bag with curl
MrDeBuFF Mar 5, 2026
8aa5c47
docs: add lab6
MrDeBuFF Mar 5, 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
76 changes: 76 additions & 0 deletions .github/workflows/ansible-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Ansible Deployment

on:
push:
branches: [ master, lab06 ]
paths:
- 'ansible/**'
- '.github/workflows/ansible-deploy.yml'

pull_request:
branches: [ main, master ]
paths:
- 'ansible/**'

jobs:

lint:
name: Ansible Lint
runs-on: ubuntu-latest

steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
pip install ansible ansible-lint

- name: Run ansible-lint
run: |
cd ansible
ansible-lint playbooks/*.yml
continue-on-error: true


deploy:
name: Deploy Application
needs: lint
runs-on: ubuntu-latest

steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Ansible
run: |
pip install ansible
ansible-galaxy collection install community.docker

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

- name: Deploy with Ansible
run: |
cd ansible
echo "${{ secrets.ANSIBLE_VAULT_PASSWORD }}" > /tmp/vault_pass
ansible-playbook playbooks/deploy.yml \
-i inventory/hosts.ini \
--vault-password-file /tmp/vault_pass
rm /tmp/vault_pass
82 changes: 82 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Python CI & Docker Build

on:
push:
branches:
- master
- lab03
pull_request:
branches:
- master


jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: |
pip install -r app_python/requirements.txt
pip install -r app_python/requirements-dev.txt

- name: Run linter
run: |
cd app_python
flake8 app.py

- name: Run tests
run: |
cd app_python
pytest -v

- name: Install Snyk CLI
run: |
npm install -g snyk

- name: Authenticate Snyk
run: |
snyk auth ${{ secrets.SNYK_TOKEN }}

- name: Run Snyk security scan
run: |
cd app_python
snyk test --severity-threshold=high




docker:
needs: test
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/master'
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v4

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

- name: Generate version
run: echo "VERSION=$(date +%Y.%m)" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v6
with:
context: app_python
push: true
tags: |
mrdebuff/devops-info-service:${{ env.VERSION }}
mrdebuff/devops-info-service:latest
46 changes: 46 additions & 0 deletions .github/workflows/terraform-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Terraform CI Validation

on:
pull_request:
paths:
- 'terraform/**'
- '.github/workflows/terraform-ci.yml'

jobs:
terraform-validate:
name: Terraform Validation
runs-on: ubuntu-latest

defaults:
run:
shell: bash
working-directory: terraform

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

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.14.5

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

- name: Terraform Init
run: terraform init -backend=false

- name: Terraform Validate
run: terraform validate

- name: Setup TFLint
uses: terraform-linters/setup-tflint@v3
with:
tflint_version: latest

- name: Initialize TFLint
run: tflint --init

- name: Run TFLint
run: tflint --format compact
22 changes: 21 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
test
# Python
__pycache__/
*.py[cod]
venv/
*.log

# IDE
.vscode/
.idea/

# OS
.DS_Store

# Test cache
.pytest_cache

# Ansible
*.retry
.vault_pass
ansible/inventory/*.pyc
__pycache__/
1 change: 1 addition & 0 deletions ansible/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[![Ansible Deployment](https://github.com/MrDeBuFF/DevOps-Core-Course/actions/workflows/ansible-deploy.yml/badge.svg)](https://github.com/your-username/your-repo/actions/workflows/ansible-deploy.yml)
11 changes: 11 additions & 0 deletions ansible/ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[defaults]
inventory = inventory/hosts.ini
roles_path = roles
host_key_checking = False
retry_files_enabled = False
remote_user = ubuntu

[privilege_escalation]
become = True
become_method = sudo
become_user = root
Loading