Cloud Computing Flashcards

1
Q

Cloud history

A
  • late 90s idea of remotely provide products, services and functionalities
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Definition of cloud computing by NIST

A
  • 2011
  • something that provides resources from remote (piombe)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Differences and definitions of on-premise and cloud-based infrastructures

A
  • on-premise: the infrastructure is physically present in the organization’s property or in its data centers.
  • cloud-base: all that is not on-premise

An on-premise can work with a cloud-based and can be moved to it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Differences and definitions of horizontal and vertical scaling

A

Scaling is the ability to handle increased or decreased demand.
- horizontal: in or out; you allocate or de-allocate resources that are all equal one with each other. It is less expensive. It doesn’t require some additional logical set up but it requires additional hardware. It’s immediate. it is not limited by hardware capacity

  • vertical: up or down, replace of a resource with another that have higher or lower capacity. It is more expansive. Usually it is immediate and it doesn’t require additional hardware but it is limited by hardware capacity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which are the business drivers for cloud computing?

A
  • capacity planning
  • cost reduction
  • operational overhead
  • organizational agility
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Capacity planning

A
  • it’s the process of determining and satisfy the resources demand. It has the goal to minimize the discrepancy between the available resources and the demand.
    There are three strategies: lead (add in anticipation), lag (add when needed), match (little and constant increase)
    This is done to avoid under-provisioning or over-provisioning
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Operational overhead

A

the IT budget is usually used as a countermeasure for operational overheads such as:
- technical staff to keep the system up
- upgrades, patches
- security
- administrative and accounts staff
- costs of power and cooling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Cost reduction (business driver)

A
  • it’s the direct alignment between IT costs and business performance in fact when the IT env grows its maximum usage requirements are evaluated to not waste any resource
  • between the IT costs there is often the one needed to have business automation but also the best automation cannot manage everything (it is limited by the underlying infrastructure) so investments are often used for the environment improvement

two main costs:
- for acquiring new infrastructures
- for having the ownership

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Organizational agility

A

it’s the ability that the system must have to face internal or external changes -> measure of its responsiveness

it’s easier and less expensive with cloud computing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which are the cloud computing benefits from a cloud consumer point of view?

A
  • cost reduction
  • scalability increase
  • availability increase
  • reliability increase
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Cost reduction (benefit)

A
  • with cloud computing up front costs are nearly deleted so enterprises can start with just a small infrastructure using the budget for the core of the business and taking the needed resources from a cloud provider when they need them and release them otherwise and at a lower cost
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Scalability increase (cloud consumer POV)

A
  • on-demand acces to pay as you go resources on short term basis
  • abstraction of the infrastructure: for example apps are no locked into the physical device but can be moved
  • perception of having unlimited resources
  • possibility to modify the infrastructure as needed at a fine-grained level
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Availability increase

A

consumers can access a cloud service whenever and from anywhere. they can access their stored data, download them and make computations on them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Reliability increase

A

without cloud computing when the “business is open” no works can be done on the infrastructure and if a runtime failure comes it means that functionalities will no longer be available for the consumers -> business loss

goal: minimize te impact of runtime failure conditions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Cloud service and all parties involved

A
  • cloud consumer + cloud service consumer: cloud consumer is a TEMPORARY RUNTIME ROLE ASSUMED BY A SOFTWARE PROGRAM WHEN IT ACCESSES A CLOUD SERVICE
  • cloud provider
  • cloud service administrator
  • cloud auditor
  • cloud broker
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

SLA guarantees

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which are the required characteristics that a cloud has to have to be considered an effective cloud?

A
  • on demand usage
  • measured usage
  • elasticity
  • resiliency
  • multi tenancy and resource pooling
  • ubiquitous access
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Cloud characteristics: on-demand usage

A

when the env is configured and it is no longer needed the involvement of the cloud consumer or provider

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Cloud characteristics: elasticity

A

it is the ability of a cloud to transparently scale IT resources based on runtime conditions. The larger the env the greater the elasticity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Cloud characteristics: measured usage

A
  • ability of keeping track of the ITresources usage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Cloud characteristics: resiliency

A
  • it’s a form of failover: the cloud distributes redundant implementations of IT resources across physical locations
  • if one becomes deficient the other turns on
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Cloud characteristics: mulitenancy and resource pooling

A
  • resource pooling: is the action of using multi tenancy models to serve multiple cloud service consumers
  • multitenancy: is when a software program creates an instance to serve different tenants that are isolated one from another
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Cloud characteristics: ubiquitous access

