KEMBAR78
Week 3 | PDF | Cloud Computing | Software As A Service
0% found this document useful (0 votes)
46 views12 pages

Week 3

The document outlines key concepts and practices in Full Stack Web Development, focusing on DevOps engineering practices, including Configuration Management, Continuous Integration, Automated Testing, Infrastructure as Code, Continuous Delivery, and Continuous Deployment. It details the importance of tools like Git for version control, as well as the processes for managing repositories on platforms like GitHub. Additionally, it covers cloud infrastructure and computing architecture, emphasizing the integration of various components to deliver cloud services.

Uploaded by

hirakeshkashyap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views12 pages

Week 3

The document outlines key concepts and practices in Full Stack Web Development, focusing on DevOps engineering practices, including Configuration Management, Continuous Integration, Automated Testing, Infrastructure as Code, Continuous Delivery, and Continuous Deployment. It details the importance of tools like Git for version control, as well as the processes for managing repositories on platforms like GitHub. Additionally, it covers cloud infrastructure and computing architecture, emphasizing the integration of various components to deliver cloud services.

Uploaded by

hirakeshkashyap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Full Stack Web Development VVPCS

DevOps Engineering Practices


DevOps is a set of practices that combines software development (Dev) and IT operations (Ops) to shorten the systems development
life cycle and provide continuous delivery with high software quality.

Configuration Management
Configuration management (CM) is the process of maintaining consistent states for system resources like servers,
databases, and networks. It involves defining and enforcing desired configurations as code, ensuring environments are repeatable
and reducing configuration drift.
Why Needed:
• Consistency: Ensures all environments (dev, test, prod) are identical, reducing "it works on my machine" issues.
• Repeatability: Allows for quick and reliable provisioning of new environments.
• Traceability: Tracks all changes to configurations, facilitating rollbacks and auditing.
• Efficiency: Automates manual setup and updates, saving time and reducing human error.
Tools: Ansible, Puppet, Chef, SaltStack.
Continuous Integration (CI)
Continuous Integration is a development practice where developers frequently merge their code changes into a central
repository, often multiple times a day. Each integration is then verified by an automated build and automated tests.
Benefits:
• Early Bug Detection: Identifies integration issues and bugs quickly, making them easier and cheaper to fix.
• Reduced Integration Problems: Prevents "integration hell" by integrating small changes frequently.
• Improved Code Quality: Automated tests and code quality checks ensure a healthier codebase.
• Faster Feedback Loop: Developers get immediate feedback on their changes.
Tools: Jenkins, GitLab CI/CD, GitHub Actions, Bitbucket Pipelines, Azure DevOps.
Automated Testing
Automated testing involves executing tests automatically and comparing actual outcomes with predicted outcomes. It's a
cornerstone of CI/CD, ensuring code quality and rapid feedback.
Types:
• Unit Tests: Test individual components or functions in isolation.
• Integration Tests: Verify interactions between different components or services.
• End-to-End (E2E) Tests: Simulate real user scenarios across the entire application.
• Performance Tests: Assess system responsiveness and stability under load.
• Security Tests: Identify vulnerabilities (e.g., SAST, DAST).
Tools:
• Unit/Integration: JUnit (Java), Jest (JS), Pytest (Python), NUnit (.NET).
• E2E: Selenium, Cypress, Playwright.
• Performance: Apache JMeter, LoadRunner.
• Security: OWASP ZAP, SonarQube, Snyk.
Infrastructure as Code (IaC)
Managing and provisioning infrastructure (networks, virtual machines, load balancers) using code instead of manual
processes. Infrastructure definitions are stored in version control.
Benefits:
• Consistency: Guarantees environments are provisioned identically.
• Repeatability: Automates infrastructure setup, eliminating manual errors.
• Speed: Rapidly deploys and scales infrastructure.
• Version Control: Changes to infrastructure are tracked and auditable.
• Cost Efficiency: Reduces operational overhead.
Tools: Terraform, AWS CloudFormation, Azure Resource Manager (ARM) Templates, Pulumi.
Continuous Delivery (CD)
An extension of Continuous Integration, where code changes are automatically built, tested, and prepared for release to
production. Every change that passes automated tests is a candidate for release. A manual approval step typically exists before
actual deployment to production.
Benefits:
• Reliable Releases: Confident in deploying at any time due to extensive automation.
• Reduced Risk: Smaller, more frequent releases mean less risk per release.
• Faster Time to Market: Features are ready to be deployed to users quicker.

