LAB 8 (INSTANCE CREATION) - arunsinghchauhan38-arch/CLOUDARCHITECTDOC GitHub Wiki

INSTANCE

In Oracle Cloud Infrastructure (OCI), an instance is the fundamental compute resource you create to run applications. Think of it as your virtual machine (VM) or bare metal server in the cloud.

What an OCI Instance Is

  1. A compute host that can be either:
  • Virtual Machine (VM): Runs on shared physical infrastructure, flexible and cost‑efficient.

  • Bare Metal: Gives you full access to a physical server for maximum performance and isolation.

  1. It’s where you install your operating system, deploy applications, and manage workloads.

  2. You control its lifecycle: start, stop, reboot, terminate.

Step to Create Instance

Step-1. Go to the Navigation menu/burger menu , Click on Compute Option and Click on "Instances"

Step-2. Now click on Create Instance before click on create instance we select compartment Hub_Compute_and_storage_compartment, then click on "Create Instance"

Step-3. Now Fill the Name of Instance "Bastion-server" ( As per the choice) and In Create in Compartment Box select the Compartment name which we already created - Hub_Compute_and_storage_compartment.

Step-4. Now in Placement Section we select Availability domain (AD) as per our choice, here 3 ADS available for select. We select AD 1 for our instance.

What Availability Domain means

  • An AD is a physically isolated data center within a region
  • OCI regions typically have 3 Availability Domains :- AD1,AD2 and AD3.

Step-5. Next , In Adavance Options we select our Capicity Type asper our choice but before selecting any capicity type we know about both available capicity

  1. On-demand capacity: Pay for only the compute capacity that you use. With on-demand capacity, you pay for compute capacity by the second, and depending on the shape, you pay only for the seconds that your instances are running.

  2. Preemptible capacity: Preemptible capacity allows you to save money by using preemptible instances to run workloads that only need to run for brief periods or that can be interrupted when the capacity is reclaimed. Preemptible instances behave the same as regular compute instances, but the capacity is reclaimed when it's needed elsewhere, and the instances are terminated.

  3. Reserved capacity: Reserve capacity for future usage, and ensure that capacity is available to create Compute instances whenever you need them. The reserved capacity is used when you launch instances against the reservation. When these instances are terminated, the capacity is returned to the reservation, and the unused capacity in the reservation increases. Unused reserved capacity is metered differently than used reserved capacity

  4. Dedicated capacity: Run VM instances on dedicated servers that are a single tenant and not shared with other customers. This feature lets you meet compliance and regulatory requirements for isolation that prevent you from using shared infrastructure. You can also use this feature to meet node-based or host-based licensing requirements that require you to license an entire server. For more information

Note : We will chose the capicity type as per our client need so be carefull before selecting any capicity type. This Time we select Capicity type On Demand Capicity

Cluster Placement Group: we never change it we leave it as off condition.

Fault Domin: Here is 3 Options available (AD1,AD2 and AD3) for select but we leave it as default mode.

Step-6. Image and shape

Image

In Oracle Cloud Infrastructure (OCI), an Image is the software environment your compute instance will boot with. It’s essentially the operating system (and sometimes additional pre-installed software) that defines what runs on your virtual machine or bare metal server.

What an Image Is

  • Definition: A template that contains the operating system and optionally applications or configurations.

Select Image When we click on this button, A window open with multipule image open infront of us. we will chose image as per our application need. By Default we chose Oracle Linux for smoth operation and support becuase oracle provide us direct support and help instead of other image and it will available free of cost in oci. we can also chose another image but support and problem-solving may be slower if issues arise.

A common rule N-1 used when we select image name or verison of operationg systems. We always select one less version instead of new due to its reliability or uses.

Why N‑1 Is Recommended in OCI

  • Reliability: The N‑1 version has already gone through patches, bug fixes, and stability improvements.

  • Support: Oracle and many vendors provide stronger support for N‑1 versions because they are widely used.

  • Compatibility: Applications and middleware often lag behind the very latest OS release, so N‑1 ensures fewer compatibility issues.

  • Risk Management: Avoids potential downtime caused by untested features or regressions in the newest release.

SHAPE

