Deploy Oracle RAC 12c in minutes - AIOUG

27
Deploy Oracle RAC 12c in minutes P Sai Janakiram November 9 th , 2013

Transcript of Deploy Oracle RAC 12c in minutes - AIOUG

Page 1: Deploy Oracle RAC 12c in minutes - AIOUG

Deploy Oracle RAC 12c

in minutes

P Sai JanakiramNovember 9th, 2013

Page 2: Deploy Oracle RAC 12c in minutes - AIOUG

2

Sai Janakiram Penumuruo Ten years in Oracle DBA / Oracle Apps DBA o Currently : WW Product Expert, Cloud Platform in hpo Founding Member of AIOUG, Currently- Director of Financeo Oracle Database 12c Beta Testero Oracle VM SIG Lead www.oraclevmsig.orgo Blogs: www.oadba.com, www.oracle12c.info

Page 3: Deploy Oracle RAC 12c in minutes - AIOUG

3

Virtualization allows multiple operating system instances to run concurrently on a

single computer; it is a means of separating hardware from a single operating system

Type-1 Native (Bare Metal)Oracle VMMicrosoft Hyper-V, VMWare ESX

Type-2 HostedVirtualBoxVMWare Server and Workstation, Microsoft Virtual PC, KVM

A hypervisor, also called a virtual machine manager (VMM), is a program that allows multiple operating systems to

share a single hardware host.

What is Virtualization?

Reasons to Use Virtualization• Resource optimization• Consolidation• Maximizing Uptime• Automatically Protect Applications from

Server Failure• Easily Migrate Workloads as Needs Change

Bare-metal Server Bare-metal Server

Page 4: Deploy Oracle RAC 12c in minutes - AIOUG

4

What is Oracle VM

Source – Oracle VM User's Guide for Release 3.2.1

Oracle VM = Oracle VM Server + Oracle VM Manager

Oracle VM is built upon Xen technology, using the Xen hypervisor.

Oracle VM Server: • providing a lightweight, secure, server platform which runs VMs.• Open source server software tailored by Oracle• Installs on “bare-metal” servers from a single CD• x86 and x86_64 based Intel and AMD Systems

Oracle VM Manager: • Manage Oracle VM Servers, virtual machines, and resources.• Web browser-based management console (command line & API also)• Java-based management server• Database repository: XE (incl.), SE, EE• Installs as guest VM (template available) or on “bare-metal” servers

Page 5: Deploy Oracle RAC 12c in minutes - AIOUG

5

Rapid Application Deployment

Oracle VM Templates

Oracle E-Delivery

DB/RAC File Storage - NAS, SAN, iSCSI

Server 1

Oracle VM Server Pool

Server 2 Server 3

RAC VM1

RAC VM2

EBSVM

VM VM

VM

Download from Oracle Pre-built, pre-configured VM Complete Single Instance OR Clusterware, ASM, RAC installation (11gR2 or 12c) Enterprise Manager DBControl or DBExpress in 12c

Import to Oracle VMManager

Customize & Save as Golden Images

Page 6: Deploy Oracle RAC 12c in minutes - AIOUG

6

History

Oracle VM Templates for Oracle Database

• 2010: Initial release with Oracle VM 2 deployment options only.

• May 2012: The deploycluster tool was released making Oracle VM 3 deployments extremely easy.

• August 2013: The templates support Single Instance, Oracle Restart and the most talked about Oracle 12c features: • Flex Cluster

• Flex ASM

• Container/Pluggable Database

Page 7: Deploy Oracle RAC 12c in minutes - AIOUG

7

New in 2013 releases

Deployment Modes

o The new Oracle VM Templates for Oracle Database support three deployment modes:

Single Instance Database

Database on filesystem

Oracle Restart (formerly known as Single Instance/HA)

Database on ASM or filesystem (in 12c can be in ACFS)

Oracle RAC

Database on ASM or shared filesystem (in 12c can be in ACFS)

o In addition, Clusterware-only mode available

Applicable to Oracle RAC and Oracle Restart

No Database installed, DB Home may be removed (reduced memory/disk)

Page 8: Deploy Oracle RAC 12c in minutes - AIOUG

8

Oracle RAC

Deployment Configuration

• Oracle RAC has two types of deployments

Production Oracle RAC OVM Configurations [Supported]

o Each RAC node must be deployed on a separate physical server

o Shared database disks must be on physical disks

Test Oracle RAC OVM Configurations

o Above requirements are relaxed

o Templates support both configurations, each has its own installation guide to help with steps

o Single Instance deployment has no such requirements

Page 9: Deploy Oracle RAC 12c in minutes - AIOUG

9

Availability

Oracle VM Templates for Oracle Database

• Currently available for 12.1.0.1.0 (64 bit only), 11.2.0.4.0, 11.2.0.3.7, 11.2.0.2.11, 11.2.0.3.2, 11.2.0.2.6, 11.2.0.3.0, 11.2.0.2.2, 11.2.0.2.0, 11.2.0.1.4, 11.2.0.1.2 ,11.1.0.7.6, 11.1.0.7.2 on Oracle Linux 32 and 64 bits

• Download from e-delivery or My Oracle Support Note:1185244.1: https://support.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=1185244.1

• Templates are distributed as archive files containing two disk images • Oracle Linux 5 U4/U5/U6/U7/U8/U9 & OL6U2/U4 system disk

• OL5U8, OL6U2 and higher are OVMAPI enabled (Deploycluster)

• 11.2.0.2.11, 11.2.0.3.7, 11.2.0.4.0, 12.1.0.1.0 and higher have Single Instance support

• Oracle disk image (Clusterware, Database, ASM)

• Suitable for Single Instance or RAC

• All homes updated to latest Bundle / CPU Patch level

• Entire install is automated, with the user only providing minimal input

Page 10: Deploy Oracle RAC 12c in minutes - AIOUG

10

Delivery Mechanism

Oracle VM Templates for Oracle Database

• 32 bit and 64bit versions

• Image files are built with ‘sparse file’ support

• Inside each zip are tgz/tbz archives with the following files: • VM Config file (text file)

• Opatch lsinventory sample output

• README / PDFs for installing

• Disk 1 image file: Operating System

• Disk 2 image file: Oracle Software

• Includes Clusterware, ASM & RAC (suitable for Single Instance)

• Follow the instructions in provided PDF files or document for the new DeployClustertool

Page 11: Deploy Oracle RAC 12c in minutes - AIOUG

11

High-level Workflow

Oracle VM Templates for Oracle Database

• Step 1 Download Template 32/64bits 11.1/11.2/12.1

• Step 2 Register/Import Template with Oracle VM Manager

• Step 3 Create VM(s); Single Instance: 1 VM, RAC: 2+ VMs

• Step 4 (Shared) Storage; Single Instance disks are optional • For Non Production: Create Shared Disk using OVM Manager

• Assigned Shared disk to all Guest VMs using OVM Manager

• For Production Deployment: Identify Physical Shared Disk

• OVM2: Update all Guest VM’s vm.cfg files with location of shared disk

• OVM3: Attach physical disks using Oracle VM Manager

• Step 5 Boot all VMs or use Deploycluster tool and skip Step 6

• Step 6 Run buildcluster/buildsingle to Configure and build the environment

Page 12: Deploy Oracle RAC 12c in minutes - AIOUG

12

Non-Production deployment

Oracle VM Templates for Oracle Database

X86/64 Bare-Metal Server (CPU, Memory, Storage)

Dom-0 Hypervisor

Dom0 OS

Listener

Single Instance Database

Operating System

Guest VM• Single Instance • Minimum Requirements

• One core • 2GB of memory or more • 30GB of disk or more

Page 13: Deploy Oracle RAC 12c in minutes - AIOUG

13

Single Instance deployment

Oracle VM Templates for Oracle Database

X86/64 Bare-Metal Server (CPU, Memory, Storage)

Dom-0 Hypervisor

Dom0 OS

Shared Cache /RAC

• 2-node Test Oracle 12c RAC• Minimum Requirements

