Rac Ondocker BP WP
Rac Ondocker BP WP
Rac Ondocker BP WP
INTENDED AUDIENCE
Oracle Database Administrators and Application Developers.
DISCLAIMER
This document in any form, software, or printed matter, contains proprietary information that is the exclusive property of
Oracle. Your access to and use of this confidential material is subject to the terms and conditions of your Oracle software
license and service agreement, which has been executed and with which you agree to comply. This document and information
contained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oracle without prior written
consent of Oracle. This document is not part of your license agreement, nor can it be incorporated into any contractual
agreement with Oracle or its subsidiaries or affiliates.
This document is for informational purposes only and is intended solely to assist you in planning for the implementation and
upgrade of the product features described. 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 in this document remains at the sole discretion of Oracle.
Due to the nature of the product architecture, it may not be possible to safely include all features described in this document
without risking significant destabilization of the code.
1 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
TABLE OF CONTENTS
Purpose Statement 1
Intended Audience 1
Disclaimer 1
INTRODUCTION 3
Solution Overview 4
Oracle Clusterware 4
Oracle Automatic Storage Management (ASM) 4
Oracle Real Application Clusters (RAC) 4
Oracle Linux 4
Oracle Container Runtime for Docker 4
CONCLUSION 13
More Information 13
2 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
INTRODUCTION
Oracle Real Application Clusters (Oracle RAC) allows an Oracle Database to run any packaged or custom application across a
set of clustered servers. This provides continuous database service uptime during node and instance failures, most planned
maintenance activities, and Oracle RAC expansion. If a clustered node fails, the Oracle Database service continues to run on
one of the surviving nodes. When more processing power is needed, another node can be added without interrupting user
access to the database or data.
Docker is an open source containerization platform that accelerates the development and deployment of microservices.
Docker has gained a lot of support in the IT community because of its agility, and, as such, many organizations are running
their services in Docker containers.
• Integration Challenges: Building a database environment for applications requires solving many software
dependencies. With Docker, developers or the database administrator can build an Oracle RAC Docker image with all
the package dependencies, Oracle Grid Infrastructure Software, Oracle Database release updates, and application
deployment scripts.
• Environment Provisioning Challenges: In test and development environments, users require quick environment
provisioning. Without a packaged database Docker image, it will take a lot of time and skills. However, using Docker,
users can download the Oracle RAC image and trigger the deployment of RAC and the application schemas. Users
get a complete software stack included in the image and can quickly provision the environment.
• Testing Challenges: Since Oracle RAC runs in a Docker container, users can freeze the test environment and share
it with other testers and developers, enhancing collaboration and productivity.
3 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
SOLUTION OVERVIEW
This section introduces Oracle Grid Infrastructure, Oracle RAC, Oracle Linux, and Docker.
ORACLE CLUSTERWARE
Oracle Clusterware enables servers to coordinate with each other to appear to function as a highly available unit. This
combination of servers is commonly known as a cluster. Although the servers are standalone servers, each server
communicates with other servers, making the individual servers appear as one system to applications and end-users. Oracle
Clusterware also monitors the components within the cluster, restarting or failing over resources to ensure high availability.
Oracle Clusterware provides the infrastructure necessary to run Oracle RAC. Oracle Clusterware also manages resources, such
as virtual IP (VIP) addresses, databases, listeners, services, and many more.
ORACLE LINUX
Operating systems, containers, and virtualization are the fundamental building blocks of modern IT infrastructure. Oracle
combines them all into one integrated offering: Oracle Linux. Running on your choice of hardware—in your data center or the
cloud—Oracle Linux provides the reliability, scalability, security, and performance for demanding enterprise workloads.
4 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
DEPLOYMENT BEST PRACTICES
This section provides best practices details for deploying and configuring Oracle RAC on Docker.
5 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
DEPLOYMENT ON MULTIPLE HOSTS
Multiple Oracle RAC Clusters can be deployed on multiple hosts on Docker. Every Oracle RAC Cluster will use dedicated storage
and assigned IP addresses within the Docker container. To run Oracle RAC on Docker on multiple hosts, you need container
IPs on the same subnet and reachable between the containers running on the different hosts. Docker MACVLAN bridge
connects the containers directly to your public physical network enabling containers running on different hosts to
communicate with each other.
Figure 2 illustrates the architecture of running Oracle RAC on Docker on multiple hosts.
Figure 2 RAC on Docker when RAC is deployed on user network using the Docker Macvlan Driver on Multihost
6 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
If you specify the "--privileged=true" option to the commands "docker create" or "docker run", the container has access to all
the devices on the host, which can present a security risk. You should plan your storage requirements ahead of the Oracle
RAC installation and allocate specific block devices to containers based on your Oracle RAC DB storage requirement for more
precise control.
To allocate specific block devices on the host available to particular containers, you can use the "—device" option with the
docker run and Docker create commands: --device=host_devname[:container_devname[:permissions]]
Figure 3 illustrates the architecture of deploying RAC on Docker using block devices as shared storage.
7 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
Suppose you do not have block or NAS devices to run Oracle RAC on Docker. In that case, you can deploy the
OracleRACStorageServer image, which emulates an NFS server and an NFS volume exposed to Oracle RAC container. The
following figure explains the usage of RAC on Docker with NAS devices.
Note: the OracleRACStorageServer storage image is supported only for test and development deployments.
DEPLOYMENT OVERVIEW
To build the Oracle RAC on Docker image, clone the Oracle/docker-images repository files from GitHub and build the images
based on your environment. The Oracle RAC Docker image will be built based on the Oraclelinux:Slim-7 image. Figure 5
illustrates the complete build scenario for the Oracle RAC Docker Image, Oracle Connection Manager image, and RAC Storage
image.
8 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
Figure 5 Steps to clone Oracle/docker repository files from GITHUB
9 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
STEP 6: CONFIGURE DOCKER HOST ENVIRONMENT
After building the required images, configure the Docker host environment to run Oracle RAC on Docker. You may need to
configure kernel parameters, network setup, and ASM device allocation, as well as configuring real-time process settings in
the container.
To understand the pre-setup steps for Oracle RAC on Docker, refer to the section "Pre-requisites for Oracle RAC on Docker"
in the README.MD on GitHub.
At this point, you have deployed a single node RAC database running in a single container. For test & dev environments, a
single node Oracle RAC environment may be sufficient. However, if you wish to run a multi-instance Oracle RAC database,
you must add additional nodes to your Oracle RAC cluster. To add extra nodes, please follow step 8. Otherwise, skip to step 9.
10 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
WEBLOGIC AND ORACLE RAC ON DOCKER CONTAINERS
Oracle WebLogic (Oracle WLS) is a scalable, enterprise-ready J2EE-based application server for developing and deploying
multi-tier distributed enterprise applications. WebLogic Server provides enterprise-level security and administration tools for
ease of managing the applications.
Tighter integration between WebLogic and Oracle RAC database provides a robust, complete, highly available infrastructure
to develop and test applications with improved availability, better resource sharing, ease of configuration, and automated
management facilities. As WebLogic and Oracle RAC databases are now running in containers, developers and enterprises
can take advantage of Docker's benefits of container isolation, portability, ability to automate the development and testing of
these applications. To understand the deployment scenarios of WebLogic on Docker, please refer to the Oracle WebLogic
Server on Docker Containers Document published by WebLogic on OTN.
MedRec (Avitek Medical Records Application) is an end-to-end sample Java EE application shipped with WebLogic Server; it
simulates an independent, centralized medical record management system. The MedRec application provides a framework
for patients, doctors, and administrators to manage patient data using various clients. MedRec demonstrates WebLogic server
and Java EE features, and it highlights Oracle-recommended best practices. MedRec is installed in the WebLogic server
distribution. It has been used as a reliable and realistic application performance benchmark for over ten years.
Figure 6 shows the system architecture for WebLogic deployment with Oracle RAC on Docker. Figure 6 illustrates a WebLogic
container running the MedRec application, which is connected to RAC Database. If any instance goes down, the application
can still connect to other instances.
A WebLogic domain can be extended to a clustered domain by running multiple domains in different containers managed by
the Admin server. Clustered WebLogic containers can run on the same host or multiple hosts.
11 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
STEP 1: INSTALL AND CONFIGURE ORACLE RAC ON DOCKER
To install WebLogic on Docker, first, install Oracle RAC on Docker.
dsurl=jdbc:oracle:thin:@//172.16.1.70:1521/ORCLCDB
dsusername=system
dspassword=Oracle_12c
For more details, please refer to the README.MD placed in the current directory.
Note: Pass –network docker parameter and create the WebLogic container on a public network that you have used for RAC.
http://<Docker_Host>:7011/medrec
12 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
CONCLUSION
In traditional deployment workflows, various steps are required, contributing to an overall deployment pain felt by multiple
teams. Each step added to the deployment process for an application or database, such as applying a patch, providing
application scripts, or setting up an environment for users, increases the overall inhering risk that comes with deploying
dev/test or production systems. Docker provides a simple toolset that is aimed to combine all steps in a single workflow to
address these concerns.
Oracle RAC represents an enterprise-class database product, which is best used with the latest patches and releases.
Combined with Docker, it can provide fast provisioning and ready-made images using those latest patches and releases. These
images can easily be consumed in dev and test environments and discarded when the dev or test jobs are done, expediting
any organization's dev and test cycle.
Concluding, one of the most significant challenges that today's IT faces is the efficient management of test, dev, QA, and
production environments necessary to support the complete application development lifecycle. Economic realities dictate that
these environments be hosted on consolidated systems to maintain cost efficiency. With the introduction of Oracle RAC and
Docker repository files on GitHub, customers now have a simple solution to all these challenges. It provides simple and rapid
deployment, storage, and portability of environments and the isolation required for consolidated environments.
MORE INFORMATION
• Oracle RAC on Docker - Released Versions and Known Issues (Doc ID 2488326.1)
• Oracle® Linux Oracle Container Runtime for Docker User's Guide
https://docs.oracle.com/en/operating-systems/oracle-linux/docker/
• Operating Systems Documentation: https://docs.oracle.com/en/operating-systems/index.html
13 DB TECHNICAL BRIEF | Best Practices For Deploying Oracle RAC On Docker | Version 0.90
Copyright © 2021, Oracle and/or its affiliates
CONNECT WITH US
Call +1.800.ORACLE1 or visit oracle.com.
Outside North America, find your local office at oracle.com/contact.
Copyright © 2021, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the contents hereof are subject to change without
notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties
and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are formed
either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without
our prior written permission.
This device has not been authorized as required by the rules of the Federal Communications Commission. This device is not, and may not be, offered for sale or lease, or sold or
leased, until authorization is obtained.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of
SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered
trademark of The Open Group. 0120