A
  • it has to be widely accessible
  • it has to satisfy every type of device, protocol, …
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which are the cloud deployment models?

A
  • public cloud
  • private cloud
  • community cloud
  • hybrid cloud
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Which are the cloud delivery models?

A
  • IaaS
  • PaaS
  • SaaS
  • XaaS

These are spcefici, pre-packaged combination of IT resources offered by a cloud provider

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Public cloud

A
  • owner: a third party organization
  • access: at a cost or commercialized via other avenues as publicity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Private cloud

A
  • the owner organization is both the provider and the consumer so there will be department that will be the provider and others that will be the consumers; IT resources are both on-premise and on-demand
  • the administration can be both internal and external
  • access: just for the organization members
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Community cloud

A
  • ownership: one or more organizations independent one from another
  • access: for community members at different levels. they share the responsibility to define and evolve the community cloud
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Hybrid cloud

A
  • the sum of two or three different models
  • example: private cloud for sensitive data and public one for the other
  • difficult to divide the ownership
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

IaaS

A
  • autonomous environment
  • raw resources (hardware, network, connectivity, OSs, …) are virtualized and than packaged to make them easily runnable and customizable
  • they aren’t preconfigured but they are offered as freshly initialized virtual instances -> the consumer has a high level of control of the configuration and the utilization. of the resources
  • responsibilities: patching OS, updating apps, enforcing security, network configuration…
  • they are packaged and a cloud consumer can access them using interfaces and tools offered by the cloud service
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

PaaS

A
  • lower level control than IaaS because PaaS has pre-configured and ready-to-use resources

It is chosen when there is the need to extend the on-premise environment or to entirely substitute it, or to make available just some services, or when he doesn’t want to worry about setting up the env

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

SaaS

A
  • everything is pre-configured because SaaS is a program software that is made available as a product, a generic utility

Why it is not a simple cloud service but a SaaS? Because it is reusable and widely available to cloud consumers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

XaaS

A
  • X: everything/anything/X
  • benefits: controlled and lowered costs, lowered risks, innovation is accelerated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Which are the technologies based on a cloud infrastructure?

A
  • Virtualization
  • Containerization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

General definition of Virtualization

A

it’s the process of creating an abstraction level over the physical layer such that there can be more virtual computers THAT ARE THE VMs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

VM’s components (4)

A
  • Guest OS: it doesn’t know it is running on something virtual. It. runs on a virtual hardware that has to be as similar as possible to the real one. Its characteristics are defined in the virtual hardware profile
  • Host OS: is the OS running on the underlying physical layer. IT HAS TO VIRTUALIZE THE HARDWARE. It works together with the Hypervisor and the Virtual Machine Monitor VMM (that are almost the same thing)
  • Hypervisor: it is responsible of the hosting and the management of the VMs and it directly runs on the physical hardware so it is limited by it
  • VMM: it provides abstraction of hardware resources to have VMs and it provides the virtual env for the guest OS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

VM’s benefits

A
  • security
  • scalability: multiple copies of the same VMs
  • portability: you can copy VMs and clone them with the OS already installed. You can relocate VMs in the network as needed by the workload. You can make VMs a on-premise structure and the again. cloud based structure
  • flexibility: creating a VM and installing it is easier and faster than installing an OS on a physical computer
  • Resource utilization and improved ROI
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

Definition of hypervisor

A
  • it is the abstraction layer that we find among the physical one and the VMs
  • it coordinated VMs
  • it is like a interface between the psychical layer and the VMs
  • it makes possible for the VMs to access the needed resources and thanks to it the various VMs doesn’t interfere one with another
  • we have two type of hypervisors: bare metal virtualization and residence/hosted virtualization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Characteristics of an hypervisor

A
  • performance
  • ecosystem
  • management tools: you need them to avoid VMs sprawl -> maintain, audit and clean up the VMs to avoid it -> tools
  • live migration: you can move VMs without stopping them -> good for failover and workload balancing
  • cost: license to have an hypervisor technology + hypervisor itself + management tools + license to sell it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Hypervisors types

A
  1. bare metal virtualization: it directly runs on the physical computer -> it interacts with CPU, memory, physical storage
    it takes the place of the host OS and thanks to the direct access it is highly efficient
    – monolithic : the hypervisor contains the kernel, device drivers, I/O stack, isolation and

