Skip to content

Instantly share code, notes, and snippets.

@andrerom
Last active April 30, 2017 17:38
Show Gist options
  • Save andrerom/015f43a6642cca95d03ebbf5736e2cbf to your computer and use it in GitHub Desktop.
Save andrerom/015f43a6642cca95d03ebbf5736e2cbf to your computer and use it in GitHub Desktop.
Oracle support in eZ Platform

Todo in regards to getting Oracle support in eZ Platform

We need a few things in order to support Oracle:

  • Development:
  • kernel: There are a few places we parse database "dsn", these needs to understand oci8 dsn as well
    • Or better yet find a way to get rid of it and let doctrine parse this so we can support full doctrine dsn as used by Symfony flex
  • Oracle schema, need someone with Oracle expertise involved to see what we can optimize in the schema
  • Estimate 1-2 weeks (but you need step below to be able to verify)
  • CI: Continues Integration, aka testing of every change, this is the more tricky part. in short oracle does not allow CI services to provide Oracle as an option so we have two options:
    • A: Setup testing of this on Jenkins and buy a license
    • B: Just test Platform (not commercial revenue generating software) by using Oracle Express Edition
  • Estimate 2-5 days (needed to verify development)

At this point Oracle will be "experimentally" / Community supported, and customers can use it as long as they have a partner willing to take some responsibility of providing patches back to eZ Platform kernel if they find bugs.

  • QA: we need a license for Oracle and we need 2-3 weeks setting it up and running true QA test suite as well as the tests in CI
    • Estimate 2-3 weeks (needed to offically support oracle, will once supported need to be tested for each release slowing down releases)

Besides that there is doc, orginizing it, marketing material updates, ....

Important: Ideally Oracle support should not be added before we have a Installer, and a upgrade system that supports several databases. Otherwise support will be second class like postgress support has become right now (not possible to install for clean installs, only unoffical upgrade path), and handling schmea changes will be time consuming until we get around to use schema tools in Doctrine for this.

Automating Oracle Express Editor setup for CI

Somewhat tricky, theoretically the following guides should help:

See script below for quick untested compilation of this.

Note: We have a developer account setup with ezrobot mail on oracle.com that can be used to download the software.

#!/usr/bin/env bash
# Server
export ORACLE_COOKIE=sqldev ORACLE_FILE=oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe ORACLE_SID=XE
wget 'https://github.com/cbandy/travis-oracle/archive/v2.0.1.tar.gz'
mkdir -p ~/.travis/oracle
tar x -C ~/.travis/oracle --strip-components=1 -f v2.0.1.tar.gz
~/.travis/oracle/download.sh
~/.travis/oracle/install.sh
# Client
#apt-get install --yes php5 php5-cli php5-dev php-db php-pear
apt-get install --yes build-essential libaio1
pecl install oci8
echo "extension=oci8.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# Create database (just copy past from doc, needs adaption, install.sh above sets up $USER to have access)
"$ORACLE_HOME/bin/sqlplus" -L -S / AS SYSDBA <<SQL
CREATE DATABASE mynewdb
USER SYS IDENTIFIED BY sys_password
USER SYSTEM IDENTIFIED BY system_password
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/mynewdb/redo01.log') SIZE 100M,
GROUP 2 ('/u01/app/oracle/oradata/mynewdb/redo02.log') SIZE 100M,
GROUP 3 ('/u01/app/oracle/oradata/mynewdb/redo03.log') SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/app/oracle/oradata/mynewdb/system01.dbf' SIZE 325M REUSE
SYSAUX DATAFILE '/u01/app/oracle/oradata/mynewdb/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE users
DATAFILE '/u01/app/oracle/oradata/mynewdb/users01.dbf'
SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/mynewdb/temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE undotbs
DATAFILE '/u01/app/oracle/oradata/mynewdb/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
SQL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment