Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Support Oracle Database Express Edition in module oradb #10

Open
josepedrocorreia opened this issue Jul 5, 2013 · 2 comments
Open

Support Oracle Database Express Edition in module oradb #10

josepedrocorreia opened this issue Jul 5, 2013 · 2 comments

Comments

@josepedrocorreia
Copy link

Could support be added for this? According to the comments I found, only SE, EE, and SEONE are supported.

@biemond
Copy link
Owner

biemond commented Jul 5, 2013

Hi,

is this really interesting cause you can do this with rpm and in puppet use pacakge

rpm -ivh /downloads/oracle-xe-11.2.0-1.0.x86_64 > /xe_logs/XEsilentinstall.log
/etc/init.d/oracle-xe configure responseFIle= >> /xe_logs/XEsilentinstall.log

only the last part can be interesting.

Thanks

@josepedrocorreia
Copy link
Author

Hello,

Well, anything can be done with a shell script ;)

I currently have the following puppet code to install Oracle XE:

    package { ["libaio", "bc", "flex"]:
        ensure => installed,
    }
    exec { "create swap file":
        command => "/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024",
        creates => "/var/swap.1",
    }
    exec { "attach swap file":
        command => "/sbin/mkswap /var/swap.1 && /sbin/swapon /var/swap.1",
        require => Exec["create swap file"],
        unless => "/sbin/swapon -s | grep /var/swap.1",
    }

    exec { "installOracleDB":
        command => "unzip -q /projects/Operations/Software/oracle-xe-11.2.0-1.0.x86_64.rpm.zip -d /install/ && rpm -ivh /install/Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm",
        creates => $oracleDatabaseHome,
        require => Exec["attach swap file"],
    }
    exec { "configureOracleDB":
        command => "/etc/init.d/oracle-xe configure <<EOF
8085
1521
$tkPassword
$tkPassword
y
EOF",
        require => Exec["installOracleDB"],
    }

I mainly followed the instructions here: http://www.davidghedini.com/pg/entry/install_oracle_11g_xe_on

As you can see, at least on my setup there are enough steps to justify wrapping it in the module.

First, the module could take care of making sure there's enough swap space for the database. This is something that, in my opinion, should be done behind the scenes.

Second, if the installation is done by the Puppet module it could make sure it is OS independent, whereas this sort of approach does not.

Third, it would be much cleaner to specify ports, passwords, etc, as parameters to a class rather than as a response file for the Oracle XE configuration script (or as a heredoc as I do).

What do you think?

Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants