Permalink
Browse files

install and configure oracle-xe

  • Loading branch information...
1 parent d401a8a commit c9008a3ef30dacfe200cb3eddc54d41dc337f3c2 @Xylakant Xylakant committed Feb 5, 2013
View
1 .gitignore
@@ -1,2 +1,3 @@
.vagrant
modules/java/files/rpms/*
+modules/oracle-xe/files/rpms/*
View
5 Vagrantfile
@@ -5,13 +5,14 @@ Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
+ config.vm.customize ["modifyvm", :id, "--memory", 1280]
# Every Vagrant virtual environment requires a box to build off of.
- config.vm.box = "centos-6.3-base"
+ config.vm.box = "centos-6.3-base-extended-swap"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
- config.vm.box_url = "http://asq-vagrant-boxes.s3.amazonaws.com/centos/centos-6.3-base.box"
+ config.vm.box_url = "http://asq-vagrant-boxes.s3.amazonaws.com/centos/centos-6.3-base-extended-swap.box"
# Boot with a GUI so you can see the screen. (Default is headless)
# config.vm.boot_mode = :gui
View
3 manifests/tomcat-server.pp
@@ -68,10 +68,11 @@
include installrvm
include java::jdk
include tomcat7
+ include oracle-xe
class { requirements: stage => 'requirementsstage' }
- Class['java::jdk'] -> Class['tomcat7'] -> Class['installrvm'] -> Class['projects']
+ Class['java::jdk'] -> Class['oracle-xe'] -> Class['tomcat7'] -> Class['installrvm'] -> Class['projects']
}
# start and set up everything
View
17 modules/java/files/select-java.sh
@@ -0,0 +1,17 @@
+#!/bin/env bash
+
+## java ##
+alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
+## javaws ##
+alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000
+
+## Java Browser (Mozilla) Plugin 32-bit ##
+#alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/latest/jre/lib/i386/libnpjp2.so 20000
+
+## Java Browser (Mozilla) Plugin 64-bit ##
+#alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 20000
+
+## Install javac only if you installed JDK (Java Development Kit) package ##
+alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000
+alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000
+
View
11 modules/java/manifests/jdk.pp
@@ -9,12 +9,21 @@
file { "/root/$jdk.rpm":
source => "puppet:///modules/java/rpms/jdk-7u13-linux-x64.rpm", # fetch from the puppet server.
}
-
+
+ file { "/root/select-java.sh":
+ source => "puppet:///modules/java/select-java.sh",
+ mode => 0700,
+ }
+
package {"$jdk":
source => "/root/$jdk.rpm",
ensure => installed,
require => File["/root/$jdk.rpm"],
provider => "rpm", # the yum provider can't install from file.
}
+ exec {"/root/select-java.sh":
+ require => [Package["$jdk"], File["/root/select-java.sh"]]
+ }
+
}
View
31 modules/oracle-xe/files/ntp.conf.client
@@ -0,0 +1,31 @@
+# For more information about this file, see the man pages
+# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
+
+driftfile /var/lib/ntp/drift
+
+# Permit time synchronization with our time source, but do not
+# permit the source to query or modify the service on this system.
+restrict default kod nomodify notrap nopeer noquery
+restrict -6 default kod nomodify notrap nopeer noquery
+
+# Permit all access over the loopback interface. This could
+# be tightened as well, but to do so would effect some of
+# the administrative functions.
+restrict 127.0.0.1
+restrict -6 ::1
+
+# Hosts on local network are less restricted.
+#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
+
+# Using services of PTB
+#server ptbtime1.ptb.de
+#server ptbtime2.ptb.de
+#server ptbtime3.ptb.de
+server 172.30.212.12 iburst
+restrict 172.30.212.12 mask 255.255.255.255 nomodify notrap noquery
+
+includefile /etc/ntp/crypto/pw
+
+keys /etc/ntp/keys
+
+restrict default ignore
View
0 modules/oracle-xe/files/rpms/.gitkeep
No changes.
View
2 modules/oracle-xe/files/sysconfig-ntpd.client
@@ -0,0 +1,2 @@
+# Drop root to id 'ntp:ntp' by default.
+OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -g -l /var/log/ntp.log -I 127.0.0.1"
View
5 modules/oracle-xe/files/xe.rsp
@@ -0,0 +1,5 @@
+ORACLE_LISTENER_PORT=1521
+ORACLE_HTTP_PORT=8080
+ORACLE_PASSWORD=manager
+ORACLE_CONFIRM_PASSWORD=manager
+ORACLE_DBENABLE=y
View
72 modules/oracle-xe/manifests/init.pp
@@ -0,0 +1,72 @@
+class oracle-xe {
+ # bc is used by oracle-xe. it is not a direct dependency, but without it, the configure step
+ # fails
+ # see
+ # http://www.pythian.com/news/30197/installing-oracle-vm-manager-3-0-3-under-dom0-host-or-how-to-save-resources-on-your-sandbox/
+
+ package { 'bc':
+ ensure => installed
+ }
+
+ package { 'libaio':
+ ensure => installed
+ }
+
+ package { "ntp":
+ ensure => installed
+ }
+
+ file { "/etc/sysconfig/ntpd":
+ mode => "644",
+ source => "puppet:///modules/oracle-xe/sysconfig-ntpd.client",
+ notify => Service["ntpd"],
+ require => Package["ntp"],
+ }
+
+ file { "/etc/ntp.conf":
+ mode => "644",
+ source => "puppet:///modules/oracle-xe/ntp.conf.client",
+ notify => Service["ntpd"],
+ require => Package["ntp"],
+ }
+
+ service { "ntpd":
+ ensure => running,
+ enable => true,
+ require => Package["ntp"],
+ }
+
+ file {"/etc/localtime":
+ ensure => link,
+ target => "/usr/share/zoneinfo/Europe/Berlin"
+ }
+
+ # installs the oracle xe from an rpm
+ # you need to drop the rpm into the files folder
+
+
+ $orapkg = "oracle-xe-11.2.0-1.0"
+
+ # fetch the rpm.
+ file { "/root/$orapkg.rpm":
+ source => "puppet:///modules/oracle-xe/rpms/oracle-xe-11.2.0-1.0.x86_64.rpm", # fetch from the puppet server.
+ }
+
+ package {"$orapkg":
+ source => "/root/$orapkg.rpm",
+ ensure => installed,
+ require => [File["/root/$orapkg.rpm"], Package['bc'], Package["libaio"]],
+ provider => "rpm", # the yum provider can't install from file.
+ }
+
+ file {"/root/xe.rsp":
+ source => "puppet:///modules/oracle-xe/xe.rsp"
+ }
+
+ exec { 'configure-xe':
+ command => "/etc/init.d/oracle-xe configure responseFile=/root/xe.rsp >> /root/xe-install.log",
+ require => [Package["$orapkg"], File["/root/xe.rsp"]],
+ user => root,
+ creates => "/root/xe-install.log",
+ }
+}

0 comments on commit c9008a3

Please sign in to comment.