image
ECS Hands-on Demo
Start course
Difficulty
Beginner
Duration
53m
Students
31
Description

In this course, you'll learn what Elastic Compute Service (ECS) is, how to use it, and what makes Alibaba Cloud's new 6th generation instances faster and more powerful than their predecessors. You'll also learn how to choose the right type of instance for your workload, and how to save money by understanding the ECS pricing model. Finally, you'll learn how to launch your own ECS instance from Alibaba Cloud's web console.

Learning Objectives

  • Understand the fundamentals of Alibaba ECS
  • Learn the advantages of the sixth-generation ECS hardware
  • Learn the instance types and families in ECS
  • Learn how to choose the right instance type for your workload
  • Understand ECS's different pricing models
  • Learn how to purchase an ECS instance from the Alibaba Cloud console

Intended Audience

  • Solution architects
  • System operators
  • Developers
  • Anyone who wants to learn about Alibaba ECS

Prerequisites

To get the most out of this course, you should have a basic understanding of the Alibaba Cloud platform.

 

Transcript

Okay. So let's now have a hands-on demo. Let's see how we launch an ECS instance. So, here we are in the console, let's have a quick demo to see how to launch an ECS instance. So, what I'll do is I'll click on Elastic Compute Service that will open up a new tab, which will take me to the ECS console. From the ECS console there's a button here that says, Create Instance. Go ahead and click on that Create Instance. And that will take me to the instance buy page. And you'll see, I have three choices right now, Subscription, Pay As You Go or Preemptible.

So, what I'm going to do is choose, Pay As You Go. If you want to buy an RI, you actually don't do that from the purchase page. You would need to do that in advance. So, what I'll do is I'll select Pay As You Go. I then have to choose a region and a zone for my instance. So, here I have China, Shanghai, as my default. Let me change that over to Singapore. So, we'll choose Singapore instead

 So I'm now choosing Singapore and I'll choose let's say Zone A and the zone you choose may have an impact on what instance types are available, because each instance type in a region is defined by what hardware was installed in that region. So, not every region and zone will have the same hardware. So, you can see I can choose Heterogeneous, x86, or Bare Metal here. And then I have General Purpose, Compute, Memory, Big Data.

All of those types we discussed are available here. Burstable is actually called Entry Level. What I'll do is I'll choose General Purpose and I'll choose a G6E. So, this is a generation six enhanced with an Intel Xeon Cascade Lake processor that can handle 900,000 packets per second with a storage IOPS up to 21,000. So, this is a fast, fast, instance and I will go ahead and choose a disk image to put on my instance.

Let's go with the Ubuntu 20. We'll use Ubuntu 20, the latest and greatest. You can see here, the default disk type, and the only choice for the generation six enhanced is the SSD, enhanced SSD. And I have a 40 gigabyte disk. If I make that bigger, I actually get, I may actually be granted more potential IO operations per second. And you can see that that is the case. If I go up to, let's say 500 gigabytes, I now have 7,800 IOPS. If I scale back down to 40, then I have 2280. Then I can choose my performance here, PLO or PL1 are available in this zone that I selected in Singapore.

I can also set a snapshot policy to automatically back up my disk on a schedule or I can attach network attached storage. I'm now going to the networking page. From here I need to select a VPC in which to launch my instance, I have two VPCs in Singapore, I'll choose the web VPC. I then can choose whether or not to assign a public IP. If I check this box, I am granted a public IP and I can choose its peak bandwidth anywhere from one megabit per second, up to 100 megabits per second.

I then select a security group. Every ECS needs to be a member of at least one security group, which is essentially a set of firewall rules. And then I can assign one or more elastic network interfaces. In my case, I'll assign a single ENI with a single private IP, and then I'll click on next to go to the configurations page. This is where I do things like set SSH keys or passwords. I'll go ahead and choose a password here. Oops, let's wait for that to get typed in. The page is a little slow right now.

