Compute Service

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

4

OCI Compute Service


March 2019, v1
@jlakshma

Copyright © 2017, Oracle and/or its affiliates. All rights reserved.


Objectives
After completing this lesson, you should be able to:
• Describe the OCI Compute Service
• Describe compute instance Shapes and Images
• Create and launch a compute instance
• Analyze compute instance with the C3PO tool
• Common Issues

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4-2
Compute: Bare Metal & Virtual Machines

Bare Metal (BM) Virtual Machine (VM)


Direct Hardware Access – customers get the full A hypervisor to virtualize the underlying Bare Metal
Bare Metal server server into smaller VMs
(single-tenant model) (multi-tenant model)
VMs

Hypervisor

Bare Metal Server Bare Metal Server

VM compute instances runs on the same hardware as a Bare Metal instances, leveraging the
same cloud-optimized hardware, firmware, software stack, and networking infrastructure

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4-3
Bare Metal
Direct Hardware Access with all the Security, Capabilities, Elasticity and
Scalability of Oracle Cloud Infrastructure

Hypervisor

Workloads that are Workloads that Workloads that Workloads that


Performance- are not virtualized require a specific require BYO
intensive hypervisor Licensing

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4-4
Bare Metal Instances
RAM Network Max
Shape Instance type OCPU Local Disk (TB)
(GB) Bandwidth vNICs

BM.Standard2.52 X7 based Standard compute 52 768 Block Storage only 2 X 25 Gbps 24

BM.DenseIO2.52 X7 based Dense I/O compute 52 768 51.2 TB NVMe SSD (8) 2 X 25 Gbps 24

BM.Standard.E2.64 E1-based standard AMD CPUs 64 512 Block storage only 2 x 25 Gbps 75
1 x 25 Gbps
X7-based high frequency
BM.HPC2.36 36 384 6.7 TB NVMe SSD (1) 1 x 100 Gbps 50
compute
RDMA

2 x 25 Gbps implies two NIC cards with 25 Gbps bandwidth

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4-5
VM Instances (current gen)

OCI supports a number of VM shapes such as:

VM.Standard.2.X – Standard VMs on X7 hardware supporting 1 - 24 oCPUs, 15 – 320 GB


RAM, 1 – 24.6 Gbps Network B/W.

VM.Standard.E2.X - AMD processor based shapes supporting 1 – 8 oCPUs, 8 – 64 GB RAM,


700 Mbps – 5.6 Gbps Network B/W.

VM.DenseIO2.X - shapes supporting 8 – 24 oCPUs, 120 – 320 GB RAM, 8.2 – 24.6 Gbps
Network B/W, 6.4 – 25.6 TB NVMe SSD local disks.

Refer: https://docs.cloud.oracle.com/iaas/Content/Compute/References/computeshapes.htm#VMShapes

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4-6
GPU Instances

Network
Shape Instance type GPU OCPU RAM (GB) Local Disk (TB)
Bandwidth

VM.GPU3.1 Volta VM GPU 1 x V100 6 90 Block Storage only 400 Mbps


VM.GPU3.2 Volta VM GPU 2 x V100 12 180 Block Storage only 800 Mbps
BM.GPU3.4 Volta BM GPU 4 x V100 24 360 Block Storage only 1 x 25 Gbps
BM.GPU3.8 Volta BM GPU 8 x V100 52 768 Block Storage only 2 x 25 Gbps
VM.GPU2.1 Pascal VM GPU 1 x P100 12 104 Block Storage only 1 x 25 Gbps
VM.GPU2.2 Pascal BM GPU 2 x P100 28 192 Block Storage only 2 x 25 Gbps

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4-7
Oracle provided Images
A template of a virtual hard drive that determines the operating system and other software for an
instance. Images can be Oracle-provided, Custom, or BYOI.

Oracle provides several pre-built images for Oracle Linux, Microsoft Windows, Ubuntu and CentOS

Image Name
Oracle-Linux-7.x-<date>-<number>,
Oracle Linux
Oracle-Linux-6.x-<date>-<number>
CentOS-7-x-<date>-<number>,
CentOS 7
CentOS-6.x-<date>-<number>
Canonical-Ubuntu-16.x-<date>-<number>,
Ubuntu 16.04 LTS
Canonical-Ubuntu-14.x-<date>-<number>
Windows Server 2012 R2 Windows-Server-2012-R2-<edition>-<gen>.<date>-<number>

Windows Server 2008 R2 - VM Windows-Server-2008-R2-Standard-Edition-VM-<date>-<number>

Windows Server 2016 Windows-Server-2016-Datacenter-Edition-Gen2.<date>-<number>

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4-8
Oracle Provided Images
Linux Images
• User name ‘opc’ created automatically for instances created from Oracle Linux/CentOS
• User name ‘ubuntu’ created automatically for instances created from Ubuntu image
• These users have sudo privileges and are configured for remote access over the SSH v2
• Default set of firewall rules allow only SSH access (port 22)
• Provide a startup script using cloud-init

