Getting Started with Alibaba Cloud ECS

Alibaba Cloud is a cloud computing company from china, it's a subsidiary company of Alibaba Group. Alibaba Cloud was launched in September 2009. Alibaba Cloud is the first Chinese cloud service provider to pass ISO27001:2005 (Information Security Management System). In this article, we will be talking about Alibaba ECS (Elastic Compute Service)

Alibaba Elastic Compute Service (ECS)

ECS is an Iaas service as Virtual Cloud Server. ECS provides computing services and can be used as per your need. Need to host a simple website? pick Entry-level Instances. Or the need for enterprise-level operations? you can choose the required configuration of your server.

With ECS you don't need to invest in hardware and maintain it, scale as needed, select different payment options as a subscription or pay as you go. If you are a student you can get a Free ECS Alibaba Cloud for Students: Get Student Discounts.

Creating ECS instances

Let's create ECS instances, to create Alibaba ECS instances we need to follow some basic steps:
  1. Select payment methods
  2. Select the Instance type
  3. Select the Image (OS)
  4. Configure the firewall (security group)
  5. System configurations, login keys, hosts
  6. Review and Lunch
Thus first, log in to Alibaba Cloud, then click console and select Elastic Compute Service. Now you will be on the ECS console, Now click on Instance on the left and click Create Instances.
Elastic Compute Service ECS Console

First, pick the Billing methods. Choose Subscriptions if you have long term deterministic service or choose Pay-As-You-Go if you are looking for short term or indeterministic (traffics, computations) services.
Pick the Region near to your customers for lower network latency.
Choose Instance Type as your need.
Choose the Images (OS) as per your need and click networking.

ECS Instance With Lowest Price Possible
Now in the Networking tab, you can let the default if you have no special requirements for Networking. be sure that port 80 is allowed so we can connect to the Linux server through SSH.

Now in the System Configurations, select a key pair to log in to the server. if you don't have already created one, it's time to create an SSH key.

Now is grouping, pick tags to recognize the instance, it will be handy when working with a large number of instances.

Now preview the configurations you picked, Go back and update if any needed.
Preview On Creating Alibaba ECS Instance

Accept the Terms of Service and click Create Instance. If you are following the article to create ECS for a Student account, click on Create Order and Purchase next.


Now the ECS instance is created. you can connect and start your cloud computation.

Connection to ECS via SSH

To connect to the ECS server via SSH we need:
  1. the SSH key (downloaded when created)
  2. the public IP
  3. the username
Even if you are on a Windows machine you can connect using the SSH from Ubuntu installed within Windows, Ya it is possible with WSL, Get Started with Linux within Windows.

Once the ECS instance is created, you can find it listed on the ECS console. Check the Public IP (Internet).
Go to the location where the ssh key is and change it to read-only if you are using it for the first time.

Local Terminal

  • $ chmod 400 alibaba.pem
  • $ ssh -i alibaba.pem root@47.254.198.192

Accept to add to know host, Now you are inside your Virtual Cloud Server.

Now I will write some Linux commands which will install a web server and we will serve a static site.

Remote Connected Local Terminal

  • $ sudo apt-get install nginx
  • $ sudo systemctl start nginx
  • $ sudo systemctl enable nginx

Since we want our server to respond as a web server, we need to allow port 80 for incoming requests. For that select the instance, then click on the Security group, Then Open the security group. And add security Group Rule, to allow port 80 on Inbound.

Enable Port 80 of Security Group
If you visit the servers IP on the browser you will find a default Nginx page, It worked.

Find More on configuring the Nginx to serve on a domain from this video above.

Conclusion

In this article, we talk about getting started with Alibaba Cloud ECS, create an instance, talk about different options and its uses. We connect to the server using SSH and configure an Nginx. thus create a Web server. 

Getting Started with Alibaba Cloud ECS Getting Started with Alibaba Cloud ECS Reviewed by Devkota on November 03, 2020 Rating: 5

No comments:

Powered by Blogger.