Tuesday, January 15, 2019

OCI―Knowing Compute Service Basics

Video 1.  OCI Core 100 - Compute (Demo starts at 24:00)

Oracle Cloud Infrastructure (OCI) Compute Service lets you provision and manage compute hosts,  known as instances.  

Instance Type


OCI offers two types of instances:
  • Bare Metal
    • Gives you dedicated physical server access (single-tenant model) for highest performance and strong isolation
    • Allows direct hardware access with all the security, capabilities, elasticity and scalability of OCI
  • Virtual Machine
    • A hypervisor to virtualize the underlying Bare Metal server into smaller VMs (multi-tenant model)
      • The virtualization makes it possible to run multiple VMs that are isolated from each other
      • VMs are ideal for running applications that do not require the performance and resources (CPU, memory, network bandwidth, storage) of an entire physical machine
Both types of instances are run on the same OCI stacks.


Figure 1.  Bare Metal Instances
Figure 2.  VM Standard Instances (Intel X7 & AMD)
Figure 3.  VM Dense I/O Instances
Figure 4.  GPU Instances (BM and VM)

Instance Shape


A shape is a template that determines the number of CPUs, amount of memory, and other resources allocated to a newly created instance.  OCI Compute Service enables you to select from a range of predefined shapes for both Bare Metal (BM) and Virtual Machine (VM) instances (see Figure 1-4):
  • Compute Standard E2 is based on AMD EPYCTM processor
  • 2 x 25 Gbps implies two NIC cards with 25 Gbps bandwidth
  • Network bandwidth is based on expected bandwidth for traffic within a VCN
  • Max vNICs numbers are for Linux
  • GPU (Nvdia)[2]
    • Volta is based on Tesla Volta GPUs
    • Pascal is based on Tesla Pascal GPUs
  • VM standard vs VM Dense IO shapes
    • VM Dense IO will provide NVMe drivers and VM Standard will provide block storage only

Figure 5.  Image Tab for Selecting the Image Build (highlighted: Oracle Images)

Instance Image


An image is a template of a virtual hard drive. The image determines the operating system and other software for an instance. 

On the Image tab (see Figure 5) you can optionally change the image build. By default, the latest build of the image is used to create the instance. You can select an older build of the image that is compatible with the shape you selected. Only compatible image builds are displayed in the list. You need to select a shape before you can change the image build.

