Exploring AWS and azure in cloud computing (3)

Source: Internet
Author: User

Exploring AWS and azure in cloud computing (3)

-- Amazon EC2 and Windows azure Virtual Machine

 

Today, I will compare the differences between AWS EC2 and azure VM processes. And compare some of their basic differences in the network environment.Article.

Today, I will use a medium-size machine, AWS's M1 medium, memory 3.75 GB, 2 computing units, and storage 410 GB. On Azure, I will create an M machine with 2 * GHz CPU, equivalent to 2 cores, GB memory, and GB storage. For convenience, the Windows operating system is selected for both machines. Let's see how many things need to be done from creation to real machine access.

Create a virtual machine

First, let's take a look at AWS. In the management console, we select EC2 and then create an instance.

Three wizard options are available: Traditional wizard, quick wizard, and AWS marketplace. Here we select the traditional wizard mode:

Next, you can choose a variety of operating systems. Here, choose Windows Server 2012.

Next, select the instance type and quantity. Here I select M1 medium, and you can also select the available region, that is, availability zone. Obviously, there are multiple zones in each region to ensure high availability and disaster recovery. Here we can specify an AZ or choose no preference.

The next step is some advanced options, including a, whether to use cloudwatch to monitor the instance; B, enter user data; C, select the instance Termination Protection (Termination Protection ), whether to allow the API or interface to terminate the instance. D. Whether to stop or stop the instance. E. The Iam role is used to grant permissions to the instance.

The next step is to configure the mounted disk. The default operation root volume is 30 GB, which is of the standard type and the iops is 100. It is automatically deleted upon termination. In this step, you can add an EBS volume or an instance storage volume. These volumes will be reserved for storage. No new volumes are added.

The next step is to add some metadata or tags to the machine, which is actually metadata, such as the machine name.

Create a key pair to access the machine's key pair through remote desktop or ssh. You can select an existing key pair or create a new one.

You can enter a key pair name and click Create and download. At this time, a pem file will be downloaded to the local device. The PEM file is actually the RSA private key and stored in base64. It is the same as the CER file on Windows. You can use this PEM file to obtain the password for logging on to the machine.

The next step is to configure the firewall and create access rules. For example, you can set a TCP port range that can be accessed, or define the IP address of the access source. If Windows is created, the default Remote Desktop port 3389 is automatically enabled.

After completing this step, you can check the virtual machine to be created and start it.

After creating all the machines, you can find the machines you just created.

Of course, we have no way to access this Windows machine. Right-click the machine and select "get Windows Password". At this time, you need to enter the key or upload the downloaded PEM file,

Click decrypt to obtain the administrator password.

After obtaining the password, we can start to connect to Windows. Right-click the machine and select connect. In the remote connection prompt box, click Download quick file. You can get an RDP file and connect to Windows directly.

Machine

Note that the DNS name for this machine is ec2-54-248-59-152.ap-northeast-1.compute.amazonaws.com, basically in EC2-<ip>. <availability-zoon> .compute.amazonaws.com. 54.248.59.152 is the external IP address of the machine. Note that this IP address is not fixed, so do not bind the record of DNS to this IP address. Maybe it will be unavailable someday.

Let's take a look at the hardware details of this machine.

Currently, the disk has only one C disk with a size of 30 GB. The operating system is installed, which is the same as the configuration we just made.

Create new volume

To add a disk, create a new volume and click volumes.

Two types can be selected here: Standard and provisioned iops, that is, volumes with custom iops. The minimum value is 1 GB and the maximum value is 1 TB. If you select provisioned iops, you can customize the iops from 200 to 2000 to determine the disk performance. The default value is 1000. AZ can select any Az in this region. Of course, if you want to improve performance, you can select the same AZ as the machine. An image is an existing disk template preinstalled with some content, such as Windows and Linux installation files.

After creation, right-click the volume and mount it to the virtual machine,

After mounting, a new hard disk will automatically appear in windows, and our server can also be used.

Elastic IP

To enable the machine to have a fixed external IP address, you also need to create an elastic IP address and bind it to this machine. The steps are as follows:

Select elastic IP on the left and click Allocate at the top:

 

Right-click the new IP address and associate it with your new instance.

After the association is complete, you will find that the public DNS name of this machine has also changed to a new fixed IP address. In this case, you can associate your domain name with this IP address to directly access it.

Server Load balancer

Of course, the next step is to install your own application, open a specific port, and provide external services. However, to achieve elasticity and on-demand use of cloud computing, you must also increase the Load balancer. It is easy to create a Server Load balancer instance. Select Load balancer and click Create new Server Load balancer instance.

Then select the Server Load balancer protocol to be configured and the internal external Port:

Currently, AWS Server Load balancer supports four protocols, including HTTP, https, SSL, and TCP. For HTTP and HTTPS health checks, a custom link is used to check whether the link is accessible normally. Of course, you can also configure response timeout, health check interval, unhealthy threshold, and healthy threshold. For details, refer:

The next step is to set the Server Load balancer to allocate the load. At least two servers are required.

After selecting a machine, you can create a Server Load balancer instance.

After the Server Load balancer instance is created, the DNS name of the Load balancer instance is also fixed:

Lbsample-1268049695.ap-northeast-1.elb.amazonaws.comRecord)

Ipv6.lbsample-1268049695.ap-northeast-1.elb.amazonaws.com (aaaa)Record)

Dualstack.lbsample-1268049695.ap-northeast-1.elb.amazonaws.comOrAaaaRecord)

 

It should be noted that, like the virtual machine just now, do not bind a record to the IP address of the Server Load balancer. You can use a cname to link to the DNS name of the Server Load balancer, to implement custom access.

So far, an Amazon AWS EC2 machine is basically created and can be used. In the next section, we will create an azure virtual machine.

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.