Skip to player
Skip to main content
Search
Connect
Watch fullscreen
Like
Bookmark
Share
More
Add to Playlist
Report
20. Demo: Creating a Compute Instance - Oracle Cloud Infrastructure Foundations
Psycho Killer
Follow
4 days ago
Category
🤖
Tech
Transcript
Display full video transcript
00:00
Welcome to this demo on OCI compute instance. In this particular demo, we are going to instantiate
00:11
an instance a compute instance in inside a VCN. And then we are going to manually build the VCN
00:20
create internet gateway, modify the route tables and the security list. And then we are going to
00:26
install Apache web server on this particular instance. So let's get started. All right, I'm
00:32
logged on to the OCI console here in the Ashburn region. So first thing I'm going to do is I'm going
00:37
to create a virtual cloud network. So click on virtual cloud network. And this time we are going
00:42
to create a VCN using the manual method, not through the visit. So I click on create VCN and we need to
00:50
provide a name here. So we'll say because I'm in Ashburn region. So I'll say this is IAD VCN demo
00:57
sandbox compartment is fine. And here I need to select the cider blocks for the VCN. I'll use the
01:04
same cider blocks we have been using until now. And right here, I can change some of these parameters,
01:11
but we are okay with IPv4 and some of the default parameters here. And I'm going to click on create
01:16
VCN. And this will now create a bare bones VCN. And I need to go ahead and create subnets, etc.
01:23
So first thing I'm going to do is I'm going to click create subnet here. And let's create the first
01:29
subnet here. And we'll call this subnet one sandbox compartment is fine. And there are two choices which
01:38
we get whether it's a regional subnet or AD specific subnet will go with regional as is recommended
01:44
here. And then it's asking me to provide a cider block. So we'll use the 10.0.0.0.0 slash 24. And
01:54
you can see here 256 IP addresses, which are which are provided, which are available as part of this
02:00
subnet. And now I can choose the subnet to be either private or public, we are going with a public
02:06
subnet because we are going to spin up on a web server inside this subnet. And just all the parameters
02:11
look fine. The security list here default security list is fine. And if I just scroll here, everything
02:19
else the route table, I'll choose the default route table. And then I'll click on on hit create subnet.
02:25
So now what we have done is we have created a VCN, we have created a subnet and associated the default
02:33
route table and the default security list with the subnet. So the next thing for us to go ahead and do is
02:40
create an internet gateway. And this provides the path for our packets from from the web server to
02:47
to to the to the internet. So I'll give a very creative name IGW and and hit internet gateway.
02:54
And now the internet gateway is created. And the subnet is created. So the next step for us is to add a
03:01
route from the subnet all the way to the internet gateway. So you can see here the default route table
03:07
has no rules right now. So I'll click here. And I'll add a route rule. So first it says what is my
03:14
target type and my target is internet gateway. And then it says what is the destination cider block.
03:21
And now I'm going to use quad zero, because this basically means all IP addresses right. And I'll choose
03:28
my target as internet gateway. And I'll add this route rule. So what we've just done is we ensure we have
03:36
ensured that the public subnet has a path to the internet through the internet gateway. Now the next
03:43
thing for us to do is to come to the security list. And if I again, I'm using the default security list,
03:49
click here, you can see the default rules which get added. And you will see that it has, you know,
03:58
access for TCP at port 22, etc. So we need to add a rule to get the traffic to come on on port 80 for
04:08
the web server. So again, we'll use quad zero as my source cider, meaning all IP addresses, and my
04:14
destination port will become port 80. That's where the web server is running. So I'll click
04:19
add ingress rule. And that's pretty much all we need to do from a VCN perspective. So we have created
04:26
again, just to recap, we created a VCN, we created one public subnet, we added, we created an internet
04:33
gateway. And then we change the rule in the route table to allow access out and in from through the
04:41
to the internet gateway from the subnet. And then we modified the security list to allow traffic at
04:47
port 80. So that's all we just did manually. If we had used wizard, some of that would have been
04:52
automated. So now let's go ahead and spin up a compute instance. So I'll click here on instances,
04:59
and I'll bring up the instance creation menu. So I'll click on create instance here. And it gives a
05:05
name, I'm okay with that name. And right here, you can see the placement. It provides you know, 81, 82, 83.
05:13
I'm okay with that. If I click on advanced options, I can see things like on demand capacity, preemptible
05:19
capacity, dedicated host, etc. This is a foundational course, we're not going to get into a lot of details.
05:26
But just keep in mind that there are various capacity types which are available with the compute
05:33
service. And it can also choose the best fault domain. I'm just keeping giving that option to
05:39
Oracle to choose the best for domain. Otherwise, I can choose for domain one, two or three here.
05:44
And right here, you can see that it's picking an image and a shape. So shape is basically a template,
05:55
virtual hardware template, which determines number of CPUs, amount of memory, other resources,
06:01
image is basically an operating system, which runs on top of that shape. So think of this as kind of
06:06
combination of hardware and software. So if I click on change image here, I can get I can see options
06:14
for Windows, Linux, Red Hat, Ubuntu, etc. Right? I'm happy with Oracle Linux 8. So I'll keep that default.
06:21
And if I click on change shape, now you can see that I can first choose between a virtual machine and a
06:28
bare metal machine. And then bare metal basically means that you get 52 cores, it's the complete
06:34
server, which is which is given to you virtual machines optional, go with that. And here you can
06:40
see options for various processors, whether it's AMD, Intel, Ampere, etc. And, you know, I'll go with with
06:49
AMD. And right here, you can see that these shapes have this abbreviation called flex. And basically, what that
06:56
means is these are flexible shapes. So I can choose the number of CPUs and the amount of memory. So I can
07:04
move these slider here, and I can actually decide, you know, what kind of, you know, or CPUs, and, you
07:11
know, memory I want. So I'll go with something like one CPU and six gigafram that that sounds about right.
07:20
And I'll kind of choose that shape. And right below that, I can choose my network. And this,
07:29
you can see that the network we just provisioned shows up here. So that's the WCN demo network we
07:36
created. And it's also picking the subnet, which is the public subnet we created. And public subnet
07:43
basically means that my compute instance basically gets a public IPv4 address. So you can see that here.
07:50
And below that, you have an option to add SSH keys. If you recall from the previous demo,
07:56
we actually created SSH keys. And if I go to my cloud, cloud shell, and
08:02
just clear the screen. And I bring up my keys, you can see that I have two, you have two keys here,
08:15
it's kind of a key pair, where I have a private key and a public key. So look at the content of the
08:21
public key, I can just do cat command, and I can copy this, this entire string here, because this needs
08:29
to be put as part of the as as part of the server is that the problem, the private key has to go there.
08:36
So I would say paste public keys, and I would paste the public key here. And there are other options
08:43
which are available. But I'm just going to hit create this instance. And you will see within 1520
08:50
seconds, the instance will be up and running. And we will be able to SSH into the instance,
08:56
once we are able to SSH to the instance, we can we can go ahead, and we can install an Apache web
09:04
server on it. So let me just hit pause here, give it a few seconds, and we'll come back once the
09:09
instance is up and running. All right, so you can see here my instances up and running. And as I scroll
09:17
down, I can see options like public IP address, my, you know, virtual network interface card,
09:23
IP addresses, username, etc. So what I'm going to do next is I'm going to SSH into this instance. So I
09:32
would say SSH minus I provide the name of my private key. So that's demo key. And right here, you can see
09:43
that the instance gets a public IP address because we instantiated it in a public subnet. So I'll provide
09:51
that here. But I could have just copied from here as well. So that's fine. And I'll say, you know, I want
10:00
to connect to this instance, say yes. And right here, you can see now I'm inside the instance. So if I want to
10:11
ping, you can see I'm connected to the instance, if I want to ping, let's see, for example, Google, because
10:17
this is a public subnet, you can see that I have access to the internet. So let me go ahead and
10:26
and install Apache web server on this machine. And this will take a few seconds and we'll come back
10:35
and we'll see this in action. All right, so that took less than a minute. And what I did here was
10:46
install Apache, and then to run some few commands, just to open up the firewalls, etc. And right here,
10:55
you can see that we customize the homepage to say something like this is a web server running on OCI.
11:01
So that's pretty straightforward set of commands. And right here, you can see that this is my public
11:08
IP address. So let me just copy the public IP address and paste it in the browser. And you can
11:14
see right here, let me zoom in, you can see that, you know, this is says this is my web server running
11:20
on Oracle Cloud infrastructure. So this is how simple it is to create a compute instance in OCI. We
11:27
went from from scratch, we built a network, and then we instantiated compute instance in that network.
11:35
I hope you found this demo useful. Thanks for watching.
Be the first to comment
Add your comment
Recommended
3:45
|
Up next
43. Support Rewards - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
5:34
42. Tagging - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
6:52
41. Demo: Cloud Advisor - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
8:06
40. Demo: Cost Management - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
3:25
39. Cost Management - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
4:41
38. Pricing - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
6:38
37. Demo Vault - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
7:49
36. Vault - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
10:12
35. Encryption Basics - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
5:48
34. Demo: Security Zone and Security Advisor - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
3:41
33. Security Zones and Security Advisor - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
8:04
31. Security Introduction - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
4:20
32. Cloud Guard - Oracle Cloud Infrastructure Foundations
Psycho Killer
3 days ago
8:17
29. Demo: Block Volume - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
3:31
30. File Storage - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
4:19
28. Block Volume - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
5:15
27. Demo: Object Storage - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
7:10
26. Object Storage - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
4:56
25. Storage Introduction - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
4:58
24. Serverless with Oracle Functions - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
2:29
23. Container workloads in OCI - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
9:28
22. Oracle Container Engine for Kubernetes (OKE) - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
4:24
21. Scaling - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
2:49
19. Demo: Getting Started with Cloud Shell - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
3:46
18. Instance Basics - Oracle Cloud Infrastructure Foundations
Psycho Killer
4 days ago
Be the first to comment