– microkernelized: the hypervisor layer is really thin and only takes care of isolation and memory. it works with the “parent PARTITION” that takes care of IO stack and drivers

  1. hosted/configured virtualization: it runs on an app and it is good for individual PCs that wants to run multiple OSs- It often has tools to install.
    It is a quick and easy way to access an alternative OS but there is some latency due to the fact that the access to the psychical layer is not direct but done via the host OS

-> Type 1 substitutes the host OS and works over the physical layer, Type 2 works over it

41
Q

What are the virtualization techniques and which of them do we have

A

These define how we run the guest OS.

  • full
  • para (OS assisted)
  • HW assisted (Hardware Virtual Machine, HVM)
42
Q

Full Virtualization

A

(These define how we run the guest OS)

It completely abstract the OS from the hardware so the guest OS is unaware that is is a guest and there are not modification of the hardware neither its assistance.
Calls from the guest Os are translated on the fly by the hypervisor

43
Q

ParaVirtualization

A

(These define how we run the guest OS)

  • it is efficient and lightweight, it has a near-native performance
  • the hypervisor provides an Api used by the guest OS so there are modifications of the host OS
  • kernel support and drivers are required
44
Q

HW-assisted virtualization

A

(These define how we run the guest OS)

  • this is a full virtualization with hardware help
  • no API -> no modifications of the host OS
  • the hypervisor only traps sensitive calls

ADDED TO x86 in 2006

45
Q

Which types of Virtualization do we have?

A

System, Desktop, Server, application and storage

46
Q

System Virtualization

A
  • most used
  • the OS is separated from he physical hardware
  • one ore more OS can be installed and run simultaneously without effecting each other
  • for the apps in the os there is no difference between the guest and the host

ok to have more VMs on a device

47
Q

Server Virtualization

A

one server is virtualized in several servers thanks to the VMs

48
Q

Storage Virtualization

A

all the storage of the network are put in the same virtual places and with a storage pooling they are assigned to the VM that needs some storage

49
Q

Desktop Virtualization

A

it lets you run multiple desktop OS each on its own virtual machine

  • Virtual Desktop Infrastructure: desktops and apps are hosted on physical servers by an organization. The organization has to build its own virtualization hardware and server and then vendors offer different license models based on persistent or non-persistent desktop per user or per machine basis
    High amount of labor
  • Remote Desktop Services: desktop and apps sessions hare hosted on a shared desktop on windows server -> it requires a Windows Server desktop environment. Each client needs an access license
    Medium amount of labor
  • DaaS: desktop and apps are hosted in the cloud by a third-party vendor -> no server or data centers investments
    Low amount of resources and labor
50
Q

Application Virtualization

A

only apps are run on a WM and this permits to use them without installing them in local -> the OS and the end user’s device run as usual -> ≠ desktop virtualization

  • Local Application Virtualization: the app runs on the endpoint device but in runtime it runs on a virtual env instead of the native one
  • Application streaming: the app lives on the server and sends small pieces of work to run on the end user device
  • Server-based Application Virtualization: the app runs entirely on the server and the user just sees the result via an interface
51
Q

Which are the popular hypervisors?

A

VMWare, Hyper-V, Citrix Systems Xen Server

52
Q

VMWare

A
53
Q

Hyper-V

A
54
Q

Citrix Systems, Xen Server

A
55
Q

KVM

A
56
Q

in which cases do we need lightweight virtualization?

A

When the operational overhead of a VM is not acceptable but we want scalability (horizontal and vertical!!), elasticity, isolation (VM’s characteristics) and the possibility to migrate the system

57
Q

Which types of virtualization are used to implement lightweight virtualization?

A

Software virtualization technologies: OS level virtualization and application level virtualization.

With the OS one the hypervisor is the Linux kernel itself so is no longer needed a dedicated hypervisor.
With the Linux cgroup we saw that with that Linux kernel feature (that is the cgroup itself) you can implement OS virtualization

58
Q

Which is the basic unit of a lightweight virtualization? Not a VM but…

A

a virtual environment.

The virtualization technologies used create virtual environments that have less resource management and isolation than what a VM has.

59
Q

Where are executed apps in a lightweight virtualization?

A

In the virtual envs

60
Q

Which requirements do we need to implement lightweight virtualization?

A
  • fine-grained control physical. resources
  • guarantees that we have security and isolation between the virtual environments
  • possibility to manage virtual envs all together and even better in combination with a cloud toolkit to deploy, migrate, etc VMs, containers, etc
61
Q

How can we implement lightweight virtualization?

A

using cgroups and namespaces that were originally used just to make a good isolation between processes

62
Q

What cgroups and namespaces can control?

