SlideShare a Scribd company logo
1 of 38
Download to read offline
BASEL | BERN | BRUGG | BUKAREST | DÜSSELDORF | FRANKFURT A.M. | FREIBURG I.BR. | GENF
HAMBURG | KOPENHAGEN | LAUSANNE | MANNHEIM | MÜNCHEN | STUTTGART | WIEN | ZÜRICH
www.oradba.ch@stefanoehrli
Oracle and Docker
Oracle Databases in Docker Container
Stefan Oehrli
BASEL | BERN | BRUGG | BUKAREST | DÜSSELDORF | FRANKFURT A.M. | FREIBURG I.BR. | GENF
HAMBURG | KOPENHAGEN | LAUSANNE | MANNHEIM | MÜNCHEN | STUTTGART | WIEN | ZÜRICH
Stefan Oehrli
Platform Architect, Trainer and Partner at Trivadis
• Since 1997 active in various IT areas
• Since 2008 with Trivadis AG
• More than 20 years of experience in Oracle databases
Focus: Protecting data and operating databases securely
• Security assessments and reviews
• Database security concepts and their implementation
• Oracle Backup & Recovery concepts and troubleshooting
• Oracle Enterprise User Security, Advanced Security, Database Vault, …
• Oracle Directory Services
Co-author of the book The Oracle DBA (Hanser, 2016/07)
@stefanoehrli www.oradba.ch
Agenda
22.05.2019 SOUG Day - Oracle and Docker3
• Introduction
• Docker images, container and volumes
• Database image
• Database container
• Use cases
• Licensing
• Summary
Introduction
22.05.2019 SOUG Day - Oracle and Docker4
What is Docker?
22.05.2019 SOUG Day - Oracle and Docker5
• One software container platform
• Developed from Linux / Linux containers
• Available...
• ... for Linux, Mac OS and Windows
• ... as Community Edition (CE) and Enterprise Edition (EE)
• Part of the Linux Open Container Initiative (OCI)
• Docker is not the only implementation of Linux containers
• Core OS / Rkt, LXC Linux Containers, OpenVZ, Mesos Containerizer,...
• Docker has the largest market share
• Increase the interchangeability and reproducibility of objectives
Oracle support for Docker
22.05.2019 SOUG Day - Oracle and Docker6
• Various Oracle products are supported and certified for Docker
• MOS Note 2216342.1 Oracle Support for Database Running on Docker
• MOS Note 2017945.1 Support Information for Oracle WebLogic Server and Oracle Fusion
Middleware Running in Docker Containers
• Container Oracle Linux 7 / UEK4 Kernel or Red Hat
Enterprise Linux 7 as base image
• Oracle sources for images or official build sources
• Oracle Docker Build Sources on GitHub
https://github.com/oracle/docker-images
• Oracle Container Registry https://container-registry.oracle.com
• Oracle Container Engine and Registry https://developer.oracle.com/containers
• Oracle auf Docker Hub https://hub.docker.com/publishers/oracle
What else about containers?
22.05.2019 SOUG Day - Oracle and Docker7
• There is no such thing as THE container.
• Single Process / Service
• No replacement for VMs
• Small space requirement
• Dealing with identities and sensitive data
• Dealing with data persistent
• Understanding how to build containers, but
• ...not every container has to be adapted individually
• ...use available and trusted container repositories
Source: Volkswagen Advertising (June 2016)
Docker images,
container and volumes
22.05.2019 SOUG Day - Oracle and Docker8
Virtualization
• Use of common infrastructure
• each VM is a "server
• guest operating system
• Software and libraries
• uses
• Redundancy
• Effort for setting up the VMs
22.05.2019 SOUG Day - Oracle and Docker9
Docker container
• Use of common infrastructure
• a host operating system
• Applications are "packaged
• Only necessary libraries and software
components
• Use of existing images
• Slim
• Reproducible
• Because automatically created
• Docker Image are immutable
22.05.2019 SOUG Day - Oracle and Docker10
Docker components
22.05.2019 SOUG Day - Oracle and Docker11
Volumes
• Docker Image are immutable
• Changes only in a new image
• A container is based on an image
• Top Layer read/write
• No persistence over the lifetime of the
container
• Securing data persistence through volumes
• Data is outside the container
• Lifecycle…
• New image
• New container
• current volume
22.05.2019 SOUG Day - Oracle and Docker12
Database image
22.05.2019 SOUG Day - Oracle and Docker13
• Deploy the Docker Build scripts e.g. https://github.com/oehrlis/docker
• Docker environment e.g. Docker Desktop for Mac OS
• Deploying Oracle Software
• Oracle Database Enterprise Edition 18c (18.3.0.0)
• Oracle Database Release Update 18.6.0.0.0 (Patch 29301631)
• Oracle OJVM Release Update 18.6.0.0.190416 (Patch 29249584)
• OPatch 12.2.0.1.17 for DB 18.x releases (APR 2019) (Patch 6880880)
• Deploying the Docker Base Image
docker pull oraclelinux:7-slim
git clone https://github.com/oehrlis/docker
Prerequisites
22.05.2019 SOUG Day - Oracle and Docker14
• Dockerfile uses Multi-Stage Build
• Available from Docker 17.05
• Use of multiple FROM statements
• Splitting the build process into several sections
• Reduction of image size
• software is part of the build context and is copied
• Optional download of the software from a local web server
• Start Docker Build with the command docker build
cd docker/OracleDatabase/18.6.0.0
docker build -t oracle/database:18.6.0.0 .
Build image
22.05.2019 SOUG Day - Oracle and Docker15
Dockerfile
• Base image
• Setting the environment
• OS configuration of the basic image
• Build image
• Copying Oracle binaries and patch files
• Installing the Oracle software
• Installation of the Oracle Patch, Trivadis
BasenvTM
• Target image
• Copying the software from the build
image
• Completion of the installation (root.sh
scripts)
• Definition of ports, volume and start
script
22.05.2019 SOUG Day - Oracle and Docker16
Image build scripts
22.05.2019 SOUG Day - Oracle and Docker17
Dockerfile uses different scripts for configuring the image
• 00_setup_oradba_init.sh Installation of the latest OraDBA Init scripts
• 01_setup_os_db.sh OS Setup Configuration
• Users, create groups
• Install YUM Software Packages
• 10_setup_db_18.6.sh Installation of the Oracle Binaries
• Oracle Basis Release
• Release Updates and Oracle JVM Update
• 20_setup_basenv.sh Installation of Trivadis BasEnvTM
• 5n_xxxxx_database.sh Various scripts for configuring the container
Database container
22.05.2019 SOUG Day - Oracle and Docker18
• Control of the container log and status of the DB with docker logs -f tdb186s
• Starting or instantiating an Oracle database container with docker run
• specify host (--hostname) and container name (--name)
• Volume for the database files
• Oracle instance name as environment variable ORACLE_SID
• Executing the container command CMD
docker run --detach --hostname tdb186s --name tdb186s 
--volume /data/docker/volumes/tdb186s:/u01 
-p 1521:1521 -p 5500:5500 -e ORACLE_SID=TDB186S 
oracle/database:18.6.0.0
Oracle database container
22.05.2019 SOUG Day - Oracle and Docker19
Procedure for container start
22.05.2019 SOUG Day - Oracle and Docker20
Container Scripts
22.05.2019 SOUG Day - Oracle and Docker21
• 50_run_database.sh checks the volume and starts the database with…
• 50_start_database.sh If no database exists, the script
• 52_create_database.sh is called
• 50_start_database.sh starts the listener and the database instance
• 52_create_database.sh creates a database with the dbca. Base parameters can be adjusted with
environment variables
• 55_config_database.sh checks whether configuration files (*.sh or *.sql) are present in the directory
${INSTANCE_INIT}/setup or ${INSTANCE_INIT}/startup respectively.
• 55_check_database.sh is used for the health check of the Docker container and checks the status of
the database instance
Container variables
22.05.2019 SOUG Day - Oracle and Docker22
Variable Purpose
ORACLE_SID Oracle SID or database name. Default value is TDB186S
CONTAINER Flag for creating an Oracle container database Default value is FALSE
ORACLE_PDB Oracle PDB Name. Default value PDB1
ORACLE CHARACTERSET Oracle character set. Default value AL32UTF8
ORACLE_PWD Password for the SYS user. The default password is generated and
stored in the admin directory
INSTANCE_INIT Directory for the instance configuration files
ORADBA_RSP Various variables for the adaptation of the dbca template
Completion of initial container start
22.05.2019 SOUG Day - Oracle and Docker23
• At the first start, 50_run_database.sh creates a database.
• Checking the output of 50_run_database.sh with docker logs tdb186s
Access to the database container
22.05.2019 SOUG Day - Oracle and Docker24
• Access for applications via exported ports e.g. 1521
• Different whether on Windows, MacOS and Linux
• Docker runs on Linux "native" only
• Access via command line with docker exec and sqlplus, bash etc.
Access to the database container
22.05.2019 SOUG Day - Oracle and Docker25
• Access for applications via exported ports e.g. 1521
• Different whether on Windows, MacOS and Linux
• Docker runs on Linux "native" only
• Access via command line with docker exec and sqlplus, bash etc.
Use cases
22.05.2019 SOUG Day - Oracle and Docker26
Use Cases
22.05.2019 SOUG Day - Oracle and Docker27
• Oracle databases in containers can also be used in a microservice environment
• Corresponding build and configuration scripts must be developed individually
• Real Application Cluster (RAC) for test and development officially supported
• Oracle example on GitHub https://github.com/oracle/docker-images
• Use of Oracle Container
• Docker container contains single-PDB
• PDB can be plugged/unplugged relatively easily
• Using Docker Compose
• No manual docker commands
• Link container
• Establishment of a private network
• Shutting down either by stop or down
• down will remove the container
• stop just stops the service / container
• Define all parameter, volumes, network etc. in a YAML file
• Default name is docker-compose.yml
• Can contain multiple containers
• Started and managed via docker-compose command or regular docker command
• Start the container in background / detach
docker-compose up -d
docker-compose down
Docker compose
22.05.2019 SOUG Day - Oracle and Docker28
• Example docker-compose.yml file for tdb186s
• YAML, watches out for the correct whitespace characters
tdb186s:
image: ${DOCKER_USER}/${DOCKER_REPO}:18.6.0.0
container_name: tdb186s
hostname: tdb186s
restart: unless-stopped
network_mode: bridge
volumes:
- ${DOCKER_VOLUME_BASE}/tdb186s:/u01
- ./config:/u01/config
ports:
- "1521"
environment:
CONTAINER: 'FALSE’
INSTANCE_INIT: /u01/config
ORACLE_SID: TDB186S
Docker compose file
22.05.2019 SOUG Day - Oracle and Docker29
Oracle Enterprise User Security
• Oracle Database Container
• Demo Schema with VPD
• Oracle Unified Directory Container
• Directory with EUS suffix
• Initial start of containers
• Creating the DB / Directory
• Registration of the DB
• Configuration of EUS
• Available on GitHub
• https://github.com/oehrlis/docker/tre
e/master/samples/eus
22.05.2019 SOUG Day - Oracle and Docker30
Oracle DB and Docker best practice
22.05.2019 SOUG Day - Oracle and Docker31
• Always use the latest Docker version at least Docker CE 17.03
• btrfs is the recommended storage driver alternative overlay2
• Use latest images and build files
• Use data containers or volumes to ensure persistence
• Container are not VM’s
• Patching, HA, B&R and Security work differently
• Basically there is no reason to login to the container
Licensing
22.05.2019 SOUG Day - Oracle and Docker32
Licensing - Docker
22.05.2019 SOUG Day - Oracle and Docker33
• Docker Desktop
• Docker application for Mac or Windows
• Available as community and new enterprise version
• Docker Engine
• Available for different Linux distributions
• Community and enterprise version available
• Docker Enterprise
• Complete container platform based on Docker Engine
• Additional components like support, trusted
registry, orchestration, security etc.
Source: https://www.docker.com/products
Licensing - Oracle
22.05.2019 SOUG Day - Oracle and Docker34
Oracle Software
• Docker allows to limit resources like CPU, Memory, etc.
• Limitation not applicable in the context of Oracle licensing!
• CPU cores of the Docker hosts determine the required licenses
• Analogous challenge to virtualization
Possible solutions
• Using Oracle Express Edition 18c in the Docker Environment
• Oracle ULA (Unlimited License Agreement)
• Development of a dedicated docker infrastructure for Oracle software
Source: Oracle Inc.
Summary
22.05.2019 SOUG Day - Oracle and Docker35
Summary
• Oracle databases can be set up easily and quickly in containers.
• Docker based databases are not suited for high io performance.
• Use of Docker volumes is mandatory to ensures data persistence.
• The development of clear use cases and suitable architecture is a prerequisite.
• As with virtualization, licensing remains one of the major challenges.
22.05.2019 SOUG Day - Oracle and Docker36
BASEL | BERN | BRUGG | BUKAREST | DÜSSELDORF | FRANKFURT A.M. | FREIBURG I.BR. | GENF
HAMBURG | KOPENHAGEN | LAUSANNE | MANNHEIM | MÜNCHEN | STUTTGART | WIEN | ZÜRICH
Question and answers…
Stefan Oehrli
Solution Manager / Trivadis Partner
Tel.: +41 58 459 55 55
stefan.oehrli@trivadis.com
@stefanoehrli www.oradba.ch https://url.oradba.ch/SOUG1905
Oracle and Docker

More Related Content

What's hot

TechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - Trivadis
TechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - TrivadisTechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - Trivadis
TechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - TrivadisTrivadis
 
SOUG Day Oracle 21c New Security Features
SOUG Day Oracle 21c New Security FeaturesSOUG Day Oracle 21c New Security Features
SOUG Day Oracle 21c New Security FeaturesStefan Oehrli
 
IaC MeetUp Active Directory Setup for Oracle Security LAB
IaC MeetUp Active Directory Setup for Oracle Security LABIaC MeetUp Active Directory Setup for Oracle Security LAB
IaC MeetUp Active Directory Setup for Oracle Security LABStefan Oehrli
 
DOAG Oracle Unified Audit in Multitenant Environments
DOAG Oracle Unified Audit in Multitenant EnvironmentsDOAG Oracle Unified Audit in Multitenant Environments
DOAG Oracle Unified Audit in Multitenant EnvironmentsStefan Oehrli
 
Oracle Cloud deployment with Terraform
Oracle Cloud deployment with TerraformOracle Cloud deployment with Terraform
Oracle Cloud deployment with TerraformStefan Oehrli
 
SOUG Oracle Unified Audit for Multitenant Databases
SOUG Oracle Unified Audit for Multitenant DatabasesSOUG Oracle Unified Audit for Multitenant Databases
SOUG Oracle Unified Audit for Multitenant DatabasesStefan Oehrli
 
Security Best Practice: Oracle passwords, but secure!
Security Best Practice: Oracle passwords, but secure!Security Best Practice: Oracle passwords, but secure!
Security Best Practice: Oracle passwords, but secure!Stefan Oehrli
 
MythBusters Globalization Support - Avoid Data Corruption
MythBusters Globalization Support - Avoid Data CorruptionMythBusters Globalization Support - Avoid Data Corruption
MythBusters Globalization Support - Avoid Data CorruptionChristian Gohmann
 
AUSOUG Oracle Password Security
AUSOUG Oracle Password SecurityAUSOUG Oracle Password Security
AUSOUG Oracle Password SecurityStefan Oehrli
 
REST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using RESTREST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using RESTChristian Gohmann
 
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...Trivadis
 
Trivadis TechEvent 2017 How modern DBAs can use our efficient Toolbox by Rola...
Trivadis TechEvent 2017 How modern DBAs can use our efficient Toolbox by Rola...Trivadis TechEvent 2017 How modern DBAs can use our efficient Toolbox by Rola...
Trivadis TechEvent 2017 How modern DBAs can use our efficient Toolbox by Rola...Trivadis
 
Oracle Unified Directory. Lessons learnt. Is it ready for a move from OID? (O...
Oracle Unified Directory. Lessons learnt. Is it ready for a move from OID? (O...Oracle Unified Directory. Lessons learnt. Is it ready for a move from OID? (O...
Oracle Unified Directory. Lessons learnt. Is it ready for a move from OID? (O...Andrejs Prokopjevs
 
12 Things about Oracle WebLogic Server 12c
12 Things	 about Oracle WebLogic Server 12c12 Things	 about Oracle WebLogic Server 12c
12 Things about Oracle WebLogic Server 12cGuatemala User Group
 
Docker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsDocker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsZohar Elkayam
 
OOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architectureOOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architecturePini Dibask
 
Oracle virtualbox basic to rac attack
Oracle virtualbox basic to rac attackOracle virtualbox basic to rac attack
Oracle virtualbox basic to rac attackBobby Curtis
 
Create non-cdb (traditional) oracle database 12c on windows
Create non-cdb (traditional) oracle database 12c on windowsCreate non-cdb (traditional) oracle database 12c on windows
Create non-cdb (traditional) oracle database 12c on windowsBiju Thomas
 
Oracle Database on Docker - Best Practices
Oracle Database on Docker - Best PracticesOracle Database on Docker - Best Practices
Oracle Database on Docker - Best Practicesgvenzl
 

What's hot (20)

TechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - Trivadis
TechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - TrivadisTechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - Trivadis
TechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - Trivadis
 
SOUG Day Oracle 21c New Security Features
SOUG Day Oracle 21c New Security FeaturesSOUG Day Oracle 21c New Security Features
SOUG Day Oracle 21c New Security Features
 
IaC MeetUp Active Directory Setup for Oracle Security LAB
IaC MeetUp Active Directory Setup for Oracle Security LABIaC MeetUp Active Directory Setup for Oracle Security LAB
IaC MeetUp Active Directory Setup for Oracle Security LAB
 
DOAG Oracle Unified Audit in Multitenant Environments
DOAG Oracle Unified Audit in Multitenant EnvironmentsDOAG Oracle Unified Audit in Multitenant Environments
DOAG Oracle Unified Audit in Multitenant Environments
 
Oracle Cloud deployment with Terraform
Oracle Cloud deployment with TerraformOracle Cloud deployment with Terraform
Oracle Cloud deployment with Terraform
 
SOUG Oracle Unified Audit for Multitenant Databases
SOUG Oracle Unified Audit for Multitenant DatabasesSOUG Oracle Unified Audit for Multitenant Databases
SOUG Oracle Unified Audit for Multitenant Databases
 
Security Best Practice: Oracle passwords, but secure!
Security Best Practice: Oracle passwords, but secure!Security Best Practice: Oracle passwords, but secure!
Security Best Practice: Oracle passwords, but secure!
 
MythBusters Globalization Support - Avoid Data Corruption
MythBusters Globalization Support - Avoid Data CorruptionMythBusters Globalization Support - Avoid Data Corruption
MythBusters Globalization Support - Avoid Data Corruption
 
AUSOUG Oracle Password Security
AUSOUG Oracle Password SecurityAUSOUG Oracle Password Security
AUSOUG Oracle Password Security
 
REST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using RESTREST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using REST
 
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
 
Postgre sql best_practices
Postgre sql best_practicesPostgre sql best_practices
Postgre sql best_practices
 
Trivadis TechEvent 2017 How modern DBAs can use our efficient Toolbox by Rola...
Trivadis TechEvent 2017 How modern DBAs can use our efficient Toolbox by Rola...Trivadis TechEvent 2017 How modern DBAs can use our efficient Toolbox by Rola...
Trivadis TechEvent 2017 How modern DBAs can use our efficient Toolbox by Rola...
 
Oracle Unified Directory. Lessons learnt. Is it ready for a move from OID? (O...
Oracle Unified Directory. Lessons learnt. Is it ready for a move from OID? (O...Oracle Unified Directory. Lessons learnt. Is it ready for a move from OID? (O...
Oracle Unified Directory. Lessons learnt. Is it ready for a move from OID? (O...
 
12 Things about Oracle WebLogic Server 12c
12 Things	 about Oracle WebLogic Server 12c12 Things	 about Oracle WebLogic Server 12c
12 Things about Oracle WebLogic Server 12c
 
Docker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsDocker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOps
 
OOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architectureOOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architecture
 
Oracle virtualbox basic to rac attack
Oracle virtualbox basic to rac attackOracle virtualbox basic to rac attack
Oracle virtualbox basic to rac attack
 
Create non-cdb (traditional) oracle database 12c on windows
Create non-cdb (traditional) oracle database 12c on windowsCreate non-cdb (traditional) oracle database 12c on windows
Create non-cdb (traditional) oracle database 12c on windows
 
Oracle Database on Docker - Best Practices
Oracle Database on Docker - Best PracticesOracle Database on Docker - Best Practices
Oracle Database on Docker - Best Practices
 

Similar to Oracle and Docker

2014, April 15, Atlanta Java Users Group
2014, April 15, Atlanta Java Users Group2014, April 15, Atlanta Java Users Group
2014, April 15, Atlanta Java Users GroupTodd Fritz
 
TechEvent 2019: DB, CMU and EUS engineering with vagrant; Stefan Oehrli - Tri...
TechEvent 2019: DB, CMU and EUS engineering with vagrant; Stefan Oehrli - Tri...TechEvent 2019: DB, CMU and EUS engineering with vagrant; Stefan Oehrli - Tri...
TechEvent 2019: DB, CMU and EUS engineering with vagrant; Stefan Oehrli - Tri...Trivadis
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and MicroserviceSamuel Chow
 
Docker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSDocker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSFrank Munz
 
Oracle Database 18c Docker.pdf
Oracle Database 18c Docker.pdfOracle Database 18c Docker.pdf
Oracle Database 18c Docker.pdfYossi Nixon
 
Docker in the Oracle Universe / WebLogic 12c / OFM 12c
Docker in the Oracle Universe / WebLogic 12c / OFM 12cDocker in the Oracle Universe / WebLogic 12c / OFM 12c
Docker in the Oracle Universe / WebLogic 12c / OFM 12cFrank Munz
 
Lessons Learned Running Hadoop and Spark in Docker Containers
Lessons Learned Running Hadoop and Spark in Docker ContainersLessons Learned Running Hadoop and Spark in Docker Containers
Lessons Learned Running Hadoop and Spark in Docker ContainersBlueData, Inc.
 
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...Lucas Jellema
 
Practical guide to Oracle Virtual environments
Practical guide to Oracle Virtual environmentsPractical guide to Oracle Virtual environments
Practical guide to Oracle Virtual environmentsNelson Calero
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker, Inc.
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with DockerGeeta Vinnakota
 
On CloudStack, Docker, Kubernetes, and Big Data…Oh my ! By Sebastien Goasguen...
On CloudStack, Docker, Kubernetes, and Big Data…Oh my ! By Sebastien Goasguen...On CloudStack, Docker, Kubernetes, and Big Data…Oh my ! By Sebastien Goasguen...
On CloudStack, Docker, Kubernetes, and Big Data…Oh my ! By Sebastien Goasguen...Radhika Puthiyetath
 
Sebastien goasguen cloud stack and docker
Sebastien goasguen   cloud stack and dockerSebastien goasguen   cloud stack and docker
Sebastien goasguen cloud stack and dockerShapeBlue
 
Intro to Docker Containers and the Oracle Platform – Database, WebLogic &Clo...
 Intro to Docker Containers and the Oracle Platform – Database, WebLogic &Clo... Intro to Docker Containers and the Oracle Platform – Database, WebLogic &Clo...
Intro to Docker Containers and the Oracle Platform – Database, WebLogic &Clo...Lucas Jellema
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochranedotCloud
 

Similar to Oracle and Docker (20)

Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
2014, April 15, Atlanta Java Users Group
2014, April 15, Atlanta Java Users Group2014, April 15, Atlanta Java Users Group
2014, April 15, Atlanta Java Users Group
 
TechEvent 2019: DB, CMU and EUS engineering with vagrant; Stefan Oehrli - Tri...
TechEvent 2019: DB, CMU and EUS engineering with vagrant; Stefan Oehrli - Tri...TechEvent 2019: DB, CMU and EUS engineering with vagrant; Stefan Oehrli - Tri...
TechEvent 2019: DB, CMU and EUS engineering with vagrant; Stefan Oehrli - Tri...
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and Microservice
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
Docker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSDocker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCS
 
Oracle Database 18c Docker.pdf
Oracle Database 18c Docker.pdfOracle Database 18c Docker.pdf
Oracle Database 18c Docker.pdf
 
Docker in the Oracle Universe / WebLogic 12c / OFM 12c
Docker in the Oracle Universe / WebLogic 12c / OFM 12cDocker in the Oracle Universe / WebLogic 12c / OFM 12c
Docker in the Oracle Universe / WebLogic 12c / OFM 12c
 
Lessons Learned Running Hadoop and Spark in Docker Containers
Lessons Learned Running Hadoop and Spark in Docker ContainersLessons Learned Running Hadoop and Spark in Docker Containers
Lessons Learned Running Hadoop and Spark in Docker Containers
 
Docker handons-workshop-for-charity
Docker handons-workshop-for-charityDocker handons-workshop-for-charity
Docker handons-workshop-for-charity
 
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
Introduction into Docker Containers, the Oracle Platform and the Oracle (Nati...
 
Practical guide to Oracle Virtual environments
Practical guide to Oracle Virtual environmentsPractical guide to Oracle Virtual environments
Practical guide to Oracle Virtual environments
 
Docker
DockerDocker
Docker
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
On CloudStack, Docker, Kubernetes, and Big Data…Oh my ! By Sebastien Goasguen...
On CloudStack, Docker, Kubernetes, and Big Data…Oh my ! By Sebastien Goasguen...On CloudStack, Docker, Kubernetes, and Big Data…Oh my ! By Sebastien Goasguen...
On CloudStack, Docker, Kubernetes, and Big Data…Oh my ! By Sebastien Goasguen...
 
Sebastien goasguen cloud stack and docker
Sebastien goasguen   cloud stack and dockerSebastien goasguen   cloud stack and docker
Sebastien goasguen cloud stack and docker
 
Intro to Docker Containers and the Oracle Platform – Database, WebLogic &Clo...
 Intro to Docker Containers and the Oracle Platform – Database, WebLogic &Clo... Intro to Docker Containers and the Oracle Platform – Database, WebLogic &Clo...
Intro to Docker Containers and the Oracle Platform – Database, WebLogic &Clo...
 
Django and Docker
Django and DockerDjango and Docker
Django and Docker
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
 

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Oracle and Docker

  • 1. BASEL | BERN | BRUGG | BUKAREST | DÜSSELDORF | FRANKFURT A.M. | FREIBURG I.BR. | GENF HAMBURG | KOPENHAGEN | LAUSANNE | MANNHEIM | MÜNCHEN | STUTTGART | WIEN | ZÜRICH www.oradba.ch@stefanoehrli Oracle and Docker Oracle Databases in Docker Container Stefan Oehrli
  • 2. BASEL | BERN | BRUGG | BUKAREST | DÜSSELDORF | FRANKFURT A.M. | FREIBURG I.BR. | GENF HAMBURG | KOPENHAGEN | LAUSANNE | MANNHEIM | MÜNCHEN | STUTTGART | WIEN | ZÜRICH Stefan Oehrli Platform Architect, Trainer and Partner at Trivadis • Since 1997 active in various IT areas • Since 2008 with Trivadis AG • More than 20 years of experience in Oracle databases Focus: Protecting data and operating databases securely • Security assessments and reviews • Database security concepts and their implementation • Oracle Backup & Recovery concepts and troubleshooting • Oracle Enterprise User Security, Advanced Security, Database Vault, … • Oracle Directory Services Co-author of the book The Oracle DBA (Hanser, 2016/07) @stefanoehrli www.oradba.ch
  • 3. Agenda 22.05.2019 SOUG Day - Oracle and Docker3 • Introduction • Docker images, container and volumes • Database image • Database container • Use cases • Licensing • Summary
  • 4. Introduction 22.05.2019 SOUG Day - Oracle and Docker4
  • 5. What is Docker? 22.05.2019 SOUG Day - Oracle and Docker5 • One software container platform • Developed from Linux / Linux containers • Available... • ... for Linux, Mac OS and Windows • ... as Community Edition (CE) and Enterprise Edition (EE) • Part of the Linux Open Container Initiative (OCI) • Docker is not the only implementation of Linux containers • Core OS / Rkt, LXC Linux Containers, OpenVZ, Mesos Containerizer,... • Docker has the largest market share • Increase the interchangeability and reproducibility of objectives
  • 6. Oracle support for Docker 22.05.2019 SOUG Day - Oracle and Docker6 • Various Oracle products are supported and certified for Docker • MOS Note 2216342.1 Oracle Support for Database Running on Docker • MOS Note 2017945.1 Support Information for Oracle WebLogic Server and Oracle Fusion Middleware Running in Docker Containers • Container Oracle Linux 7 / UEK4 Kernel or Red Hat Enterprise Linux 7 as base image • Oracle sources for images or official build sources • Oracle Docker Build Sources on GitHub https://github.com/oracle/docker-images • Oracle Container Registry https://container-registry.oracle.com • Oracle Container Engine and Registry https://developer.oracle.com/containers • Oracle auf Docker Hub https://hub.docker.com/publishers/oracle
  • 7. What else about containers? 22.05.2019 SOUG Day - Oracle and Docker7 • There is no such thing as THE container. • Single Process / Service • No replacement for VMs • Small space requirement • Dealing with identities and sensitive data • Dealing with data persistent • Understanding how to build containers, but • ...not every container has to be adapted individually • ...use available and trusted container repositories Source: Volkswagen Advertising (June 2016)
  • 8. Docker images, container and volumes 22.05.2019 SOUG Day - Oracle and Docker8
  • 9. Virtualization • Use of common infrastructure • each VM is a "server • guest operating system • Software and libraries • uses • Redundancy • Effort for setting up the VMs 22.05.2019 SOUG Day - Oracle and Docker9
  • 10. Docker container • Use of common infrastructure • a host operating system • Applications are "packaged • Only necessary libraries and software components • Use of existing images • Slim • Reproducible • Because automatically created • Docker Image are immutable 22.05.2019 SOUG Day - Oracle and Docker10
  • 11. Docker components 22.05.2019 SOUG Day - Oracle and Docker11
  • 12. Volumes • Docker Image are immutable • Changes only in a new image • A container is based on an image • Top Layer read/write • No persistence over the lifetime of the container • Securing data persistence through volumes • Data is outside the container • Lifecycle… • New image • New container • current volume 22.05.2019 SOUG Day - Oracle and Docker12
  • 13. Database image 22.05.2019 SOUG Day - Oracle and Docker13
  • 14. • Deploy the Docker Build scripts e.g. https://github.com/oehrlis/docker • Docker environment e.g. Docker Desktop for Mac OS • Deploying Oracle Software • Oracle Database Enterprise Edition 18c (18.3.0.0) • Oracle Database Release Update 18.6.0.0.0 (Patch 29301631) • Oracle OJVM Release Update 18.6.0.0.190416 (Patch 29249584) • OPatch 12.2.0.1.17 for DB 18.x releases (APR 2019) (Patch 6880880) • Deploying the Docker Base Image docker pull oraclelinux:7-slim git clone https://github.com/oehrlis/docker Prerequisites 22.05.2019 SOUG Day - Oracle and Docker14
  • 15. • Dockerfile uses Multi-Stage Build • Available from Docker 17.05 • Use of multiple FROM statements • Splitting the build process into several sections • Reduction of image size • software is part of the build context and is copied • Optional download of the software from a local web server • Start Docker Build with the command docker build cd docker/OracleDatabase/18.6.0.0 docker build -t oracle/database:18.6.0.0 . Build image 22.05.2019 SOUG Day - Oracle and Docker15
  • 16. Dockerfile • Base image • Setting the environment • OS configuration of the basic image • Build image • Copying Oracle binaries and patch files • Installing the Oracle software • Installation of the Oracle Patch, Trivadis BasenvTM • Target image • Copying the software from the build image • Completion of the installation (root.sh scripts) • Definition of ports, volume and start script 22.05.2019 SOUG Day - Oracle and Docker16
  • 17. Image build scripts 22.05.2019 SOUG Day - Oracle and Docker17 Dockerfile uses different scripts for configuring the image • 00_setup_oradba_init.sh Installation of the latest OraDBA Init scripts • 01_setup_os_db.sh OS Setup Configuration • Users, create groups • Install YUM Software Packages • 10_setup_db_18.6.sh Installation of the Oracle Binaries • Oracle Basis Release • Release Updates and Oracle JVM Update • 20_setup_basenv.sh Installation of Trivadis BasEnvTM • 5n_xxxxx_database.sh Various scripts for configuring the container
  • 18. Database container 22.05.2019 SOUG Day - Oracle and Docker18
  • 19. • Control of the container log and status of the DB with docker logs -f tdb186s • Starting or instantiating an Oracle database container with docker run • specify host (--hostname) and container name (--name) • Volume for the database files • Oracle instance name as environment variable ORACLE_SID • Executing the container command CMD docker run --detach --hostname tdb186s --name tdb186s --volume /data/docker/volumes/tdb186s:/u01 -p 1521:1521 -p 5500:5500 -e ORACLE_SID=TDB186S oracle/database:18.6.0.0 Oracle database container 22.05.2019 SOUG Day - Oracle and Docker19
  • 20. Procedure for container start 22.05.2019 SOUG Day - Oracle and Docker20
  • 21. Container Scripts 22.05.2019 SOUG Day - Oracle and Docker21 • 50_run_database.sh checks the volume and starts the database with… • 50_start_database.sh If no database exists, the script • 52_create_database.sh is called • 50_start_database.sh starts the listener and the database instance • 52_create_database.sh creates a database with the dbca. Base parameters can be adjusted with environment variables • 55_config_database.sh checks whether configuration files (*.sh or *.sql) are present in the directory ${INSTANCE_INIT}/setup or ${INSTANCE_INIT}/startup respectively. • 55_check_database.sh is used for the health check of the Docker container and checks the status of the database instance
  • 22. Container variables 22.05.2019 SOUG Day - Oracle and Docker22 Variable Purpose ORACLE_SID Oracle SID or database name. Default value is TDB186S CONTAINER Flag for creating an Oracle container database Default value is FALSE ORACLE_PDB Oracle PDB Name. Default value PDB1 ORACLE CHARACTERSET Oracle character set. Default value AL32UTF8 ORACLE_PWD Password for the SYS user. The default password is generated and stored in the admin directory INSTANCE_INIT Directory for the instance configuration files ORADBA_RSP Various variables for the adaptation of the dbca template
  • 23. Completion of initial container start 22.05.2019 SOUG Day - Oracle and Docker23 • At the first start, 50_run_database.sh creates a database. • Checking the output of 50_run_database.sh with docker logs tdb186s
  • 24. Access to the database container 22.05.2019 SOUG Day - Oracle and Docker24 • Access for applications via exported ports e.g. 1521 • Different whether on Windows, MacOS and Linux • Docker runs on Linux "native" only • Access via command line with docker exec and sqlplus, bash etc.
  • 25. Access to the database container 22.05.2019 SOUG Day - Oracle and Docker25 • Access for applications via exported ports e.g. 1521 • Different whether on Windows, MacOS and Linux • Docker runs on Linux "native" only • Access via command line with docker exec and sqlplus, bash etc.
  • 26. Use cases 22.05.2019 SOUG Day - Oracle and Docker26
  • 27. Use Cases 22.05.2019 SOUG Day - Oracle and Docker27 • Oracle databases in containers can also be used in a microservice environment • Corresponding build and configuration scripts must be developed individually • Real Application Cluster (RAC) for test and development officially supported • Oracle example on GitHub https://github.com/oracle/docker-images • Use of Oracle Container • Docker container contains single-PDB • PDB can be plugged/unplugged relatively easily • Using Docker Compose • No manual docker commands • Link container • Establishment of a private network
  • 28. • Shutting down either by stop or down • down will remove the container • stop just stops the service / container • Define all parameter, volumes, network etc. in a YAML file • Default name is docker-compose.yml • Can contain multiple containers • Started and managed via docker-compose command or regular docker command • Start the container in background / detach docker-compose up -d docker-compose down Docker compose 22.05.2019 SOUG Day - Oracle and Docker28
  • 29. • Example docker-compose.yml file for tdb186s • YAML, watches out for the correct whitespace characters tdb186s: image: ${DOCKER_USER}/${DOCKER_REPO}:18.6.0.0 container_name: tdb186s hostname: tdb186s restart: unless-stopped network_mode: bridge volumes: - ${DOCKER_VOLUME_BASE}/tdb186s:/u01 - ./config:/u01/config ports: - "1521" environment: CONTAINER: 'FALSE’ INSTANCE_INIT: /u01/config ORACLE_SID: TDB186S Docker compose file 22.05.2019 SOUG Day - Oracle and Docker29
  • 30. Oracle Enterprise User Security • Oracle Database Container • Demo Schema with VPD • Oracle Unified Directory Container • Directory with EUS suffix • Initial start of containers • Creating the DB / Directory • Registration of the DB • Configuration of EUS • Available on GitHub • https://github.com/oehrlis/docker/tre e/master/samples/eus 22.05.2019 SOUG Day - Oracle and Docker30
  • 31. Oracle DB and Docker best practice 22.05.2019 SOUG Day - Oracle and Docker31 • Always use the latest Docker version at least Docker CE 17.03 • btrfs is the recommended storage driver alternative overlay2 • Use latest images and build files • Use data containers or volumes to ensure persistence • Container are not VM’s • Patching, HA, B&R and Security work differently • Basically there is no reason to login to the container
  • 32. Licensing 22.05.2019 SOUG Day - Oracle and Docker32
  • 33. Licensing - Docker 22.05.2019 SOUG Day - Oracle and Docker33 • Docker Desktop • Docker application for Mac or Windows • Available as community and new enterprise version • Docker Engine • Available for different Linux distributions • Community and enterprise version available • Docker Enterprise • Complete container platform based on Docker Engine • Additional components like support, trusted registry, orchestration, security etc. Source: https://www.docker.com/products
  • 34. Licensing - Oracle 22.05.2019 SOUG Day - Oracle and Docker34 Oracle Software • Docker allows to limit resources like CPU, Memory, etc. • Limitation not applicable in the context of Oracle licensing! • CPU cores of the Docker hosts determine the required licenses • Analogous challenge to virtualization Possible solutions • Using Oracle Express Edition 18c in the Docker Environment • Oracle ULA (Unlimited License Agreement) • Development of a dedicated docker infrastructure for Oracle software Source: Oracle Inc.
  • 35. Summary 22.05.2019 SOUG Day - Oracle and Docker35
  • 36. Summary • Oracle databases can be set up easily and quickly in containers. • Docker based databases are not suited for high io performance. • Use of Docker volumes is mandatory to ensures data persistence. • The development of clear use cases and suitable architecture is a prerequisite. • As with virtualization, licensing remains one of the major challenges. 22.05.2019 SOUG Day - Oracle and Docker36
  • 37. BASEL | BERN | BRUGG | BUKAREST | DÜSSELDORF | FRANKFURT A.M. | FREIBURG I.BR. | GENF HAMBURG | KOPENHAGEN | LAUSANNE | MANNHEIM | MÜNCHEN | STUTTGART | WIEN | ZÜRICH Question and answers… Stefan Oehrli Solution Manager / Trivadis Partner Tel.: +41 58 459 55 55 stefan.oehrli@trivadis.com @stefanoehrli www.oradba.ch https://url.oradba.ch/SOUG1905