Rakesh Kashyap 1
Full Stack Web Development VVPCS

Continuous Deployment (CD)


Takes Continuous Delivery a step further. Every change that passes all stages of the pipeline (including automated tests and
quality checks) is automatically deployed to production without manual intervention.
Benefits:
• Maximum Automation: Eliminates manual release bottlenecks.
• Fastest Feedback Loop: New features reach users almost instantly.
• High Velocity: Enables very rapid iteration and innovation.
Difference from Continuous Delivery: The key difference is the manual approval gate before production deployment in
Continuous Delivery, which is absent in Continuous Deployment. Continuous Deployment requires an extremely high level of
confidence in automated tests and monitoring.
Continuous Monitoring
The ongoing process of monitoring the entire application and infrastructure stack (performance, security, health, user
experience) in real-time.
Why Needed:
• Proactive Issue Detection: Identifies problems before they impact users.
• Performance Optimization: Provides insights into bottlenecks and areas for improvement.
• Security Insight: Detects anomalous behavior and potential security breaches.
• Feedback Loop: Informs development and operations teams about application behavior in production.
Tools:
• Metrics & Dashboards: Prometheus, Grafana, Datadog, New Relic, Amazon CloudWatch, Azure Monitor.
• Logging: ELK Stack (Elasticsearch, Logstash, Kibana), Splunk, Graylog.
• Tracing: Jaeger, Zipkin, OpenTelemetry.
• Alerting: PagerDuty, Opsgenie.
Explore the various tools used (T-Shaped Skills)
DevOps practitioners often have "T-shaped" skills, meaning deep expertise in one or two areas and broad knowledge across many
others.
• Version Control: Git, GitHub, GitLab, Bitbucket
• Configuration Management: Ansible, Puppet, Chef, SaltStack
• CI/CD: Jenkins, GitHub Actions, GitLab CI/CD, Bitbucket Pipelines, Azure DevOps
• Containerization: Docker, Kubernetes
• Cloud Platforms: AWS, Azure, Google Cloud Platform (GCP)
• Monitoring & Logging: Prometheus, Grafana, ELK Stack, Splunk, Datadog
• Infrastructure as Code: Terraform, CloudFormation, ARM Templates
• Testing: Selenium, JUnit, Pytest, Jest, Cypress, JMeter, SonarQube
• Artifact Management: Nexus, Artifactory

Version Control System


A Version Control System (VCS) is essential for software development for several reasons:

1. Collaboration:
Enables multiple developers to work on the same project concurrently without overwriting each other's changes.
2. Tracking Changes:
Records every modification made to the codebase, including who made it, when, and why.
3. Reversion:
Allows developers to revert to any previous version of the code, which is crucial for bug fixing or undoing
unwanted changes.
4. Branching and Merging:
Facilitates isolated development of new features or bug fixes (branches) and then integrates them back into the
main codebase (merging).
5. Conflict Resolution:
Provides tools to manage and resolve conflicts when multiple developers modify the same lines of code.
6. Backup and Disaster Recovery:
The history of the project is stored, providing a robust backup against data loss.
7. Accountability:
Tracks individual contributions, making it clear who changed what.
8. Code Review:
Supports code review processes by highlighting changes between versions.

Rakesh Kashyap 2
Full Stack Web Development VVPCS

Fundamentals of Git
Git: A free and open-source distributed version control system (DVCS).
Distributed Nature: Unlike centralized VCS (e.g., SVN), every developer has a complete copy of the repository,
including its full history. This means:
• Offline Work: Developers can commit changes locally without an internet connection.
• Resilience: No single point of failure; if the central server goes down, developers still have full copies.
• Faster Operations: Most operations (commits, diffs) are done locally.
Key Concepts:
• Repository (Repo): A collection of files and the history of changes to those files.
• Commit: A snapshot of your repository at a specific point in time. Each commit has a unique ID (SHA-1 hash),
an author, a timestamp, and a commit message.
• Branch: An independent line of development. Allows developers to work on new features or bug fixes without
affecting the main codebase.
• Merge: The process of combining changes from one branch into another.
• Head: A pointer to the latest commit in the currently checked-out branch.
• Working Directory: The actual files you see and edit on your file system.
• Staging Area (Index): An intermediate area where you prepare changes before committing them. You git add
files to the staging area.