In Oracle Cloud Infrastructure (OCI), a Shape defines the hardware configuration of your compute instance. It’s essentially the “size” of the machine you’re creating—how many CPUs, how much memory, what kind of storage, and whether it includes GPUs or special networking.

When we click on change shape that time a window open with multipule options. we select options as per our requirment.

Instance type

In Oracle Cloud Infrastructure (OCI), the term instance type refers to the kind of compute resource you are launching. It defines whether your instance is a virtual machine (VM) or a bare metal server. 2 types of instance avaialbe in oracle.

VM (Virtual Machine) Instance

  • Runs on shared physical hardware with a virtualization layer.

  • Resources (CPU, memory, network) are allocated virtually.

  • Flexible scaling: You can adjust OCPUs and memory (especially with Flex shapes).

  • Cost‑efficient: Pay only for what you use.

  • Isolation: Logical isolation, but hardware is shared with other tenants.

  • Best for: General workloads, web apps, dev/test environments, and applications that don’t need direct hardware access.

Bare Metal Instance

  • Runs directly on physical hardware with no virtualization layer.

  • Full access to all resources of the server (CPU, memory, storage, networking).

  • Maximum performance: No overhead from virtualization.

  • Isolation: Dedicated hardware, not shared with other tenants.

  • Best for: High‑performance computing, large databases, workloads needing hardware control (e.g., custom hypervisors, specialized drivers).

Shape series

In this option we select AMD as processor due to his flexiblity.

Shape Name

In this option we select VM.Standard.E5.Flex because this a latest one cpu and in this we can increase the number of ocpu as per our requirement and also increase memory.

Step-7. Security

we do not change anything in security options. we leave it by default mode.

Step-8. Networking

In this step we setup networking for our instance

  1. Primary network: we go with Select existing virtual cloud network because we already create it.
  • In Virtual Cloud Compartment we select Hub_Network_Compartment by going through parent compartment in every time.

  • In virtual cloud network we select HUB_COMPARTMENT

Subnet

  • Select existing subnet

Private IPv4 address assignment

  • Private IPv4 address : In this option we select Automatically assign private IPv4 address . OCI assign us automatically an private ip.

Add SSH keys

In Oracle Cloud Infrastructure (OCI), SSH keys are a secure way to access your compute instances remotely — without using passwords.

Here’s the meaning in simple terms:

SSH (Secure Shell) is a protocol that lets you log in to a Linux server safely over the internet.

SSH keys are like digital “locks and keys.”

The public key is stored in OCI when you create your instance.

The private key stays on your computer.

When you connect to your instance, OCI checks that your private key matches the public key — if it does, you’re allowed in.

Generate a key pair for me: When we create VCM first time that time we select this option. in this option we generate two type of key 1. Private key & 2. Public key.

When we generate key both key first time so we save both key in our system.

Both Key work for each other because its like a lock and key in a simple language. for example if we want to connect with our vcm so we need a private key for login if we have not a key so we not able to login in our virtual machine.

Private key stored in your local computer drive and Public key saved inside your vcm server. With combination of both sever will work.

Step-9 Storage

**Boot Valume

In Oracle Cloud Infrastructure (OCI), a boot volume is the primary storage disk that contains the operating system and is automatically created when you launch a compute instance. It is essential for starting (booting) the instance, unlike block volumes which are used for additional data storage.

After Set Boot Valume in storage we process for further move and click on create and review details carefully and filal click on create. when we process for create its take a time for creating the instance and showing provisioning.

When we check after some time its created succesfully and showing us as a Running

We will check all the details in our instance section.

Step-10. Login in Server by Using Putty Application

  1. Before login in our server we want to convert our public key into the ppk. formate. for this we use Putty Key Generator

First we open Putty key Generator and Load our private key into the putty software and Save Private key in our computer.

  1. Now we setup our putty application for server login

We enter our public ip into the Host Name (IP Address) -

Now we configure SSH Key into the SSH - Auth - Credentials and insert our private key by click into Browse button.

After Successfully enter the private key into the putty we can now process for login by click on Open button.

Note :- In this our default user name is opc, when we enter this into the login window and press enter its login into the our server without asking for the password. becuaes its already stored into the our server.