Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
444 commits
Select commit Hold shift + click to select a range
d9bcc1b
docker compose
Feb 5, 2023
077da6e
1
Feb 5, 2023
d73095e
1
Feb 5, 2023
daf7ce2
2
Feb 5, 2023
8746271
3
Feb 5, 2023
78c873c
compose
Feb 5, 2023
93f3435
fix file
Feb 5, 2023
073605a
fix docker file location
Feb 5, 2023
299b4d5
1
Feb 5, 2023
e19ebcf
update
Feb 5, 2023
de14276
update
Feb 5, 2023
cafbd27
update
Feb 5, 2023
cb1e7e2
updates
yanivomc Feb 6, 2023
0f8f538
hen add helm
yanivomc Feb 6, 2023
74ccfd3
marceline
yanivomc Feb 6, 2023
dc3f02e
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
f5f73f0
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
85047b0
updates
yanivomc Feb 6, 2023
497904d
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
1429982
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
76f01e9
updates-helm
yanivomc Feb 6, 2023
6c8398c
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
1579d93
commiting helm
yanivomc Feb 6, 2023
63062fc
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
09f0cd8
marceline change values to match guided labs
yanivomc Feb 6, 2023
a8947e8
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
55b744d
hen update
yanivomc Feb 6, 2023
18b43f7
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
3b0259d
Added spring-music
yanivomc Feb 6, 2023
33adab5
Update
yanivomc Feb 6, 2023
59df453
updates
yanivomc Feb 6, 2023
08eaf67
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
5198733
marceline lab "Template Functions and Pipelines"
yanivomc Feb 6, 2023
eefafa4
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
75020af
updaed
yanivomc Feb 6, 2023
ca9fb16
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
c947ac9
Updated
yanivomc Feb 6, 2023
b0fc386
commit the code
yanivomc Feb 6, 2023
ebd759b
marceline deployment lab
yanivomc Feb 6, 2023
9432566
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
a726af1
hen
yanivomc Feb 6, 2023
d0b26a2
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
40f38a7
update
yanivomc Feb 6, 2023
131a95a
hen2
yanivomc Feb 6, 2023
89298b3
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
a30ae78
commited services code
yanivomc Feb 6, 2023
f720e41
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
ffdf0b3
deployment
yanivomc Feb 6, 2023
278a00e
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
0b5e65f
Update
yanivomc Feb 6, 2023
a678a2b
spring-music
yanivomc Feb 6, 2023
9b00ee7
update
yanivomc Feb 6, 2023
53cb0fd
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
8c59e9c
updated code with services.yaml
yanivomc Feb 6, 2023
9742bcf
Merge branches 'labs' and 'labs' of https://github.com/yanivomc/devop…
yanivomc Feb 6, 2023
7b62fb8
Update
yanivomc Feb 6, 2023
fa2a26a
updated code
yanivomc Feb 6, 2023
5ae4cd7
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
5712f19
Update
yanivomc Feb 6, 2023
c012366
marceline replicas
yanivomc Feb 6, 2023
f4e11c3
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
e4a39a5
working version
yanivomc Feb 6, 2023
f85b4cf
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
f7bf8bc
fix value lookup
yanivomc Feb 6, 2023
c099180
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
b53acd5
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 6, 2023
aeed462
working chart
yanivomc Feb 8, 2023
60508bd
update
yanivomc Feb 8, 2023
7f46077
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
1fff453
Update
yanivomc Feb 8, 2023
0958d80
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
cba7abe
updates
yanivomc Feb 8, 2023
e06a13a
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
d070363
hen add template
yanivomc Feb 8, 2023
10a0c1b
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
4175096
commiting the help helper
yanivomc Feb 8, 2023
d06278d
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
e0e15fb
helm lab
yanivomc Feb 8, 2023
a68ad98
Added helm charts with _helper.tpl.
yanivomc Feb 8, 2023
7ec9497
hen update
yanivomc Feb 8, 2023
6d40663
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
94368e0
helper
yanivomc Feb 8, 2023
97fc269
updates
yanivomc Feb 8, 2023
ec01aba
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
1ab439b
Stolen from Hen
yanivomc Feb 8, 2023
942adef
updating
yanivomc Feb 8, 2023
ad2a644
Update job.yaml
yanivomc Feb 8, 2023
02f6e9b
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
219b9ad
hen add job
yanivomc Feb 8, 2023
ed42357
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
92839b0
cron update
yanivomc Feb 8, 2023
fc0052e
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
e755734
updated
yanivomc Feb 8, 2023
e95016a
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
2c33840
update
yanivomc Feb 8, 2023
a20b6f6
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
86a2ab2
hen add parms
yanivomc Feb 8, 2023
3df4c27
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
16305e3
hen add read me file
yanivomc Feb 8, 2023
757d975
commiting code for helper lab
yanivomc Feb 8, 2023
5d43c99
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 8, 2023
725c555
fixed deployment yaml
yanivomc Feb 8, 2023
7f9551a
kubectl commands
yanivomc Feb 9, 2023
f59b331
k8b
yanivomc Feb 12, 2023
24cf442
update
yanivomc Feb 12, 2023
aea78a9
1
yanivomc Feb 12, 2023
f9844b2
commit
yanivomc Feb 13, 2023
08bce35
step 1
yanivomc Feb 13, 2023
820a408
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
0991662
hen add affinity
yanivomc Feb 13, 2023
a99e5f4
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
5d05135
working affinity
yanivomc Feb 13, 2023
61efccd
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
a8c98a0
add deployment with affinity
yanivomc Feb 13, 2023
ffb3c2d
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
a62e628
initial affinity lab
yanivomc Feb 13, 2023
8ac6564
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
da16e2d
Update affinity
yanivomc Feb 13, 2023
b9d1d7e
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
cb573d9
affinity again
yanivomc Feb 13, 2023
f23b360
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
fe41ed1
new set
yanivomc Feb 13, 2023
f37e3d6
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
075b698
hen just save
yanivomc Feb 13, 2023
688203b
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
b2c500d
update
yanivomc Feb 13, 2023
09a1331
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
10b8400
Update
yanivomc Feb 13, 2023
85ff32f
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
c996799
affinity lab 2
yanivomc Feb 13, 2023
112abc9
last copy
yanivomc Feb 13, 2023
ad1e423
updated with es
yanivomc Feb 13, 2023
e9b2d37
update
yanivomc Feb 13, 2023
4364c9d
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 13, 2023
1901046
added namespace
yanivomc Feb 15, 2023
b1b0ac0
added namespace manifest
yanivomc Feb 15, 2023
1955d2d
updated replicas
yanivomc Feb 15, 2023
066c590
UPDATED replica
yanivomc Feb 15, 2023
46672ea
updated image
yanivomc Feb 15, 2023
5cf7172
updated
yanivomc Feb 15, 2023
19eeee6
update
yanivomc Feb 15, 2023
52c981b
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 15, 2023
24158a4
update
yanivomc Feb 15, 2023
ce2f719
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 15, 2023
f641466
hen add helm
yanivomc Feb 15, 2023
974198a
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 15, 2023
31f756c
hen add helm2
yanivomc Feb 15, 2023
fed2a24
simonson springmusic argocd lab
yanivomc Feb 15, 2023
64b247b
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 15, 2023
4a13639
updated
yanivomc Feb 15, 2023
b51f971
fromyaniv
yanivomc Feb 15, 2023
3054fda
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Feb 15, 2023
0a53800
first commit
yanivomc Feb 16, 2023
4d0e1ad
updates
Feb 21, 2023
c0e2fed
add green-blue apps
yanivomc Feb 23, 2023
1b879a6
helm-lab
yanivomc Feb 28, 2023
183b8e6
helm
yanivomc Feb 28, 2023
b1fa72d
test
shachash1984 Mar 16, 2023
5d07cb1
add docker file
Mar 16, 2023
a02176e
morning lab
shachash1984 Mar 16, 2023
0bca450
fix
Mar 16, 2023
8cc501e
updates
Mar 16, 2023
2ecdc28
Test3
Mar 16, 2023
a031942
test3
Mar 16, 2023
784d834
MyTest
Mar 19, 2023
67532e8
Koby/Test
Koby-San Mar 19, 2023
7ff3113
My Test
Mar 19, 2023
622e2df
First commit Ben
Apr 4, 2023
b72e471
change nodejs groovy
Apr 4, 2023
db1fd36
change nodejs groovy
Apr 4, 2023
5732e45
first commit
Apr 4, 2023
4a67357
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
Apr 4, 2023
2f8de4f
lhkjhk
Apr 4, 2023
1e9dfb8
first commit
May 2, 2023
eaf99bd
fdf
yanivomc May 21, 2023
020b6cc
deploy file
yanivomc May 21, 2023
d45c389
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc May 21, 2023
a0719be
fourth
yanivomc May 21, 2023
3626dd3
fourth
yanivomc May 21, 2023
c264863
dfdf
yanivomc May 23, 2023
f844157
Valentine Dir
yanivomc Jun 1, 2023
621222b
lab2
yanivomc Jun 1, 2023
8d8f57a
lab3
yanivomc Jun 1, 2023
ce5a4ab
remove ide warnings
yanivomc Jun 1, 2023
b385088
fix labels
yanivomc Jun 1, 2023
d4396c6
lab4
yanivomc Jun 1, 2023
86b257a
init
yanivomc Jun 8, 2023
735a538
qos
yanivomc Jun 8, 2023
f20ddaa
morning-lab-anandam
yanivomc Jun 8, 2023
8b77f74
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Jun 8, 2023
5a33ba0
test
yanivomc Jun 8, 2023
4662cdf
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Jun 8, 2023
b046504
morning lab
yanivomc Jun 8, 2023
19f0c41
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Jun 8, 2023
d887b62
morning-lab
yanivomc Jun 8, 2023
42ddc29
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Jun 8, 2023
8cde6ee
test
yanivomc Jun 8, 2023
b71ee51
fix
yanivomc Jun 8, 2023
613edc1
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Jun 8, 2023
c609582
ds
yanivomc Jun 8, 2023
5828bbf
Daemonset
yanivomc Jun 8, 2023
c0d38d5
added ingress task
yanivomc Jun 8, 2023
f66b339
test
yanivomc Jun 8, 2023
1d547a7
updates
yanivomc Jun 8, 2023
9586f0a
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Jun 8, 2023
ab1a4a3
updates
yanivomc Jun 8, 2023
dbbbc8c
ingress task
yanivomc Jun 8, 2023
6f57b24
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Jun 8, 2023
01233bd
ingress-mapping
yanivomc Jun 8, 2023
784844c
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Jun 8, 2023
b5493a3
rename
yanivomc Jun 8, 2023
51a0f36
ingress
yanivomc Jun 8, 2023
339ac44
Merge branch 'labs' of https://github.com/yanivomc/devopshift-welcome…
yanivomc Jun 8, 2023
c0b7b4a
Initial deployment
yanivomc Jun 19, 2023
0402e18
Merge branch 'main' of https://github.com/yanivomc/devopshift-welcome
yanivomc Jun 19, 2023
b20e3eb
first commit
yanivomc Jun 19, 2023
0cdc6ed
first commit
yanivomc Jun 19, 2023
0f27dd7
Merge remote-tracking branch 'origin/main'
yanivomc Jun 19, 2023
01ecdb9
Merge remote changes
yanivomc Jun 19, 2023
5d78cfa
updates
Aug 25, 2024
aef4fb2
cleaning
Aug 25, 2024
b7859bc
updates
Aug 25, 2024
7b07615
updates
Aug 25, 2024
85c7767
added readme file
Aug 25, 2024
f567728
working
Feb 24, 2025
6bace4f
updates
Mar 3, 2025
56c684a
final
Mar 3, 2025
f2a6666
test
Mar 4, 2025
df0eeab
morning commit
Mar 4, 2025
deca1b2
commit of not working
Mar 4, 2025
6d2bf48
the fe pipelne worked
Mar 4, 2025
ad83efc
try to chenge dockerfilebe
Mar 4, 2025
1ff5b53
final commit jenkins
Mar 4, 2025
4bc1aac
test
yanivomc Mar 4, 2025
008c120
Add k8s manifests and ArgoCD app manifest
yanivomc Mar 4, 2025
0f9c94f
error commit
yanivomc Mar 4, 2025
d5c3eff
test
Mar 17, 2025
33b06df
morning commit
Mar 17, 2025
5422887
Add main.tf and tst2.txt for final exam
Mar 17, 2025
01c3a9c
commit1140
Mar 17, 2025
5a3386f
commit1232
Mar 17, 2025
dca2c55
commit1315
Mar 17, 2025
6594b29
commit1327
Mar 17, 2025
a7edcc7
commit1341
Mar 17, 2025
da67c07
commit1407
Mar 17, 2025
464697d
commit1453
Mar 17, 2025
9437c31
commit1555
Mar 17, 2025
e2beb54
commit1629
Mar 17, 2025
6b3f2b9
commit1632
Mar 17, 2025
46312b6
test
Mar 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

ARG VARIANT="latest"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
41 changes: 41 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "Python 3",
"mounts": [ "source=/Users/yanivos/.aws,target=/home/vscode/.aws,type=bind"],
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
"VARIANT": "3.10-bullseye",
"NODE_VERSION": "lts/*"
}
},
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"GitHub.copilot"
]
}
},
"forwardPorts": [3500],
// "runArgs": [
// "--network=jb-elearning_cloudjb",
// "--name=jbelearning-envconsumers",
// "--add-host=host.docker.internal:host-gateway"
// ]
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ignore __pycache__ and .pyc files and pytest_cache folders
__pycache__/
*.pyc
pytest_cache/
2 changes: 2 additions & 0 deletions Final_Exam/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
terraform-ec2/.terraform.lock.hcl
terraform-ec2/.terraform/
51 changes: 51 additions & 0 deletions Final_Exam/terraform-ec2/builder_key.pem
Original file line number Diff line number Diff line change
@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RSA PRIVATE KEY-----
11 changes: 11 additions & 0 deletions Final_Exam/terraform-ec2/dockerStep/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.9-slim as builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt

FROM python:3.9-slim
WORKDIR /app
COPY --from=builder /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages
COPY . .
EXPOSE 5001
CMD ["python", "app.py"]
55 changes: 55 additions & 0 deletions Final_Exam/terraform-ec2/dockerStep/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
pipeline {
agent any

environment {
DOCKERHUB_CREDENTIALS = credentials('docker-hub-creds')
IMAGE_NAME = 'yaniv8360/flask-aws-monitor'
IMAGE_TAG = "${env.BUILD_NUMBER}"
}

stages {
stage('Clone Repository') {
steps {
git branch: 'dev', url: 'https://github.com/yaniv8360/devops-final-project.git'
}
}

stage('Lint & Security Scan') {
parallel {
stage('Flake8 Linting') {
steps {
echo 'pip install flake8 && flake8 .'
}
}
stage('Bandit Security Scan') {
steps {
echo 'pip install bandit && bandit -r .'
}
}
}
}
stage('Install Dependencies') {
steps {
sh 'pip install -r dockerStep/requirements.txt'
}
}
stage('Build Docker Image') {
steps {
sh """
cd dockerStep/
docker build -t yaniv8360/flask-aws-monitor:${IMAGE_TAG} .
docker tag yaniv8360/flask-aws-monitor:${IMAGE_TAG} yaniv8360/flask-aws-monitor:latest
"""
}
}
stage('Push to Docker Hub') {
steps {
sh """
echo \$DOCKERHUB_CREDENTIALS_PSW | docker login -u \$DOCKERHUB_CREDENTIALS_USR --password-stdin
docker push yaniv8360/flask-aws-monitor:${IMAGE_TAG}
docker push yaniv8360/flask-aws-monitor:latest
"""
}
}
}
}
82 changes: 82 additions & 0 deletions Final_Exam/terraform-ec2/dockerStep/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import os
import boto3
from flask import Flask, render_template_string