Git Client Installation and Setup


1. Download:
• Windows: Download from git-scm.com.
• macOS: Install via Homebrew (brew install git) or by installing Xcode Command Line Tools (xcode-
select --install).
• Linux (Ubuntu/Debian): sudo apt update && sudo apt install git.
2. Installation Wizard:
Follow the prompts. Default options are usually fine for most users.
3. Initial Setup (Configure User Info):

Basic Local Git Operations


1. Creating a Repository:
• mkdir my-project
• cd my-project
• git init # Initializes an empty Git repository in the current directory
2. Cloning a Repository:
• git clone <repository-url> # Clones an existing remote repository to your local machine
• Example: git clone https://github.com/your-username/your-repo.git
3. Making and Recording Changes:
• Modify/Create Files: Make changes in your working directory.
• Check Status: git status (shows modified, staged, and untracked files).
• Staging Changes: git add <file-name> or git add . (to stage all changes).
• Committing Changes: git commit -m "Your descriptive commit message" (saves staged changes to
the local repository history).
4. Viewing the History of All Changes:
• git log # Shows a chronological list of commits
• git log --oneline # Shorter summary
• git log --graph --oneline --all # Visualizes branch history

Rakesh Kashyap 3
Full Stack Web Development VVPCS

5. Undoing Changes:
• Unstage a file: git reset HEAD <file-name> (moves changes from staging back to working directory).
• Discard changes in working directory (uncommitted): git checkout -- <file-name> (reverts file to its
last committed state).
• Undo a specific commit (creates a new commit that reverts the changes): git revert <commit-hash>
• Move HEAD to a previous commit (rewrites history, use with caution on shared branches): git
reset --hard <commit-hash>

Git Branching and Merging


Basic: Branches allow you to diverge from the main line of development and work on features or fixes in isolation.
1. Creating a new branch:
• git branch <new-branch-name>
2. Switching to a new branch:
• git checkout <branch-name> # Switches to an existing branch
• git checkout -b <new-branch-name> # Creates and switches to a new branch
3. Switching between branches:
• git checkout <existing-branch-name>
4. Merging local branches together:
• # First, switch to the branch you want to merge *into* (e.g., main)
• git checkout main
• # Then, merge the feature branch into the current branch
• git merge <feature-branch-name>
• Git will attempt a "fast-forward" merge if there are no diverging changes.
• If there are conflicts, Git will prompt you to resolve them manually before completing the merge.

GitHub
GitHub is a web-based platform that uses Git for version control. It provides a central hub for collaborative software development.
Basics of Distributed Git: GitHub acts as a "remote" repository. Developers push their local commits to GitHub and
pull changes from GitHub to synchronize their local repositories with the shared remote one.
Account Creation and Configuration:
1. Go to github.com and sign up.
2. Follow the instructions to verify your email.
3. Optionally, configure SSH keys for secure authentication without repeated password entry.
Create and Push to Repositories:
1. On GitHub, click "New repository".
2. Give it a name (e.g., my-project).
3. Choose public/private.
4. Initialize with a README (optional, but good practice).
5. To push an existing local repo:
• cd my-local-repo
• git remote add origin https://github.com/your-username/my-project.git
• git branch -M main
• git push -u origin main
Versioning:
• Git itself manages versions via commits.
• On GitHub, you can create Releases or Tags to mark specific points in history (e.g., v1.0.0) that correspond to
stable versions of your software.

Rakesh Kashyap 4
Full Stack Web Development VVPCS

