Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GA release #13

Merged
merged 68 commits into from
Apr 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
f7e115c
Build full image
gvenzl Jan 24, 2021
50246c2
Introduce password reset (ER #2)
gvenzl Jan 25, 2021
ab6e8c2
Introduce healthcheck (ER #1)
gvenzl Jan 25, 2021
7492dec
Shutdown listener before database
gvenzl Jan 25, 2021
5c3726c
Fix healthcheck typo
gvenzl Jan 25, 2021
5f03d32
Update description header
gvenzl Jan 25, 2021
bc7f413
Use build args for Dockerfile
gvenzl Jan 26, 2021
c7cf9b4
Update Description
gvenzl Jan 26, 2021
75da139
Add password profile, restructure db file sizes
gvenzl Jan 28, 2021
8612ea4
Transition to OL8 slim
gvenzl Jan 28, 2021
ca4e81b
Introducing a image build script
gvenzl Jan 30, 2021
ed85a1b
Full completed, normal and slim TBD
gvenzl Jan 31, 2021
411a4d4
Update ReadMe
gvenzl Jan 31, 2021
fc1138f
Add test scripts
gvenzl Jan 31, 2021
2829308
Add .gitignore
gvenzl Jan 31, 2021
66bc38c
Merge branch 'main' into development
gvenzl Jan 31, 2021
76a9406
Print DATABASE IS READY TO USE only after healthcheck succeeded (ER #6)
gvenzl Jan 31, 2021
1ee4ac1
18c Dockerfile
gvenzl Feb 1, 2021
dcfb11d
Full install DB configured
gvenzl Feb 7, 2021
dc7b9d5
Add checksum verification for 18c
gvenzl Feb 7, 2021
554dc76
Add parameter to ignore checksum
gvenzl Feb 8, 2021
11cc396
18c full install
gvenzl Feb 13, 2021
31d697c
Remove recovery_dest
gvenzl Feb 13, 2021
c4f640b
Merge branch 'development' into 18c-full
gvenzl Feb 13, 2021
70a9c51
Remove install log files
gvenzl Feb 13, 2021
639466d
Remove installation phase only dependencies
gvenzl Feb 14, 2021
3f763bc
Update ORACLE_HOME in .bash_profile
gvenzl Feb 14, 2021
199e723
Resize redo logs
gvenzl Feb 19, 2021
0bec3bb
Include network files
gvenzl Feb 20, 2021
827a8e8
ER #8: Set password only at initialization
gvenzl Feb 20, 2021
62e3b94
Use entrypoint rather cmd
gvenzl Feb 20, 2021
aaf9364
Add build duration to build script
gvenzl Feb 21, 2021
6391ef4
Compress data files in image
gvenzl Feb 21, 2021
93b19c1
Implemented ORACLE_RANDOM_PASSWORD ER #9
gvenzl Feb 21, 2021
e6bdd36
Update .gitignore
gvenzl Feb 28, 2021
0c25e31
rename entrypoint script
gvenzl Mar 1, 2021
3d91eeb
Implement ER #4 - _FILE variable support
gvenzl Mar 1, 2021
dd6914b
Make zip and gzip a runtime requirement
gvenzl Mar 6, 2021
c9a5616
Make sure PWD is treated as a string
gvenzl Mar 6, 2021
449aec1
Add support for custom scripts ER #3
gvenzl Mar 7, 2021
9aa33e8
Update ReadMe (WIP)
gvenzl Mar 7, 2021
7d8513e
reformat indent
gvenzl Mar 7, 2021
3bd3a0e
Reorg
gvenzl Mar 14, 2021
0cc71f6
Build and container tests for 11g and 18c
gvenzl Mar 21, 2021
7ec10e2
Update UNDO size
gvenzl Mar 27, 2021
5e6a366
Update ReadMe
gvenzl Mar 27, 2021
a0ead78
Introduce tags
gvenzl Mar 27, 2021
5d10073
Add slim builds for 11g
gvenzl Mar 27, 2021
d204559
Merge branch 'main' into development
gvenzl Mar 27, 2021
b9add86
Remove comment line
gvenzl Mar 27, 2021
8a042bb
Merge branch 'main' into development
gvenzl Mar 27, 2021
2fba379
Update ReadMe
gvenzl Mar 27, 2021
9fe72ab
Merge branch 'main' into development
gvenzl Mar 27, 2021
8051974
fix typo in ReadMe
gvenzl Mar 27, 2021
83571f1
Merge branch 'main' into development
gvenzl Mar 27, 2021
69084fe
Remove MKL requirement
gvenzl Mar 30, 2021
7298f54
Remove sysconfig file
gvenzl Mar 30, 2021
5d1f8db
Clean up DB components
gvenzl Apr 3, 2021
8774c80
Merge branch 'no-mkl' into development
gvenzl Apr 3, 2021
79a2bb0
Update tests and retries
gvenzl Apr 3, 2021
2e7fd4c
Update all references to REGULAR images
gvenzl Apr 3, 2021
2ea1270
Clean zip files in lib dir
gvenzl Apr 10, 2021
1890013
Remove not needed deps from fortran runtime
gvenzl Apr 10, 2021
fd76cfb
Remove inventory directory
gvenzl Apr 10, 2021
832aea6
Move zip file to ORACLE_BASE for host-only vols
gvenzl Apr 10, 2021
9510e2d
Use SHRINK SPACE for TEMP files
gvenzl Apr 10, 2021
044d7f1
Exit SQL*Plus on SQL errors
gvenzl Apr 10, 2021
cada4a7
Add tag and upload scripts
gvenzl Apr 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile.11202
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
# Database configuration is as per default installation, except for the
# location of the fast_recovery_area and redo logs.
#
# NORMAL: Following functionalities have been removed:
# REGULAR: Following functionalities have been removed:
# * gcc & make (needed for native PL/SQL execution, etc.)
# * APEX
#
# SLIM: Following functionalities have been removed:
# * Everything that has been removed in the NORMAL image, plus:
# * Everything that has been removed in the REGULAR image, plus:
# * Oracle Text
#
# Copyright 2021 Gerald Venzl
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ The execution order and implications are the same as with the [Initialization sc

# Image flavors

| Flavor | Extension | Description | Use cases |
| -------| --------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------|
| Slim | `-slim` | An image focussed on smallest possible image size instead of additional functionality. | Wherever small images sizes are important but advanced functionality of Oracle Database is not needed. |
| Normal | [None] | A well-balanced image between image size and functionality. Recommended for most use cases. | Recommended for most use cases. |
| Full | `-full` | An image containing all functionality as provided by the Oracle Database installation. | Best for extensions and/or customizations. |
| Flavor | Extension | Description | Use cases |
| --------| --------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------|
| Slim | `-slim` | An image focussed on smallest possible image size instead of additional functionality. | Wherever small images sizes are important but advanced functionality of Oracle Database is not needed. |
| Regular | [None] | A well-balanced image between image size and functionality. Recommended for most use cases. | Recommended for most use cases. |
| Full | `-full` | An image containing all functionality as provided by the Oracle Database installation. | Best for extensions and/or customizations. |

## Full image flavor

Expand All @@ -236,19 +236,24 @@ A couple of modifications have been performed to make the installation more suit
* The `REDO` logs have been located into `$ORACLE_BASE/oradata/$ORACLE_SID/` (11gR2 image)
* The fast recovery area has been removed (11gR2 images)

## Normal image flavor
## Regular image flavor

The normal image has all customizations that the full image has.
The regular image has all customizations that the full image has.
Additionally, it also includes the following changes:

### Database components
* Oracle APEX has been removed (you can download and install the latest and greatest from [apex.oracle.com](https://apex.oracle.com), 11gR2 image)
* The `HR` schema and folder have been removed
* The JDBC drivers have been removed (`$ORACLE_HOME/jdbc`, `$ORACLE_HOME/jlib`, `$ORACLE_HOME/ucp`)
* The Oracle Database Assistants have been removed (`$ORACLE_HOME/assistants`)
* The Oracle Database Migration Assistant for Unicode has been removed (`$ORACLE_HOME/dmu`)
* The OPatch utility has been removed (`$ORACLE_HOME/OPatch`)
* The QOpatch utility has been removed (`$ORACLE_HOME/QOpatch`)

### Operating system

* The following Linux packages are not installed: `binutils`, `gcc`, `glibc`, `make` (11g R2)
* The jdbc drivers have been removed (`$ORACLE_HOME/jdbc`, `$ORACLE_HOME/jlib`)


### Data files

Expand All @@ -266,3 +271,4 @@ Additionally, it also includes the following changes:
* The `DEFAULT` profile has the following set:
* `FAILED_LOGIN_ATTEMPTS=UNLIMITED`
* `PASSWORD_LIFE_TIME=UNLIMITED`
* The Intel Math kernel libraries have been removed
8 changes: 4 additions & 4 deletions buildContainerImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
set -Eeuo pipefail

VERSION="18.4.0"
FLAVOR="NORMAL"
FLAVOR="REGULAR"
IMAGE_NAME="gvenzl/oracle-xe"
SKIP_CHECKSUM="false"

Expand All @@ -35,7 +35,7 @@ Builds a container image for Oracle Database XE.

Parameters:
-f: creates a 'full' image
-n: creates a normal image (default)
-n: creates a regular image (default)
-s: creates a 'slim' image
-v: version of Oracle Database XE to build
Choose one of: 11.2.0.2, 18.4.0
Expand Down Expand Up @@ -65,7 +65,7 @@ while getopts "hfnsv:io:" optname; do
FLAVOR="FULL"
;;
"n")
FLAVOR="NORMAL"
FLAVOR="REGULAR"
;;
"s")
FLAVOR="SLIM"
Expand Down Expand Up @@ -107,7 +107,7 @@ fi;

IMAGE_NAME="${IMAGE_NAME}:${VERSION}"

if [ "${FLAVOR}" != "NORMAL" ]; then
if [ "${FLAVOR}" != "REGULAR" ]; then
IMAGE_NAME="${IMAGE_NAME}-${FLAVOR,,}"
fi;

Expand Down
10 changes: 7 additions & 3 deletions container-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,14 @@ function setup_env_vars() {
# Create dbconfig directory structure
function create_dbconfig() {

if [ -f "${ORACLE_BASE}"/oradata/"${ORACLE_SID}".zip ]; then
if [ -f "${ORACLE_BASE}"/"${ORACLE_SID}".zip ]; then
echo "CONTAINER: uncompressing database data files, please wait..."
unzip "${ORACLE_BASE}"/oradata/"${ORACLE_SID}".zip -d "${ORACLE_BASE}"/oradata/ 1> /dev/null
rm "${ORACLE_BASE}"/oradata/"${ORACLE_SID}".zip
EXTRACT_START_TMS=$(date '+%s')
unzip "${ORACLE_BASE}"/"${ORACLE_SID}".zip -d "${ORACLE_BASE}"/oradata/ 1> /dev/null
EXTRACT_END_TMS=$(date '+%s')
EXTRACT_DURATION=$(( EXTRACT_END_TMS - EXTRACT_START_TMS ))
echo "CONTAINER: done uncompressing database data files, duration: ${EXTRACT_DURATION} seconds."
rm "${ORACLE_BASE}"/"${ORACLE_SID}".zip
fi;

mkdir -p "${ORACLE_BASE}/oradata/dbconfig/${ORACLE_SID}"
Expand Down
36 changes: 27 additions & 9 deletions install.11202.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,18 @@ set -Eeuo pipefail

echo "BUILDER: started"

# Build mode ("SLIM", "NORMAL", "FULL")
BUILD_MODE=${1:-"NORMAL"}
# Build mode ("SLIM", "REGULAR", "FULL")
BUILD_MODE=${1:-"REGULAR"}

echo "BUILDER: BUILD_MODE=${BUILD_MODE}"

# Set data file sizes
SYSTEM_SIZE=353
SYSAUX_SIZE=610
TEMP_SIZE=2
UNDO_SIZE=155
if [ "${BUILD_MODE}" == "FULL" ]; then
REDO_SIZE=50
elif [ "${BUILD_MODE}" == "NORMAL" ]; then
elif [ "${BUILD_MODE}" == "REGULAR" ]; then
REDO_SIZE=20
USERS_SIZE=10
elif [ "${BUILD_MODE}" == "SLIM" ]; then
Expand Down Expand Up @@ -117,6 +116,10 @@ echo "BUILDER: post config database steps"

# Perform further Database setup operations
su -p oracle -c "sqlplus -s / as sysdba" << EOF

-- Exit on any errors
WHENEVER SQLERROR EXIT SQL.SQLCODE

-- Enable remote HTTP access
EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);

Expand Down Expand Up @@ -159,9 +162,12 @@ rm "${ORACLE_BASE}"/oradata/"${ORACLE_SID}"/redo04.log
###################################

# If not building the FULL image, remove and shrink additional components
if [ "${BUILD_MODE}" == "NORMAL" ] || [ "${BUILD_MODE}" == "SLIM" ]; then
if [ "${BUILD_MODE}" == "REGULAR" ] || [ "${BUILD_MODE}" == "SLIM" ]; then
su -p oracle -c "sqlplus -s / as sysdba" << EOF

-- Exit on any errors
WHENEVER SQLERROR EXIT SQL.SQLCODE

-- Disable password profile checks
ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED PASSWORD_LIFE_TIME UNLIMITED;

Expand All @@ -181,8 +187,11 @@ EOF
if [ "${BUILD_MODE}" == "SLIM" ]; then
su -p oracle -c "sqlplus -s / as sysdba" << EOF

-- Remove XDB
SELECT '#TODO' FROM DUAL;
-- Exit on any errors
WHENEVER SQLERROR EXIT SQL.SQLCODE

-- Remove XDB
SELECT '#TODO' FROM DUAL;
EOF
# Spatial
# Text
Expand All @@ -192,6 +201,9 @@ EOF
# Shrink datafiles
su -p oracle -c "sqlplus -s / as sysdba" << EOF

-- Exit on any errors
WHENEVER SQLERROR EXIT SQL.SQLCODE

---------------------------
-- Shrink SYSAUX tablespace
---------------------------
Expand Down Expand Up @@ -225,7 +237,7 @@ EOF
-- Shrink TEMP tablespace
-------------------------

ALTER DATABASE TEMPFILE '${ORACLE_BASE}/oradata/${ORACLE_SID}/temp.dbf' RESIZE ${TEMP_SIZE}M;
ALTER TABLESPACE TEMP SHRINK SPACE;
ALTER DATABASE TEMPFILE '${ORACLE_BASE}/oradata/${ORACLE_SID}/temp.dbf'
AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED;

Expand Down Expand Up @@ -260,6 +272,10 @@ echo "BUILDER: graceful database shutdown"

# Shutdown database gracefully (listener is not yet running)
su -p oracle -c "sqlplus -s / as sysdba" << EOF

-- Exit on any errors
WHENEVER SQLERROR EXIT SQL.SQLCODE

-- Shutdown database gracefully
shutdown immediate;
exit;
Expand All @@ -272,6 +288,8 @@ EOF
echo "BUILDER: compressing database data files"
cd "${ORACLE_BASE}"/oradata
zip -r "${ORACLE_SID}".zip "${ORACLE_SID}"
chown oracle:dba "${ORACLE_SID}".zip
mv "${ORACLE_SID}".zip "${ORACLE_BASE}"/
rm -r "${ORACLE_SID}"
cd - 1> /dev/null

Expand Down Expand Up @@ -398,7 +416,7 @@ rm "${ORACLE_BASE}"/diag/tnslsnr/localhost/listener/metadata/*
rm -r "${ORACLE_BASE}"/oradiag_oracle/*

# Remove additional files for NOMRAL and SLIM builds
if [ "${BUILD_MODE}" == "NORMAL" ] || [ "${BUILD_MODE}" == "SLIM" ]; then
if [ "${BUILD_MODE}" == "REGULAR" ] || [ "${BUILD_MODE}" == "SLIM" ]; then

# Remove APEX directory
rm -r "${ORACLE_HOME}"/apex
Expand Down
Loading