Final Review Flashcards
What is IaaS?
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.
Why use Docker and containers?
Faster software delivery, Portability, Scalability, Continuous integration, Health checks, Security, Packaging, Environment management
What does the future of QR Codes look like?
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 to set up an app for AWS?
- Get a key pairs - pem file, save it locally, change properties to allow only the signed in user full control - disable inheritance
- Create an instance using the new key pair, set the security group to allow incoming port 8080
- 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
- On the Linux - remote host, install docker, start the daemon, copy local files (SNAPSHOT and dockerfile), and tell Linux to restart docker at boot
- Build the docker image and create a docker container from it, then run it
What is the command to install Docker on AMI Linux?
sudo yum install -y docker
What is the command to start Docker on AMI Linux?
sudo service docker start
What is the command(s) to copy files to Docker on AMI Linux?
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
What is the command to tell the Linux AMI to restart docker at boot?
sudo systemsctl enable docker
What is the command to build a docker image on the Linux AMI?
sudo docker build -t name:casestudy .
What is the command to tell the Linux AMI to create a docker container and run it?
sudo docker run -dit –restart unless-stopped -p 8080:8080 name:casestudy
What is Docker?
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.
What is a Docker container?
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.
What is a Docker image?
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.
What is a Dockerfile?
A textfile that contains commands to build an image. Using docker build, users create images automatically by executing several commands in succession.
Docker Hub
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).
What problem does Docker try to address?
True independence between applications and infrastructure.
What is the main difference between a docker container and a VM?
container contains no OS
What is the main difference between a docker image and a docker container?
image is the class of the container instance
What command is used to create a docker image?
docker build
How does the docker daemon keep track of docker images?
internal image id 12 bytes
Why would you want to create a tag?
so you don’t need to remember the 12 bytes
What command is used to create a docker container?
docker run
How can we expose the host OS port to a docker container?
with the -p switch
What command would I use to view a LABEL for a docker container?
Inspect
What is OpenJDK?
open-source edition of Oracle’s JDK
Where would I locate a docker image for OpenJDK 18?
Docker Hub
What tag would I use in my dockerfile for the image in q11?
18-jdk
What is the #1 public cloud option?
AWS
Which one of the Greiner roles are we undertaking?
IAAS
What does EC2 stand for?
Elastic Compute Cloud
When setting up your security keys on AWS, what file type did you download?
.pem
What do you have to do in windows before using this file?
change the local security
Where did you use this file?
scp and config file for ssh
What OS did we install on AWS?
AMI (Amazon Machine Image) Linux
What user do we sign into AWS with?
ec2-user
What ports do we open on the Linux instance created in q5?
22, 8080
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
What happens to my public IP address if I stop my instance?
changes
What happens to my instance if I terminate it?
gone forever
What VSCode extension did we use to sign into the EC2 instance?
Remote SSH - Microsoft
What new annotation was added to the property in the Expense class on the server that contains the receipt image?
@Lob
What new field did we add to the Expense interface on the client side to contain the image?
receiptscan
What does the src attribute look like on the <img tag in the expense-detail.html file once we incorporate the receipt upload functionality?
<img *ngIf=”selectedExpense.receiptscan !== null” src=”{{ selectedExpense.receiptscan }}” />
What JavaScript object is used to obtain the image?
FileReader
What JavaScript function converts the binary data to an encoded string?
reader.readAsDataURL(file);
What two variables did we use interpolation on in the delete dialog component template markup?
modalTitle, entityname
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’ };
What module did we modify to include the material dialog component in the exercises project to delete employees?
MatComponents
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
What property in the dialog config JSON do we set to change the default styling of the dialog modal?
panelClass
How was the material dialog module referenced in the expense-detail.component?
via dependency injection in the constructor
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
What industry was the QRCode first developed for?
Automotive
Who invented the QRCode?
Japanese
How much data can we store in a QRCode?
Numeric data – 7k,Alphanumeric – 4K,Binary – 3K
What do companies frequently use QRCodes for?
Link to websites
What’s google’s api for QRCode processing called?
Zebra Crossing
Which part of the process determines that we’re creating a graphic in .PNG format?
Generator’s MatrixToImageWriter.writeToStream method
What other part of the process utilizes the .PNG format?
Controller when settin content header
Other than the actual markup, what else is placed in the same <img tag?
encoded string returned from server binary data
What validator do we place on the qrcodetxt field?
required
T/F the QRCode should be visible when adding a product?
F only update
What technique was used in the client’s img tag to display the QRCodes
concatenation
What class does the JpaRepository class extend?
PagingAndSorting
Which first page loads faster a client-side pagination program or a server-side pagination program?
server, less data transmitted
Describe the data set size you would use a server-side pagination program against.
Large Dataset
What 2 parameters do you utilize in @GetMapping annotation when doing server-side pagination?
@RequestParam(“p”), @RequestParam(“s”)
What is the return type from the GET method in server-side pagination?
Page<T></T>
What is returned along with array of paged data?
meta data
What material component do you need for pagination?
MatPaginatorModule
What html tag did we use for the pagination control?
<mat-paginator
What attributes did we add to the tag from about pagination?
pageSize
What annotation is used on a component property to access the pagination control?
@ViewChild
What other component property was added other than the annotated one?
pageSize
Where did we set the value for the property in Q11?
Where we delared it, in the home component
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.