Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Compute 200

80 views

Published on

In this course, you will learn advanced compute features like HA and DR implementations, Instance Configuration and Pool and console connections. You will also explore how you can import/export a custom image and deploy your own hypervisor.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Compute 200

  1. 1. 1Copyright © 2018, Oracle and/or its affiliates. All rights reserved.Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Compute Level 200 Flavio Pereira November 2018
  2. 2. 2Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  3. 3. 3Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Objectives After completing this lesson, you should be able to: • Describe High Availability and Disaster Recovery in OCI • Describe Instance Configuration and Pool • Describe Instance Console Connections • Create custom images – Import/Export • Describe Bring your Own Image (Emulated Mode) • Describe Bring your own Hypervisor • Describe GPU images • Cloud-Init and instance metadata
  4. 4. 4Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Bare Metal (BM) Direct Hardware Access – customers get the full Bare Metal server (single-tenant model) Virtual Machine (VM) A hypervisor to virtualize the underlying Bare Metal server into smaller VMs (multi-tenant model) Compute: Bare Metal & Virtual Machines Hypervisor VMs 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 Bare Metal Server Bare Metal Server
  5. 5. 5Copyright © 2018, Oracle and/or its affiliates. All rights reserved. High Availability and Disaster Recovery
  6. 6. 6Copyright © 2018, Oracle and/or its affiliates. All rights reserved. High Availability for Oracle Cloud Infrastructure Redundant Hardware and Software: It is recommended that you have an extra set of Hardware and Software as it will increase reliability of your workload and in some cases improve system performance. ORACLE CLOUD INFRASTRUCTURE (REGION) Availability Domain 1 Availability Domain 2 Availability Domain 3 Subnet A Subnet B Subnet D Subnet E Subnet F Subnet G
  7. 7. 7Copyright © 2018, Oracle and/or its affiliates. All rights reserved. High Availability for Oracle Cloud Infrastructure ORACLE CLOUD INFRASTRUCTURE (REGION) Availability Domain 1 Availability Domain 2 Availability Domain 3 Subnet A Subnet B Subnet D Subnet E Subnet F Subnet G Avoid single point of failure:
  8. 8. 8Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Compute High Availability – Fault Domains ORACLE CLOUD INFRASTRUCTURE (REGION) Availability Domain 1 Availability Domain 2 Availability Domain 3 FD01 FD02 Subnet A FD03 Subnet B FD01 FD02 Subnet C FD03 Subnet D
  9. 9. 9Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Disaster Recovery for Oracle Cloud Infrastructure • Regions are completely independent of other regions and can be separated by vast distances—across countries or even continents. • You can also deploy applications in different regions to: - mitigate the risk of region-wide events, such as large weather systems or earthquakes - meet varying requirements for legal jurisdictions, tax domains, and other business or social criteria ORACLE CLOUD INFRASTRUCTURE (REGION 1) AD1 AD2 AD3 ORACLE CLOUD INFRASTRUCTURE (REGION 2) AD1 AD2 AD3
  10. 10. 10Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Disaster Recovery using multiple regions • You can connect Regions using Remote VCN Peering. • Using internal backbone, traffic never leaves Oracle Network. ORACLE CLOUD INFRASTRUCTURE (REGION 1) AD1 AD2 AD3 ORACLE CLOUD INFRASTRUCTURE (REGION 2) AD1 AD2 AD3
  11. 11. 11Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Instance Configuration and Pools
  12. 12. 12Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Instance Configuration and Pool Instance Configurations Running Instance Config Instance Pools Config - OS image, metadata, shape - vNICs, Storage, subnets Multiple Instances - Different Availability Domains - Manage all together (stop, start, terminate)
  13. 13. 13Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Instance Configuration and Pool – Use Cases Instance Configurations • Clone an instance and save to a configuration file. • Create standardized baseline instance templates. • Easily deploy instances from CLI with a single configuration file. • Automate the provisioning of many instances, its resources and handle the attachments. Instance Pools • Centrally manage a group of instance workloads that are all configured with a consistent configuration. • Update a large number of instances with a single instance configuration change. • Maintain high availability and distribute instances across availability domains within a region. • Scale out instances on-demand by increasing the instance size of the pool.
  14. 14. 14Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Instance Console Connections
  15. 15. 15Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Instance Console Connections Oracle Cloud Infrastructure Compute service provides console connections that enable you to remotely troubleshoot malfunctioning instances, such as: • Add or reset the SSH keys for the opc user • Edit system configuration files • An imported or customized image that does not complete a successful boot. • A previously working instance that stops responding. There are two types of instance console connections: • Serial console connections • VNC console connections
  16. 16. 16Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Creating the instance Console Connection Before you can connect to the serial console or VNC console, you need to create the instance console connection.
  17. 17. 17Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Creating the instance Console Connection Specify the public key portion for the SSH key and then click Create Console Connection NOTE: You can provide a different SSH Key than the one used to launch your instance
  18. 18. 18Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Creating the instance Console Connection Once the console connection has been created and is available, the status changes to ACTIVE.
  19. 19. 19Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Connecting from Mac OS X and Linux Operating Systems You can connect to the serial console by using an SSH client. Paste the connection string copied to a terminal window on a Mac OS X or Linux system, and hit enter to connect to the console.
  20. 20. 20Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Connecting to the Serial Console # ssh -o ProxyCommand='ssh -W %h:%p -p 443 ocid1.instanceconsoleconnection.oc1.phx.abyhqljsmcdajeuxew3hml2jyhhz7ji5mmassdahclt7jcod gavraxuw6bka@instance-console.us-phoenix-1.oraclecloud.com' ocid1.instance.oc1.phx.abyhqljs5vlfdsosrokb7la6kuergjt7mqbnioy26icpzgz7mshr3cn7z2na • SSH on port 443 • Username: ocid1.instanceconsoleconnection.oc1.phx…. • Console Connection Server: instance-console.us-phoenix-1.oraclecloud.com • Instance: ocid1.instance.oc1.phx.abyhqljs5vlfdsosrokb7la6kuergjt7mqbnioy26icpzgz7mshr3cn7z2na
  21. 21. 21Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Connecting to the Serial Console • Once you are finished with the serial console and have terminated the SSH connection, you should delete the serial console connection. • If you do not disconnect from the session, Oracle Cloud Infrastructure will terminate the serial console session after 24 hours and you will need to re-authenticate to connect again.
  22. 22. 23Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Custom Images and Import/Export
  23. 23. 24Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Custom Images • Create a custom image of an instance’s boot disk and use it to launch other instances • 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. The 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
  24. 24. 25Copyright © 2018, Oracle and/or its affiliates. All rights reserved. X5 and X7 Compatibility for Custom Images • Oracle X5 and X7 servers have different host hardware. As a result, using an X5 image on an X7 bare metal or virtual machine (VM) instance may not work without additional modifications. • If you do attempt to use an existing X5 image on X7 hardware, note that Ubuntu 14.04 and all Windows and CentOS versions are not cross-compatible. • Oracle Linux and Ubuntu 16.04 are cross-compatible, however you need to update the kernel to the most recent version to install the latest device drivers. To do so, run the following commands from a terminal session: • Oracle Linux: # yum update • Ubuntu 16.04: # apt-get update apt-get dist-upgrade
  25. 25. 26Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Launch an instance from Custom Image • In the Console, click Compute, and then choose your Compartment. • Click Custom Images and find the custom image you want to use • Click the Actions icon, and then click Create Instance
  26. 26. 27Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Image Import/Export • Compute service enables you to share custom images across tenancies and regions using image import/export • Image import/export uses OCI Object Storage service • You can import Linux and Windows Operating System • Supports: • Emulation Mode: Fully emulated NIC, block boot, legacy BIOS. • Native Mode: Offer maximum performance with modern OS’s • Para-Virtualized (PV) Mode: Balance between performance and compatibility. You can also find more information about custom images here: https://cloud.oracle.com/iaas/whitepapers/deploying_custom_os_images.pdf
  27. 27. 28Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Custom Image v/s Boot Volume Backup Pros Cons You can export a custom image across regions and tenancies Instance shuts down and remains unavailable for several minutes until the process finished No cost associated to store your custom images Limit of 25 custom images per compartment Pros Cons It doesn’t require a downtime Cost associated with the amount of Object Storage used to store your backup Preserve the entire state of your running operating system as a backup Creating a boot volume backup while instance is running creates a crash-consistent backup Boot volume Backup Custom Images
  28. 28. 29Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Bring Your own Image / Hypervisors
  29. 29. 30Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Bring Your Own Image (BYOI) To enable the lift-and-shift of customer workloads from on-premise to the cloud, OCI supports the Bring Your Own Image (BYOI) feature. Currently OCI supports two launch modes: 1. Emulated Mode: Fully emulated NIC, block boot, legacy BIOS boot. •Pro’s: compatibility with wide range of older/custom OS •Con’s: Low Performance – 20% less compared with Native mode 2. Native Mode: Current OCI VM experience offering maximum performance with modern OS’s. •Pro’s: Available for Oracle provided smaller set of modern OS’s only •Con’s: incompatibility with wide range of older OS 3. Paravirtualized Mode: Balance between performance and compatibility •Pro’s: Support a wide range of older and new OS as long it works with virtio driver •Con’s: Minimal performance gap between virtio and iSCSI
  30. 30. 31Copyright © 2018, Oracle and/or its affiliates. All rights reserved. BYOI for Emulation Mode Virtual Machines You can import a wide range of new and legacy production operating systems, using the QCOW2 or VMDK formats, and then run them on Compute VMs using emulated hardware. The following table lists the operating systems that are supported for emulation mode VMs Image Name Supported versions RHEL 4.5, 5.9, 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.2, 6.5, 6.9, 7.4 Ubuntu 12.04, 14.04, 16.04 Windows Server 2008 R2 Standard, Enterprise, Datacenter 2012 Standard, Datacenter 2012 R2 Standard, Datacenter 2016 Standard, Datacenter
  31. 31. 32Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Custom Image Requirements for Emulation Mode Virtual Machines Linux-based and Windows-based custom images imported for emulation mode VMs must meet the following requirements: • The image must be set up for BIOS boot • The maximum image size is 300 GB • Only one disk is supported, and it must be the boot drive with a valid MBR and boot loader • Existing network interfaces will not be recreated.
  32. 32. 33Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Bring your own Hypervisor – OVM, KVM and Hyper-V Bring your own Hypervisor in a cloud environment has two benefits: • It allows the extension of existing on-premises environments into the Oracle Cloud • It provides the ability to install legacy operating systems and prepackaged virtual machines to use within your environment. The ability to bring hypervisors is unique to Oracle and is enabled by using several Oracle Cloud Infrastructure features: • Block Volume service • Compute instances • Multiple virtual network interface cards (multi-VNIC) capabilities within the Networking service
  33. 33. 34Copyright © 2018, Oracle and/or its affiliates. All rights reserved. VNIC1 • In a BYOH scenario, each guest VM can get one or more secondary VNICs. • In case SR-IOV virtual functions (VF) are being used by the hypervisor to provide network access to the guest VMs, each VF can be configured with the VLAN tag and MAC address of a secondary VNIC. • Guest-VM can have a private and a public IP associated • Each Shape has a limit on the amount of VNICs you can have. Please check compute shapes documentation for more information Multiple VNICs on bare metal instances for BYOH ORACLE CLOUD INFRASTRUCTURE (REGION) Availability Domain 1 AD2 Subnet A 10.0.0.0/24 Subnet B 10.0.1.0/24 VNIC2 VNIC3 VNIC4 AD3 NIC 1 GuestVM3 GuestVM2 GuestVM1VF1 VF2 VF3 NIC2 Bare metal instance Subnet X 172.16.0.0/2 4 VNIC5 Hypervisor primar y
  34. 34. 35Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Oracle Linux KVM Image for Oracle Cloud Infrastructure • Oracle Linux KVM image is available for deployment as as part of Oracle Images • This Oracle packaged image simplifies the deployment of virtual machines (VMs) by integrating with services such as block storage and virtual network interfaces through the use of scripted tools • These tools include support for defining the VM guest domain, allocating a specific block device or VNIC and launching and removing VMs on Oracle Cloud Infrastructure • Currently, BM.Standard and BM.DenseIO shapes are supported • Users should be familiar with managing virtual guests using libvirt, specifically virsh and virt- install
  35. 35. 36Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Preparing to create a new guest Virtual Machine – KVM Prior to creating a new virtual machine, take note of what resources are required. In particular: • Number of CPUs, amount of memory, size of root disk, and subnet. • Each guest requires a dedicated OCI Block Storage device and OCI VNIC. • Create and attach these resources as necessary. • When using KVM image, you can easily deploy an KVM guest using oci-kvm command. Here is one example: # oci-kvm create -D guest-01 --disk /dev/sdX –net <internal IP address> -V --vcpus 4 --memory 8192 --boot cdrom,hd --location /home/opc/Oracle-Linux-7.4-Boot-ISO.iso --nographics --console pty,target_type=serial -- console pty,target_type=virtio --noautoconsole --os-variant=rhel7 --extra-args "console=tty0 console=ttyS0,115200n8 serial"
  36. 36. 37Copyright © 2018, Oracle and/or its affiliates. All rights reserved. NVIDIA GPU images
  37. 37. 38Copyright © 2018, Oracle and/or its affiliates. All rights reserved. NVIDIA GPU Cloud – NGC • NVIDIA GPU Cloud (NGC) is a GPU- accelerated cloud platform optimized for deep learning and scientific computing. • Running NGC containers on this instance provides optimum performance for deep learning jobs. • you can SSH into the instance and start running deep learning jobs using framework containers from the NGC container registry.
  38. 38. 39Copyright © 2018, Oracle and/or its affiliates. All rights reserved. NVIDIA Tesla V100 and P100 GPUs Instance Shape GPU Type GPUs Cores Memory (GB) Interconnect BM.GPU3.8 Tesla V100 (SXM2) 8 52 768 P2P over NVLINK VM.GPU3.4 Tesla V100 (SXM2) 4 24 356 P2P over NVLINK VM.GPU3.2 Tesla V100 (SXM2) 2 12 178 P2P over NVLINK VM.GPU.3.1 Tesla V100 (SXM2) 1 6 86 N/A BM.GPU2.2 Tesla P100 2 28 192 N/A VM.GPU2.1 Tesla P100 1 12 104 N/A NVIDIA® NVLink™ technology addresses this interconnect issue by providing higher bandwidth, more links, and improved scalability for multi-GPU and multi-GPU/CPU system configurations. A single NVIDIA Tesla® V100 GPU supports up to six NVLink connections and total bandwidth of 300 GB/sec https://www.nvidia.com/en-us/data-center/nvlink/
  39. 39. 40Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Cloud-Init and Metadata
  40. 40. 41Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Configuring instances using cloud-init or cloudbase-init When launching instances on OCI, you can use cloud-init (for Linux) or cloudbase-init (for Windows) to support automated configuration of instances at boot time. Oracle-provided images provide you with the ability to run custom scripts or provide custom metadata when the instance launches. With cloud-init and cloudbase-init you can: • Set Hostname • Configure SSH Keys • Install Packages • Run commands and execute scripts
  41. 41. 42Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Example of cloud-init – User Data Script When launching an instance you can use the advanced options to input scripts to be executed during provision time.
  42. 42. 43Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Instance Metadata OCI exposes an Instance Metadata endpoint on every Compute Instance at http://169.254.169.254. If you SSH to a Compute Instance, you can use any HTTP client, such as curl, to get information about that Instance from its Instance Metadata endpoint: • 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/vnics/ The metadata serves two main purposes: • It provides information about the running instance including attached VNICs and custom metadata key/value pairs defined at instance launch. • It provides information to cloud-init to be used for various system initialization tasks.
  43. 43. 44Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Updateable Instance Metadata You can provide your own custom metadata information that will be saved along with the instance and will be retrievable from the instance metadata service on the instance. You can also update the custom metadata on your instance using the CLI or REST APIs. When use custom metadada? Lets say you have an application that reads a specific metadata attribute and based on the value it will take a specific action. For example: • Register an instance against a specific Configuration Management tool (Ansible, Chef, Puppet or Salt) • Pull a dataset from Object Storage in order to process for analysis.
  44. 44. 45Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Summary • Understand how architect your applications for HA and DR in OCI • Understand Instance Configuration and Pool • Describe and validate instance console connections • Use Custom images to create templates and customize your OS • Understand Emulated and Native mode when Bring your own image • Use pre-build KVM image for OCI to take advantage of Bring your own Hypervisor • Utilize NVIDIA GPU NGC registry • Describe how to use Cloud-init and metadata
  45. 45. 46Copyright © 2018, Oracle and/or its affiliates. All rights reserved. cloud.oracle.com/iaas cloud.oracle.com/tryit

×