Final Review Flashcards

(76 cards)

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
What is OpenJDK?
open-source edition of Oracle's JDK
26
Where would I locate a docker image for OpenJDK 18?
Docker Hub
27
What tag would I use in my dockerfile for the image in q11?
18-jdk
28
What is the #1 public cloud option?
AWS
29
Which one of the Greiner roles are we undertaking?
IAAS
30
What does EC2 stand for?
Elastic Compute Cloud
31
When setting up your security keys on AWS, what file type did you download?
.pem
32
What do you have to do in windows before using this file?
change the local security
33
Where did you use this file?
scp and config file for ssh
34
What OS did we install on AWS?
AMI (Amazon Machine Image) Linux
35
What user do we sign into AWS with?
ec2-user
36
What ports do we open on the Linux instance created in q5?
22, 8080
37
What command did we issue to copy our local jar to AWS?
scp - scp -i Info5059Keys.pem case-0.0.1-SNAPSHOT.jar ec2-user@ec2-yourpublicip.compute-1.amazonaws.com:/home/ec2-user
38
What happens to my public IP address if I stop my instance?
changes
39
What happens to my instance if I terminate it?
gone forever
40
What VSCode extension did we use to sign into the EC2 instance?
Remote SSH - Microsoft
41
What new annotation was added to the property in the Expense class on the server that contains the receipt image?
@Lob
42
What new field did we add to the Expense interface on the client side to contain the image?
receiptscan
43
What does the src attribute look like on the
44
What JavaScript object is used to obtain the image?
FileReader
45
What JavaScript function converts the binary data to an encoded string?
reader.readAsDataURL(file);
46
What two variables did we use interpolation on in the delete dialog component template markup?
modalTitle, entityname
47
Where were the values for the two variables set?
in the expense details component openDeleteDialog method: dialogConfig.data = {title: `Delete Vendor ${this.selectedVendor.id}`, entityname: 'vendor' };
48
What module did we modify to include the material dialog component in the exercises project to delete employees?
MatComponents
49
What module will we modify so we can delete both vendors and products in the case study?
trick question we don't need to as it's a stand alone component
50
What property in the dialog config JSON do we set to change the default styling of the dialog modal?
panelClass
51
How was the material dialog module referenced in the expense-detail.component?
via dependency injection in the constructor
52
In Angular terms what is an injection token? Where did we use one this class?
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
What industry was the QRCode first developed for?
Automotive
54
Who invented the QRCode?
Japanese
55
How much data can we store in a QRCode?
Numeric data – 7k,Alphanumeric – 4K,Binary – 3K
56
What do companies frequently use QRCodes for?
Link to websites
57
What's google's api for QRCode processing called?
Zebra Crossing
58
Which part of the process determines that we’re creating a graphic in .PNG format?
Generator's MatrixToImageWriter.writeToStream method
59
What other part of the process utilizes the .PNG format?
Controller when settin content header
60
Other than the actual markup, what else is placed in the same
encoded string returned from server binary data
61
What validator do we place on the qrcodetxt field?
required
62
T/F the QRCode should be visible when adding a product?
F only update
63
What technique was used in the client’s img tag to display the QRCodes
concatenation
64
What class does the JpaRepository class extend?
PagingAndSorting
65
Which first page loads faster a client-side pagination program or a server-side pagination program?
server, less data transmitted
66
Describe the data set size you would use a server-side pagination program against.
Large Dataset
67
What 2 parameters do you utilize in @GetMapping annotation when doing server-side pagination?
@RequestParam("p"), @RequestParam("s")
68
What is the return type from the GET method in server-side pagination?
Page
69
What is returned along with array of paged data?
meta data
70
What material component do you need for pagination?
MatPaginatorModule
71
What html tag did we use for the pagination control?
72
What attributes did we add to the tag from about pagination?
pageSize
73
What annotation is used on a component property to access the pagination control?
@ViewChild
74
What other component property was added other than the annotated one?
pageSize
75
Where did we set the value for the property in Q11?
Where we delared it, in the home component
76
What was the final change we made for production?
Added a method to make a summary string, and added the qrGenerator to the controller and pdf generator constructor.