Collaboration:
• Forking: Creating a personal copy of another user's repository.
• Pull Requests (PRs): The core mechanism for collaboration. A developer proposes changes from their branch (or
fork) to another branch (e.g., main). PRs are reviewed by others, commented on, and then merged.
• Issues: Used to track bugs, enhancements, and other tasks.
• Projects: Kanban boards for organizing work.
Migration:
Migrating repositories to/from GitHub involves cloning the existing repo and pushing it to a new GitHub
remote, or using GitHub's import tools for other VCS.
Create Repository named mini project-1 and Push the same to GitHub
Steps:
1. Create a local directory:
• mkdir "mini project-1"
• cd "mini project-1"
2. Initialize a Git repository:
• git init
3. Create some sample files:
• echo "# Mini Project 1" > README.md
• echo "console.log('Hello from mini-project-1!');" > app.js
4. Stage and commit the files:
• git add .
• git commit -m "Initial commit for mini project 1"
5. Go to GitHub.com:
• Log in to your GitHub account.
• Click the "+" sign in the top right corner, then "New repository."
• For "Repository name," type mini-project-1.
• Choose "Public" or "Private."
• Do NOT initialize with a README, .gitignore, or license (since you already have a local repo).
• Click "Create repository."
6. Connect your local repository to GitHub:
On the next page, GitHub will show you commands under "…or push an existing repository from the command
line."
Copy and paste these commands into your terminal (while still in the mini project-1 directory):
• git remote add origin https://github.com/YOUR_GITHUB_USERNAME/mini-project-1.git
• git branch -M main
• git push -u origin main
7. Verify:
Go back to your mini-project-1 repository page on GitHub and refresh. You should see README.md and app.js.

Cloud Basics
Cloud Infrastructure Overview
Cloud infrastructure refers to the collection of hardware and software components (servers, storage, networking,
virtualization) that enables cloud computing. It's the physical and virtual resources provided by cloud service providers.
• Compute: Virtual Machines (VMs), containers, serverless functions provide processing power.
• Storage: Object storage, block storage, file storage, databases store data.
• Networking: Virtual Private Clouds (VPCs), subnets, load balancers, gateways connect and manage traffic within and to
the cloud.
• Virtualization: Software (hypervisors) that creates virtual versions of hardware components, enabling multiple VMs to
run on a single physical server.

Rakesh Kashyap 5
Full Stack Web Development VVPCS

Cloud Computing Architecture and Its Components


Cloud computing architecture defines how the various components of a cloud system are integrated to deliver services.
• Front-end: The client-side, including the user interfaces (web browsers, mobile apps) and the client devices used to
access cloud services.
• Back-end: The cloud service provider's infrastructure (data centers, servers, storage, databases, networking equipment)
that hosts the applications and services.
• Network: The internet and internal network infrastructure that connects the front-end to the back-end, and also
interconnects various cloud resources.
• Cloud-based Delivery Platform: The software layers (e.g., hypervisors, orchestration software, APIs) that abstract and
manage the underlying physical infrastructure, allowing users to provision and manage resources.
Service Models
Cloud computing offers services at different levels of abstraction:
1. Infrastructure as a Service (IaaS)
IaaS provides virtualized computing resources over the internet. It offers fundamental infrastructure like virtual
machines, storage, networks, and operating systems, which customers can rent and manage.
Key Components:
• Compute (e.g., Virtual Machines)
• Storage (e.g., Block storage, Object storage)
• Networking (e.g., Load balancers, firewalls)
• Virtualization technology
• Monitoring & Security
Advantages:
• Scalability: Easily scale up or down based on needs.
• Cost-effective: Pay-as-you-go model reduces capital expenses.
• Control: Greater control over infrastructure compared to other models.
• Flexibility: Supports a variety of operating systems and software stacks.
Disadvantages:
• Management Overhead: Users must manage operating systems, middleware, and runtime.
• Security: More responsibility on the user to secure systems.
Examples:
• Amazon Web Services (AWS) EC2
• Microsoft Azure Virtual Machines
• Google Compute Engine
• IBM Cloud Infrastructure
2. Platform as a Service (PaaS)
PaaS offers a platform allowing customers to develop, run, and manage applications without the complexity of building
and maintaining infrastructure.
Key Components:
• Application Hosting & Development Tools
• Database Management Systems
• Middleware
• Runtime Environment
• Development Frameworks (e.g., Node.js, .NET, Java)
Advantages:
• Faster Development: Pre-built components and tools accelerate development.
• No Infrastructure Management: Developers can focus on writing code.
• Integrated Tools: Built-in version control, testing, and collaboration tools.
• Automatic Updates: Platform is maintained by the provider.
Disadvantages:
• Less Control: Developers have less access to the underlying infrastructure.
• Compatibility Issues: Vendor lock-in can make migration difficult.
• Limited Customization: Some platforms restrict customization or language support.
Examples:
• Google App Engine • Red Hat OpenShift
• Microsoft Azure App Service • AWS Elastic Beanstalk
• Heroku

Rakesh Kashyap 6
Full Stack Web Development VVPCS

3. Software as a Service (SaaS)


SaaS delivers software applications over the internet, on a subscription basis. Users can access the software via web
browsers without installing it locally.
Key Components:
• Applications Hosted in the Cloud
• Multi-tenancy Architecture
• Web-based Access
• Subscription/Billing Models
• Data Storage & Security
Advantages:
• Accessibility: Use from any device with internet access.
• No Installation Required: Reduces IT overhead.
• Automatic Updates: Regular updates and patches from the provider.
• Collaboration: Often includes collaboration tools and cloud data sync.
Disadvantages:
• Limited Control: Less control over features and updates.
• Dependency on Internet: Internet outages disrupt access.
• Data Security Risks: Sensitive data stored on third-party servers.
Examples:
• Google Workspace (Docs, Gmail, Sheets)
• Microsoft 365
• Salesforce
• Dropbox
• Zoom

Deployment Models
Cloud services can be deployed in different ways:
1. Public Cloud:
• What it is: Cloud services delivered over the public internet and available to anyone. Resources are owned and
operated by a third-party cloud provider (e.g., AWS, Azure, GCP).
• Characteristics: High scalability, cost-effective (pay-as-you-go), multi-tenancy.
2. Private Cloud:
• What it is: Cloud infrastructure exclusively used by a single organization. It can be physically located on the
company's premises or hosted by a third-party service provider.
• Characteristics: Greater control, enhanced security, compliance benefits.
3. Hybrid Cloud:
• What it is: A combination of two or more distinct cloud infrastructures (private, public, or on-premises) that
remain unique entities but are bound together by proprietary technology or standardized technology that enables
data and application portability.
• Characteristics: Flexibility, ability to leverage existing on-premise investments, burst capacity to public cloud.
4. Multi-cloud:
• What it is: The use of multiple cloud computing services from different cloud providers within a single
architecture. It's about using multiple public clouds (e.g., AWS for compute, Azure for AI services).
• Characteristics: Vendor lock-in avoidance, resilience, leveraging best-of-breed services.
Virtualization
The technology that creates virtual versions of computing resources, such as operating systems, servers, storage devices,
or network resources.
How it works:
A hypervisor (or Virtual Machine Monitor, VMM) is software that sits between the hardware and the virtual
machines. It creates and runs virtual machines (VMs), allowing multiple operating systems to run concurrently on a
single physical host machine, sharing its resources.
Importance in Cloud:
Virtualization is fundamental to cloud computing. It allows cloud providers to provision scalable and isolated
virtual resources to multiple customers from a shared pool of physical hardware, maximizing resource utilization.

Rakesh Kashyap 7
Full Stack Web Development VVPCS

Cloud Native Application Development


