Happy Tuesday! Today, we’re kicking off the first of our new series about how to manage your Hortonworks Data Platform (HDP). Our analytics whiz, Vishwas Subramanian, helps you prepare your Amazon Virtual Private Cloud (Amazon VPC) for instance and cluster. Let’s get into it.

Amazon Virtual Private Cloud (Amazon VPC) lets you provision a logically isolated section of the Amazon Web Services (AWS) cloud where you can launch AWS resources in a virtual network you define. You have complete control over your virtual networking environment, including selection of your own IP address range, creation of subnets, and configuration of route tables and network gateways.

vish 1 image

Figure 2.1.1

When I was creating a VPC, I had already created an AWS account. Once you have access to AWS Management Console, you can navigate to Networking. Under Networking, you will find VPC.

You can create a VPC using VPC Wizard or create one manually.

To create a VPC manually, follow the steps mentioned below:

  1. Navigate to “Your VPCs” on the VPC dashboard.
  2. Click “Create VPC” as highlighted, in Figure 2.1.1.
  3. Provide a name for your VPC.
  4. Next, provide a CIDR block. In my case, I entered (10.0.0.0/16)

To learn more about CIDR, go here.

  1. Leave the Tenancy as “Default”. If choose “Dedicated”, then charges apply.

To learn more about Dedicated, go here.

  1. Finally click, “Yes, Create”.

vish 2

Figure 2.1.2

In Figure 2.1.2, if you navigate to Route Tables under VPC Dashboard, you will notice that a new Route Table is created along the VPC.

vish 3

Figure 2.1.3

After creating a VPC, you can add one or more subnets in each Availability Zone. Each subnet must reside entirely within one Availability Zone and cannot span zones. Availability Zones are distinct locations engineered to be isolated from failures in other Availability Zones.

Navigate to Subnets under VPC Dashboard, and click “Create Subnet” as highlighted in Figure 2.1.3.

  • Add a name-tag.
  • Select the VPC to which the subnet will be linked to.
  • Choose an availability zone, where the EC2 instances will be launched.

To read more about availability zone in AWS, go here.

  • Choose a CIDR block. In my case, I entered (10.0.1.0/24)
  • Click “Yes, Create” as highlighted in Figure 2.1.4

After a successful subnet creation, you should be able to verify it, as shown in Figure 2.1.5

vish 4

Figure 2.1.4

vish 5

Figure 2.1.5

An Internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows communication between instances in your VPC and the Internet. It therefore imposes no availability risks or bandwidth constraints on your network traffic.

An Internet gateway serves two purposes:

  • Provide a target in your VPC route tables for Internet-routable traffic
  • Perform network address translation (NAT) for instances that have been assigned public IP addresses.

Navigate to Internet Gateways under VPC Dashboard and click “Create Internet Gateway” as highlighted in Figure 2.1.6.

Provide a name for the Internet Gateway and click “Yes, Create” as highlighted in Figure 2.1.7.

Choose VPC to which, the newly created Internet Gateway will be attached to. Next, click “Yes, Attach” as highlighted in Figure 2.1.6.

vish 6

Figure 2.1.6

vish 7

Figure 2.1.7

A route table contains a set of rules, called routes, to determine where network traffic is directed.

Each subnet in your VPC must be associated with a route table; the table controls the routing for the subnet. A subnet can only be associated with one route table at a time, but you can associate multiple subnets with the same route table.

Navigate to Route Tables under VPC Dashboard and click “Create Route Table” as highlighted in Figure 2.1.8.

Provide a name for the Route Table and attach it to the VPC, that was created earlier. Click “Yes, Create”.

After the Route Table is created, you need to add an Internet route to it.

vish 8

Figure 2.1.8

You can add an Internet Gateway route to your Route Table as highlighted in Figure 2.1.9. Select the route table and then select “Routes” tab as shown in Figure 2.1.9.

vish 9

Figure 2.1.9

Click “Edit” and CIDR information. I entered (0.0.0.0/0) in the destination field, because I wanted the all the instances have Internet access as highlighted in Figure 2.1.10.

The Internet Gateway which was previous configured, was attached as a target. Click “Save”.

vish 10

Figure 2.1.10

vish 11

Figure 2.1.11

Next, Click “Subnet Association” tab and assign the subnet you created earlier to your Route Table. “Check” the subnet and click “Save” as highlighted in Figure 2.1.11

If you have associated the subnet to your Route Table, you will able to see it as shown in Figure 2.1.9, which states “1 Subnet” explicitly associated.

vish 12

Figure 2.1.12

When a VPC is created, a Network ACL is also created for the VPC by default as highlighted in Figure 2.1.12. The Inbound and Outbound Rules are pre-defined. We can add rules if needed.

If you select the “Subnet Association” tab, you will notice that the subnet you created earlier is attached to the Network ACL.

To learn more about Network ACL, go here.

Once you have completed all the steps to creating a VPC, you can proceed to launch an instance on AWS EC2.

Next time: Learn how to launch an instance on Amazon Elastic Compute Cloud EC2.

 


Vishwas SubramanianVishwas Subramanian
Analytics Associate
About Vishwas: Vishwas provides solutions to big data problems like real-time streaming data, Traditional SQL vs NoSQL, Hadoop or Spark, Amazon Cloud Services (AWS) vs Personal Cluster. He is focused on analysing and providing the optimum solution for a particular use case. Prior to Syntelli, Vishwas was a Research Assistant at University of North Carolina at Charlotte. While at UNC Charlotte, Vishwas worked on integrating Big Data with Mobile Devices (IoT) and Deploying Language Classifier on a Pseudo Distributed Spark Cluster. Vishwas received a M.S in Electrical Engineering from the University of North Carolina at Charlotte. His research interests are Spark development, Visual Analytics, Android Devices.