Okay, and then I will go down to instance name and I'll give this instance a name. So, we'll call it, I don't know, Web Server, maybe I want my general purpose instance to run Apache. So, we'll call it Web Servers. Let's do that. And then I can choose to give it a host name, if I want, we can do that. Let's call the host name also Web Server. If I'm launching more than one instance at a time, I can choose to give the instance name or host name a suffix so that there will be a number at the end of increments, like: Web Server 1, Web Server 2, et cetera.

I can also turn on release protection, which will prevent users from deleting this instance, if I'm worried about that and I can attach Ram roles, which is a way to give my instance permissions to talk to other Alibaba cloud services. I can then add tags, which will allow me to identify my instance more easily later. And I can add my instance to a deployment set. This will actually ensure that the instance gets deployed onto a particular, a dedicated host.

So I can create a DDH and make sure my instance launches on that DDH. And then we'll go to preview. You can see the configuration for our instance, the instance type that we selected, the disk type, the zone and region, the disk image; so, the operating system version, how many we're going to buy, our billing method, our network configuration and other information, like; how we're going to login. If I want, I can even save this instance as a launch template, which is essentially a copy of all these configurations that I can use to quickly launch identical ECS instances in the future.

And here's a cool feature. If you're doing development, you can choose automatic release, which will cause this instance to be automatically deleted at a particular time. I will turn this on because I'm worried that I'll forget. So, after I do this test, after I filmed this video, I might forget to turn my instance off. That's okay. If I check this box and choose a time, then the system will automatically delete my instance for me. I then have to agree to the terms of service and I click create instance. And that's it.

That should start the process of creating my ECS instance. And you can see, I now have an instance ID, which means the instance was successfully created and is now launching. I can close that tab and let's go through the instances list in the ECS console for the region Singapore. So, I need to switch from Shanghai over to Singapore and I should now see I have an instance that's in the starting state. So, my instance is right here, starting up, and this is it's public IP and it's private IP. Once it's booted up, maybe we can SSH in and try installing something just so you can see how that works.

So, let's go ahead and SSH into this instance. Okay, there we go and we're in. So, now let's say I run APT update, and then let's say we install Apache and we'll go see if the Apache default page loads up, or we could put our own web page up. We could, I'm just not sure whether or not we have time for that. Let's see. So, APT install Apache2. There we go.

Okay. Apache is now installed. If I want to make sure that Apache is going to boot up every time the instance reboots then I need to also run this. And you'll notice that I'm logged in as root, so, I don't need to use the SUDO command. I don't need to use SUDO to get group permissions. The default login for all of ECS instances is root. So, I'm logged in as root. So, if I now take this IP address and paste it into my browser, I can see the Apache default page. And just to prove that this is really my server, let's go ahead and change that to something else.

So, I'll change index.html to something of my own or remove the old one and we'll make a new one. So, I'll make a new one. I'll just do this from memory. My New Page. Okay, that should be enough. And then we'll add a body. Maybe we'll center it, make a header so it's big. Welcome to my page. All right. Closing tags. Okay, great. And last closing tag, we now have some valid HTML in here. So, I replaced this landing page. 

Let's see if that worked and sure enough it did. I get Welcome to my page. So, you now have the web server up and running and that's it. That's how you launch an ECS instance. If I want to delete this, because it's a pay as you go, I can delete it any time just by checking this box and then choosing release. I could also change it to subscription.

If I decide I want to keep it for a long time and I want to get a discount and I haven't purchased a reserved instance, then I could switch it to subscription. In this case, I'm just going to go ahead and delete it. I'll choose Release Now, Next. Okay. And that will delete my instance. And now it's gone and that's it. Thank you for joining this class and thank you for watching this demo. And I hope to see you in our future classes.

About the Author
Students
701
Courses
18
Learning Paths
2

Alibaba Cloud, founded in 2009, is a global leader in cloud computing and artificial intelligence, providing services to thousands of enterprises, developers, and governments organizations in more than 200 countries and regions. Committed to the success of its customers, Alibaba Cloud provides reliable and secure cloud computing and data processing capabilities as a part of its online solutions.