• Two or more cores• 4GB of memory or more• 30GB of disk or more

Instance 1

Oracle Clusterware

Operating System

Guest VM

Listener

Oracle ASM

Service

Instance 2

Oracle Clusterware

Operating System

Guest VM

Listener

Oracle ASM

Service

Page 14: Deploy Oracle RAC 12c in minutes - AIOUG

14

Production deployment

Oracle VM Templates for Oracle Database

X86/64 Bare-Metal Server (CPU, Memory, Storage)

Dom-0 Hypervisor

Dom0 OS

Shared Cache /RAC

Guest VM

Instance 2

Oracle Clusterware

Operating System

Guest VM

Listener

Oracle ASM

Service

X86/64 Bare-Metal Server (CPU, Memory, Storage)

Dom-0Hypervisor

Dom0 OS

Instance 2

Oracle Clusterware

Operating System

Guest VM

Listener

Oracle ASM

Service

Page 15: Deploy Oracle RAC 12c in minutes - AIOUG

15

Building Single Instance or a Cluster

• After initial boot, to build Single Instance or a Cluster, run:

/u01/racovm/buildsingle.sh

OR:

/u01/racovm/buildcluster.sh

• Automatically builds Single Instance or a cluster based on netconfig.ini & params.ini

• Automatically writes a build log and progress log

• Internal testers report: Single Instance ~11minutes, w/o relink: 6minutes • 2 node RAC, 18 minutes

• 4 node RAC, 23 minutes

• End-to-end, including Database Creation (DBCA)

• 101-Node Flex Cluster done in ~10 hours (including OVM installation)

Page 16: Deploy Oracle RAC 12c in minutes - AIOUG

16

Automated Deployment

DeployCluster Tool Features

• Allows for fully automated end-to-end cluster deployment of N-node clusters• Assuming VMs are pre-created w/NICs & shared disks

• Option to simulate a deployment attempt • Use the --dryrun (-D) flag

• Allow ANY build configuration (SID name, user name, passwords, ports, etc.) to be modified from outside the guests at deploy time

• Supply a custom params.ini using --params (-P) flag \

• Easy to re-attempt a failed deployment • Only fix what failed, and leave other VMs running

Page 17: Deploy Oracle RAC 12c in minutes - AIOUG

17

2013 release

DeployCluster – What’s NEW

• Full support for Flex Cluster and/or Flex ASM deployments • Allows for optional 3rd network adapter (NIC)

• Support for Single Instance or Single Instance/HA (Oracle Restart) deployments

• Exclusively used to deploy the 101-Node Flex Cluster

Page 18: Deploy Oracle RAC 12c in minutes - AIOUG

18

Examples

DeployCluster

• List all VMs with a simple name of “racnode.?” on Manager

• $ deploycluster.py –u admin –N netconf.ini –M racnode.? -L

• Deploy all VMs with a simple name of “racnode.?”:

• $ deploycluster.py –u admin –N netconf.ini –M racnode.?

• Deploy a VM as the 3rd node in an existing cluster

• $ deploycluster.py –u admin –N netconf.ini –M racnode3 –G –n3

Page 19: Deploy Oracle RAC 12c in minutes - AIOUG

19

Fully automated addition and removal of nodes or instances

Adding or Removing Node(s) / Instance(s)

Simply run:

./racovm.sh -S addnodes -N node2,node3

Or:

./racovm.sh -S removenodes -N node2,node3

Or:

./racovm.sh -S addinstances -N node2,node3

Or:

./racovm.sh -S deleteinstances -N node2,node3

Page 20: Deploy Oracle RAC 12c in minutes - AIOUG

20

doall.sh [options] <command> | "<command1>;<command2>;..<commandX>"

doall.sh – Run command on all nodes

-l <user> : Login as user (default: current user)

-x : Run commands in sequence (default: run in parallel)

-P : Print commands as they are executed (default: noprint)

-p : Setup passwordless SSH for <user> on all nodes listed in

netconfig.ini

-s : Skip confirmation for passwordless SSH setup

-u : Skip unreachable nodes

