Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ htmlcov/
.direnv

.github/**
Downloads/
*.pub
cd0157-Server-Deployment-and-Containerization-master/
eks-fargate-trust.json
14 changes: 14 additions & 0 deletions Dockerfile.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Use the `python:3.9` as a source image from the Amazon ECR Public Gallery
# We are not using `python:3.7.2-slim` from Dockerhub because it has put a pull rate limit.
FROM public.ecr.aws/sam/build-python3.9:latest

# Set up an app directory for your code
COPY . /app
WORKDIR /app

# Install `pip` and needed Python packages from `requirements.txt`
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

# Define an entrypoint which will run the main app using the Gunicorn WSGI server.
ENTRYPOINT ["gunicorn", "-b", ":8080", "main:app"]
Empty file modified README.md
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions cd0157-Server-Deployment-and-Containerization
Submodule cd0157-Server-Deployment-and-Containerization added at b9f578
Empty file modified ci-cd-codepipeline.cfn.yml
100755 → 100644
Empty file.
35 changes: 35 additions & 0 deletions deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:stable
ports:
- containerPort: 80
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 5
periodSeconds: 10
failureThreshold: 3
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 15
periodSeconds: 20
failureThreshold: 3
20 changes: 20 additions & 0 deletions eks-elb-read-policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowDescribeForELBAndEC2",
"Effect": "Allow",
"Action": [
"elasticloadbalancing:DescribeInstanceHealth",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeLoadBalancerAttributes",
"elasticloadbalancing:DescribeTags",
"ec2:DescribeInstances",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribeSecurityGroups",
"ec2:DescribeAddresses"
],
"Resource": "*"
}
]
}
Binary file added eksctl.zip
Binary file not shown.
Empty file modified main.py
100755 → 100644
Empty file.
18 changes: 18 additions & 0 deletions netshoot-hostdebug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Pod
metadata:
name: netshoot-hostdebug
labels:
app: netshoot-hostdebug
spec:
hostNetwork: true
hostPID: true
restartPolicy: Never
tolerations:
- operator: Exists
containers:
- name: netshoot
image: nicolaka/netshoot:latest
command: ["/bin/sleep","3600"]
securityContext:
privileged: true
Empty file modified requirements.txt
100755 → 100644
Empty file.
12 changes: 12 additions & 0 deletions service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
type: LoadBalancer
selector:
app: nginx
ports:
- protocol: TCP
port: 80
targetPort: 80
Binary file added simple_jwt_api-svc-nlb.yml
Binary file not shown.
40 changes: 0 additions & 40 deletions simple_jwt_api.yml

This file was deleted.

Binary file added svc-backup.yml
Binary file not shown.