Final Review Flashcards

1
Q

What is IaaS?

A

IaaS, or Infrastructure as a Service, is a cloud computing model that provides on-demand access to computing resources such as servers, storage, networking, and virtualization.

IaaS is attractive because acquiring computing resources to run applications or store data the traditional way requires time and capital.

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

Why use Docker and containers?

A

Faster software delivery, Portability, Scalability, Continuous integration, Health checks, Security, Packaging, Environment management

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

What does the future of QR Codes look like?

A

With the global usage and exposure of various QR code campaigns from multiple industries, it’s empirical that the QR code’s usefulness will keep growing.

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

How to set up an app for AWS?

A
  1. Get a key pairs - pem file, save it locally, change properties to allow only the signed in user full control - disable inheritance
  2. Create an instance using the new key pair, set the security group to allow incoming port 8080
  3. Open a remote window in VSCode, edit config to use the Hostname of the new instance, user must be ec2-user, identityFile is the full path of the local pem file, then Connect to Host
  4. On the Linux - remote host, install docker, start the daemon, copy local files (SNAPSHOT and dockerfile), and tell Linux to restart docker at boot
  5. Build the docker image and create a docker container from it, then run it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the command to install Docker on AMI Linux?

A

sudo yum install -y docker

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

What is the command to start Docker on AMI Linux?

A

sudo service docker start

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

What is the command(s) to copy files to Docker on AMI Linux?

A

scp -i Info5059Keys.pem case-0.0.1-SNAPSHOT.jar ec2-user@ec2-yourpublicip.compute1.amazonaws.com:/home/ec2-user

scp -i Info5059Keys.pem dockerfile ec2-user@ec2-yourpublicip.compute-1.amazonaws.com:/home/ec2-
user

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

What is the command to tell the Linux AMI to restart docker at boot?

A

sudo systemsctl enable docker

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

What is the command to build a docker image on the Linux AMI?

A

sudo docker build -t name:casestudy .

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

What is the command to tell the Linux AMI to create a docker container and run it?

A

sudo docker run -dit –restart unless-stopped -p 8080:8080 name:casestudy

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

What is Docker?

A

A platform for shipping and running applications which enables you to separate your applications from your infrastructure. It provides the ability to package and run an application in a loosely isolated environment called a container.

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

What is a Docker container?

A

A lightweight, standalone, executable package of a piece of software that includes everything needed to run it. It is relatively well isolated from other containers and its host machine, and when removed, any state changes that aren’t stored in persistent storage disappear.

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

What is a Docker image?

A

A standardized package that includes all of the files, binaries, libraries, and configurations to instantiate and run a container. They can be tracked just like code with version control software like Git.

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

What is a Dockerfile?

A

A textfile that contains commands to build an image. Using docker build, users create images automatically by executing several commands in succession.

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

Docker Hub

A

The official repository, which holds different images of a Java container used as both the build and runtime environment via OpenJDK (open-source implementation of Java).

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

What problem does Docker try to address?

A

True independence between applications and infrastructure.

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

What is the main difference between a docker container and a VM?

A

container contains no OS

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

What is the main difference between a docker image and a docker container?

A

image is the class of the container instance

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

What command is used to create a docker image?

A

docker build

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

How does the docker daemon keep track of docker images?

A

internal image id 12 bytes

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

Why would you want to create a tag?

A

so you don’t need to remember the 12 bytes

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

What command is used to create a docker container?

A

docker run

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

How can we expose the host OS port to a docker container?

A

with the -p switch

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

What command would I use to view a LABEL for a docker container?

A

Inspect

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

What is OpenJDK?

A

open-source edition of Oracle’s JDK

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

Where would I locate a docker image for OpenJDK 18?

A

Docker Hub

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

What tag would I use in my dockerfile for the image in q11?

A

18-jdk

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

What is the #1 public cloud option?

A

AWS

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

Which one of the Greiner roles are we undertaking?

A

IAAS

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

What does EC2 stand for?

A

Elastic Compute Cloud

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

When setting up your security keys on AWS, what file type did you download?

32
Q

What do you have to do in windows before using this file?

A

change the local security

33
Q

Where did you use this file?

A

scp and config file for ssh

34
Q

What OS did we install on AWS?

A

