Skip to main content

How to launch an ECS instance in Alibaba cloud


This blog introduces you to ECS service provided by Alibaba cloud. 
After reading this blog you will be able to deploy your own ECS instance in no time.

What is ECS?
Elastic Compute Service is a type of computing service, ECS is simple and
more efficient than physical servers. We can create instances, change the OS and modify 
any number of ECS instances at any time. An ECS instance is a virtual computing
environment that includes CPU, memory, and other computing components.

If you have already used AWS then you can compare ECS with EC2.

What are the advantages of ECS?

Security

Cloud provider's job is to monitor security, most of the businesses don't like to openly 
consider possibility of internal data theft, but the truth is that high percentage of data thefts 
occur internally and are done by employees.

Availability


Cloud providers are now days present in most of the continents and countries. So, if you 
want to deploy your application in a particular region, you can easily do it with help of most 
of the cloud providers.

Scalability

Cloud providers allow you to easily modify your IT requirements as and when required. 
This will allow you to support your business growth without expensive changes to your 
existing IT systems.


Before creating an instance you must create a security group and key pair.

What is security group?

Security groups are associated with ECS instances and provide security at the protocol and 
port access level. Each security group working much the same way as a firewall – contains 
a set of rules that filter traffic coming into and out of an ECS instance. Security groups made
 in a particular region, will only be available in that region.


How to create a security group in Alibaba cloud?

1. Log on to the ECS console.
2. In the left-side navigation pane, select “Networks and Security” 
and then “Security Groups”.


3. Click “Create Security Group”.
4. In the Create Security Group dialog box, complete the following configurations:


  • Template: If the instances in the security group are for Web server deployment. 
  • Select proper template to simplify security group rule configuration.
  •  Security Group Name: Specify a valid security group name. 
  • Description: Give a brief description to the security group for future management.
  • Network Type:

    • To create a classic network-connected security group, select Classic.
A classic network is majorly deployed in the public infrastructure of 
Alibaba Cloud, which is responsible for its planning and management.

    • To create a VPC-connected security group, select VPC and then a specific VPC.
VPCs are isolated networks established in Alibaba Cloud and logically 
isolated from each other. You can customize the topology and 
IP addresses in a VPC.

    5.    Click OK to save the rule.


What is SSH key?

Secure Shell is a cryptographic network protocol for operating network services 
securely over an unsecured network. The standard TCP port for SSH is 22. The best known 
example application is for remote login to computer systems by users.


How to create key pair in Alibaba cloud?

1. Log on to the ECS console.
2. In the left-side navigation pane, select “Networks and Security” and then “SSH Key Pair”.
3. On the SSH Key Pairs page, click “Create SSH Key Pair”.
4. On the Create SSH Key Pair page, enter a name for the key pair, and select Auto-Create 
SSH Key Pair.




How to create ECS instance in Alibaba cloud?

1. Log in to Alibaba cloud console.

2. Select “Elastic Cloud Service” and then select “Instance”.

3. Click on “Create Instance”.


4. Choose the billing method, region, instance type, image and storage.
  
Billing method - There are two billing methods. 

1. Subscription - You can choose subscription if you want to use the instance for 
a month or a year.
2. Pay as you go - In this method you will be billed on hourly basis. 

Region - It defines in which region and availability zone you want to deploy your instance. 

Instance type - It lets you choose the configuration of your instance ie number of CPU’s and 
amount of RAM required. 

Image - It lets you select the Operating system and its version. 

Storage - Allocate the required amount of disk space.

After completing all the above, click on “Next: Networking”.


5. In Networking select the VPC and VSwitch, assign public IP, select security group

VPC - A virtual private cloud is a virtual network dedicated to your account. 
It is logically isolated from other virtual networks in the Cloud.

VSwitch - It is nothing but a subnet of the network.

Public IP - It is the IP address with which you can access your instance.

Security group - It is a logical group that assorts instances in the same region 
with the same security requirements. Each instance belongs to 
at least one security group, which must be specified at the 
time of creation.

After completing all the above click on “Next: System Configuration”.


6. In System Configurations select the key pair that you have created earlier and 
fill the instance name, description and host.


7. Click on Preview and then Create Instance.
8. After instance has been created you can log into the instance using pem file.
9. Open the terminal and type the command -

    ssh -i your_key_file.pem root@ip_address

10.Done.





Resources

7939108.912228.1.1d1f17c2BlcW32

https://www.alibabacloud.com/help/doc-detail/86455.html?spm=a2c5t.10695662.1996646101.
searchclickresult.290e608dTz6IFi


https://searchsecurity.techtarget.com/definition/Secure-Shell

Comments

Popular posts from this blog

EC2 Ssh Connection Refused

When ssh: connect to host ip_address port 22 Connection refused



Unable to access server???
Exactly when you see the error - “ssh: connect to host ip_address port 22: Connection refused” while connecting your AWS EC2 Instance. In order to find solution of the problem, you will go to AWS forum and other channels where you need to answers several questions first. But it's very difficult to find the actual problem. In order to get clues what the problem is, we should provide as many details as possible about what we have tried and the results we are getting. Because there are hundreds of reason why a server or service might not be accessible, also connectivity is one of the toughest issue to diagnose, especially when you are hosting something critical on your box. I've seen several topics on this problem, but none offers a solution to it.  I was not aware for what should I look at first. So I walk through from the very basics and investigated the following thing Use of verbose while ss…

jgit-flow maven plugin to Release Java Application

Introduction As a DevOps I need a smooth way to release the java application, so I compared two maven plugin that are used to release the java application and in the end I found that Jgit-flow plugin is far better than maven-release plugin on the basis of following points: Maven-release plugin creates .backup and release.properties files to your working directory which can be committed mistakenly, when they should not be. jgit-flow maven plugin doesn't create these files or any other file in your working directory.Maven-release plugin create two tags.Maven-release plugin does a build in the prepare goal and a build in the perform goal causing tests to run 2 times but jgit-flow maven plugin builds project once so tests run only once.If something goes wrong during the maven plugin execution, It become very tough to roll it back, on the other hand jgit-flow maven plugin makes all changes into the branch and if you want to roll back just delete that branch.jgit-flow maven plugin doesn…

VPC per envrionvment versus Single VPC for all environments

This blog talks about the two possible ways of hosting your infrastructure in Cloud, though it will be more close to hosting on AWS as it is a real life example but this problem can be applied to any cloud infrastructure set-up. I'm just sharing my thoughts and pros & cons of both approaches but I would love to hear from the people reading this blog about their take as well what do they think.


Before jumping right away into the real talk I would like to give a bit of background on how I come up with this blog, I was working with a client in managing his cloud infrastructure where we had 4 environments dev, QA, Pre Production and Production and each environment had close to 20 instances, apart from applications instances there were some admin instances as well such as Icinga for monitoring, logstash for consolidating logs, Graphite Server to view the logs, VPN server to manage access of people.




At this point we got into a discussion that whether the current infrastructure set-u…