Chef cookbook for installing Oracle XE on Docker images. For details on the installation process consult the official documentation.
The existing Chef cookbooks for Oracle XE don't work with most of the stripped down Docker images (e.g. the base CentOS images). Hence this cookbook. It installs some tools needed for the installation process and downloads the rpm
via wget
. So you need unzip and copy your rpm
download (avaiable for free here) to a place accessible via wget
(e.g. Dropbox) and provide the link via the source
attribute to the recipe.
The cookbook works with Oracle XE 11.2.0 and CentOS. More constellations need to be tested...
- Make sure the swap partition on your machine is big enough. For instance, Oracle 11g XE requires 2048 MB of swap space. Here's a general guide to increase the swap size on a Linux system. In case you're using Docker be aware that you cannot add a swap file to the container. Instead the hosting docker machine has to be adapted. @madhead provides a nice script in his README.
magic_shell
- oraclexe needs magic_shell to set environment variables.
-
source
- specifies the URL where you've placed the Oracle 11g Express Edition RPM. Source must be accessible via wget. -
oracle-home
- defines the directory where Oracle XE is installed and is used to set environment variables pointing to this directory. -
oracle-sid
- sets the Oracle System ID (SID) identifying the database on your system -
http-port
- port for the HTTP interface -
listener-port
- sets listener port used to connect to Oracle XE -
password
- initial password for administrative user accounts -
dbenable
- specifies whether you want to start Oracle XE automatically on system start
Key | Type | Default |
---|---|---|
Environment parameters: | ||
['oraclexe']['source'] | URL | nil |
['oraclexe']['oracle-home'] | String | '/u01/app/oracle/product/11.2.0/xe/ |
['oraclexe']['oracle-sid'] | String | XE |
Oracle response file parameters: | ||
['oraclexe']['http-port'] | Integer | 8079 |
['oraclexe']['listener-port'] | Integer | 1521 |
['oraclexe']['password'] | String | 'oracle' |
['oraclexe']['dbenable'] | Boolean | false |
e.g.
Just include oraclexe
in your node's run_list
and add at least the location of the Oracle XE rpm
:
{
"name":"my_node",
"run_list": [
"recipe[oraclexe]"
],
"oracle-xe": {
"url": "https://www.dropbox.com/s/FILE-ID/oracle-xe-11.2.0-1.0.x86_64.rpm"
}
}
The configuration files init.ora
and initXETemp.ora
as well as the start script are taken from madhead/docker-oracle-xe
License: Apache 2.0 Authors: Frank Wisniewski