Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Docker, let the database deployment be completed in a flash

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Guo Xurui, an expert on technology products of Waldorf.

Container technology is not the innovation of Docker, and some basic technologies that container technology depends on, such as namespace, cgroup, chroot and so on, are not the first of Docker.

The popularity of Docker depends largely on its concept of image. Docker redefines how applications are distributed in the cloud era through its concept of mirroring.

Docker makes it easy to build the environment in the process of software development, eliminates the problems caused by environmental inconsistencies in the process of software testing, and makes operation and deployment easy and fast.

As can be seen from Docker's logo: containers are containers, and our programs are packaged in containers; Docker is a porter who helps you transport packaged applications to all parts of the world and run everywhere.

In the article "you can see the sea over that mountain | Kubernetes makes DBA manage the database more elegantly", we discussed that during the deployment of the database, a series of prerequisites such as dependency packages, kernel parameters, users and groups, directories, and so on, all need to be operated manually or scripted by DBA, as well as subsequent database software installation, database creation and other work, resulting in a lot of repetitive and meaningless time and energy consumption. Docker image is to package all these configurations. An image is a ready-to-use application that can be easily distributed. When combined with a database, a mirror is a rapidly deployed and ready-to-use database.

Walker Technology keeps up with the development of the times, integrates container technology into database lifecycle management, and creates containerized cloud database RDS products. At the same time, it also actively gives back to the community and contributes a lot of experience in containerized database construction. This article will disclose the Docker image of Oracle Database version 11.2.0.4.0 that we have made.

Oracle officially provides some Oracle Docker image on Github, but not the 11g R2 version. Considering that there are still a large number of users using 11g R2, we have made version 11.2.0.4.0 of image with reference to the official 12.1 version of image, and have further enriched and standardized it, including:

Specify whether to turn on archiving

Specify SGA and PGA size (the official image specifies a fixed memory size. If you need to modify it, you need to manually adjust it after the database is created, so we have done the corresponding automation here)

Specify database roles, including primary and standby (official mirrors can only create primary databases. We also implement the logic of creating standby databases, but this part of the logic depends on the snapshot function provided by QCFS cloud storage of WorldCom Technology. Currently, it can only be implemented in QFusion 3.0 RDS database cloud platform)

Contains health checks for primary database instance status, standby database instance status and MRP recovery status

ONLINE REDO LOG automatically adjusts to 1G size to avoid frequent log switching

Set username and password to never expire (it is not secure, but this practice is adopted by most enterprise users)

Turn off the Concurrent Statistics Gathering function

TEMP tablespace is set to 30G size

SYSTEM tablespace is set to 1G size

SYSAUX tablespace is set to 1G size

UNDO tablespace is set to 10G size

Image download:

Click (here) to collapse or open

Examples of docker pull registry.cn-hangzhou.aliyuncs.com/woqutech/oracle-database-11.2.0.4.0-eeImage usage:

Click (here) to collapse or open

Create a database storage path:

Mkdir-p / data/oracledb

Start the Oracle database container:

Docker run-d-name oracledb\

-p 1521VR 1521\

-e ORACLE_SID=oracledb\

-e ORACLE_PWD=oracle\

-e ORACLE_CHARACTERSET=ZHS16GBK\

-e SGA_SIZE=8G\

-e PGA_SIZE=8G\

-e DB_ROLE=primary\

-e ENABLE_ARCH=true\

-v / data/oracledb:/opt/oracle/oradata\

Registry.cn-hangzhou.aliyuncs.com/woqutech/oracle-database-11.2.0.4.0-ee

Then you can access the database through port 1521! Enjoy it! PS: currently, the community version of Image can only set DB_ROLE to primary,standby and does not provide support. We put the Dockerfile of the image on Github, please keep an eye on this project.

Project link: https://github.com/woqutech/docker-images/tree/master/Oracle/11.2.0.4

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report