An approach to building and running applications that exploits the advantages of the cloud computing delivery model.
Cloud-native applications are designed to be highly scalable, resilient, and manageable.
Key Principles:
• Microservices: Applications are broken down into small, independently deployable services.
• Containers: Services are packaged into lightweight, portable, and consistent units (Docker).
• Orchestration: Tools like Kubernetes automate the deployment, scaling, and management of containerized
applications.
• Serverless Computing: Developers write code, and the cloud provider fully manages the underlying
infrastructure (e.g., AWS Lambda).
• CI/CD: Automated pipelines for rapid and reliable deployment.
• DevOps: Collaboration and automation throughout the entire software lifecycle.
• Observability: Comprehensive monitoring, logging, and tracing built-in.
Create Cloud Account (AWS, GCB or any other service provider) and Explore Features
(Assuming AWS for demonstration purposes, steps are similar for GCP/Azure)
1. Create AWS Account:
o Go to aws.amazon.com.
o Click "Create an AWS Account."
o Follow the prompts: provide email, password, account name, credit card details (for verification, you usually
start with a Free Tier).
o Complete phone verification.
o Choose a support plan (Free tier is usually selected by default).
o Log in to the AWS Management Console.
2. Explore Features:
o Dashboard: Get an overview of your services, recent activity, and cost forecasts.
o Services Menu: Browse various services categorized by Compute, Storage, Database, Networking, Security,
etc.
o IAM (Identity and Access Management): Learn how to create users, groups, and roles to manage permissions.
(Crucial for security).
o Billing Dashboard: Monitor your spending and understand how the Free Tier applies.
Create and Setup a Virtual Machine (AWS EC2)
1. Log in to AWS Management Console.
2. Navigate to EC2: Search for "EC2" in the search bar and select it.
3. Launch Instance: Click "Launch Instance" on the EC2 Dashboard.
4. Choose an Amazon Machine Image (AMI): Select a free tier eligible AMI (e.g., Amazon Linux 2023 AMI or Ubuntu
Server 22.04 LTS).
5. Choose an Instance Type: Select a free tier eligible type (e.g., t2.micro or t3.micro).
6. Configure Instance Details: Defaults are usually fine for basic setup. You can choose a VPC and subnet if you've set
them up.
7. Add Storage: Default 8GB is usually fine for basic VMs.
8. Add Tags: Optional, but good for organization (e.g., Name: MyWebAppVM).
9. Configure Security Group: This is crucial.
• Create a new security group.
• Add rules to allow incoming traffic:
▪ SSH (Port 22): For connecting to the VM. Restrict to "My IP" for security.
▪ HTTP (Port 80): For web traffic. Set source to "Anywhere" for a public web server.
▪ HTTPS (Port 443): If you plan to use SSL.
10. Review and Launch: Review your settings.
11. Create New Key Pair:
• Choose "Create a new key pair."
• Give it a name (e.g., my-webapp-key).
• Download the .pem file and keep it secure (you'll need it to SSH into the VM).
• Click "Launch Instances."

Rakesh Kashyap 8
Full Stack Web Development VVPCS

12. Connect to VM (using SSH):


• Once the instance status is "Running", select it in the EC2 Dashboard.
• Click "Connect."
• Follow the SSH client instructions, usually:
▪ chmod 400 my-webapp-key.pem
▪ ssh -i "my-webapp-key.pem" ec2-user@<Your Public IPv4 DNS or IP>
▪ (user name might be ubuntu for Ubuntu AMIs)
13. Setup a basic web server (e.g., Nginx on Amazon Linux):
• sudo yum update -y
• sudo yum install nginx -y
• sudo systemctl start nginx
• sudo systemctl enable nginx
Create a Simple Webapp Using Cloud Services (AWS S3 for Static Hosting)
For a simple web app (HTML, CSS, JS), AWS S3 is a cost-effective and scalable solution for static website hosting.
1. Create an S3 Bucket:
• Navigate to S3 in the AWS Console.
• Click "Create bucket."
• Give it a globally unique name (e.g., my-simple-webapp-2025).
• Choose a region.
• Crucially: Uncheck "Block all public access" and acknowledge the warning (you need it to be public for a website).
• Click "Create bucket."
2. Upload Web Files:
• Inside your new bucket, click "Upload."
• Drag and drop your index.html, style.css, script.js (and any other assets) into the bucket.
• Click "Upload."
3. Enable Static Website Hosting:
• Go to your bucket, click the "Properties" tab.
• Scroll down to "Static website hosting" and click "Edit."
• Select "Enable."
• For "Index document," type index.html.
• For "Error document" (optional), type error.html.
• Click "Save changes."
4. Configure Bucket Policy (to allow public read access):
• Go to your bucket, click the "Permissions" tab.
• Under "Bucket policy," click "Edit."
• Paste the following policy, replacing YOUR_BUCKET_NAME with your actual bucket name:
• Click "Save changes."
5. Access Your Website:
• Go back to the "Properties" tab of your bucket.
• Scroll down to "Static website hosting." You'll find an "Endpoint" URL (e.g., http://my-simple-webapp-2025.s3-
website.ap-south-1.amazonaws.com).
• Open this URL in your browser, and your simple web app should be visible.

Rakesh Kashyap 9
Full Stack Web Development VVPCS

How to Use Cloud Service for User Authentication Flow (AWS Cognito)
AWS Cognito is a managed service for user authentication, authorization, and user management. It supports sign-up, sign-in, and
password reset flows.
1. Create a User Pool:
o Navigate to Cognito in the AWS Console.
o Click "Create user pool."
o Configure sign-in experience: Choose how users will sign in (e.g., Username, Email, Phone number).
o Configure security requirements: Set password policies, MFA requirements.
o Configure sign-up experience: Enable self-registration, verify email/phone.
o Configure message delivery: Set up email/SMS for verification and password reset.
o Integrate your app: Create an "App client" within the User Pool settings. This generates a client ID.
o Configure domain: Provide a Cognito domain (e.g., your-app-domain.auth.ap-south-1.amazoncognito.com).
o Review and create.
2. Integrate with your Web App:
o Use AWS Amplify or AWS SDK: For front-end development, AWS Amplify (JavaScript, React, Angular,
Vue, etc.) provides pre-built UI components and easy-to-use APIs for authentication.
o Cognito provides hosted UI for login/signup pages, which can simplify integration.

