Exploring the Future Potential of AI-Enabled Smartphone Processors
Rapid Home Provisioning
1. BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA
HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH
Rapid Home Provisioning
A new Oracle Grid Infrastructure 12.1.0.2 feature
Ludovico Caldara
Oracle ACE, Senior Oracle Consultant
Trivadis SA
2. About Ludovico Caldara
Rapid Home Provisioning2 09.12.2015
■ 16 Years DBA (Not Only Oracle)
▪ I do it everywhere (even Windows)
■ RAC ATTACK Ninja & co-writer
■ VP, SOUG & ITOUG Board member
■ OCP (11g, 12c, MySQL) & OCE
■ Italian living in Switzerland
■ http://www.ludovicocaldara.net
■ @ludodba
■ ludovicocaldara
3. Our company.
Rapid Home Provisioning3 09.12.2015
Trivadis is a market leader in IT consulting, system integration, solution engineering
and the provision of IT services focusing on and
technologies in Switzerland, Germany, Austria and Denmark.
We offer our services in the following strategic business fields:
Trivadis Services takes over the interactive operation of your IT systems.
O P E R A T I O N
8. Patching, worst way
Rapid Home Provisioning8 09.12.2015
1. Stop everything
2. In-place binaries patching
3. Database patching, "big bang" mode
4. Start everything
Problem: you seriously need a check-up of your operational practices
9. Patching, better way
Rapid Home Provisioning9 09.12.2015
1. Re-install binaries, out-of-place binaries patching
2. Stop databases, one by one
3. Move to new ORACLE_HOME, patch one by one
4. Decommission old binaries
10. Patching, better way
Rapid Home Provisioning10 09.12.2015
1. Re-install binaries, out-of-place binaries patching
2. Stop databases, one by one
3. Move to new ORACLE_HOME, patch one by one
4. Decommission old binaries
Problem: what if you have many servers/environments and patch frequently?
11. Patching, best way (so far)
Rapid Home Provisioning11 09.12.2015
1. Install binaries somewhere
2. Detach and patch them
3. Keep them as golden images somewhere
4. Deploy them on the servers somehow, attach them
5. Stop databases, one by one
6. Move to new ORACLE_HOME, patch one by one
7. Decommission old binaries
12. Patching, best way (so far)
Rapid Home Provisioning12 09.12.2015
1. Install binaries somewhere
2. Detach and patch them
3. Keep them as golden images somewhere
4. Deploy them on the servers somehow, attach them
5. Stop databases, one by one
6. Move to new ORACLE_HOME, patch one by one
7. Decommission old binaries
Flexible?
YES!
13. Patching, best way (so far)
Rapid Home Provisioning13 09.12.2015
1. Install binaries somewhere
2. Detach and patch them
3. Keep them as golden images somewhere
4. Deploy them on the servers somehow, attach them
5. Stop databases, one by one
6. Move to new ORACLE_HOME, patch one by one
7. Decommission old binaries
Flexible?
YES!
Easy?
NO!
16. Rapid Home Provisioning is...
Rapid Home Provisioning16 09.12.2015
Usage: rhpctl ... client
Usage: rhpctl ... database
Usage: rhpctl ... image
Usage: rhpctl ... role
Usage: rhpctl ... series
Usage: rhpctl ... server
Usage: rhpctl ... user
Usage: rhpctl ... workingcopy
grid$ rhpctl -help | grep Usage: | awk '{printf ("%s %s ... %sn", $1, $2, $4)}' | sort |uniq
It has its own rhpctl command too! This is how you administer it.
17. Rapid Home Provisioning - the idea
Rapid Home Provisioning17 09.12.2015
DF
OH_1 OH_2 OH_3
RHP SERVER
-MGMTDB
RHP CLIENT
RHP CLIENT
RHP CLIENT
RHP CLIENT
RHP CLIENT
RHP CLIENT
RHP CLIENT RHP CLIENT
GOLDEN
IMAGE
DB
WORKING
COPY
18. Rapid Home Provisioning is a tool for...
Rapid Home Provisioning18 09.12.2015
Provisioning and patching
– Oracle Homes
– other Software
Simplifying software deployment
Patching Databases (Mass patching possible)
Centralizing Golden Images
Ensuring standardization within the enterprise
19. Rapid Home Provisioning has mandatory requirements
Rapid Home Provisioning19 09.12.2015
Oracle Grid Infrastructure release 12.1.0.2 or upwards (use the last PSU)
ASM Cluster File System (ACFS)
Oracle Grid Infrastructure Global Naming Services (GNS)
NFS Server and HAVIP (optional*)
Lifecycle Management Pack Option (optional*)
* how optional is optional? We will see in the next episode (coming soon)
20. Rapid Home Provisioning has also limitations!
Rapid Home Provisioning20 09.12.2015
The main ones:
Not available on Windows
Cannot upgrade from a release to another (planned in 12.2)
Cannot provision Grid Infrastructure Homes (not yet, maybe 12.2?)
– Bug 19596245 : IMPLEMENT GRID INFRASTRUCTURE SUPPORT IN RAPID HOME PROVISIONING
Cannot provision OS Images or VMs, not in the scope of the tool
21. Rapid Home Provisioning - Security Roles
Rapid Home Provisioning21 09.12.2015
Several roles -> specific permissions on Working Copies and and Golden Images
But basically three composite roles:
– GH_SA : RHP Server administrator
– GH_CA : RHP Client administrator
– GH_OPER : for generic administration
22. Rapid Home Provisioning22 09.12.2015
Rapid Home Provisioning
Single Cluster Architecture
(or when you have only one cluster)
23. Single Cluster Architecture - Setup
Rapid Home Provisioning23 09.12.2015
RHP Server Cluster
ASM RHP DG-MGMTDB
24. Single Cluster Architecture - Setup
Rapid Home Provisioning24 09.12.2015
RHP Server Cluster
ASM RHP DG-MGMTDB
Existing
OraHome
1
25. Single Cluster Architecture - Setup
Rapid Home Provisioning25 09.12.2015
RHP Server Cluster
ASM RHP DG-MGMTDB
RHP
Server
Existing
OraHome
1
# srvctl add rhpserver -storage /my/path/to/rhp/ -diskgroup RHP
# srvctl start rhpserver
new resource ora.ghs is created
ASM DG must exist,
ADVM Compatible >= 12.1.0.0
26. Single Cluster Architecture - Adding Images
Rapid Home Provisioning26 09.12.2015
RHP Server Cluster
ASM RHP DG-MGMTDB
RHP
Server
Existing
OraHome
ACFS Mount
Base
Golden
Image
grid $ rhpctl grant role -role GH_CA -user oracle -client rhps-cluster
oracle $ rhpctl import image -image 12cR1_EE_Base
-path $OH -imagetype ORACLEDBSOFTWARE
28. Single Cluster Architecture - Adding Working Copies
Rapid Home Provisioning28 09.12.2015
RHP Server Cluster
ASM DG-MGMTDB
RHP
Server
Existing
OraHome
1
ACFS Mount
Base
Golden
Image
no more needed
oracle $ rhpctl add workingcopy -workingcopy 12cR1_EE_Base_1
-image 12cR1_EE_Base -oraclebase /u01/app/oracle
ACFS Snap
Base
Working
Copy
29. Getting Working Copy details
Rapid Home Provisioning29 09.12.2015
oracle $ rhpctl query workingcopy -workingcopy 12cR1_EE_Base_1
Working copy name: 12cR1_EE_Base_1
Image name: 12cR1_EE_Base
Owner: oracle@rhps-cluster
Site: rhps-cluster
Access control: USER:oracle@rhps-cluster
Access control: ROLE:GH_WC_ADMIN
Software home path:
/u01/app/12.1.0.2/grid/srvm/images/i12cR1_EE_Base296880/.ACFS/snaps/w12cR1
_EE_Base_1/swhome
Oracle base: /u01/app/oracle
Storage type: RHP Managed
Configured databases:
Interim patches installed:
Complete: TRUE
YOUR ORACLE_HOME
ON RHP SERVER
30. Single Cluster Architecture - Using Working Copies
Rapid Home Provisioning30 09.12.2015
RHP Server Cluster
ASM DG-MGMTDB
RHP
Server
ACFS Mount
Base
Golden
Image
ACFS Snap
Base
Working
Copy
DB
You can use the working copy as ORACLE_HOME for databases
$ rhpctl add database -workingcopy 12cR1_EE_base_1 -dbname ORCL
-datafileDestination DATA -dbtemplate General_Purpose.dbc
... or ...
31. Single Cluster Architecture - Patching Working Copies
Rapid Home Provisioning31 09.12.2015
RHP Server Cluster
ASM DG-MGMTDB
RHP
Server
ACFS Mount
Base
Golden
Image
ACFS Snap
Patched
Working
Copy
oracle $ cd PSUx/patchnumber
oracle $ opatch apply
32. Single Cluster Architecture - Patching Working Copies
Rapid Home Provisioning32 09.12.2015
RHP Server Cluster
ASM DG-MGMTDB
RHP
Server
ACFS Mount
Base
Golden
Image
ACFS Snap
Patched
Working
Copy
oracle $ cd PSUx/patchnumber
oracle $ opatch apply
oracle $ rhpctl add image –image 12cR1_EE_PSUx
-workingcopy 12cR1_EE_Base_1
ACFS Snap
Patched
Golden
Image
33. Single Cluster Architecture - Patching Working Copies
Rapid Home Provisioning33 09.12.2015
$ rhpctl add image -image 12cR1_EE_PSU4 -workingcopy 12cR1_EE_PSU4_1
rhpsh02.trivadistraining.com: Finding ACFS of previous image "12cR1_EE_Base" ...
rhpsh02.trivadistraining.com: Creating snapshot for image "12cR1_EE_PSU4" from
working copy "12cR1_EE_PSU4_1" ...
rhpsh02.trivadistraining.com: Changing the home ownership ...
$
34. Single Cluster Architecture - Images and Working Copies
Rapid Home Provisioning34 09.12.2015
RHP Server Cluster
ASM DG-MGMTDB
RHP
Server
ACFS Mount
Base
Golden
Image
ACFS Snap
Patched
Golden
Image
You can have as many Images and Working copies as you need.
ACFS Snap
Patched
Working
Copy
ACFS Snap
Base
Working
Copy
$ rhpctl query workingcopy
Working copy name: 12cR1_EE_Base_1
Working copy name: 12cR1_EE_PSU4_1
Working copy name: 12cR1_EE_PSU4_2
$ rhpctl query image
Image name: 12cR1_EE_PSU4
Image name: 12cR1_EE_Base
ACFS Snap
Patched
Working
Copy
35. Single Cluster Architecture - Database Patching
Rapid Home Provisioning35 09.12.2015
RHP Server Cluster
ASM DG-MGMTDB
RHP
Server
ACFS Mount
Base
Golden
Image
ACFS Snap
Patched
Golden
Image
ACFS Snap
Patched
Working
Copy
ACFS Snap
Base
Working
Copy
Unpatched
DB
Database patching is dead simple!
36. Single Cluster Architecture - Database Patching
Rapid Home Provisioning36 09.12.2015
RHP Server Cluster
ASM DG-MGMTDB
RHP
Server
ACFS Mount
Base
Golden
Image
ACFS Snap
Patched
Golden
Image
ACFS Snap
Patched
Working
Copy
ACFS Snap
Base
Working
Copy
Unpatched
DB
Database patching is dead simple!
$ rhpctl move database -sourcewc 12cR1_EE_Base_1
-patchedwc 12cR1_EE_PSU4_1 -dbname ORCL
Patched
DB
Database
must be open
37. Single Cluster Architecture - Database Patching
Rapid Home Provisioning37 09.12.2015
$ rhpctl move database -sourcewc 12cR1_EE_Base_1 -patchedwc 12cR1_EE_PSU4_1 -dbname ORCL
rhpsh02.trivadistraining.com: Starting to move database from
"/u01/app/12.1.0.2/grid/srvm/images/i12cR1_EE_Base296880/.ACFS/snaps/w12cR1_EE_Base_1/swhome" to
"/u01/app/12.1.0.2/grid/srvm/images/i12cR1_EE_Base296880/.ACFS/snaps/w12cR1_EE_PSU4_1/swhome"
on server cluster
...
SQL Patching tool version 12.1.0.2.0 on Sat Oct 24 17:06:22 2015
...
Adding patches to installation queue and performing prereq checks...done
...
The following patches will be applied:
20831110 (Database Patch Set Update : 12.1.0.2.4 (20831110))
...
Installing patches...
...
rhpsh02.trivadistraining.com: Completed the 'move database' operation on server cluster
39. Rapid Home Provisioning39 09.12.2015
Rapid Home Provisioning
Multi Cluster Architecture
(or when you have a private cloud)
40. Multi Cluster Architecture - Additional requirements
Rapid Home Provisioning40 09.12.2015
NFS Server and HAVIP
Lifecycle Management Pack Option
Licensed on
all RHP Client
Clusters
Source: https://docs.oracle.com/database/121/DBLIC/editions.htm#DBLIC110
41. Multi Cluster Architecture - Adding a Client Cluster
Rapid Home Provisioning41 09.12.2015
## SERVER
# srvctl add havip -id rhp -address 192.168.89.202
$ rhpctl add client -client rhpc-cluster -toclientdata
/home/grid
$ scp /home/grid/rhpc-cluster.xml rhpch01:/home/grid
## CLIENT
# srvctl add rhpclient -clientdata /home/grid/rhpc-cluster.xml
# srvctl start rhpclient
# rhpctl query server
Rapid Home Provisioning Server (RHPS): rhps-cluster
Storage base path: /u01/app/12.1.0.2/grid/srvm
Disk Groups: RHP
Port number: 23795
42. Multi Cluster Architecture - Adding a Client Cluster
Rapid Home Provisioning42 09.12.2015
## SERVER
# srvctl add havip -id rhp -address 192.168.89.202
# rhpctl add client -client rhpc-cluster -toclientdata
/home/grid
# scp /home/grid/rhpc-cluster.xml rhpch01:/home/grid
## CLIENT
# srvctl add rhpclient -clientdata /home/grid/rhpc-cluster.xml
# srvctl start rhpclient
# rhpctl query server
Rapid Home Provisioning Server (RHPS): rhps-cluster
Storage base path: /u01/app/12.1.0.2/grid/srvm
Disk Groups: RHP
Port number: 23795
43. Multi Cluster Architecture - NFS Provisioning
Rapid Home Provisioning43 09.12.2015
RHP Server Cluster
ASM Volume 1-MGMTDB
RHP
Server
ACFS SnapACFS Mount
Golden
Image
Working
Copy
for NFS
RHP Client Cluster
RHP
Client Node 1
NFS Mount
Node 2
NFS Mount
44. Multi Cluster Architecture - NFS Provisioning
Rapid Home Provisioning44 09.12.2015
RHP Server Cluster
ASM Volume 1-MGMTDB
RHP
Server
ACFS SnapACFS Mount
Golden
Image
Working
Copy
for NFS
RHP Client Cluster
RHP
Client Node 1
NFS Mount
Node 2
NFS Mount
exportfs
mountfs mountfs
45. Multi Cluster Architecture - Provisioning via NFS
Rapid Home Provisioning45 09.12.2015
oracle@rhpc $ rhpctl add workingcopy -workingcopy 12cR1_EE_PSU4_rhpc
-image 12cR1_EE_PSU4 -storagetype NFS -path /u01/app/oracle/product/12.1.0.2.4
-oraclebase /u01/app/oracle
rhpch02.trivadistraining.com: Starting server-side action for 'add workingcopy'...
rhpsh01.trivadistraining.com: Adding storage for working copy ...
rhpsh01.trivadistraining.com: Storing metadata in repository for working copy
"12cR1_EE_PSU4_rhpc" ...
rhpsh01.trivadistraining.com: Finding ACFS file system of the image "12cR1_EE_PSU4"
...
rhpsh01.trivadistraining.com: Creating snapshot ...
rhpsh01.trivadistraining.com: Adding export file system for image
"12cR1_EE_PSU4_rhpc" ...
...
rhpsh01.trivadistraining.com: Successfully executed attach home operation.
46. Multi Cluster Architecture - Provisioning via NFS
Rapid Home Provisioning46 09.12.2015
oracle@rhpc $ rhpctl add workingcopy -workingcopy 12cR1_EE_PSU4_rhpc
-image 12cR1_EE_PSU4 -storagetype NFS -path /u01/app/oracle/product/12.1.0.2.4
-oraclebase /u01/app/oracle
rhpch02.trivadistraining.com: Starting server-side action for 'add workingcopy'...
rhpsh01.trivadistraining.com: Adding storage for working copy ...
rhpsh01.trivadistraining.com: Storing metadata in repository for working copy
"12cR1_EE_PSU4_rhpc" ...
rhpsh01.trivadistraining.com: Finding ACFS file system of the image "12cR1_EE_PSU4"
...
rhpsh01.trivadistraining.com: Creating snapshot ...
rhpsh01.trivadistraining.com: Adding export file system for image
"12cR1_EE_PSU4_rhpc" ...
...
rhpsh01.trivadistraining.com: Successfully executed attach home operation.
47. Multi Cluster Architecture - Provisioning via NFS
Rapid Home Provisioning47 09.12.2015
oracle@rhpc $ rhpctl add workingcopy -workingcopy 12cR1_EE_PSU4_rhpc
-image 12cR1_EE_PSU4 -storagetype NFS -path /u01/app/oracle/product/12.1.0.2.4
-oraclebase /u01/app/oracle
rhpch02.trivadistraining.com: Starting server-side action for 'add workingcopy'...
rhpsh01.trivadistraining.com: Adding storage for working copy ...
rhpsh01.trivadistraining.com: Storing metadata in repository for working copy
"12cR1_EE_PSU4_rhpc" ...
rhpsh01.trivadistraining.com: Finding ACFS file system of the image "12cR1_EE_PSU4"
...
rhpsh01.trivadistraining.com: Creating snapshot ...
rhpsh01.trivadistraining.com: Adding export file system for image
"12cR1_EE_PSU4_rhpc" ...
...
rhpsh01.trivadistraining.com: Successfully executed attach home operation.
ORACLE_HOME
via NFS. What
can go wrong?
48. Multi Cluster Architecture - LOCAL Provisioning
Rapid Home Provisioning48 09.12.2015
RHP Server Cluster
ASM Volume 1-MGMTDB
RHP
Server
ACFS Mount
Golden
Image
ACFS Snap
Working
Copy
for Local
Copy
RHP Client Cluster
RHP
Client Node 1 Node 2
Local Copy Local Copy
49. Multi Cluster Architecture - LOCAL Provisioning
Rapid Home Provisioning49 09.12.2015
RHP Server Cluster
ASM Volume 1-MGMTDB
RHP
Server
ACFS Mount
Golden
Image
ACFS Snap
Working
Copy
for Local
Copy
RHP Client Cluster
RHP
Client Node 1 Node 2
Local Copy Local Copy
local ACFS
or other FS
50. Multi Cluster Architecture - LOCAL Provisioning
Rapid Home Provisioning50 09.12.2015
oracle@rhpc $ rhpctl add workingcopy -workingcopy 12cR1_EE_PSU4_c1
-image 12cR1_EE_PSU4 -storagetype LOCAL -path
/u01/app/oracle/product/12.1.0.2.4/Home_EE_2 -oraclebase /u01/app/oracle
rhpch02.trivadistraining.com: Starting server-side action for 'add workingcopy'...
rhpsh01.trivadistraining.com: Adding storage for working copy ...
rhpsh01.trivadistraining.com: Creating snapshot ...
rhpsh01.trivadistraining.com: Adding export file system for image "12cR1_EE_PSU4_c1"
...
rhpch02.trivadistraining.com: Mounting file system...
rhpch02.trivadistraining.com: Creating local storage ...
rhpch02.trivadistraining.com: Creating local ACFS file system ...
rhpch02.trivadistraining.com: Starting local ACFS file system ...
rhpch02.trivadistraining.com: Making a local copy ...
...
51. Multi Cluster Architecture - Mixed Provisioning
Rapid Home Provisioning51 09.12.2015
RHP Server Cluster
ASM Volume 1-MGMTDB
RHP
Server
ACFS SnapACFS Mount
Golden
Image
Working
Copy
for NFS
ACFS Snap
Working
Copy
for Local
Copy
RHP Client Cluster
RHP
Client Node 1
NFS Mount
Node 2
NFS MountLocal Copy Local Copy
53. RHP Metadata Repository: GHSUSER@-MGMTDB
Rapid Home Provisioning53 09.12.2015
SQL> select table_name from dba_tables where owner='GHSUSER' order by 1;
TABLE_NAME
------------------------------
HOLDER
IMAGE_ROLES
IMGS
IMGSRS
IMGSRS_IMAGES
IMGSRS_USERS
PARENT_CHILD_ROLE
ROLEIMPL_M_PRIVLIST
ROLES
SITES
SWHOMES
USERS
USER_ROLES
WCOPY_ROLES
14 rows selected.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 RHPS_CLUSTER READ WRITE NO
54. RHP Metadata Repository: GHSUSER@-MGMTDB
Rapid Home Provisioning54 09.12.2015
SQL> select table_name from dba_tables where owner='GHSUSER' order by 1;
TABLE_NAME
------------------------------
HOLDER
IMAGE_ROLES
IMGS
IMGSRS
IMGSRS_IMAGES
IMGSRS_USERS
PARENT_CHILD_ROLE
ROLEIMPL_M_PRIVLIST
ROLES
SITES
SWHOMES
USERS
USER_ROLES
WCOPY_ROLES
14 rows selected.
ORACLE says you
don't need to
backup the GIMR.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 RHPS_CLUSTER READ WRITE NO
55. RHP Metadata Repository: GHSUSER@-MGMTDB
Rapid Home Provisioning55 09.12.2015
SQL> select table_name from dba_tables where owner='GHSUSER' order by 1;
TABLE_NAME
------------------------------
HOLDER
IMAGE_ROLES
IMGS
IMGSRS
IMGSRS_IMAGES
IMGSRS_USERS
PARENT_CHILD_ROLE
ROLEIMPL_M_PRIVLIST
ROLES
SITES
SWHOMES
USERS
USER_ROLES
WCOPY_ROLES
14 rows selected.
ORACLE says you
don't need to
backup the GIMR.
If you use RHP, my
recommandation
is to do it!
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 RHPS_CLUSTER READ WRITE NO
57. RHP Documentation
Rapid Home Provisioning57 09.12.2015
12c Documentation:
– https://docs.oracle.com/database/121/CWADD/rapidhome.htm#CWADD92402
– https://docs.oracle.com/database/121/RILIN/racrhp.htm
OTN Private Database Cloud Home (whitepaper and video):
– http://www.oracle.com/technetwork/database/database-cloud/private/index.html
Best MOS Note:
– ODA (Oracle Database Appliance): How To Setup a Rapid Home Provisioning
(RHP) Server (Doc ID 2054804.1)
58. Conclusions
Rapid Home Provisioning58 09.12.2015
Ease of patching
Standardized installations
Free for standalone clusters
Private-Cloud ready
Nice features
Thin documentation
Pricey option for multi-clusters
No GI_HOME Provisioning
It is not free from bugs (not rock-solid)
59. Embrace it or live without it?
Rapid Home Provisioning59 09.12.2015
60. What's your question?
Ludovico Caldara
Oracle ACE, Senior Oracle Consultant
Trivadis SA
09.12.2015 Rapid Home Provisioning60