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
36 changes: 36 additions & 0 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
14 changes: 14 additions & 0 deletions .github/workflows/second.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Second CI

on:
push

jobs:
build:
runs-on: ubuntu-latest



steps:
- name: Say Hello
run: echo "Hello From Second"
1 change: 1 addition & 0 deletions Full-Stack-AI-DevOps-Masterclass
Submodule Full-Stack-AI-DevOps-Masterclass added at d19adb
16 changes: 16 additions & 0 deletions docker/app1-hello/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
hello-py:
build: ./python
image: ritesh07p/hello-python:1.0
ports:
- "3000:3000"
environment:
- ENV_VALUE=${ENV_VALUE}

hello-node:
build: ./node
image: ritesh07p/hello-node:1.0
ports:
- "3001:3000"
environment:
- ENV_VALUE=${ENV_VALUE}
7 changes: 7 additions & 0 deletions docker/app1-hello/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:26-slim
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
EXPOSE 3000
CMD [ "node", "app.js" ]
7 changes: 7 additions & 0 deletions docker/app1-hello/python/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.10-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 3000
CMD [ "python", "main.py" ]
36 changes: 36 additions & 0 deletions docker/app2-tax-calculator/node/service-a/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: tax-service-a
labels:
app: tax-service-a
spec:
replicas: 2
selector:
matchLabels:
app: tax-service-a
template:
metadata:
labels:
app: tax-service-a
spec:
containers:
- name: tax-service-a
image: embarkx/tax-service-a:latest # <-- changed image name
ports:
- containerPort: 3000 # <-- matches default port from docs
env:
- name: TAX_SERVICE_URL
value: http://tax-service-b:4000
---
apiVersion: v1
kind: Service
metadata:
name: tax-service-a
spec:
selector:
app: tax-service-a
type: LoadBalancer
ports:
- port: 80 # external port exposed by the Service
targetPort: 3000 # must match containerPort inside the pod
36 changes: 36 additions & 0 deletions docker/app2-tax-calculator/node/service-b/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: tax-service-b
labels:
app: tax-service-b
spec:
replicas: 2
selector:
matchLabels:
app: tax-service-b
template:
metadata:
labels:
app: tax-service-b
spec:
containers:
- name: tax-service-b
image: embarkx/tax-service-b:stable # <-- image for Service B
ports:
- containerPort: 4000 # default exposed port
env:
- name: PORT
value: "4000" # required env variable
---
apiVersion: v1
kind: Service
metadata:
name: tax-service-b
spec:
selector:
app: tax-service-b
type: LoadBalancer
ports:
- port: 4000 # external port exposed by the Service
targetPort: 4000 # must match containerPort inside the pod
12 changes: 0 additions & 12 deletions docker/app2-tax-calculator/node/service-b/index.js

This file was deleted.

6 changes: 0 additions & 6 deletions docker/app2-tax-calculator/node/service-b/package.json

This file was deleted.

7 changes: 7 additions & 0 deletions docker/app2-tax-calculator/python/service-a/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.10-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 3000
CMD [ "python", "main.py" ]
33 changes: 33 additions & 0 deletions docker/k8s/nginx/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
labels:
app: myapp
spec:
replicas: 2
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: nginx:latest
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: myapp
spec:
selector:
app: myapp
type: LoadBalancer
ports:
- port: 80 # external port exposed by the Service
targetPort: 80 # must match containerPort inside the pod
File renamed without changes.
32 changes: 32 additions & 0 deletions docker/k8s/yamal/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
replicas: 2
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: nginx
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: myapp
spec:
selector:
app: myapp
type: NodePort
ports:
- port: 80
targetPort: 80
nodePort: 32000
12 changes: 12 additions & 0 deletions docker/k8s/yamal/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: myapp
spec:
selector:
app: myapp
type: NodePort
ports:
- port: 80
targetPort: 80
nodePort: 32000