Sunteți pe pagina 1din 27

Deploy

Oracle RAC 12c


in minutes
P Sai Janakiram
November 9th, 2013
Sai Janakiram Penumuru
o Ten years in Oracle DBA / Oracle Apps DBA
o Currently : WW Product Expert, Cloud Platform in hp
o Founding Member of AIOUG, Currently- Director of Finance
o Oracle Database 12c Beta Tester
o 2 Oracle VM SIG Lead www.oraclevmsig.org
o Blogs: www.oadba.com, www.oracle12c.info
What is Virtualization?

Virtualization allows multiple operating A hypervisor, also called a virtual machine manager (VMM),
system instances to run concurrently on a is a program that allows multiple operating systems to
single computer; it is a means of separating share a single hardware host.
hardware from a single operating system

Reasons to Use Virtualization


Resource optimization
Consolidation
Maximizing Uptime Bare-metal Server Bare-metal Server
Automatically Protect Applications from
Server Failure Type-1 Native Type-2 Hosted
Easily Migrate Workloads as Needs Change (Bare Metal) VirtualBox
Oracle VM VMWare Server and Workstation,
Microsoft Hyper-V, Microsoft Virtual PC,
VMWare ESX KVM
3
What is Oracle VM
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

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 = Oracle VM Server + Oracle VM Manager


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

4 Source Oracle VM User's Guide for Release 3.2.1


Oracle VM Templates
Rapid Application Deployment
Oracle E-Delivery
RAC RAC EBS
Download from Oracle VM VM
VM1 VM2 VM
Pre-built, pre-configured VM
Complete Single Instance OR
Clusterware, ASM, RAC
installation (11gR2 or 12c) Oracle VM Server Pool
Enterprise Manager DBControl or
DBExpress in 12c
Server 1 Server 2 Server 3

DB/RAC
File Storage - NAS, SAN, iSCSI

Import to
Oracle VM VM
Manager

5 Customize & Save


as Golden Images
Oracle VM Templates for Oracle Database
History
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

6
Deployment Modes
New in 2013 releases
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)

7
Deployment Configuration
Oracle RAC
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

8
Oracle VM Templates for Oracle Database
Availability
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
9
Oracle VM Templates for Oracle Database
Delivery Mechanism
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 DeployCluster
tool

10
Oracle VM Templates for Oracle Database
High-level Workflow
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 VMs 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

11
Oracle VM Templates for Oracle Database
Non-Production deployment

Listener

Single Instance
Database

Dom0 OS Operating System

Guest VM
Single Instance
Dom-0 Hypervisor Minimum Requirements
One core
X86/64 Bare-Metal Server 2GB of memory or more
(CPU, Memory, Storage)
30GB of disk or more

12
Oracle VM Templates for Oracle Database
Single Instance deployment
Shared Cache /RAC

Service Service

Listener Listener

Instance 1 Instance 2

Oracle ASM Oracle ASM

Oracle Clusterware Oracle Clusterware 2-node Test Oracle 12c RAC


Dom0 OS Operating System Operating System Minimum Requirements
Guest VM Guest VM Two or more cores
4GB of memory or more
Dom-0 Hypervisor
30GB of disk or more
X86/64 Bare-Metal Server
(CPU, Memory, Storage)
13
Oracle VM Templates for Oracle Database
Production deployment

Shared Cache /RAC

Service Service

Listener Listener

Instance 2 Instance 2

Oracle ASM Oracle ASM

Oracle Clusterware Oracle Clusterware

Dom0 OS Operating System Operating System Dom0 OS

Guest VM Guest VM Guest VM

Dom-0 Hypervisor Hypervisor Dom-0

X86/64 Bare-Metal Server X86/64 Bare-Metal Server


(CPU, Memory, Storage) (CPU, Memory, Storage)
14
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)

15
DeployCluster Tool Features
Automated Deployment
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

16
DeployCluster Whats NEW
2013 release
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

17
DeployCluster
Examples
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

18
Adding or Removing Node(s) / Instance(s)
Fully automated addition and removal of nodes or instances

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

19
doall.sh Run command on all nodes
doall.sh [options] <command> | "<command1>;<command2>;..<commandX>"
-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
20
Oracle VM Templates for Oracle Database
Useful Links
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


21
Useful Links Oracle VM on oracle.com :
http://www.oracle.com/virtualization

Oracle VM on the Wiki :


http://wiki.oracle.com/Oracle+VM

Oracle's Virtualization Blog


https://blogs.oracle.com/virtualization/
Keep Watch for SIG events
Wim Coekaerts Blog
https://blogs.oracle.com/wim/

http://oraclevmsig.org/ VirtualBox.org
https://www.virtualbox.org/
22
Thank You ! See you in Sangam14
http://oraclevmsig.org/; ps.janakiram@aioug.org

23
Backup Slides

24
DeployCluster Options
Oracle VM Login 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)

25
DeployCluster Options
DB/RAC OVM Template 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)

26
DeployCluster Options
DB/RAC OVM Template Options (Contd)
-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, --dryrun
Show what will be done (do not start VMs or send msgs)
27

S-ar putea să vă placă și