Build a Basic Web Application on AWS (amazon.com)


This refers to an AWS tutorial for building a basic web application. The steps provided above for static hosting on S3 and using
EC2 for a dynamic app, along with Cognito for auth, cover the core components usually demonstrated in such tutorials.

Continuous Integration (CI) with CI/CD Tools


The goal is to set up a build pipeline with steps for code build, test, and code quality check. We'll use GitHub Actions as an
example, as it's directly integrated with GitHub repositories.
Scenario: A simple Node.js web application (e.g., a "To-do" app) with unit tests and a code quality check (e.g., ESLint).
Assumptions:
• You have a GitHub repository for your simple web application (e.g., your-username/todo-app).
• The application is a Node.js project with package.json, index.js, test.js (for unit tests), and .eslintrc.json (for ESLint
configuration).
Working of GitHub Actions:
• Workflows: Automated processes configured in YAML files (.github/workflows/*.yml) in your repository.
• Events: Workflows are triggered by events (e.g., push to a branch, pull_request, schedule).
• Jobs: A workflow consists of one or more jobs that run in parallel or sequentially.
• Steps: Each job consists of a sequence of steps, which can be commands or actions.
• Actions: Reusable units of code (scripts) from the GitHub Marketplace or your own repository.
• Runners: Virtual machines hosted by GitHub (or self-hosted) that execute your jobs.

Rakesh Kashyap 10
Full Stack Web Development VVPCS

Steps to Create a Build Pipeline using GitHub Actions:


1. Navigate to your GitHub Repository: Go to https://github.com/your-username/todo-app.
2. Create a Workflow File:
o Click on the "Actions" tab.
o Click on "New workflow" or "set up a workflow yourself".
o This will open a new file in your repository at .github/workflows/main.yml.
3. Define the Workflow (main.yml):
4. Commit the Workflow File:
o After pasting the YAML, click "Start commit" (or "Commit changes").
o Add a commit message (e.g., "Add CI pipeline with GitHub Actions").
o Click "Commit new file."
5. Trigger and Monitor:
o Once committed, the workflow will automatically trigger (since you pushed to main).
o Go to the "Actions" tab in your repository. You will see your workflow running.
o Click on the running workflow to see the progress of each step. If any step fails, the job will fail, and you'll get
detailed logs to debug.
This pipeline ensures that every time code is pushed to main or a pull request is created against main, the code is automatically
built, tested, and checked for quality.

Comparison of Cloud Services (AWS, Azure, GCP)


Feature / Provider Amazon Web Services (AWS) Microsoft Azure Google Cloud Platform (GCP)
Market Share Largest (dominant) Second largest Third largest, rapidly growing
Broadest and deepest set of Strong in AI/ML, Big Data,
Strong hybrid cloud capabilities,
services, mature ecosystem, Kubernetes, global network
Strengths deep integration with Microsoft
first-mover advantage, infrastructure, open-source
enterprise tools.
serverless. friendly.
EC2 (VMs), Lambda Virtual Machines, Azure Compute Engine (VMs), Cloud
Compute (Serverless), ECS/EKS Functions (Serverless), AKS Functions (Serverless), GKE
(Containers) (Containers) (Containers)
S3 (Object), EBS (Block), EFS Blob Storage, Disk Storage, File Cloud Storage (Object), Persistent
Storage (File), RDS (DB), DynamoDB Storage, Azure SQL DB, Cosmos Disk (Block), Filestore (File),
(NoSQL) DB (NoSQL) Cloud SQL, Firestore (NoSQL)
VPC, Route 53 (DNS), ELB
Virtual Network, DNS, Load VPC, Cloud DNS, Cloud Load
Networking (Load Balancing), CloudFront
Balancer, CDN Balancing, Cloud CDN
(CDN)
RDS (MySQL, PgSQL, Oracle, Azure SQL DB, PostgreSQL, Cloud SQL (MySQL, PgSQL,
Databases SQL Server), Aurora, MySQL, Cosmos DB, Synapse SQL Server), Firestore, BigQuery
DynamoDB, Redshift (DW) Analytics (DW) (DW), Spanner (NewSQL)
Vertex AI (unified platform),
Azure ML, Cognitive Services,
AI/ML SageMaker, Rekognition, Polly Vision AI, Natural Language AI,
Azure Bot Service
TensorFlow integration
AWS Outposts, AWS Azure Arc, Azure Stack (strong
Hybrid Cloud Anthos (strong focus)
Wavelength focus)
Pay-as-you-go, complex with Pay-as-you-go, often offers Pay-as-you-go, granular billing,
Pricing Model many options, can be hard to discounts for existing Microsoft often competitive for specific
optimize. customers. services.
Very high, strong appeal to Growing, appealing to cloud-
High, widely adopted by large
Enterprise Focus enterprises with existing native enterprises and those
enterprises.
Microsoft investments. focused on data/AI.

Rakesh Kashyap 11
Full Stack Web Development VVPCS

How to Make Full Stack Development Efficient by Using DevOps


DevOps fundamentally transforms full-stack development by integrating practices and tools across the entire software delivery
lifecycle, leading to increased efficiency, speed, and quality.
1. Accelerated Development Cycles with CI/CD:
o Continuous Integration: Developers commit code frequently to a shared repository. Automated builds and
tests run on every commit, quickly identifying integration issues and bugs. This eliminates "integration hell" and
allows developers to focus on writing code rather than fixing merge conflicts.
o Continuous Delivery/Deployment: Once code passes all automated tests and quality checks, it's either ready
for manual deployment (CD) or automatically deployed to production (CDp). This dramatically reduces the time
from code commit to production, enabling rapid iteration and faster feedback from end-users.
o Efficiency Gain: Developers spend less time on manual deployment, debugging integration issues, and waiting
for releases.
2. Consistent Environments with Infrastructure as Code (IaC) & Configuration Management:
o IaC: Defines infrastructure (servers, databases, networks) as code, version-controlled like application code. This
ensures that development, testing, and production environments are identical, reducing environment-specific
bugs and making new environment provisioning fast and repeatable.
o Configuration Management: Automates the configuration of software and services on these infrastructures.
This prevents "configuration drift" and ensures that all components behave as expected across environments.
o Efficiency Gain: Eliminates manual environment setup errors, speeds up environment provisioning, and
reduces debugging time related to environmental discrepancies.
3. Enhanced Collaboration and Communication:
o Shared Responsibility: DevOps breaks down silos between development and operations teams, fostering a
culture of shared responsibility for the entire application lifecycle.
o Version Control (Git/GitHub): Centralized code repositories facilitate seamless collaboration, code reviews
(via Pull Requests), and clear tracking of who changed what, improving code quality and team accountability.
o Feedback Loops: Continuous monitoring provides real-time insights into production performance and issues,
directly feeding back into the development cycle for quick resolution and continuous improvement.
o Efficiency Gain: Reduces miscommunication, accelerates problem-solving, and improves overall team synergy.
4. Automated Quality Assurance with Comprehensive Testing:
o Automated Testing: Unit, integration, end-to-end, performance, and security tests are integrated into the CI/CD
pipeline. This ensures that code changes are thoroughly validated automatically, catching defects early.
o Code Quality Tools: Linters and static analysis tools automatically check for coding standards, potential bugs,
and security vulnerabilities.
o Efficiency Gain: Reduces the need for extensive manual testing, shortens testing cycles, and improves software
reliability, leading to fewer post-release defects.
5. Improved Resilience and Scalability through Cloud-Native Practices:
o Containerization (Docker) & Orchestration (Kubernetes): Full-stack applications are packaged into portable
containers and managed by orchestrators. This ensures consistent runtime environments and enables automatic
scaling and self-healing.
o Microservices Architecture: Breaking down monolithic applications into smaller, independently deployable
services (often hosted in containers) allows teams to develop, test, and deploy parts of the application
independently, reducing complexity and increasing agility.
o Serverless Computing: For specific components, using serverless functions allows developers to focus purely
on code without managing servers, optimizing resource utilization and reducing operational overhead.
o Efficiency Gain: Simplifies deployment, improves application resilience, enables cost-effective scaling, and
allows developers to focus on business logic rather than infrastructure management.

Rakesh Kashyap 12

You might also like