app = Flask(__name__)

# Fetch AWS credentials from environment variables
AWS_ACCESS_KEY = os.getenv("AWS_ACCESS_KEY_ID")
AWS_SECRET_KEY = os.getenv("AWS_SECRET_ACCESS_KEY")
REGION = "us-east-1"

# Initialize Boto3 clients
session = boto3.Session(
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY,
region_name=REGION
)
ec2_client = session.client("ec2")
elb_client = session.client("elbv2")

@app.route("/")
def home():
# Fetch EC2 instances
instances = ec2_client.describe_instances()
instance_data = []
for reservation in instances["Reservations"]:
for instance in reservation["Instances"]:
instance_data.append({
"ID": instance["InstanceId"],
"State": instance["State"]["Name"],
"Type": instance["InstanceType"],
"Public IP": instance.get("PublicIpAddress", "N/A")
})

# Fetch VPCs, Load Balancers and AMIs (Note: Dummy variables vpcs, lbs, amis used here)
vpcs = ec2_client.describe_vpcs()
lbs = elb_client.describe_load_balancers()
amis = ec2_client.describe_images(Owners=["self"])
vpc_data = [{"VPC ID": vpc["VpcId"], "CIDR": vpc["CidrBlock"]} for vpc in []]
lb_data = [{"LB Name": lb["LoadBalancerName"], "DNS Name": lb["DNSName"]} for lb in []]
ami_data = [{"AMI ID": ami["ImageId"], "Name": ami.get("Name", "N/A")} for ami in []]

