Module 1-5 Cloud
Module 1-5 Cloud
Micro Services
CCA3010
Module 1
Syllabus
1.Unclear Requirements:
2.Poor Communication:
3.Scope Creep:
4.Inadequate Testing:
5.Integration Issues:
6.Lack of Automation:
7.Insufficient Quality Assurance:
8.Resource Constraints:
9.Ineffective Project Management:
Software delivery challenges:
10. Security Concerns:
11. Regulatory Compliance:
12.Scaling Challenges:
• Addressing these challenges often involves adopting best practices such as Agile
methodologies, DevOps principles, continuous integration and delivery (CI/CD), and
robust testing and automation strategies.
Waterfall Model:
• The Waterfall model is a traditional and linear software development
methodology where progress is seen as flowing steadily through sequential
phases such as requirements, design, implementation, testing, deployment,
and maintenance.
• Challenges:
• Challenges:
1.False Positives/Negatives: Static analysis tools may produce false positives (indicating
issues that aren't real problems) or false negatives (missing actual issues).
2.Limited Context Awareness: Static analysis tools might lack the ability to fully
understand the context of the software, leading to potential misinterpretations.
Agile
• Agile is an iterative and incremental approach to software development. It prioritizes
flexibility, collaboration, and customer satisfaction. Agile methodologies -such as Scrum
• Key Principles:
1.Customer Collaboration Over Contract Negotiation: Agile values customer feedback and
collaboration throughout the development process.
2.Responding to Change Over Following a Plan: Agile embraces change and adapts to
evolving requirements, even late in the development process.
3.Deliver Working Software Regularly: Frequent and consistent delivery of working
software is a core tenet of Agile.
4.Individuals and Interactions Over Processes and Tools: Agile emphasizes the importance
of effective communication and collaboration within development teams.
• Benefits:
• Faster response to changing requirements, enhanced customer satisfaction, and a more
adaptive and collaborative development environment.
Digital Delivery:
• Overview:
• Digital delivery refers to the process of delivering software, services, or products in a
digital format. It often involves the use of digital technologies, online platforms, and
automated processes to bring products and services to end-users.
• Key Components:
1.Digital Technologies: Leveraging technologies such as cloud computing, mobile
applications, and web-based platforms for delivery.
2.Automation: Streamlining and automating various aspects of the delivery process,
including deployment, testing, and monitoring.
3.User-Centric Design: Focusing on designing products and services with the end-user in
mind, often involving iterative feedback loops.
• Benefits:
• Faster time to market, scalability, improved user experiences, and the ability to adapt to
evolving digital trends.
Software delivery on the cloud,
• Software delivery on the cloud refers to the process of developing, deploying, and
delivering software applications using cloud computing services and resources. Cloud
computing provides a scalable, on-demand, and pay-as-you-go infrastructure, offering
several advantages for software delivery. Here are key aspects and considerations related
to software delivery on the cloud:
1.Cloud Service Models:
1. Infrastructure as a Service (IaaS): Provides virtualized computing resources,
allowing developers to manage the operating system, runtime, middleware, and
applications. Examples include Amazon EC2, Azure Virtual Machines, and Google
Compute Engine.
2. Platform as a Service (PaaS): Offers a platform with development tools, databases,
and runtime environments, abstracting the underlying infrastructure. Examples
include Heroku, Google App Engine, and Azure App Service.
3. Software as a Service (SaaS): Delivers software applications over the internet,
eliminating the need for users to install, manage, and maintain the software.
Examples include Google Workspace, Microsoft 365, and Salesforce.
Software delivery on the cloud,
2. Key Considerations for Cloud Software Delivery:
• Scalability: Cloud services provide the ability to scale resources up or down based on
demand, ensuring that applications can handle varying workloads effectively.
• Flexibility: Cloud environments offer a range of services and tools that cater to
diverse application needs, enabling developers to choose the best-fit solutions for
their requirements.
• DevOps and CI/CD: Cloud platforms support DevOps practices, enabling
continuous integration and continuous delivery (CI/CD) pipelines. Automation tools
help streamline the development, testing, and deployment processes.
• Resource Optimization: Cloud platforms allow for efficient resource utilization by
dynamically allocating and deallocating resources based on demand. This helps
optimize costs and improve overall performance.
• Security: Cloud providers offer a variety of security features, but it's crucial for
development teams to implement best practices for securing applications and data in
the cloud.
Software delivery on the cloud,
3. Cloud Delivery Models:
1. Multi-Cloud: Involves using services from multiple cloud providers, offering
redundancy, resilience, and the ability to choose the best services from each provider.
2. Hybrid Cloud: Combines on-premises infrastructure with cloud services, providing
flexibility and allowing organizations to leverage existing investments while
benefiting from cloud capabilities.
4. Serverless Computing:
Serverless architectures, offered through platforms like AWS Lambda, Azure Functions,
and Google Cloud Functions, allow developers to focus on writing code without
managing the underlying infrastructure. This model is event-driven and scales
automatically.
5. Cost Management:
Cloud services are typically pay-as-you-go, and effective cost management involves
optimizing resource usage, leveraging reserved instances, and monitoring spending to
avoid unnecessary expenses.
Software delivery on the cloud,
In summary, software delivery on the cloud offers numerous advantages, including
scalability, flexibility, and a variety of managed services.
However, teams need to consider factors like security, cost management, and the
appropriate cloud service model based on their specific requirements.
Continuous Integration
Continuous Integration (CI) and Continuous Delivery (CD) are integral practices in modern
software development, helping teams to automate and streamline the software delivery
process.
• Continuous Integration (CI):
• Definition: Continuous Integration is a development practice where developers
frequently integrate their code changes into a shared repository. Each integration triggers
an automated build and a series of tests to detect and address integration issues early in
the development lifecycle.
• Key Concepts:
1.Automated Builds: The CI process involves automatically building the software after
every code integration to ensure that the codebase is always in a functional state.
2.Automated Testing: Automated tests, including unit tests and integration tests, are
executed to verify that the new changes do not introduce regressions or integration issues.
3.Version Control: CI relies on a version control system (e.g., Git) to manage and track
changes to the codebase.
Continuous Integration
4. Frequent Integration: Developers integrate their code changes into the main branch
multiple times a day, promoting collaboration and reducing the risk of integration issues.
• Benefits:
• Early Issue Detection: Integration issues and conflicts are detected early in the
development process, reducing the time and effort required for bug fixing.
• Consistent Builds: Automated builds ensure that the software is built consistently,
avoiding issues related to different environments.
• Collaboration: Frequent integration encourages collaboration among team members,
leading to a more cohesive and rapidly evolving codebase.
Continuous Delivery
• Definition: Continuous Delivery is an extension of CI that focuses on automating the
entire software delivery process, including testing, deployment, and release. The goal is
to make the software delivery process efficient, reliable, and ready for deployment at any
time.
• Key Concepts:
• Purpose: CI aims to catch integration issues early in the development process, while CD
focuses on automating the entire software delivery lifecycle, making it ready for
production deployment at any time.
Infrastructure as Code (IaC)
• Infrastructure as Code (IaC) is a key concept in modern software development and IT
operations. It involves managing and provisioning computing infrastructure through
machine-readable script files, rather than through physical hardware configuration or
interactive configuration tools.
• Key Concepts of Infrastructure as Code:
1. Automation:
IaC emphasizes the automation of infrastructure provisioning and management. Instead of
manually configuring servers and other infrastructure components, automation scripts are used to
define the desired state.
2. Declarative Syntax:
IaC scripts are written using a declarative syntax, where the focus is on defining the desired end-
state of the infrastructure rather than specifying the step-by-step procedures to achieve that state.
3. Idempotence:
IaC scripts should be idempotent, meaning that running the same script multiple times should
produce the same result as running it once. This ensures consistency and repeatability.
Infrastructure as Code (IaC)
4. Scalability: Infrastructure can be easily scaled up or down by modifying the IaC scripts.
This is particularly beneficial in cloud environments where resources can be dynamically
provisioned based on demand.
5. Scalability:
With IaC, scaling infrastructure up or down based on demand becomes more
straightforward, particularly in cloud environments.
Popular IaC Tools:
1. Terraform:
A widely-used open-source IaC tool that supports multiple cloud providers and on-premises
infrastructure.
2. AWS CloudFormation:
Amazon Web Services' native IaC service for defining and provisioning AWS infrastructure.
3. Azure Resource Manager (ARM) Templates:
Microsoft Azure's native IaC tool for defining and deploying resources within Azure.
4. Ansible:
An open-source automation tool that supports configuration management and infrastructure
provisioning.
5. Chef:
A configuration management tool that can be used for defining and managing infrastructure.
6. Puppet:
A configuration management tool similar to Chef, used for automating the provisioning and
management of infrastructure.
Introduction to Kubernetes
• Kubernetes is an open source container management tool which automates container
deployment, container scaling, and load balancing.
History
• Google developed an internal system called ‘borg’ (later named as Omega) to deploy and
manage thousands google applications and services on their cluster.
• In 2014, google introduced Kubernetes an open source platform written in ‘Golang’ and
later donated to CNCF.
Introduction to Kubernetes
Online Platform for K8s
• Kubernetes playground
• Play with K8s
• Play with Kubernetes classroom
• Minicube
• Kubeadm
Introduction to Kubernetes
Data Volumes Only shared with containers in same Can be shared with any other
Pod container
Autoscaling Support vertical and horizontal Not support autoscaling
scaling
Logging and /monitoring Inbuilt tool for monitoring Used 3rd party tool like splunk
Market Share 57 11
Lifecycle of a Container
Kubernetes involves several stages, from creation to termination. Here's an overview of the
typical lifecycle:
1. Container Image Creation
2. Container Definition
3. Container Scheduling
4. Container Initialization
5. Container Running
6. Monitoring and Logging
7. Scaling and Updates
8. Container Termination
9. Resource Cleanup
10.Container Deletion
Lifecycle of a Container
1. Container Image Creation- The lifecycle begins with the creation of a container image.
This image is a lightweight, standalone, and executable software package that includes
everything needed to run a piece of software, including the code, runtime, libraries, and
system tools.
2. Container Definition- Kubernetes uses YAML or JSON configuration files to define the
specifications of a container and its associated resources, such as CPU and memory
requirements, environment variables, and volume mounts. This configuration is often
encapsulated in a Kubernetes Pod object.
3. Container Scheduling- The Kubernetes scheduler takes the container specifications and
decides on which node within the cluster the container should run.
4. Container Initialization- Once scheduled, the container runtime (e.g., Docker) pulls the
container image from a container registry onto the node where it's scheduled.
5. Container Running- The container is now in a running state, actively serving its intended
purpose. It will continue to run until it completes its task, is manually stopped, or encounters
an issue.
Lifecycle of a Container
6. Monitoring and Logging- Kubernetes monitors the container's health by periodically
checking its status. Logs generated by the container are typically collected and managed by
Kubernetes for later inspection.
7. Scaling and Updates- Kubernetes allows for scaling applications by adjusting the number
of replicas.
8. Container Termination- Containers can be terminated for various reasons, such as
completing their tasks, reaching resource limits, encountering errors, or being manually
stopped. When a container terminates, its resources are released, and it moves to a
"terminated" state.
9. Resource Cleanup- After termination, Kubernetes can perform resource cleanup, ensuring
that any associated resources like volumes, network connections, and temporary storage are
properly released.
10. Container Deletion- The container instance is removed from the node, and its status is
updated in the Kubernetes control plane.
Container Registries
• A container registry is a centralized repository for storing and managing container images.
• Container registries store container images, which are snapshots of a file system, application
code, runtime, libraries, and other dependencies needed to run a containerized application.
Registry Types:
• Public Registries: These are open to the public, and anyone can access and download images.
Examples include Docker Hub, Google Container Registry, and Quay.io.
• Private Registries: These are restricted to authorized users or organizations. Private registries
provide a secure and controlled environment for storing proprietary or sensitive images.
Examples include Amazon ECR, Azure Container Registry, and Harbor.
Docker Hub:
• Docker Hub is one of the most widely used public container registries. It hosts a vast number of
public images that developers can use directly or as a base for building their own images. It also
supports private repositories for organizations.
Container Registries
Authentication and Authorization:
Registries typically implement authentication mechanisms to control access to images. Users or
systems need proper credentials to pull or push images to a registry. Access control policies
ensure that only authorized individuals or systems can perform specific actions.
• To delete container
docker rm abc
Docker Commands (Commonly used)
• To delete image
docker image rm (image name)
• Only download image (ubuntu) from docker hub to local machine
docker pull ubuntu
• Show docker disk usage
docker system df
• Login to docker registry
docker login