A
  • CPU
  • Disk
  • Memory limitation and I/O rate
  • Network isolation
  • Check-pointing and live migration
  • File system isolation
  • Root privilege isolation
63
Q

Linux cgroup

A

It is the sum of a Linux kernel feature and user-space tools
- the linux kernel feature permits to limit, account, isolate and deny resources to groups of process or to just a single process
- using this you can implement OS virtualization
- user space tools handle the mechanism used by the kernel feature to control the groups

64
Q

Which are the characteristics of a Linux cgroup?

A
  • accounting: measure of a group’s resources usage
  • resource limiting: resources can be set to not exceed a certain quantity for a group
  • control: groups of processes can be stopped and restarted
  • prioritization: it can be prioritize to give resources to a group instead of another
65
Q

Linux namespaces

A

Linux has currently 7 of them
- a namespace job is to wrap a global resource making it abstract so that processes within the namespace think that they have their own instance of that resource
- one of the biggest goal is to support containerization

66
Q

Limitations of cgroups and namespaces

A
  • good for processes isolation but they have limitations for other things
  • cannot be used to handle an entire datacenter without being integrated with other tools -> extension needed
  • flexible but difficult to use
  • difficult to turn a full container on
  • it is not guaranteed the possibility to have app portability to run it somewhere else
67
Q

Which type of scaling is more common in a cloud environment?

A

Horizontal due to the downtime required while a resource replacing is taking place with the vertical scaling

68
Q

Definition of container

A

it is a executable unit of software made of application code, libraries, dependencies and NOT of the guest OS.

69
Q

What does a container uses for the part related to the guest/host OS?

A

A container does not have a guest OS so it does use the features and resources of the host OS -> form of OS virtualization

Namespaces

70
Q

How is the security for a container?

A

It must not be taken for granted

71
Q

What’s inside a container?

A

Group of processes

72
Q

Which are the possibilities to deploy and orchestrate containers and which are their differences?

A
  1. Manually: into the machine is put SSH on which Docker runs
    -> easy, available everywhere, no tools needed
    -> not automated, not easily reproducible, not self healing, not scalable
  2. Via scripting: ex. Puppet, Chef
    -> integration with the existing envs, understandable, REPRODUCIBLE
    -> not automated, not self healing, not scalable, not portable, MANUAL SCHEDULING
  3. Via a dedicated orchestrator: automated matching of the container to the machine without the human intervention
    ex. Kubernetees, Mesos, Docker Swarm
    -> AUTOMATED, REPRODUCIBLE, SCALABLE, SELF-HEALING, PORTABLE
    -> some overhead, needed tools and training, more complex result
73
Q

VMs VS Containers + drawing

A

VMs: better isolation, better security, con use different OSs

Containers: faster, lighter thanks to the better resource usage, agile app creation and deployment, distribution portability

74
Q

When do we use containers?

A
  • Microservices
  • app modernization and migration
  • DevOps = microservices as the architecture + containers as a platform
  • Hybrid cloud and multi cloud: good for organizations that have to operate across multiple places in combination with their own data center
75
Q

What is a micro service?

A

it is a software development technique made of a collection of loosely coupled services ≠ monolith application

76
Q

Monolith application characteristics

A

Monolith: no differentiation between different components, when one of them changes the app has to be entirely tested -> not scalable: the application can only be installed in the same VM

77
Q

How to implement a Microservice?

A

Not with a VM because a VM is like a server in which all the components are hosted together => containers

78
Q

Which rule does a micro service follow?

A

Single responsibility principle of object oriented design: a software module must take care of a single actor where actor is a group of users that requires a. change in the module

79
Q

What are Docker and Kubernetees in brief?

A

Docker: is the tool for create LINUX CONTAiNERS (LXC)

Kubernetees: it is an orchestrator. it is the platform for scheduling and automating the deployment, management and scaling of containers in a single machine. It is a container cluster

80
Q

What is the difference between a Docker container and a LXC technology? (8)

A
  1. better virtualization of Linux kernel processes
  2. it adds some features to make containers easy to build, deploy, manage, secure
  3. Docker does not make modifications to the OS so it is portable ≠ VM
  4. in a container multiple processes can run simultaneously and one of them can be stopped and update while the others are still running
  5. if you give to Docker an app source code it can directly create the container
  6. Docker can keep the versions saved, from the oldest to the newer and perform roll backs ; It can also upload only the differences between two versions
  7. the same image can be reused to create different containers
  8. community: shared containers libraries