# Render the result in a simple table
html_template = """
<html>
<head><title>AWS Resources</title></head>
<body>
<h1>Running EC2 Instances</h1>
<table border='1'>
<tr><th>ID</th><th>State</th><th>Type</th><th>Public IP</th></tr>
{% for instance in instance_data %}
<tr><td>{{ instance['ID'] }}</td><td>{{ instance['State'] }}</td><td>{{ instance['Type'] }}</td><td>{{ instance['Public IP'] }}</td></tr>
{% endfor %}
</table>
<h1>VPCs</h1>
<table border='1'>
<tr><th>VPC ID</th><th>CIDR</th></tr>
{% for vpc in vpc_data %}
<tr><td>{{ vpc['VPC ID'] }}</td><td>{{ vpc['CIDR'] }}</td></tr>
{% endfor %}
</table>
<h1>Load Balancers</h1>
<table border='1'>
<tr><th>LB Name</th><th>DNS Name</th></tr>
{% for lb in lb_data %}
<tr><td>{{ lb['LB Name'] }}</td><td>{{ lb['DNS Name'] }}</td></tr>
{% endfor %}
</table>
<h1>Available AMIs</h1>
<table border='1'>
<tr><th>AMI ID</th><th>Name</th></tr>
{% for ami in ami_data %}
<tr><td>{{ ami['AMI ID'] }}</td><td>{{ ami['Name'] }}</td></tr>
{% endfor %}
</table>
</body>
</html>
"""
return render_template_string(html_template, instance_data=instance_data, vpc_data=vpc_data, lb_data=lb_data, ami_data=ami_data)