Windows Images
• User name ‘opc’ created automatically with an OTP (one time password)
• Include the Windows Update utility to get the latest Windows updates from Microsoft
• Default set of firewall rules allow only RDP access (port 3389)

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4-9
Custom Images
• Create a custom image of an instance’s boot disk and use it to launch other instances
• Best practice - create a custom image of your system drive each time you change the image
• Instances you launch from your custom image include customizations, configuration, and software
installed when you created the image
• During the process, instance shuts down and remains unavailable for several minutes. Instance restarts
when the process completes
• Custom images do not include the data from any attached block volumes
• A custom image cannot exceed 300 GB
• Windows custom images cannot be exported or downloaded
• Support Generalized and Specialized images for Windows
• Generalized image - generalized OS disk, cleaned of computer-specific information.
• Specialized image - OS disk that is already fully installed, and a copy of the original BM or VM
• You cannot create an image of an Oracle Database instance

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 10


Bring Your Own Image (BYOI)

• You can bring your own Operating System images or older Operating Systems
• Build new RHEL 7 images for Bare Metal and VM instances using a Terraform template
• Bring your own Hypervisor (KVM) – install and configure KVM on Bare Metal instances
• Bring Oracle VM – bring Oracle VM workloads to OCI
• Bring Image for Emulation Mode VM – import new and legacy OS using the QCOW2 or
VMDK formats, and run them on Compute VMs using Paravirtualized/Emulation mode.

OS Supported versions
RHEL 4.5, 5.11, 6.9, 7.4
CentOS 4.0, 4.8, 5.11, 6.9, 7.x
Oracle Linux 4.5, 4.8, 5.11, 6.9, 7.4

Ubuntu 12.04, 14.04, 16.04

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 11


MarketPlace Images
Oracle Cloud Infrastructure Marketplace is an online store that offers applications specifically for customers of Oracle
Cloud Infrastructure.

In the Oracle Cloud Infrastructure Marketplace catalog, you can find images from partners that you can
deploy on an Oracle Cloud Infrastructure Compute instance.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 12


Image Import Export
• Compute service enables you to share custom images across tenancies and regions using
image import/export
• Can only import custom images that have been exported from OCI, so you first need to export
an image before you can import it
• Image import/export uses OCI Object Storage service
• Supports
• Paravirtualized/Emulated modes for images generated from non-OCI servers
• Native mode for images generated from OCI
• Currently supported for Linux images only

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 13


Boot Volumes
• A compute instance is launched using OS image stored on a remote boot volume
• Boot volume is created, automated and associated with an instance until you terminate the
instance
• Boot volumes are encrypted, have faster performance, lower launch times, and higher
durability for BM and VM instances
• Compute instance can be scaled to a larger shape by using boot volumes
• You can preserve the boot volume when you terminate a compute instance
• Boot volumes can be detached from a stopped/non-functional instance and attached to
another running instance for troubleshooting.
• You can take manual backups, assign backup policy or create clone of boot volumes

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 14


Custom Boot Volumes
• You have the option of specifying a custom boot volume size.
• In order to take advantage of the larger size, you must first extend the root (Linux-based
images) or system (Windows-based images) partition.
• Maximum size is 16TB

Linux default size is 46.6 GB Windows default size is 256GB

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 15


Instance Configuration and Pool
An instance configuration is a template that defines the settings to use when creating Compute instances.
An instance pool is a group of instances within the same region that are created based off of an instance configuration.

Instance Configurations
• Define the configuration information to launch a Compute instance
• Include parameters (OS image, metadata, shape) and related resources as a single configuration entity, so you don’t
have to specify them every time you launch a new instance
• Configure attached storage volumes; VNIC, Subnets and AD placements all with a single request

Instance Pools
• Provision and create multiple compute instances based off of the same instance configuration, within the same region
• Scale up/down
• 1 pool:1 configuration, but 1 configuration: n pools

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 16


Instance Metadata
• Instance Metadata includes its OCID, name, compartment, shape, region, AD, creation date,
state, image, and any custom metadata such as an SSH public key
• Service runs on every instance and is an HTTP endpoint listening on 169.254.169.254
• Get instance metadata by logging in to the instance and using the metadata service
• Oracle provided Linux instances
• curl http://169.254.169.254/opc/v1/instance/
• curl http://169.254.169.254/opc/v1/instance/metadata/
• curl http://169.254.169.254/opc/v1/instance/metadata/<key-name>/
• Add and update custom metadata for an instance using CLI or SDK

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 17


Instance Life Cycle
• Start – Restarts a stopped instance. After the instance is restarted, the Stop action is enabled
• Stop – Shuts down the instance. After the instance is powered off, the Start action is enabled
• Reboot – Shuts down the instance, and then restarts it
• Terminate – Permanently delete instances that you no longer need (vNICs and volumes are
auto detached; boot volume is not deleted, but you can delete it)
• Resource Billing
• Standard VM and BM instances, billing pauses in a STOP state
• High I/O BM instances and dense I/O BM and VM instances , billing continues even in
STOP state

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 18


Compute Metrics

Latest OEL images comes with the monitoring agent installed.


For older images/instances, customers need to manually enable monitoring and install ‘oracle-cloud-
agent’ package installed.

Metrics related to Compute:

• oci_computeagent - Metrics measured at the instance and measure activity level and throughput
of Compute instances.Metrics on oci_computeagent namespace are aggregated across all the
related resources on the instance.
• oci_blockstore - The metrics are for an individual volume (either boot volume or block volume).
• oci_vcn - The metrics are for an individual VNIC.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 19


Available Metrics – oci_computeagent

The following Metrics are available for Compute node with oci_computeagent name space:
Metric Metric Display Name Unit Description

CpuUtilization CPU Utilization percent Activity level from CPU. Expressed as a percentage of total time.

DiskBytesRead Disk Read Bytes bytes Read throughput. Expressed as bytes read per interval.

DiskBytesWritten Disk Write Bytes bytes Write throughput. Expressed as bytes written per interval.

DiskIopsRead Disk Read I/O operations Activity level from I/O reads. Expressed as reads per interval.

DiskIopsWritten Disk Write I/O operations Activity level from I/O writes. Expressed as writes per interval.

MemoryUtilization Memory Utilization percent Space currently in use. Measured by pages. Expressed as a percentage of used pages.

NetworksBytesIn Network Receive Bytes bytes Network receipt throughput. Expressed as bytes received.

NetworksBytesOut Network Transmit Bytes bytes Network transmission throughput. Expressed as bytes transmitted.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 20


Available Metrics – oci_blockvolume
The following metrics are available for Block Volumes attached to instances.

Metric Metric Display Name Unit Description


Volume Read Throughput bytes Read throughput. Expressed as bytes read per interval.
VolumeReadThroughput
Volume Write Throughput bytes Write throughput. Expressed as bytes written per interval.
VolumeWriteThroughput
Volume Read Operations reads Activity level from I/O reads. Expressed as reads per interval.
VolumeReadOps
Volume Write Operations writes Activity level from I/O writes. Expressed as writes per interval.
VolumeWriteOps

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 21


Available Metrics – oci_vcn

You can monitor the health, capacity, and performance of your Networking service VNICs using the
metrics emitted by oci_vcn namespace.

Metric Metric Display Name Unit Description


Packets sent by the VNIC, destined for the network, dropped due to security rule
VnicEgressDropsSecurityList Egress Packets Dropped by Security List packets violations.

Packets received from the network, destined for the VNIC, dropped due to security
VnicIngressDropsSecurityList Ingress Packets Dropped by Security List packets rule violations.

VnicFromNetworkBytes Bytes from Network bytes Bytes received at the VNIC from the network, after drops.

VnicFromNetworkPackets Packets from Network packets Packets received at the VNIC from the network, after drops.

VnicToNetworkBytes Bytes to Network bytes Bytes sent from the VNIC to the network, before drops.

VnicToNetworkPackets Packets to Network packets Packets sent from the VNIC to the network, before drops.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 22


Compute Demo

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 23


C3PO – Ops Compute Tool

C3PO Demo

• Instance details – Shape/fault domain


• Image
• Instance Status
• Hypervisor Details/Status
• Instance Console Logs
• Launch Parameters

• Attachments to instances
• Events

• Check other components like VNIC/Suubnet/Block Volume attached to the instance

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 24


Troubleshooting OCI Compute issues
- Go through the Instance Details available on the C3PO tool.
- Check the Instance Console to see if any anomalies are reported.
- Ask customer to connect to the instance console and reboot to single user mode to check the OS
logs.
- If instance console is in-accessible, ask the customer to detach the boot volume and attach it to a
different instance to check the OS logs.

Common Issues
- Hardware failure
- Instances inaccessible
- Not able to launch instances
- Performance issues – Not so common!

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 25


Summary

• OCI Compute Service offers both Bare Metal and Virtual Machine instances
• Bare Metal instances provide direct hardware access and highest level of performance and
isolation
• OCI VM compute instance runs on the same hardware as a BM instance, leveraging the same
cloud-optimized hardware, firmware, software stack, and networking infrastructure
• OCI VM and BM offer a wide variety of shapes with industry leading price/performance
• OCI compute service offers Oracle-provided images, ability to create Custom images and
bring a specific hypervisor or image (latest/legacy)
• OCI compute service leverages a remote boot disk that is encrypted, durable and has a fast
launch time (<1 min for Linux)
• Available Compute metrics
• Working with C3P0 Compute tool
• Common issues

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 26


Questions/Feedback?

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 4 - 27

You might also like