81
Q

Which are the components of a Docker container? How is it made?

A
  1. Docker file: it is a text file with the instructions to build the container. It’s a list of CLI instructions
    The instructions are the same regardless the content, the env, ecc.
  2. The docker file is run by the docker engine to create the docker image
  3. Docker image = executable app source code + libraries + dependencies + tools
    An image is made of layers and each layer is a version of the image
    A DOCKER IMAGE IS A READ-ONLY FILE AND IT IS JUST A “DEAD” INSTANCE OF THE CONTAINER
  4. Docker container: it is the LIVE RUNNING INSTANCE OF THE IMAGE -> executable content

Docker daemon: service that creates the Docker Images so it is a control server of the implementation and this service run on a server called Docker Host

Docker registry: it I s open source storage for Docker Images. You can find images versions in repositories

82
Q

When does Kubernetees performs its tasks?

A

During the app lifecycle

83
Q

Which are Kubernetees tasks? (8, just liste them)

A

1) Rolling deployments
2) Service discovery
3) Load balancing
4) Health checking
5) Cluster networking
6) Storage provisioning
7) Autoscaling
8) Declarative configurations

84
Q

Kubernetees task: rolling deployments (deployment, roll-outs, how are the rollouts done)

A

Deployments: Kubernetees can deploy a number of containers to a specific host and keep them up. Sometimes it can be a zero-time deployment

Rollouts: it is a change of version. Kubernetees can stop, restart, shut down and roll out

A rollout can be done:
- uploading one container at a time monitoring the system health and at the end kill the old version
- blue-green deployment: the two version are run simultaneously and traffic goes to the new version only when it is stable

85
Q

Kubernetees task: service discovery

A

This task takes care of exposing containers and users one to another and to the extern.

For example it is done with DNS

86
Q

Kubernetees task: load balancing

A

Kubernetees can balance internal and external requests and can do it:
- cloud provider load balancers
- internal balancers

87
Q

Kubernetees task: Health checking

A

kubernetees is self-healing so it can restart-replace-take down a container when it is sick

88
Q

Kubernetees task: cluster networking

A

This kub. task takes care of IPs to connect running containers and apps

89
Q

Kubernetees task: storage provisioning

A

Kubernetees provides local or cloud storage for its containers

90
Q

Kubernetees task: autoscaling

A

Kubernetees monitors the available resources and according to the evaluated parameters it can increase or decrease the number of containers for the app

91
Q

Kubernetees task: declarative configuration

A

Thanks to this task the user can describe the app desired state and the orchestrator takes care of everything.
If the app is created this way it is possible to review, test and control the deployment. It’s easy the roll-back too

imperative configuration: the user has to define and manually execute actions to reach the state -> error-prone and rollback are difficult

92
Q

Describe or draw the docker architecture

A
93
Q

Describe or draw the Kubernetees architecture

A
94
Q

Which are the Kubernetees architecture components?

A
  • outside: KUBECTL
  • control plane = controller + api server + scheduler + ETCD
  • Cluster = Node + Pods + containers + Container runtime + Kube-proxy
95
Q

KUBECTL

A

CLI used by developers to manage clusters

96
Q

Kubernetees Control plane

A
  • controller: it observes the cluster state and drive it to the desired one
  • ETCD: to store all clusters data
  • Scheduler: it schedules pods into the nodes of the clusters
  • API server
97
Q

How the Kubernetees components

A

It is a container cluster and performs its functions on multiple nodes (worker server). These nodes are controlled and managed by the control plane; they are grouped in the clusters.

Each node is a physical/virtual compute host.

The first Node is the master worker and it is the control plane of the cluster and so it does the scheduling for the other nodes

The other nodes are called worker nodes and their job is to run the containerized application using tools such as Docker. They use KUBELET that is a software agent that, working with the KUBE-API SERVER (control plane component), receives and executes master node orders

Each node contains multiple Pods that contain multiple containers. A POD is the basic execution unit of a Kubernetees app.
Containers in the same. pod share storage, network namespaces and port space -> they work together to perform a task

Posare rolledaout using DEPLOYMENTS that are objects of a YAML file that declare the desired state. They allow to easily horizontal scaling and make replicas and perform a rolling update to an image version simply changing the file content

Kube-proxy: manages network rules on the host

Container runtime: (Docker) it first takes the container image and then executes and launches it

98
Q

Kubernetees service

A

It can be created to group similar pods to receive traffic and to grant to Pods replicas a static IP

It allows the usage of cloud provider firewalls