-U : Skip nodes that are unreachable or without passwordless

SSH configured

-L first|last|skip : Local node execution order

-N <node1>,<node2> .. : Nodes to run on (default: all nodes in netconfig.ini)

Examples: ./doall.sh -L last reboot ./doall.sh -ps /u01/app/11.2.0/grid/bin/diagcollection.sh

Page 21: Deploy Oracle RAC 12c in minutes - AIOUG

21

Useful Links

Oracle VM Templates for Oracle Database

OTN Home pages: 12c/11gR2: http://www.oracle.com/technetwork/server-storage/vm/database-templates-12c-11gr2-1972804.html

11.1: http://www.oracle.com/technetwork/database/clustering/overview/rac-092962.html

Download Locations: From https://edelivery.oracle.com/oraclevm : 12.1.0.1, 11.2.0.1.* & 11.1.0.7.*

From My Support http://support.oracle.com/ (support subscription): 11.2.0.4.0 Patch# 14000094, 11.2.0.3.7 Patch# 14000092, 11.2.0.2.11 Patch# 14000021

11.2.0.3.2 Patch# 13818831, 11.2.0.3.0 Patch# 12694014, 11.2.0.2.6 Patch# 14000016

11.2.0.2.0 Patch# 10113572, 11.2.0.2.2 Patch# 11836831

All described in Note:1185244.1: https://support.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=1185244.1

Training Video on RAC Special Interest Group (SIG): Dates: http://www.oracleracsig.org/pls/apex/f?p=105:206:::NO

Page 22: Deploy Oracle RAC 12c in minutes - AIOUG

22

Useful Links

Keep Watch for SIG events

Oracle VM on oracle.com : http://www.oracle.com/virtualization

Oracle VM on the Wiki : http://wiki.oracle.com/Oracle+VM

Oracle's Virtualization Bloghttps://blogs.oracle.com/virtualization/

Wim Coekaerts Bloghttps://blogs.oracle.com/wim/

VirtualBox.orghttps://www.virtualbox.org/

http://oraclevmsig.org/

Page 23: Deploy Oracle RAC 12c in minutes - AIOUG

23

http://oraclevmsig.org/; [email protected]

Thank You ! See you in Sangam14

Page 24: Deploy Oracle RAC 12c in minutes - AIOUG

24

Backup Slides

Page 25: Deploy Oracle RAC 12c in minutes - AIOUG

25

Oracle VM Login Options

DeployCluster Options

-u <username>, --username=<username>

Username to connect to Oracle VM Manager

-p <password>, --password=<password>

Password to connect to Oracle VM Manager

-H <host>, --host=<host>

Manager hostname (use either -H or -U or none)

-U <url>, --url=<url>

Login URL to Manager (default: tcp://localhost:54321

or tcps://host:54322 when -H used to remote node)

Page 26: Deploy Oracle RAC 12c in minutes - AIOUG

26

DB/RAC OVM Template Options

DeployCluster Options

-L, --list_vms_only

List VMs seen via Oracle VM Manager; Honors -M flag

-M <List of VMs>, --vms=<List of VMs>

List of existing VM names or IDs to deploy cluster on.

Supports "*" & "?" wildcard characters

-P <params.ini>, --params=<params.ini>

Location of params.ini file (sent to VMs)

-N <netconfig.ini>, --netconfig=<netconfig.ini>

Location of netconfig.ini file (sent to VMs)

Page 27: Deploy Oracle RAC 12c in minutes - AIOUG

27

DB/RAC OVM Template Options (Cont’d)

DeployCluster Options

-B <yes|no>, --buildcluster=<yes|no>

Start a buildcluster/buildsingle post-network setup (default: yes.

[If netconfig_args passed then default: no])

-G <args>, --netconfig_args=<args>

Advanced: Arguments to netconfig; override defaults

-K <zip file>, --kitfile=<zip file>

Advanced: Unzip new (partial) kitfile inside the VMs

-X <file>, --extrakeys=<file>

Advanced: File containing extra keys to send all VMs

-D, --dryrunShow what will be done (do not start VMs or send msgs)