Skip to content
Open

Lab6 #2869

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 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
e801e7b
feat: add lab1 main task
projacktor Jan 28, 2026
16275c8
feat: add lab1 bonus task(java)
projacktor Jan 28, 2026
f1d3f8a
feat: add dockerfile for python app
projacktor Feb 3, 2026
a881a7c
docs: update README and add python LAB02
projacktor Feb 3, 2026
3f6013d
feat: add bonus task
projacktor Feb 3, 2026
b3a6453
chore: install pytest and add dev-requirements
projacktor Feb 10, 2026
70b559e
feat: add sys functions test
projacktor Feb 10, 2026
fade416
feat: add endpoint test
projacktor Feb 10, 2026
8f06356
chore: update .gitignore
projacktor Feb 10, 2026
f59d14b
feat: add idea
projacktor Feb 10, 2026
3de805d
ci ready
projacktor Feb 10, 2026
786485f
Add Python CI workflow
projacktor Feb 10, 2026
564523c
update python version
projacktor Feb 10, 2026
5d80eed
fix: update ci file python
projacktor Feb 10, 2026
3d9cad1
chore: add snyk to python pipeline
projacktor Feb 10, 2026
b538024
change tag versioning python
projacktor Feb 10, 2026
10a6199
docs: update python/README
projacktor Feb 10, 2026
69d443b
add java task
projacktor Feb 10, 2026
ee7b641
fix: build and push pipeline and vulerabilites
projacktor Feb 10, 2026
ab26608
fix: dockerfile java
projacktor Feb 10, 2026
b3e811a
Replace IPFS with Nix
Cre-eD Feb 11, 2026
832e7de
chore: update gitignore
projacktor Feb 18, 2026
963c207
feat: add terraform
projacktor Feb 18, 2026
84a2562
feat add pulumi
projacktor Feb 18, 2026
c6dff04
feat: add terraform ci
projacktor Feb 18, 2026
997c3d2
Merge branch 'inno-devops-labs:master' into lab4
projacktor Feb 18, 2026
d899f9b
Update lab04
Cre-eD Feb 21, 2026
accf74a
feat: create directories, setup inventory and add common task
projacktor Feb 25, 2026
09d9f22
chore: update gitignore
projacktor Feb 25, 2026
4729759
feat: add vault
projacktor Feb 25, 2026
c654d50
feat: add 3.2 part app_deploy
projacktor Feb 25, 2026
f0d3f10
fix: update loopback in python app
projacktor Feb 25, 2026
7603507
feat: add deployment tasks
projacktor Feb 25, 2026
d2b5cde
docs: add report for lab5
projacktor Feb 25, 2026
895adea
feat: add bonus task lab5
projacktor Feb 25, 2026
516f737
Merge branch 'inno-devops-labs:master' into lab5
projacktor Feb 25, 2026
de270bf
feat: add task 1.3
projacktor Mar 5, 2026
8e010c4
feat: add task 1.5 testing
projacktor Mar 5, 2026
6b73b6f
feat: add task 2.2
projacktor Mar 5, 2026
cd9ba43
feat: complete task 2
projacktor Mar 5, 2026
fe1695a
feat: add task 3.3
projacktor Mar 5, 2026
3677264
feat: complete task3
projacktor Mar 5, 2026
0761be3
Workflow test
projacktor Mar 5, 2026
9a92b25
Add group_vars to gitignore - contains secrets
projacktor Mar 5, 2026
de53b08
Ansible CI test
projacktor Mar 5, 2026
4d5cee1
yaml linting
projacktor Mar 5, 2026
9c9dad5
fix ansible ci
projacktor Mar 5, 2026
5ad68fd
fix(ansible): add inventory flag to deploy playbook
projacktor Mar 5, 2026
b0baf81
fix(ansible): use hosts.ini as default inventory, add -i flag to work…
projacktor Mar 5, 2026
49176cd
fix(ansible): update ssh key path to runner home
projacktor Mar 5, 2026
87d709f
fix ansible ci
projacktor Mar 5, 2026
1c84430
finish lab6
projacktor Mar 5, 2026
33a2127
Merge branch 'master' into lab6
projacktor 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
70 changes: 70 additions & 0 deletions .github/workflows/ansible-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Ansible Deployment

on:
push:
branches: [main, master, lab*]
paths:
- "labs/ansible/**"
- ".github/workflows/ansible-deploy.yaml"
pull_request:
branches: [main, master, lab*]
paths:
- "labs/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 labs/ansible
ansible-lint playbooks/*.yaml

deploy:
name: Deploy Application
needs: lint
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4

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

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

- name: Deploy with Ansible
env:
ANSIBLE_VAULT_PASSWORD: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
run: |
cd labs/ansible
echo "$ANSIBLE_VAULT_PASSWORD" > /tmp/vault_pass
ansible-playbook playbooks/deploy.yaml \
-i inventory/hosts.ini \
--vault-password-file /tmp/vault_pass \
--tags "app_deploy"
rm /tmp/vault_pass

- name: Verify Deployment
run: |
sleep 10
curl -f http://${{ secrets.VM_HOST }}:8000 || exit 1
curl -f http://${{ secrets.VM_HOST }}:8000/health || exit 1
83 changes: 83 additions & 0 deletions .github/workflows/java-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Java CI

on:
push:
branches: ["main", "lab*"]
paths:
- "labs/app_java/**"
- ".github/workflows/java-ci.yml"
pull_request:
branches: ["main", "lab*"]
paths:
- "labs/app_java/**"

jobs:
build-and-test:
if: "!contains(github.event.head_commit.message, 'docs')"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./labs/app_java

steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
cache: "maven"

- name: Run Linting
run: mvn checkstyle:check

- name: Build and Test
run: mvn clean verify

- name: Install Snyk CLI
uses: snyk/actions/setup@master

- name: Run Snyk
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: snyk test
continue-on-error: true

docker-build:
needs: build-and-test
runs-on: ubuntu-latest
if: github.event_name == 'push'
defaults:
run:
working-directory: ./labs/app_java

steps:
- uses: actions/checkout@v4

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

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKER_USERNAME }}/devops-app-java
tags: |
type=semver,pattern={{version}}
type=raw,value=latest
type=sha

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./labs/app_java
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
94 changes: 94 additions & 0 deletions .github/workflows/python-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Python CI

on:
push:
branches: [lab*, main]
paths:
- "labs/app_python/**"
tags:
- "v*"
pull_request:
paths:
- "labs/app_python/**"

jobs:
test-and-lint:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'docs') && !contains(github.event.pull_request.title, 'docs')"
defaults:
run:
working-directory: labs/app_python
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12.3"

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

- name: Install Snyk CLI
run: |
curl -Lo ./snyk https://github.com/snyk/cli/releases/latest/download/snyk-linux
chmod +x ./snyk
sudo mv ./snyk /usr/local/bin/

- name: Run Snyk
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: |
snyk auth $SNYK_TOKEN
snyk test

- name: Lint code
run: |
flake8 .

- name: Run tests
run: |
pytest -v

build-and-push:
runs-on: ubuntu-latest
needs: test-and-lint
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/lab') || startsWith(github.ref, 'refs/tags/v'))
defaults:
run:
working-directory: labs/app_python
steps:
- name: Checkout code
uses: actions/checkout@v4

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

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

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKER_USERNAME }}/python-info-service
tags: |
type=ref,event=branch
type=sha,prefix={{date 'YYYYMMDD'}}-
type=raw,value=latest

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: labs/app_python
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/python-info-service:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/python-info-service:buildcache,mode=max
46 changes: 46 additions & 0 deletions .github/workflows/terraform-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Terraform CI

on:
push:
branches: ["main", "lab*"]
paths:
- "labs/terraform/**"
pull_request:
paths:
- "labs/terraform/**"

jobs:
terraform:
name: Terraform Validate
runs-on: ubuntu-latest
defaults:
run:
working-directory: labs/terraform
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.10.0"

- name: Setup TFLint
uses: terraform-linters/setup-tflint@v4
with:
tflint_version: v0.50.0

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

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

- name: Terraform Validate
run: terraform validate

- name: TFLint Init
run: tflint --init

- name: Run TFLint
run: tflint --format=compact
Loading