The following images of different categories can be browsed on OCI Console:
  • Platform Images
    • Pre-built images for Oracle Linux, Microsoft Windows, Ubuntu and CentOS
      • Linux Images
        • Default set of firewall rules allow only SSH access (port 22)
          • Users (e.g. opc for Oracle/CentOS or ubuntu for Ubuntu) with sudo privileges are created automatically for instances and are configured for remote access over the SSH v2
        • Provide a startup script using cloud-init
      • Windows Images
        • User name opc created automatically with an one-time password
        • Include the Windows Update utility to get the latest Windows updates from Microsoft
    • See Oracle-provided images for more information
  • Oracle Images
    • Pre-built Oracle enterprise images and solutions enabled for OCI
  • Partner Images
    • Trusted third-party images published by Oracle partners
  • Custom Images
    • Custom images created (from an instance's boot disk) or imported into your OCI environment.  
      • When you create an image of a running instance, the instance shuts down and remains unavailable for several minutes. When the process is complete, the instance restarts.
      • Instances you launch from your custom image include customization, configuration, and software installed when you create the image
      • Custom images do not include the data from any attached block volumes
      • A custom image cannot exceed 300 GB
    • See Managing Custom Images for more details.
  • Boot Volumes
  • Image OCID
Image Import/Export
Read this Oracle whitepaper for more details.

Creating an Instance from a Custom Image


Follow these steps to launch a virtual machine instance on OCI by using a previously created custom image:
  1. From the Compute tab, select Instances
  2. Choose a compartment in which you have permission to work. 
  3. Click Create Instance. 
  4. In the Create Instance dialog box, provide the following information: 
    • Enter a name for the instance. 
    • Choose an availability domain. 
    • Choose Change Image Source
    • Choose Custom Image as the boot volume. 
    • Choose the custom image to use. 
    • Choose Virtual Machine as the instance type.
    • Choose a shape (only compatible shapes are available). 
    • Configure Boot Volume
      • You can change boot volume size and/or choose a key from Key Management to encrypt this volume
    • Choose to upload or paste SSH keys (public keys). 
    • Choose a VCN
    • Choose a subnet. 
  5. Click Create Instance.

Configuration Details
  • Name
    • You can add or change instance name later. The name doesn't need to be unique; an Oracle Cloud Identifier (OCID) uniquely identifies the instance.
  • Availability domain 
  • Image Source
    • When you click Change Image Source, the Browse All Images dialog opens with the operating system or image source options. The following options are available:
      • Platform Images, Partner Images, Oracle Images, Custom Images, Boot Volumes, Image OCID
  • Instance Type
    • Select Virtual Machine or Bare Metal Machine.
  • Instance Shape
    • When you click Change Shape, the Browse All Shapes dialog opens and is populated with the list of available VM or bare metal shapes based on what you selected for instance type.
    • See Compute Shapes for a list of the available bare metal and VM shapes. 
  • Boot Volume Size
    • The specified size must be larger than the selected image's default boot volume size.
    • See Custom Boot Volume Sizes for more information.
  • Encryption
    • Boot volumes are encrypted by default but you can optionally encrypt the data in this volume using your own Key Management encryption key. 
    • See Overview of Key Management for more information.
  • SSH key
    • The public key portion of the key pair you want to use for SSH access to the instance. 
  • Virtual Cloud Network Compartment
    • The compartment containing the network in which to create the instance.
  • Virtual Cloud Network
    • The network in which to create the instance.
  • Subnet Compartment
    • The compartment containing a subnet within the cloud network to attach the instance to.
  • Subnet
    • A subnet within the cloud network to attach the instance to. 
    • The subnets are either public or private
      • Private means the instances in that subnet can't have public IP addresses. 
    • For more information, see Access to the Internet.
  • Fault Domain (Advanced Options)
    • If you do not specify the fault domain, the system selects one for you. 
    • Once the instance has been created, if you want to change the fault domain you need to terminate the instance and launch a new instance in the preferred fault domain. 
    • For more information, see Fault Domains and Best Practices for Your Compute Instance
  • User Data (Advanced Options)
    • Data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. 
    • The file or script does not need to be base64-encoded, as the Console performs this encoding when the information is submitted. For information about how to take advantage of user data, see the Cloud-Init Documentation.
  • Tags (Optional)
    • To apply a defined tag, you must have permissions to use the tag namespace. 
    • For more information about tagging, see Resource Tags
  • Instance Configuration(Optional)[5]
    • Instance configurations allow you to define the configuration to use when creating Compute instances as part of an instance pool.
    • See Managing Compute Instances for more information.
  • VNIC (Optional)
    • A VNIC enables an instance to connect to a VCN and determines how the instance connects with endpoints inside and outside the VCN. 
    • Each instance automatically comes with a primary VNIC, and you can add secondary ones.
    • See Virtual Network Interface Cards (VNICs) for more information.
  • Console Connection (Optional)
  • Attached Block Volume (Optional)
    • You can attach  a block volume to an instance in order to expand the available storage on the instance. 
    • See Attaching a Volume for more information.

References

  1. Compute Service (OCI)
  2. General Availability of Virtual Machines with NVIDIA GPUs on Oracle Cloud Infrastructure
  3. Deploying Custom Operating System Images onOracle Cloud Infrastructure
  4. Oracle Cloud Infrastructure―OCI Key Management Basics
  5. Creating an Instance Configuration (OCI)
  6. Fault Domains (OCI)
  7. Best Practices for Your Compute Instance (OCI)
  8. Cloud-Init Documentation (OCI)

1 comment:

  1. Great Article! Thanks for sharing these types of article are very helpful for us! Looking for fireplace shops bristol than contact us anytime.

    ReplyDelete