Thursday, August 6, 2020

EC2 basic to advance

What is EC2:

An EC2 instance is a virtual server in Amazon’s Elastic Compute Cloud (EC2) for running applications on the Amazon Web Services (AWS) infrastructure.  

AWS is a comprehensive, evolving cloud computing platform; EC2 is a service that allows business subscribers to run application programs in the computing environment. The EC2 can serve as a practically unlimited set of virtual machines.

Amazon provides a variety of types of instances with different configurations of CPU, memory, storage, and networking resources to suit user needs. Each type is also available in two different sizes to address workload requirements.


EC2 Security Group:

-- you can select multiple SSH, and can able to select my ip.
-- you can sleect HTTP server. which can be publicly accessilble

Public IP vs Elastic IP:

public ip will be changed when instance restart.
Elastic IP will not be chaged when instance restart. for elastic IP, have extra charge.


Well, I think nginx by itself doesn't have that in its setup, because the Ubuntu-maintained package does it as a convention to imitate Debian's apache setup. You could create it yourself if you wanted to emulate the same setup.

Create /etc/nginx/sites-available and /etc/nginx/sites-enabled and then edit the http block inside /etc/nginx/nginx.conf and add this line

include /etc/nginx/sites-enabled/*;

Of course, all the files will be inside sites-available, and you'd create a symlink for them inside sites-enabled for those you want enabled.

REFhttps://stackoverflow.com/questions/17413526/nginx-missing-sites-available-directory


  1. https://www.youtube.com/watch?v=ND8hujOoZ14&feature=youtu.be (simple code deploy to EC2 using pipeline and code deploy **************)




Ref: 
  1. https://www.youtube.com/watch?v=kjrKDtxAZpE (very powerfull vidoe please see it to understand the ec2)
  2. https://www.youtube.com/watch?v=v0g1M5bb9u4  (import for creating ec2 instance ******* good one)
  3. https://medium.com/@sumantmishra/how-to-deploy-node-js-app-on-aws-with-github-db99758294f1 (about nodejs deploy ****)
  4. https://medium.com/@abhishekk86/creating-app-in-angular-8-and-deploying-to-aws-using-ec2-4a235395ca46 ( deploy angualr using apachy httpd ******)
  5. https://medium.com/@sandeeptengale/deploy-angular-app-on-aws-ec2-instance-20749f17b33e (deploy agnular using nginx *****)
  6. https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-simple-codecommit.html (***************)



Angular deploy to S3 





Amazon Elastic Block Store

Amazon Elastic Block Store (EBS) is an easy to use, high performance block storage service designed for use with Amazon Elastic Compute Cloud (EC2) for both throughput and transaction intensive workloads at any scale.


Amazon Elastic Block Store provides raw block-level storage that can be attached to Amazon EC2 instances and is used by Amazon Relational Database Service. Amazon EBS provides a range of options for storage performance and cost.

  1. EBS storage and EC2 storage are set up in two different place.  During creating ec2 instance, provide an option "Delete of termination" that allow to delete data od EBS data when EC2 instance deleted.
  2. https://www.youtube.com/watch?v=kjrKDtxAZpE (seee this video 13:26 min)


SSH

The SSH a network protocol (also referred to as Secure Shell) is a method for secure remote login from one computer to another. It provides several alternative options for strong authentication, and it protects the communications security and integrity with strong encryption.


Transmission Control Protocol (TCP)

TCP(Transmission Control Protocol ) provides communication between an application program and the Internet Protocol (they are frequently written as TCP/IP.) An application does not need to required packet fragmentation on the transmission medium or other mechanisms for sending data in order to be sent via TCP.

Ref:

No comments:

Post a Comment

Autoboxing and Unboxing

  Autoboxing  is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper cl...