if __name__ == "__main__":
app.run(host="0.0.0.0", port=5001, debug=True)
68 changes: 68 additions & 0 deletions Final_Exam/terraform-ec2/dockerStep/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
trigger:
branches:
include:
- dev

pool:
vmImage: 'ubuntu-latest'

variables:
DOCKERHUB_USERNAME: $(DOCKERHUB_USERNAME)
DOCKERHUB_PASSWORD: $(DOCKERHUB_PASSWORD)
IMAGE_NAME: 'yaniv8360/flask-aws-monitor-azure'

stages:
- stage: CloneRepository
displayName: 'Clone Repository'
jobs:
- job: Clone
steps:
- checkout: self
displayName: 'Checkout Repository'

- stage: ParallelChecks
displayName: 'Parallel Linting & Security Checks'
dependsOn: CloneRepository
jobs:
- job: Linting
displayName: 'Linting'
steps:
- script: |
echo 'pip install flake8 && flake8 .'
echo 'pip install shellcheck && shellcheck .'
echo 'pip install hadolint && hadolint .'
displayName: 'Run Linting'
- job: SecurityScan
displayName: 'Security Scanning'
steps:
- script: |
echo 'pip install trivy && trivy .'
echo 'pip install bandit && bandit .'
displayName: 'Run Security Scan'

- stage: BuildDockerImage
displayName: 'Build Docker Image'
dependsOn: ParallelChecks
jobs:
- job: BuildImage
displayName: 'Build Docker Image'
steps:
- script: |
docker build -t $(IMAGE_NAME) .
displayName: 'Build Docker Image'

- stage: PushToDockerHub
displayName: 'Push Docker Image to Docker Hub'
dependsOn: BuildDockerImage
jobs:
- job: PushImage
displayName: 'Push Docker Image'
steps:
- script: |
echo $(DOCKERHUB_PASSWORD) | docker login --username $(DOCKERHUB_USERNAME) --password-stdin
docker push $(IMAGE_NAME)
displayName: 'Push Docker Image'

- stage: SecureCredentials
displayName: 'Store and Use Secure Credentials'
dependsOn: []
19 changes: 19 additions & 0 deletions Final_Exam/terraform-ec2/dockerStep/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: flask-aws-monitor
spec:
replicas: 2
selector:
matchLabels:
app: flask-aws-monitor
template:
metadata:
labels:
app: flask-aws-monitor
spec:
containers:
- name: flask-aws-monitor
image: yaniv8360/flask-aws-monitor:latest
ports:
- containerPort: 5001
2 changes: 2 additions & 0 deletions Final_Exam/terraform-ec2/dockerStep/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Flask
boto3
13 changes: 13 additions & 0 deletions Final_Exam/terraform-ec2/dockerStep/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: flask-aws-monitor-service
spec:
type: NodePort
selector:
app: flask-aws-monitor
ports:
- protocol: TCP
port: 5001
targetPort: 5001
nodePort: 30001
Loading