Instance,Virtual Cloud Network, Block Volumes, File Storage in Oracle Cloud Infrastructure !!
In today’s post will see regarding Oracle Cloud Infrastructure topics.
In this post we are going to see:
- How to create a compartment in OCI.
- How to create Virtual Cloud Network in OCI
- How to create subnets in VCN.
- How to create Internet Gateway.
- How to edit the Route Table and create a rule of Internet Gateway.
- How to provision instance in OCI.
- How to create Block volumes in OCI.
- How to attach Block Volumes to an instance and mounting the same at the instance OS level.
- How to create File Storage(NFS).
- How to create security list rules to access File storage for the instance.
- How to mount File storage in the instance.
Login to your cloud account, go to compute and click open service console.
Now, in the menu go to Identity and click compartments to create a new compartment.
Click on create compartment and give the details as below.
Now, in the menu go to networking–>Virtual Cloud Network–> Create Virtual Cloud Network.
Give the details as below for Virtual Cloud network.
Here I’m choosing to Create virtual cloud network only option because instead of OCI itself create subnets, I myself want to create subnets.
If you choose option Create virtual cloud network plus related resources, then OCI itself create all its necessary resources like subnets etc.
Create PRD_SUBNET_A (in Availability Domain 1) with CIDR 10.0.1.0/24 (256 IP addresses availability will be there)
Note: As you know when cloud account provisioned for you, we will get by default 3 availability domains, so we need to create each subnet in each availability domain.
Likewise, create PRD_SUBNET_B (Availability Domain 2) with CIDR 10.0.2.0/24,
PRD_SUBNET_C (Availability Domain 3) with CIDR 10.0.3.0/24
Now create Internet Gateway (It is for access internet in bi-directional from the instance which we will provision later) and add to the Default Route table.
Now, provision the instance with image Oracle Linux 7.6 using the VCN created above in its specified compartment.
Choosing the Availability Domain for the Instance:
Choosing the Shape of the instance:
Pasting the public key generated through PuTTYKeygen
Choosing the Virtual Cloud Network:
Now Instance got provisioned, it up and running successfully.
Copy the public ip address of the instance to connect through PUTTY:
Copy the private key as shown below:
Now click open as show below and connect to the instance.
After creating an instance, need to attach block volumes where our actual data will be stored.
Create a block volume of size 50 GB.
Successfully create block volume PRD_BV01.
Now attach the block volume created going to instance Attach block volumes option.
Choose the block volume PRD_BV01 for the instance with iscsi option.
Click on iSCSI Commands & Information to get the commands for to execute on the instance.
Execute the commands got from above screenshot, list the block volume, create a partition, create a physical volume, Volume group, Logical volume and format with XFS file system and mount it as shown below.
Now, will create File system storage (NFS) and mount the same to the instance.
To access the File system storage, we need to add the below security rules in the security list of the Virtual Cloud Network.
Now go to file storage, click on mount commands and execute the same commands on the instance to mount the file storage.
Hope this post find’s you well !!
Happy Learning !!
If any questions leave in the comment box.