Compute is one of the 6 pillars on which OCI is built. Oracle provides compute instances in order to provision and manage Compute hosts.
This post covers:
- Overview of OCI Compute Instances
- Types of OCI Compute Instances
- Different shapes of Instances
- Components for Launching Instances
- Steps to create & access a Compute Instance (Linux/windows)
- Important Concepts Related to Compute
Overview Of Compute Instance in OCI
Compute is a Linux/Windows machine created on the cloud with a shape that we can use to deploy various services depending on application requirements. Compute machines have OCPUs, memory, storage, and boot volume attach to it which defines the shape of an instance. We can also attach and detach storage volumes.
In the below video, I have covered the things you must know about Compute in Oracle Cloud Infrastructure (OCI)
OCI Instance Types
There are 3 types of Instances in OCI.
1) Bare Metal (BM) Instance: In Which you will get direct access to the underlying hardware. It gives a dedicated physical server for Highest performance & strong isolation. It is used for heavy workloads.
2) Virtual Machine (VM) Instance: VM instance runs on top of Bare Metal hardware. There is a hypervisor on top of Bare Metal server to virtualize it in smaller VMs. VMs are ideal for running applications that do not require the performance and resources (CPU, memory, network bandwidth, storage) of an entire physical machine.
3) Dedicated VM Host: It is the combination of Bare Metal and Virtual Machine. In this multiple VMs are running on Bare Metal and the whole server is dedicated to a single host. Till now Autoscaling & Instance pool is not supported in these instances.
Also Check: OCI Data Transfer Service.
Types Of Shapes
Compute Shape is a combination of CPU, Memory, and Local storage. There are several predefined shapes available on oracle cloud Infrastructure.
1) Standard shapes: These shapes provide a balance of cores, memory, and network resources. Standard shapes are available with Intel or AMD processors. These shapes are used for general workloads.
2) DenseIO shapes: It is used for Big Data, large databases, & high-performance local storage is needed. DenseIO shapes include locally-attached NVMe-based SSDs.
3) GPU shapes: Used for hardware-accelerated workloads. GPU shapes include Intel CPUs and NVIDIA graphics processors.
4) High-performance computing (HPC) shapes: designed for high-performance workloads that require high-frequency processor cores and cluster networking for massively parallel HPC workloads. These shapes are available in only Bare Metal instances.
Note: Oracle has recently introduced a new feature of flexible shape in OCI in which you can design shape by yourself
Components for Launching Instances
The components required to launch an instance are:
Availability domain – The Oracle Cloud Infrastructure data center within your geographical region that hosts cloud resources, including your instances. You can place instances in the same or different availability domains, depending on your performance and redundancy requirements.
Virtual cloud network – A virtual version of a traditional network—including subnets, route tables, and gateways—on which your instance runs. At least one cloud network has to be set up before you launch instances. For information about setting up cloud network.
key pair (for Linux instances) – A security mechanism required for Secure Shell (SSH) access to an instance. Before you launch an instance, you’ll need at least one key pair. For more information, see Managing Key Pairs on Linux Instances.
Password (for Windows instances) – A security mechanism required to access an instance that uses a Windows platform image. The first time you launch an instance using a Windows image, Oracle Cloud Infrastructure will generate an initial, one-time password that you can retrieve using the console or API. This password must be changed after you initially log on.
Image – A template of a virtual hard drive that determines the operating system and other software for an instance. You can launch instances from these sources:
- Oracle Cloud Infrastructure platform images.
- Trusted third-party images published by Oracle partners from the Partner Image catalog. For more information about partner images, see Overview of Marketplace and Working with Listings.
- Pre-built Oracle enterprise images and solutions enabled for Oracle Cloud Infrastructure.
- Custom images, including bring your own image scenarios.
- Community images, created and published by community members for use by other community members.
- Boot volumes.
Shape – A template that determines the number of CPUs, amount of memory, and other resources allocated to a newly created instance. You choose the most appropriate shape when you launch an instance. See Compute Shapes for a list of available bare metal and VM shapes.
Tags– You can apply tags to your resources to help you organize them according to your business needs. You can apply tags at the time you create a resource, or you can update the resource later with the wanted tags. For general information about applying tags, see Resource Tags.
Steps To Configure Compute Instance
You can create two types of instances a Linux instance or Windows instance. In this example, we will be creating a Linux instance.
Prerequisite: You must create SSH public & private keys using puttygen.exe
Check out our blog to know how to generate SSH keys.
1) Navigate to Compute and click on Instances.
2) Select the compartment in which you want to create an instance.
Also read: Oracle Cloud Infrastructure Compartments
3) In the Create Instance dialog, Enter the following
- Name: PoC_K21_Linux_Instance
- OS: Linux/Windows
- Availability Domain: AD1/AD2/AD3
- Instance Type: Virtual Machine/ Bare Metal
- Instance Shape: Eg: VM.SandardE4.Flex
- VCN Compartment: PoC_Compartmet
- VCN: PoC_VCN
- Subnet Compartment: PoC_Compartment
- Subnet: public/private
- Boot Volume: Select default boot volume (50 GB) or you can customize this
- ADD SSH Keys: Select Choose SSH key file or paste your Public key
and then click on Create. After a few minutes, we can see the instance have created
Note: Select Assign Public IP Address box otherwise it will create Public Instance without Public IP.
Steps To Access Linux Instance
We can access the Linux Instance created using putty.exe and to connect to Windows Instance we use RDC (Remote Desktop Connection) which we will cover later in the post.
1) Copy the public IP Address of Instance created
2) Open putty.exe and paste the IP address as shown below and add a private SSH key.
Note: When we create SSH keys using puttygen.exe, it will create a key pair (public & private). the public key is used while creating the instance and the private key is used here while connecting to the instance.
3) Now you are successfully connected to your instance.
Steps To Access Windows Instance
If you have created a Windows instance than it will generate a public IP, username, and password which we will use to connect to the instance using Remote Desktop Connection (RDC).
1) Creating a Windows Instance.
2) Connecting a Windows instance
3) You need to reset the password for once.
Note: You need to open 3389 port in the security list for connecting to windows instance.
Note: When we terminate an instance the changes done on Instances Local drive are lost but the saved changes to the attached volume retained.
Error While Connecting To Instance
You can get an error while connecting to the created instances due to various reasons like open appropriate port, SSH key issue, forgot to add private key, and more.
If you are getting these errors while connecting to the instance than refer our post on troubleshooting Compute (Linux/Windows) & Database Instance connectivity issues.
Important Concepts Related To Compute
1) Instance Console Connection: Used when we do not have a private SSH key of an instance or we lost it by mistake. The process is to create a new instance with new SSH key pairs(public & Private). And using that instance we can update the public SSH key of the initial instance.
To know more about Instance Console Connection click here.
2) Custom Images: We create an image of the instance in Object Storage and use that image to create similar configuration instances. We can edit configuration if we want while creating the instance.
3) Block Volumes: It is attached to compute instances for storage. It consists of a Boot and block volume. Boot volume is like a Boot disk in which OS data is stored and Block volume is used for regulatory data storage.
4) Autoscaling: It allows us to activate or deactivate compute instances depending on the requirements in an Instance pool. We can increase and decrease the number of instances using autoscaling.
To know more about Autoscaling in OCI click here
5) Resizing of Instance: Rather than creating a new Compute instance for a higher workload, we can resize the existing instance up and down.
Read our blog to know more about Resizing of Instances.
6) Instance Configuration & Instance pool: Instance Configuration is used to set a template of OS image, metadata, storage, VNIC, subnets, and use this configuration multiple times to create similar types of instances. Instance Pool is a set of similar types of instances created using instance configuration.
Check our blog to know in detail about Instance Configuration & Instance Pool.
7) High Availability: We can deploy instances across various Fault Domain (FD), Availability Domain (AD) & Regions to make it highly available. It also helps in protecting instances against FD, AD, or region failure.
Check out our blog to know in detail about OCI Regions
Ways to Access Oracle Cloud Infrastructure
You can access Oracle Cloud Infrastructure (OCI) by using the Console (a browser-based interface), REST API, or OCI CLI. Instructions for using the Console, API, and CLI are included in topics throughout this documentation. For a list of available SDKs, see Software Development Kits and Command Line Interface.
To access the Console, you must use a supported browser. To go to the Console sign-in page, open the navigation menu at the top of this page and click Infrastructure Console. You are prompted to enter your cloud tenant, your user name, and your password.
For general information about using the API, see REST APIs.
Authentication and Authorization
Each service in Oracle Cloud Infrastructure integrates with IAM for authentication and authorization, for all interfaces (the Console, SDK or CLI, and REST API).
An administrator in your organization needs to set up groups , compartments , and policies that control which users can access which services, which resources, and the type of access. For example, the policies control who can create new users, create and manage the cloud network, launch instances, create buckets, download objects, and so on. For more information, see Getting Started with Policies. For specific details about writing policies for each of the different services, see Policy Reference.
If you’re a regular user (not an administrator) who needs to use the Oracle Cloud Infrastructure resources that your company owns, contact your administrator to set up a user ID for you. The administrator can confirm which compartment or compartments you should be using.
Security
In addition to creating IAM policies, follow these security best practices for Compute.
- Encrypt boot volumes with a custom key, and rotate keys
- Apply the latest security patches to instances
- Use Oracle Cloud Guard to detect and respond to security problems
- Perform a security audit
Check about Securing Compute.
FAQs
What is the role of a shape in Oracle Cloud Infrastructure (OCI) compute instances?
In OCI, a shape refers to a predefined set of hardware resources, such as CPU cores and memory, that determine the performance and capabilities of a compute instance.
What are the advantages of using Oracle Cloud Infrastructure (OCI) Bare Metal instances over virtual machine instances?
Oracle Cloud Infrastructure (OCI) Bare Metal instances provide direct access to the physical server hardware, bypassing the virtualization layer.
Related/Further Readings
Begin Your Cloud Journey
Begin your journey towards becoming an Oracle Cloud Expert and earn a lot more in 2024 by joining our FREE CLASS. You will also know more about the Roles and Responsibilities, Job opportunities for OCI Architects, Admins in the market, and what to study Including Hands-On labs you must perform to get the Higher Paying jobs.
Click on the below image to Register for Our FREE ClASS on MASTERING ORACLE CLOUD FOR DBAs, APPs DBAs, ARCHITECTS & SYS ADMINS
Leave a Reply