In this post I would explain how you can start your OCI journey from scratch. You will get to know the requirement for building architecture like - creating and configuring compartment, VCN, policies, etc. So that you can build your first OCI Instances.
v Creating a Compartment in
Oracle Cloud Infrastructure (OCI)
As given below let us have a look at
following steps:
Step
1: Login to Oracle
Cloud Infrastructure
Step
2: Select
Compartment Menu
Click on hover over Identity option and click on Compartments
Step
3: Click on Create
Compartment button.
Once inside Compartments menu, you will see “Create Compartment” button.

Step
4: Fill Compartment
Details and Create Compartment.

Note:- Following rules need to be followed related to
compartment creation: (i) Compartment name can contain only alphanumeric characters, along
with periods, hyphens and underscores. (Spaces are not allowed in compartment
names). (ii)Compartment name can contain only alphanumeric characters, along
with periods. Hyphens and underscores (spaces are not allowed in compartment names). (iii) Compartment name can be up to 100 characters long. (iv) Compartment name should be unique within its parent compartment. (v) Compartment description can be up to 400 characters long. (vi) Compartments can be created up to 6 levels
deep, not beyond that. |
Now your Compartment is created..!! You
should be able to see your newly created compartment in the list of compartments.
v Creating a Virtual Cloud
Network (VCN) in OCI
There are two options for creating
VCN in OCI:
(I) Create Virtual Cloud Network plus
related resources: Automatically sets up a Virtual Cloud Network with access to
the internet. You can set up firewall rules and Security Lists to control
ingress and egress traffic to your Instances.
All related resources will be created
in the same Compartment as the VCN.
(II) Create
Virtual Cloud Network only: Creates a Virtual Cloud Network only.
You’ll still need to set up at least one
subnet, gateway and route rule to have a working Virtual Cloud Network.
Step
1:
Open the Console and in Menu, click Networking.
Select Create Virtual Cloud Network Only. (This option will not create the related resources like -subnet, route table,Internet Gateway, security List, DHCP Options)
Step
2:
Select a compartment on the left that you have permission to work in.
Step
3:
Click Create virtual cloud network.
Note: Enter a friendly name for the cloud network. It doesn’t have to be unique,and it cannot be changed later in the Console. |
Now our VCN is
created..!!
Ø Creating Security List
At First, I’m going to show you how to
add Ingress rule in the default security list in VCN-T1 after that we will
create two new security list for public & private subnet.
Step
1:
On the Resources menu, click Security Lists. Click on the Default Security List.
Step 2:
Click
on -> Add Ingress Rule and add the following values as shown below: Source Type: CIDR Source CIDR: 0.0.0.0/0 IP Protocol: TCP Source Port Range: All Destination Port Range: 80 Click on Add Ingress Rules at the bottom (as per below Screenshot). |
Ø We
will create two new Security Lists, one for the public subnet and one for
the private subnet. This way, we can
control the types of traffic (protocol and port) will be allowed in and out of
the instances in public and private subnets.
Step 1: To create a new Security List, on the Resources menu, click Security Lists.
Step 2: The Create Security List dialog box, use the information below:
(i)
Name: Private-Security-List Create In Compartment: The compartment
name (e.g. Training) Click + Another Ingress Rule, use the
information below: Source Type: CIDR Source CIDR: 0.0.0.0/0 IP Protocol: TCP Destination Port
Range:
22 |
(ii)
Click +
Another Egress Rule, use the information below and click Create Security
List: Source Type: CIDR Source CIDR: 0.0.0.0/0 IP Protocol: TCP Destination Port
Range:
All |
(iii)
Click Create Security List. The Security Lists were created..!! |
Step
3: Click
Create Security List again.
(i)
Name: Public-Security-List Create In Compartment: The compartment
name (e.g. Training) Click + Another Ingress Rule, use the
information below: Source Type: CIDR Source CIDR: 0.0.0.0/0 IP Protocol: TCP Destination Port
Range:
22 |
(ii)
Click +
Another Egress Rule, use the information below and click Create Security
List: Source Type: CIDR Source CIDR: 0.0.0.0/0 IP Protocol: TCP Destination Port
Range:
All |
(iii)
Click Create Security List. The Security Lists were
created..!! |
v Create Internet Gateway
in Oracle Cloud Infrastructure (OCI)
Step 1: Click Create Internet Gateway.
Step 2: In the Create Internet Gateway dialog box, use the information below and click Create Internet Gateway:
Name: internet-gateway1
Create In Compartment: The
compartment name (e.g. Training)
v Now, Creating Route Table
in Oracle Cloud Infrastructure (OCI)
Step
1:
Click Create Route Table
In the Create Route Table
dialog box, use the information below:
Step
2:
Click + Additional Route Rule, use the information below and click Create Route
Table:
Name:
Route_Table_VCN-T1 Compartment:
The compartment name (e.g. Training) Target
Type: Internet Gateway Destination
CIDR Block: 0.0.0.0/0
|
The Route Tables were created!!
v Creating Subnets in
Oracle Cloud Infrastructure (OCI)
Subnets are logical divisions of a
virtual cloud network. We can create one or more subnets in a VCN each of which
has a range of non-overlapping IP addresses. This range of address is
determined by CIDR blocks.
Step
1: Select
Virtual Cloud Networks Menu, hover over Networking option and click on Virtual
Cloud Networks.
Step
2: Select
correct VCN’s compartment.
Step
3:
Click on VCN name
After you select correct compartment,
scroll up to find list of VCNs in that compartment.
You should be able to see your
existing VCN in it. Click on the Name of the VCN to navigate to VCN page.
Step 5: Enter details and Create PUBLIC Subnet
NAME: PUBLIC-SUBNET-VCN-T1 SUBNET TYPE: REGIONAL
(RECOMMENDED) CIDR BLOCK: 172.168.0.0/24 ROUTE TABLE: Route_Table_VCN-T1 SUBNET ACCESS: PUBLIC
SUBNET DHCP OPTIONS: Default DHCP
option for VCN-T1 SECURITY LIST: Public-Security-List / Default security List |
Step 6: Enter details and Create PRIVATE Subnet
NAME: PRIVATE-SUBNET-VCN-T1 SUBNET TYPE: REGIONAL (RECOMMENDED) CIDR BLOCK: 172.168.1.0/24 ROUTE TABLE: Route_Table_VCN-T1 SUBNET ACCESS: PRIVATE SUBNET DHCP OPTIONS: Default DHCP option for VCN-T1 SECURITY LIST: Public-Security-List / Default security List |
Step 6: Validate Subnet Created
You should be able to see the newly
created subnet under list of subnets in the VCN.
So, now you are ready
to create you’re Compute Instance in Oracle Cloud Infrastructure (OCI)..!!
Very well explained...:.
ReplyDeleteThank You Sir.
DeleteSarfaraz Oracle Dba Blog: Creating Compartment And Vcn (Subnet, Route Table, Internet Gateway, Security List, Dhcp) In Oci >>>>> Download Now
ReplyDelete>>>>> Download Full
Sarfaraz Oracle Dba Blog: Creating Compartment And Vcn (Subnet, Route Table, Internet Gateway, Security List, Dhcp) In Oci >>>>> Download LINK
>>>>> Download Now
Sarfaraz Oracle Dba Blog: Creating Compartment And Vcn (Subnet, Route Table, Internet Gateway, Security List, Dhcp) In Oci >>>>> Download Full
>>>>> Download LINK