Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cfb9be4
Create main.yml
pankajsingh-Kipu Jun 16, 2025
722679e
Update main.yml
pankajsingh-Kipu Jun 16, 2025
65a7b84
Update main.yml
pankajsingh-Kipu Jun 16, 2025
1462139
Update main.yml
pankajsingh-Kipu Jun 16, 2025
ed499e9
Update main.yml
pankajsingh-Kipu Jun 16, 2025
01b3490
Update deployment.yml
pankajsingh-Kipu Jun 16, 2025
edaaf7a
Update node-service.yaml
pankajsingh-Kipu Jun 16, 2025
c5f2e52
Update service.yml
pankajsingh-Kipu Jun 16, 2025
b3be7b8
Update main.yml
pankajsingh-Kipu Jun 16, 2025
eaf6deb
Update deployment.yml
pankajsingh-Kipu Jun 16, 2025
34774eb
Update node-service.yaml
pankajsingh-Kipu Jun 16, 2025
765a44e
Update service.yml
pankajsingh-Kipu Jun 16, 2025
4be833e
Update deployment.yml
pankajsingh-Kipu Jun 16, 2025
5b0f5c0
Update main.yml
pankajsingh-Kipu Jun 16, 2025
4ad500b
Update main.yml
pankajsingh-Kipu Jun 16, 2025
3b3d5d3
Update main.yml
pankajsingh-Kipu Jun 16, 2025
0c355f4
Update main.yml
pankajsingh-Kipu Jun 16, 2025
c12d3e8
Update main.yml
pankajsingh-Kipu Jun 16, 2025
aca23b7
Update main.yml
pankajsingh-Kipu Jun 16, 2025
d7b0d25
Update main.yml
pankajsingh-Kipu Jun 16, 2025
aa8df0b
Update main.yml
pankajsingh-Kipu Jun 16, 2025
414392a
netflix deploy
pankajsingh-Kipu Jun 17, 2025
026d0ac
test 1 deploy
pankajsingh-Kipu Jun 17, 2025
869780b
Add GitHub Actions deployment pipeline
pankajsingh-Kipu Jun 17, 2025
4f2b9b5
Demo update
pankajsingh-Kipu Jun 17, 2025
1fae890
Update deploy.yml
pankajsingh-Kipu Jun 17, 2025
db08b07
Update deploy.yml
pankajsingh-Kipu Jun 17, 2025
6e4a798
Update deploy.yml
pankajsingh-Kipu Jun 17, 2025
d513448
Update deploy.yml
pankajsingh-Kipu Jun 17, 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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Push to Amazon ECR

on:
push:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest
environment: ecr-push # MUST match your GitHub environment name

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-north-1

- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1

- name: Build, Tag, and Push Docker image
run: |
IMAGE_URI=476768693646.dkr.ecr.eu-north-1.amazonaws.com/devops_sec:latest
docker build -t netflix .
docker tag netflix:latest $IMAGE_URI
docker push $IMAGE_URI
47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy to AWS ECR and EKS

on:
push:
branches:
- main

jobs:
build-push-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-north-1

- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
with:
region: eu-north-1

- name: Build Docker Image
run: |
docker build -t netflix .

- name: Tag Docker Image
run: |
docker tag netflix:latest 476768693646.dkr.ecr.eu-north-1.amazonaws.com/devops_sec:latest

- name: Push Docker Image
run: |
docker push 476768693646.dkr.ecr.eu-north-1.amazonaws.com/devops_sec:latest

- name: Update kubeconfig for EKS
run: |
aws eks --region eu-north-1 update-kubeconfig --name netflix-cluster

- name: Deploy to EKS
run: |
kubectl apply -f Kubernetes/deployment.yaml
kubectl apply -f Kubernetes/service.yaml
2 changes: 1 addition & 1 deletion Kubernetes/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ spec:
spec:
containers:
- name: netflix-app
image: nasi101/netflix:latest
image: 476768693646.dkr.ecr.eu-north-1.amazonaws.com/devops_sec:latest
ports:
- containerPort: 80
16 changes: 9 additions & 7 deletions Kubernetes/node-service.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
kind: Service
apiVersion: v1
kind: Service
metadata:
name: node-exporter
namespace: prometheus-node-exporter
labels:
app: node-exporter
spec:
type: NodePort
selector:
app: node-exporter
app: node-exporter
ports:
- name: node-exporter
protocol: TCP
port: 9100
targetPort: 9100
type: NodePort
- name: metrics
protocol: TCP
port: 9100
targetPort: 9100
10 changes: 6 additions & 4 deletions Kubernetes/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ metadata:
app: netflix-app
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
nodePort: 30007
selector:
app: netflix-app
ports:
- name: http
port: 80
targetPort: 80
nodePort: 30007
protocol: TCP
Empty file added Kubernetes/vscode.deb
Empty file.
6 changes: 6 additions & 0 deletions Kubernetes/wget-log
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--2025-06-16 19:40:25-- https://code.visualstudio.com/sha/download?build=stable
Resolving code.visualstudio.com (code.visualstudio.com)... 13.107.246.53, 2620:1ec:bdf::53
Connecting to code.visualstudio.com (code.visualstudio.com)|13.107.246.53|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-06-16 19:40:25 ERROR 404: Not Found.

18 changes: 18 additions & 0 deletions apps/netflix-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: netflix-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/pankajsinghveersatech/DevSecOps-Project-first.git
targetRevision: HEAD
path: Kubernetes
destination:
server: https://kubernetes.default.svc
namespace: default
syncPolicy:
automated:
prune: true
selfHeal: true
54 changes: 54 additions & 0 deletions aws/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# AWS CLI v2

This bundle contains a built executable of the AWS CLI v2.

## Installation

To install the AWS CLI v2, run the `install` script:
```
$ sudo ./install
You can now run: /usr/local/bin/aws --version
```
This will install the AWS CLI v2 at `/usr/local/bin/aws`. Assuming
`/usr/local/bin` is on your `PATH`, you can now run:
```
$ aws --version
```


### Installing without sudo

If you don't have ``sudo`` permissions or want to install the AWS
CLI v2 only for the current user, run the `install` script with the `-b`
and `-i` options:
```
$ ./install -i ~/.local/aws-cli -b ~/.local/bin
```
This will install the AWS CLI v2 in `~/.local/aws-cli` and create
symlinks for `aws` and `aws_completer` in `~/.local/bin`. For more
information about these options, run the `install` script with `-h`:
```
$ ./install -h
```

### Updating

If you run the `install` script and there is a previously installed version
of the AWS CLI v2, the script will error out. To update to the version included
in this bundle, run the `install` script with `--update`:
```
$ sudo ./install --update
```


### Removing the installation

To remove the AWS CLI v2, delete the its installation and symlinks:
```
$ sudo rm -rf /usr/local/aws-cli
$ sudo rm /usr/local/bin/aws
$ sudo rm /usr/local/bin/aws_completer
```
Note if you installed the AWS CLI v2 using the `-b` or `-i` options, you will
need to remove the installation and the symlinks in the directories you
specified.
Loading