AMI (Amazon Machine Image) Linux

35
Q

What user do we sign into AWS with?

36
Q

What ports do we open on the Linux instance created in q5?

37
Q

What command did we issue to copy our local jar to AWS?

A

scp - scp -i Info5059Keys.pem case-0.0.1-SNAPSHOT.jar ec2-user@ec2-yourpublicip.compute-1.amazonaws.com:/home/ec2-user

38
Q

What happens to my public IP address if I stop my instance?

39
Q

What happens to my instance if I terminate it?

A

gone forever

40
Q

What VSCode extension did we use to sign into the EC2 instance?

A

Remote SSH - Microsoft

41
Q

What new annotation was added to the property in the Expense class on the server that contains the receipt image?

42
Q

What new field did we add to the Expense interface on the client side to contain the image?

A

receiptscan

43
Q

What does the src attribute look like on the <img tag in the expense-detail.html file once we incorporate the receipt upload functionality?

A

<img *ngIf=”selectedExpense.receiptscan !== null” src=”{{ selectedExpense.receiptscan }}” />

44
Q

What JavaScript object is used to obtain the image?

A

FileReader

45
Q

What JavaScript function converts the binary data to an encoded string?

A

reader.readAsDataURL(file);

46
Q

What two variables did we use interpolation on in the delete dialog component template markup?

A

modalTitle, entityname

47
Q

Where were the values for the two variables set?

A

in the expense details component openDeleteDialog method: dialogConfig.data = {title: Delete Vendor ${this.selectedVendor.id}, entityname: ‘vendor’ };

48
Q

What module did we modify to include the material dialog component in the exercises project to delete employees?

A

MatComponents

49
Q

What module will we modify so we can delete both vendors and products in the case study?

A

trick question we don’t need to as it’s a stand alone component

50
Q

What property in the dialog config JSON do we set to change the default styling of the dialog modal?

A

panelClass

51
Q

How was the material dialog module referenced in the expense-detail.component?

A

via dependency injection in the constructor

52
Q

In Angular terms what is an injection token? Where did we use one this class?

A

Injection tokens allow you to inject something that does not have a runtime representation like an interface - constructor of delete component MAT_DIALOG_DATA

53
Q

What industry was the QRCode first developed for?

A

Automotive

54
Q

Who invented the QRCode?

55
Q

How much data can we store in a QRCode?

A

Numeric data – 7k,Alphanumeric – 4K,Binary – 3K

56
Q

What do companies frequently use QRCodes for?

A

Link to websites

57
Q

What’s google’s api for QRCode processing called?

A

Zebra Crossing

58
Q

Which part of the process determines that we’re creating a graphic in .PNG format?

A

Generator’s MatrixToImageWriter.writeToStream method

59
Q

What other part of the process utilizes the .PNG format?

A

Controller when settin content header

60
Q

Other than the actual markup, what else is placed in the same <img tag?

A

encoded string returned from server binary data

61
Q

What validator do we place on the qrcodetxt field?

62
Q

T/F the QRCode should be visible when adding a product?

A

F only update

63
Q

What technique was used in the client’s img tag to display the QRCodes

A

concatenation

64
Q

What class does the JpaRepository class extend?

A

PagingAndSorting

65
Q

Which first page loads faster a client-side pagination program or a server-side pagination program?

A

server, less data transmitted

66
Q

Describe the data set size you would use a server-side pagination program against.

A

Large Dataset

67
Q

What 2 parameters do you utilize in @GetMapping annotation when doing server-side pagination?

A

@RequestParam(“p”), @RequestParam(“s”)

68
Q

What is the return type from the GET method in server-side pagination?

A

Page<T></T>

69
Q

What is returned along with array of paged data?

70
Q

What material component do you need for pagination?

A

MatPaginatorModule

71
Q

What html tag did we use for the pagination control?

A

<mat-paginator

72
Q

What attributes did we add to the tag from about pagination?

73
Q

What annotation is used on a component property to access the pagination control?

A

@ViewChild

74
Q

What other component property was added other than the annotated one?

75
Q

Where did we set the value for the property in Q11?

A

Where we delared it, in the home component

76
Q

What was the final change we made for production?

A

Added a method to make a summary string, and added the qrGenerator to the controller and pdf generator constructor.