October 2020

Step by step creation of Oracle cloud free tier account and creating a VM

Oracle Cloud free tier account creation

Hello Friends!

This is my first blog post and I hope you will ignore mistakes. Thank you in advance.

Description:

In this blog post I will describe the step by step creation of Oracle cloud always free account and creating a Linux Virtual Machine.

Oracle Cloud Free Tier will allows you to sign up for an Oracle Cloud account which provides a number of Always Free services and a free credit of 300$ which can be use on all eligible Oracle cloud Infrastructure services for up to 30 days. The Always Free services are available for an unlimited period of time. Kindly click here to know more in detail.

We will be covering the following steps:

  1. Create a free Oracle account
  2. Sign into your account
  3. Network Configuration
    • Create Virtual Cloud Network (VCN)
    • Configure Internet Gateway
    • Adding Route table
    • Adding Security list
  4. Creation of Oracle Linux Virtual Machine Instance
  5. Accessing the Linux Virtual Machine Instance

1. Create a free Oracle trial account

Open the web browser to access the Oracle Cloud account registration form

Choose your country and enter your name and email address
Once provided the details, check your email. You will see an account validation email from Oracle.

Enter the account information.
Note: Home Region cannot be changed once you sign-up.

Enter the address information, mobile details & Payment details and verify the same
Note: You need to provide the credit card details and 1$ will be charged for the verification and the same will be reserved. You will not be charged unless you elect to upgrade the account.

2. Sign into your account

Go to cloud.oracle.com and click on Sign into cloud

Enter you cloud account name and click next. This is the name we choose during the account creation

Enter the cloud account credentials and click next. Username is your email address.

You are now login to your cloud account

3. Network Configuration

Create Virtual Cloud Network (VCN)

Open the navigation menu. Under Core Infrastructure, go to Networking and click Virtual Cloud Networks

Select the compartment you want to create the network. Then click on Create VCN

Enter a name for the VCN
For CIDR Block, I choose IP 192.168.10.0/24, so that I can use the private IP range b/w 192.168.10.1 to 192.168.10.254.

Now the VCN status is available

Click on VCN Name (ocvcn) and you will be redirected to VCN Details page. Under Resource select Subnets and then click Create Subnet

Enter the information as per the below screenshot and click on Create Subnet.
Note: Public subnet has selected to access the instance in public n/w.

The subnet is now created

Configure Internet Gateway

From VCN Details page under Resources, click on Internet Gateways

Give it a name and choose the compartment, then click on Create Internet Gateway

Your internet gateway is created. but you still need to add a route rule that allows traffic to flow to the gateway.

Adding Route table

From VNC Details page, Under Resources –> Route Tables, click on the route table associated with your public subnet.

Click on Add Route Rules

This is for the public subnet.
select Target Type as Internet gateway
Destination CIDR Block: 0.0.0.0/0 (This means all the internet)
Once ready, click on Add Route Rules

Now you can see the Internet gateway route has been successfully added

Adding Security lists

Check your public IP using the URL and whitelist it to access the cloud VM which you will be creating in the next steps

From Subnet Details page, Under Resources, select Security Lists and click on the Default Security List as shown below

Click on Add Ingress Rules

Source Type: CIDR
Source CIDR: <Your Public IP>/32
IP Protocol: TCP; Source Port Range: All; Destination Port Range: All
Once ready, Click on Add Ingress Rules

Now you can see your my Public IP is whitelisted

Creation of Oracle Linux Virtual Machine Instance

Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.

Click on create instance

Name: Enter the name for the instance
Create in Compartment: Select the compartment to create the instance in
Availablilty Zone: Select the Availability domain that you want to create the instance
Image: Select the image, by default Oracle Linux 7.x is used to boot the instance
Shape: Select VM.Standard.E2.1.Micro, which is eligible for always free
Add SSH keys: select Generate SSH Key pair; Click Save Private Key and Save Public key on your computer.

In Management section leave the setting as default

In Networking section enter the private IP and Hostname of the VM. Then click on Create

Wait for the instance creation to complete

After a couple of minutes you can see your Instance is in running state

Accessing the Linux Virtual Machine Instance

Connect the newly created VM from the windows system using ssh.
Before connecting you must set the file permissions for the Private key so that only you can read the file. Do the following.
Reference: https://docs.cloud.oracle.com/en-us/iaas/Content/GSG/Tasks/testingconnection.htm

a. Navigate to <private key file path> which we saved during the VM creation, right-click the file, and then click Properties.

b. On the Security tab, click Advanced.

c. Ensure the owner is yours

d. Click Disable Inheritance, and then select Convert inherited permissions into explicit permissions on this object.

e. Select each permission entry that is not your user account and click Remove.

f. Ensure that the access permission for your user account is Full control and save the changes.

Now we are good to connect to the instance. Open windows command prompt and run the following command.

ssh -i “<private key path>” opc@<public-ip-address>

Thanks for reading my post…

Hope this helps..