Showing posts with label cloud. Show all posts
Showing posts with label cloud. Show all posts

Sunday, March 20, 2022

AWS Networking & Content Delivery - VPC creating public and private subnet





VPC is region-wise, by default you can create max 5 VPC. Range of IP Address are defined for each VPC.

CIDR Range: Range of IP address in a network.
Example
CIDR:- 192.168.0.0/16
Because we are using /16 so 192.168 will be constant whereas other octates can be changed from 0-255 which means it has 256x256 = 65536 IP Addresses.

Valid IP Address in this Range
192.168.10.20, 192.168.200.10,192.168.2.0/24, 192.168.3.10/21

Invalid IP in the above CIDR
192.168.10.278, 192.169.0.0/24

Reserved IP Addresses in a network
These reserve IP addresses can not be used for EC2 instances:
1. Network IP
2. Broadcast IP
3. Future use IP


Lab

Create a VPC

1. Search for VPC service
2. Click on Your VPC Link
3. Click Create VPC button
4. On this Page define properties related to VPC

Select VPC only option
Name: irfan-vpc
IPV4 CIDR: 10.10.0.0/16
Tenancy : Default

5. Click on Create VPC button

Create Subnets (By Default no subnet get created in the VPC)

1. Click on Subnets link
2. Click on Create subnet

--------------------------------------------------------------------------
3. Set following properties for Public Subnet

  • VPC ID: irfan-vpc
  • Subnet Name: irfan-public-subnet-2a
  • Availability Zone: 2a
  • CIDR: 10.10.1.0/24

4. Click on Create Subnet
----------------------------------------------------------------------------------------
5. Set following properties for Private subnet

  • VPC ID: irfan-vpc
  • Subnet Name: irfan-private-subnet-2b
  • Availability Zone: 2b
  • CIDR: 10.10.2.0/24

6. Click on Create Subnet

Create an Internet Gateway to provide Internet connectivity to Public subnet

1. Click on Internet Gateways

2. Name: IGW1

  • Click on Create Internet Gateway

3. Select Internet Gateway IGW1 and Action--->Attach to VPC and select myvpc-1

Now Internet connectivity is available to myvpc-1 VPC.


Create Route Tables (A default Route table get created for VPC)

1. Click on Route Tables link

2. Click on Create Route table button

--------------------------------------------------------------------------------------------
3. Set the properties
  • Name: Public Route
  • VPC: irfan-vpc
4. Click on Create Route table button

-----------------------------------------------------------------------------------------------
5. Set the properties
  • Name: Private Route
  • VPC: irfan-vpc
6. Click on Create Route Table


Attach subnets to Route tables

1. Select Public Route

2. Select Subnet Associations

3. Click on Edit subnet associations and select Public Subnet 1-a

4. Click on Routes --> Edit Routes--> Add Route

5. Destination: 0.0.0.0/0

6. Target: IGW1

7. click on Save Changes button.

---------------------------------------------------------------------------------------------
1. Select Private Route

2. Select Subnet Associations

3. Click on Edit subnet associations and select Private subnet 1-b




Create EC2 instance in irfan-vpc

1. Create a Public EC2 instance Amazon Linux Image

2. Select VPC as irfan-vpc

3. Select subnet as Public Subnet 1-a

4. Auto assign Public IP: Enable

5. Create new Security Groups for SSH let's call it sshSG.

--------------------------------------------------------------------------------------------

1. Create a Private EC2 instance Amazon Linux Image

2. Select VPC as myvpc-1

3. Select subnet as Private Subnet 1-b

4. Auto assign Public IP: Disable

5. Select sshSG security group


Experiment

1. Private IP addresses are in the defined range of subnets or not.
Ans: yes

2. Both instances can ping to each other with private ip address.
Ans: no UNLESS you add the security group - ICMP:IPV4 !!!
Now if you want to connect to the private subnet,
you need to connect to it via the public subnet:

1. copy the key-pair info (.pem)
2. create the key-pair info into your public subnet:
    vi IrfanSydney.pem
    copy the content over
    save :wq!
3. go to the private instance and click connect, choose via ssh, then it will tell you the steps:
    chmod 400 IrfanSydney.pem
    ssh -i "IrfanSydney.pem" ec2-user@10.10.2.184

Monday, March 14, 2022

AWS Intro - Cloud Computing




Cloud Computing

Cloud computing is the basically the on-demand remittance of computing services - servers, databases, software analytics, intelligence, storage and networking of IT resources and applications via the Internet(The Cloud) or Internet of Things (IoT) with payment only for the services you opt for.

image


It does not require huge investment in hardware and as a result, saves time managing that hardware. It reduces operating costs and enhances efficiency.


image


Cloud Computing Deployment Models

“All in cloud” application is fully deployed in the cloud, with all components of the application running in the cloud. It is a very particular configuration of environment parameters. Deployment types depend on two factors:
 
1- The one who controls the infrastructure 
2- The locations where it resides.

“Hybrid Deployment” application is a customary approach adopted by many enterprises that bridges infrastructure and applications between cloud-based resources and existing resources, typically in an existing data center. It provides the seamless look and feel of a single Exchange organization between an on-premises Exchange organization and Exchange Online. It safeguards and controls strategically crucial assets in the most cost-effective and resource effective way.


image


IaaS

IaaS or Infrastructure as a Service is a cloud provider which hosts the infrastructure components which were traditionally present in an on-premises data center, including networking hardware, storage, servers and virtualization or hypervisor layer. 

Amazon Web Services, Google Compute Engine and Microsoft Azure are some of the leading IaaS cloud service providers.

Paas

PaaS or Platform as a Service is a cloud based solution in which a service provider delivers a platform to clients, enabling them to evolve, run and control business applications without the requirement of building and maintaining the infrastructure. It simplifies the process of enterprise software development and provides a favorable space for developing and testing applications. 

AWS Elastic Beanstalk, Google App Engine are two typical examples of PaaS. (Radio.co)

Saas

SaaS or Software as a Service is a model which allows users to connect to and use cloud-based apps over the Internet. SaaS provides a complete software solution which you purchase on a pay-as-you-go basis from a cloud service provider. You can use them by a paid licensed subscription for your organization. The vendor controls the entire computing stack which the users can access over the internet usually using a web browser. 

Dropbox, Google G Suite and Microsoft Office 365 are some examples of SaaS.

Fluentd

Open-source log data collector > why logs? - for compliance (auditing, company, business) - for security (transparency, monitoring, admin...