Hamza Phase 4
Hamza Phase 4
Deployments
College Name: KCT Engineering College, Kalaburgi
Group Members:
This phase focuses on automating the build, test, and deployment process of the To-Do List
Web Application using IBM Cloud Kubernetes Service (IKS) and IBM Cloud Container
Registry (ICR). The goal is to create a continuous integration and continuous deployment
(CI/CD) pipeline that ensures efficient, reliable, and scalable application deployment.
Key Components:
• Containerization: Package the application into Docker containers for consistent and
portable deployments.
• IBM Cloud Container Registry: Store and manage container images securely.
• Automation & CI/CD: Automate the build, push, and deployment pipeline for rapid
and consistent application updates.
o Click Create Cluster and select your desired Region and Cluster
Plan (Standard or Free).
1. Create a Namespace:
FROM node:16-alpine
WORKDIR /app
EXPOSE 3000
FROM node:16-alpine
WORKDIR /app
EXPOSE 5000
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend-deployment
spec:
replicas: 3
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: frontend
image: <region>.icr.io/<namespace>/frontend-app:1.0
ports:
- containerPort: 3000
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend-deployment
spec:
replicas: 2
selector:
matchLabels:
app: backend
template:
metadata:
labels:
app: backend
spec:
containers:
- name: backend
image: <region>.icr.io/<namespace>/backend-app:1.0
ports:
- containerPort: 5000
apiVersion: v1
kind: Service
metadata:
name: frontend-service
spec:
type: NodePort
selector:
app: frontend
ports:
- port: 3000
targetPort: 3000
• Check services:
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
uses: actions/checkout@v2
run: |
run: |
run: |
6. Future Enhancements
• Integrate Advanced CI/CD Pipelines: Use Jenkins or Tekton Pipelines for more
advanced CI/CD capabilities.
https://github.com/ALIHAMZA13/ToDoList.git