Sign inSign up

xebialabsunsupported/oracle

By xebialabsunsupported

Updated over 2 years ago

Oralce DBs required for XLR and XLD

Image
1

4.0K

xebialabsunsupported/oracle repository overview

Tag: 19.3.0-se2-xlr-prebuilt

As we do not have Oracle 19c docker image on public Docker hub, this image was created using following steps.

1.Base image was created using steps mentioned oracle git hub repo, image is 19c Standard edition : https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance cmd: ./buildContainerImage.sh -v 19.3.0 -s

2.Created container from base image using following command, to create PDB (Pluggable database)

docker run \
--name oracle19creal \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_PDB=orcl \
-e ORACLE_PWD=Test12345 \
-e ORACLE_MEM=4000 \
-e ORACLE_SID=XE \
-d \
oracle19c:xlr

3.It takes 10+ mins for container to create a schema and come to healthy state, after container is up created XLR schema as mentioned in XebiaLabs docs

ALTER SYSTEM SET disk_asynch_io = FALSE SCOPE = SPFILE;

CREATE USER xlarchive IDENTIFIED BY xlarchive;
GRANT CONNECT,RESOURCE TO xlarchive;
GRANT CREATE SESSION TO xlarchive;

CREATE USER xlrelease IDENTIFIED BY xlrelease;
GRANT CONNECT, RESOURCE TO xlrelease;
GRANT CREATE VIEW TO xlrelease;


ALTER USER xlrelease quota unlimited on USERS;
ALTER USER xlarchive quota unlimited on USERS;

GRANT SELECT ON SYS.DBA_RECYCLEBIN TO XLRELEASE;
GRANT SELECT ON SYS.DBA_RECYCLEBIN TO XLARCHIVE;

– Liquibase needs to access the DBA_RECYCLEBIN table so we can automatically handle the case where constraints are deleted and restored. Since Oracle doesn't properly restore the original table names referenced in the constraint, we use the information from the DBA_RECYCLEBIN to automatically correct this issue.
GRANT SELECT ON SYS.DBA_RECYCLEBIN TO xlrelease;
save /dblibs/touch.log create;

4.Committed container with XLR prebuilt schema back to image.

5.Tagged and pushed image to Xebialabsunsupported docker registry in this repo

6.To Create a container from this image just use proper port mapping and within a minute you will have running Oracle Database 19c(19.3.0) Standard Edition 2 container with prebuilt XLR schema. cmd eg.

docker run \
--name oracle19slim_prebuilt \
-p 1521:1521 -p 5500:5500 \
-d \
xebialabsunsupported/oracle:19.3.0-se2-xlr-prebuilt

7.The Oracle Database "SYS, SYSTEM and PDB_ADMIN" password is "Test12345" as mentioned in environmental variable

8.Use below xl-release.conf file in XLR server to connect with this db

xl {
    database {
        db-driver-classname="oracle.jdbc.driver.OracleDriver"
        db-password=xlrelease
        db-url="jdbc:oracle:thin:@localhost:1521:XE"
        db-username=xlrelease
    }
    reporting {
        db-driver-classname="oracle.jdbc.driver.OracleDriver"
        db-password=xlarchive
        db-url="jdbc:oracle:thin:@localhost:1521:XE"
        db-username=xlarchive
    }
}

Tag: 21.3.0-Ent-xlr-prebuilt

1.Create Base image :

docker run --name  21Enterprise -d  \
-p 1521:1521 -p 5500:5500 -p 2484:2484 \
--ulimit nofile=1024:65536 --ulimit nproc=2047:16384 --ulimit stack=10485760:33554432 --ulimit memlock=3221225472 \
-e ORACLE_PDB=ORCLPDB1 \
-e ORACLE_PWD=Test12345 \
-e ENABLE_ARCHIVELOG=true \
-e ENABLE_TCPS=true \
oracle/database:21.3.0-ee

2.Create Schema :

alter session set container=ORCLPDB1;

CREATE USER xlarchive IDENTIFIED BY xlarchive;
GRANT CONNECT,RESOURCE TO xlarchive;
GRANT CREATE SESSION TO xlarchive;
GRANT UNLIMITED TABLESPACE TO xlarchive;

CREATE USER xlrelease IDENTIFIED BY xlrelease;
GRANT CONNECT, RESOURCE TO xlrelease;
GRANT CREATE VIEW TO xlrelease;
GRANT UNLIMITED TABLESPACE TO xlrelease;

ALTER USER xlrelease quota unlimited on USERS;
ALTER USER xlarchive quota unlimited on USERS;

GRANT SELECT ON SYS.DBA_RECYCLEBIN TO XLRELEASE;
GRANT SELECT ON SYS.DBA_RECYCLEBIN TO XLARCHIVE;

3.Commit container changes back to image

4.Spin up new container :

docker run \
--name oracle21CEnterprise_xlr \
-p 1521:1521 -p 5500:5500 \
-d \
xebialabsunsupported/oracle:21.3.0-Ent-xlr-prebuilt

5.Modify conf file :

xl {
    database {
        db-driver-classname="oracle.jdbc.driver.OracleDriver"
        db-password=xlrelease
        db-url="jdbc:oracle:thin:@localhost:1521/ORCLPDB1"
        db-username=xlrelease
    }
    reporting {
        db-driver-classname="oracle.jdbc.driver.OracleDriver"
        db-password=xlarchive
        db-url="jdbc:oracle:thin:@localhost:1521/ORCLPDB1"
        db-username=xlarchive
    }
}

Tag: 19.3.0-se2-xld-prebuilt

As we do not have Oracle 19c docker image on public Docker hub, this image was created using following steps.

1.Base image was created using steps mentioned oracle git hub repo, image is 19c Standard edition : https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance cmd: ./buildContainerImage.sh -v 19.3.0 -s

2.Created container from base image using following command, to create PDB (Pluggable database)

docker run \
--name oracle19creal \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_PDB=orcl \
-e ORACLE_PWD=Test12345 \
-e ORACLE_MEM=4000 \
-e ORACLE_SID=XE \
-d \
oracle19c:xlr

3.It takes 10+ mins for container to create a schema and come to healthy state, after container is up created XLD schema

alter session set "_ORACLE_SCRIPT"=true;

CREATE USER xldrepo IDENTIFIED BY xldrepo;
GRANT CONNECT, RESOURCE TO xldrepo;
GRANT CREATE VIEW TO xldrepo;

GRANT SELECT ON SYS.DBA_RECYCLEBIN TO xldrepo;
ALTER USER xldrepo quota unlimited on USERS;

4.Committed container with XLD prebuilt schema back to image.

5.Tagged and pushed image to Xebialabsunsupported docker registry in this repo

6.To Create a container from this image just use proper port mapping and within a minute you will have running Oracle Database 19c(19.3.0) Standard Edition 2 container with prebuilt XLD schema. cmd eg.

docker run \
--name oracle19slim_prebuilt \
-p 1521:1521 -p 5500:5500 \
-d \
xebialabsunsupported/oracle:19.3.0-se2-xld-prebuilt

7.The Oracle Database "SYS, SYSTEM and PDB_ADMIN" password is "Test12345" as mentioned in environmental variable

8.Use below deploy-repository.yaml file in XLD server to connect with this db

xl.repository:
  database:
    db-driver-classname: oracle.jdbc.OracleDriver
    db-username: xldrepo
    db-password: xldrepo
    db-url: jdbc:oracle:thin:@localhost:1521:XE

Tag : 21.3.0-Ent-xld-prebuilt

1.Create Base image

docker run --name  21Enterprise -d  \
-p 1521:1521 -p 5500:5500 -p 2484:2484 \
--ulimit nofile=1024:65536 --ulimit nproc=2047:16384 --ulimit stack=10485760:33554432 --ulimit memlock=3221225472 \
-e ORACLE_PDB=ORCLPDB1 \
-e ORACLE_PWD=Test12345 \
-e ENABLE_ARCHIVELOG=true \
-e ENABLE_TCPS=true \
oracle/database:21.3.0-ee

2.Create required schema in container :

alter session set container=ORCLPDB1;

CREATE USER xldrepo IDENTIFIED BY xldrepo;
GRANT CONNECT, RESOURCE TO xldrepo;
GRANT CREATE VIEW TO xldrepo;

GRANT SELECT ON SYS.DBA_RECYCLEBIN TO xldrepo;
ALTER USER xldrepo quota unlimited on USERS;
GRANT UNLIMITED TABLESPACE TO xldrepo;

3.Commit schema back to image

4.Spin up new container with above prebuilt schema so that XLD can boot automatically :

docker run \
--name oracle21CEnterprise_xld \
-p 1521:1521 -p 5500:5500 \
-d \
xebialabsunsupported/oracle:21.3.0-Ent-xld-prebuilt

5.Use below deploy-repository.yaml file in XLD server to connect with this db

xl.repository:
  database:
    db-driver-classname: oracle.jdbc.OracleDriver
    db-username: xldrepo
    db-password: xldrepo
    db-url: jdbc:oracle:thin:@localhost:1521/ORCLPDB1

Tag summary

Content type

Image

Digest

sha256:249e71c61

Size

4.1 GB

Last updated

over 2 years ago

docker pull xebialabsunsupported/oracle:21.3.0-Ent-xld-prebuilt