[
  {
    "path": ".gitignore",
    "content": ".project\n.vagrant\n\nflyway.properties\n\nmodules/oracle/files/oracle-xe-11.2.0-1.0.x86_64.rpm.zip\nmodules/java\nmodules/maven\nmodules/stdlib\nmodules/wget\n\noracle-jdbc/ojdbc6.jar\n\ntarget"
  },
  {
    "path": "LICENSE.txt",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2012-2014 Hilverd Reker\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Oracle XE 11g on Ubuntu 12.04 using Vagrant\n\nThis project enables you to install Oracle 11g XE in a virtual machine running Ubuntu 12.04, using\n[Vagrant] and [Puppet].\n\n## Acknowledgements\n\nThis project was created based on the information in\n[Installing Oracle 11g R2 Express Edition on Ubuntu 64-bit] by Manish Raj, and the GitHub repository\n[vagrant-oracle-xe] by Stefan Glase. The former explains how to install Oracle XE 11g on Ubuntu\n12.04, without explicitly providing a Vagrant or provisioner configuration. The latter has the same\npurpose as this project but uses Ubuntu 11.10.\n\nThanks to André Kelpe, Brandon Gresham, Charles Walker, Chris Thompson, Jeff Caddel, Joe FitzGerald,\nJustin Harringa, Mark Crossfield, Matthew Buckett, Richard Kolb, and Steven Hsu for various\ncontributions.\n\n## Requirements\n\n* You need to have [Vagrant] installed.\n* The host machine probably needs at least 4 GB of RAM (I have only tested 8 GB of RAM).\n* As Oracle 11g XE is only available for 64-bit machines at the moment, the host machine needs to\n  have a 64-bit architecture.\n* You may need to [enable virtualization] manually.\n\n## Installation\n\n* Check out this project:\n\n        git clone https://github.com/hilverd/vagrant-ubuntu-oracle-xe.git\n\n* Install [vbguest]:\n\n        vagrant plugin install vagrant-vbguest\n\n* Download [Oracle Database 11g Express Edition] for Linux x64. Place the file\n  `oracle-xe-11.2.0-1.0.x86_64.rpm.zip` in the directory `modules/oracle/files` of this\n  project. (Alternatively, you could keep the zip file in some other location and make a hard link\n  to it from `modules/oracle/files`.)\n\n* *Optional:* To get [Flyway](http://flywaydb.org/) integration, download `ojdbc6.jar` for JDK 1.6 from\n    [Oracle Database 11g Release 2 11.2.0.4 JDBC Drivers](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html),\n    and place it in the directory `oracle-jdbc` of this project.\n\n    Migrations are in `data-with-flyway/src/main/resources/database/migrations`.\n    See `data-with-flyway/README.md` for more instructions.\n    Many thanks to [Nicholas Blair](https://github.com/nblair) for contributing this feature.\n\n* Run `vagrant up` from the base directory of this project. The first time this will take a while -- up to 30 minutes on\n  my machine. Please note that building the VM involves downloading an Ubuntu 12.04\n  [base box](http://docs.vagrantup.com/v2/boxes.html) which is 323MB in size.\n\nThese steps are also shown in an [asciicast] made by Daekwon Kang:\n\n[![asciicast](https://asciinema.org/a/8438.png)](https://asciinema.org/a/8438)\n\n## Connecting\n\nYou should now be able to\n[connect](http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html) to\nthe new database at `localhost:1521/XE` as `system` with password `manager`. For example, if you\nhave `sqlplus` installed on the host machine you can do\n\n    sqlplus system/manager@//localhost:1521/XE\n\nTo make sqlplus behave like other tools (history, arrow keys etc.) you can do this:\n\n    rlwrap sqlplus system/manager@//localhost:1521/XE\n\nYou might need to add an entry to your `tnsnames.ora` file first:\n\n    XE =\n      (DESCRIPTION =\n        (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))\n        (CONNECT_DATA =\n          (SERVER = DEDICATED)\n          (SERVICE_NAME = XE)\n        )\n      )\n\n## Troubleshooting\n\n### Errors when Unzipping\n\nIf you get an error containing `/usr/bin/unzip -o oracle-xe-11.2.0-1.0.x86_64.rpm.zip returned 2` during `vagrant up`, then the zip file you have downloaded is probably corrupted. This can be fixed by re-downloading, replacing the corrupted file, and running `vagrant reload --provision`.\n\n### Memory\n\nIt is important to assign enough memory to the virtual machine, otherwise you will get an error\n\n    ORA-00845: MEMORY_TARGET not supported on this system\n\nduring the configuration stage. In the `Vagrantfile` 512 MB is assigned. Lower values may also work,\nas long as (I believe) 2 GB of virtual memory is available for Oracle, swap is included in this\ncalculation.\n\n### Concurrent Connections\n\nIf you want to raise the limit of the number of concurrent connections, say to 200, then according\nto [How many connections can Oracle Express Edition (XE) handle?] you should run\n\n    ALTER SYSTEM SET processes=200 scope=spfile\n\nand restart the database.\n\n## Alternatives\n\nYou may also want to consider a Docker-based solution such as\n[docker-oracle-xe-11g](https://github.com/alexei-led/docker-oracle-xe-11g).\n\n[Vagrant]: http://www.vagrantup.com/\n\n[Puppet]: http://puppetlabs.com/\n\n[Oracle Database 11g Express Edition]: https://www.oracle.com/database/technologies/xe-prior-releases.html\n\n[Oracle Database 11g EE Documentation]: http://docs.oracle.com/cd/E17781_01/index.htm\n\n[Installing Oracle 11g R2 Express Edition on Ubuntu 64-bit]: http://meandmyubuntulinux.blogspot.co.uk/2012/05/installing-oracle-11g-r2-express.html\n\n[vagrant-oracle-xe]: https://github.com/codescape/vagrant-oracle-xe\n\n[vbguest]: https://github.com/dotless-de/vagrant-vbguest\n\n[asciicast]: https://asciinema.org/a/8438\n\n[How many connections can Oracle Express Edition (XE) handle?]: http://stackoverflow.com/questions/906541/how-many-connections-can-oracle-express-edition-xe-handle\n\n[enable virtualization]: http://www.sysprobs.com/disable-enable-virtualization-technology-bios\n"
  },
  {
    "path": "Vagrantfile",
    "content": "# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\nVagrant.configure(\"2\") do |config|\n  # All Vagrant configuration is done here. The most common configuration\n  # options are documented and commented below. For a complete reference,\n  # please see the online documentation at vagrantup.com.\n\n  config.vm.box = \"hashicorp/precise64\"\n  config.vm.box_url = \"https://vagrantcloud.com/hashicorp/precise64\"\n  config.vm.hostname = \"oracle\"\n\n  # share this project under /home/vagrant/vagrant-ubuntu-oracle-xe\n  config.vm.synced_folder \".\", \"/home/vagrant/vagrant-ubuntu-oracle-xe\", :mount_options => [\"dmode=777\",\"fmode=666\"]\n\n  # Forward Oracle port\n  config.vm.network :forwarded_port, guest: 1521, host: 1521\n\n  # Provider-specific configuration so you can fine-tune various backing\n  # providers for Vagrant. These expose provider-specific options.\n  config.vm.provider :virtualbox do |vb|\n    # Use VBoxManage to customize the VM\n    vb.customize [\"modifyvm\", :id,\n                  \"--name\", \"oracle\",\n                  # Oracle claims to need 512MB of memory available minimum\n                  \"--memory\", \"512\",\n                  # Enable DNS behind NAT\n                  \"--natdnshostresolver1\", \"on\"]\n  end\n\n  # This is just an example, adjust as needed\n  config.vm.provision :shell, :inline => \"echo \\\"America/New_York\\\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata\"\n\n  config.vbguest.auto_update = true\n\n  $install_puppet_modules = <<SCRIPT\n  if [ -f /home/vagrant/vagrant-ubuntu-oracle-xe/oracle-jdbc/ojdbc6.jar ]; then\n    mkdir -p /etc/puppet/modules\n    puppet module list | grep -q puppetlabs-java || puppet module install puppetlabs-java\n    puppet module list | grep -q maestrodev-maven || puppet module install maestrodev-maven\n  fi\nSCRIPT\n\n  config.vm.provision \"shell\", inline: $install_puppet_modules\n\n  config.vm.provision :puppet do |puppet|\n    puppet.manifests_path = \"manifests\"\n    puppet.module_path = \"modules\"\n    puppet.manifest_file = \"base.pp\"\n    puppet.options = \"--verbose --trace\"\n  end\n\n  # Run the Maven goals for data-with-flyway\n  config.vm.provision \"shell\", path: \"flyway.sh\"\nend\n"
  },
  {
    "path": "data-with-flyway/README.md",
    "content": "## Data With Flyway\n\nThis sub-project contains a means for creating tables and inserting data into the Oracle Express database.\n\nGiven you have followed all of the instructions on the parent project's README, this project is executed automatically\nby Puppet during (re)provisioning.\n\nIf you want to add more tables and/or data to the Oracle Express instance, create files in\n\n    src/main/resources/database/migrations\n \nfollowing the examples provided. The included examples are originally from the\n[Flyway Getting Started documentation](http://flywaydb.org/getstarted/firststeps/maven.html), with some Oracle-specific\nchanges.\n\nTo learn more about adding migrations, read [Migrations & Versions](http://flywaydb.org/documentation/migration/) and\n[Sql-based migrations](http://flywaydb.org/documentation/migration/sql.html).\n\nAfter adding files in `src/main/resources/database/migrations`, a quick way to run the Flyway migrations is\n\n    vagrant ssh -c 'bash ~/vagrant-ubuntu-oracle-xe/flyway.sh'\n\n### Running Flyway Manually on the Host\n\nYou could also run Flyway manually on the host, assuming Oracle XE is up and running in the VM. You will need to perform\nthe steps documented in the [README for oracle-jdbc](../oracle-jdbc/README.md) to install the Oracle JDBC driver in your\nMaven repository on the host OS.\n\nOnce done, running additional migrations is as simple as:\n\n    mvn install flyway:migrate\n\nIf you want to drop the schema and start over from scratch:\n\n    mvn flyway:clean\n\nMore commands are documented at [http://flywaydb.org/documentation/maven/](http://flywaydb.org/documentation/maven/).\n"
  },
  {
    "path": "data-with-flyway/flyway-SAMPLE.properties",
    "content": "# pom.xml contains these very same options and values\n# If you want to change any flyway options and run flyway manually,\n# copy this file as 'flyway.properties' (which is gitignored) and the values \n# in flyway.properties will take precedence.\n\n# Set the fully-qualified name of the JDBC driver class\nflyway.driver=oracle.jdbc.driver.OracleDriver\n\n# Set the JDBC URL to connect to\nflyway.url=jdbc:oracle:thin:@localhost:1521:xe\n\n# Set the credentials used to connect\nflyway.username=system\nflyway.password=manager\n\n# Set the names all schemas referenced in the migrations (schema names are CASE-SENSITIVE with Oracle)\nflyway.schemas=MYSCHEMA\n\n## Additional properties are available, see http://flywaydb.org/documentation/maven/migrate.html"
  },
  {
    "path": "data-with-flyway/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\t<modelVersion>4.0.0</modelVersion>\n\t<groupId>com.github.hilverd</groupId>\n\t<artifactId>data-with-flyway</artifactId>\n\t<version>0.0.1-SNAPSHOT</version>\n\t<name>Data with Flyway</name>\n\t<description>A subproject for https://github.com/hilverd/vagrant-ubuntu-oracle-xe that provides a means for creating tables and inserting data into the Oracle Express instance it provides.</description>\n\n\t<properties>\n\t\t<!-- Default properties are used in the event 'flyway.properties' is not available -->\n\t\t<flyway.driver>oracle.jdbc.driver.OracleDriver</flyway.driver>\n\t\t<flyway.url>jdbc:oracle:thin:@localhost:1521:xe</flyway.url>\n\t\t<flyway.user>system</flyway.user>\n\t\t<flyway.password>manager</flyway.password>\n\t\t<flyway.schemas>MYSCHEMA</flyway.schemas>\n\t</properties>\n\n\t<build>\n\t\t<plugins>\n\t\t\t<plugin>\n\t\t\t\t<groupId>org.flywaydb</groupId>\n\t\t\t\t<artifactId>flyway-maven-plugin</artifactId>\n\t\t\t\t<version>3.1</version>\n\t\t\t\t<configuration>\n\t\t\t\t\t<locations>\n\t\t\t\t\t\t<location>classpath:database/migrations</location>\n\t\t\t\t\t</locations>\n\t\t\t\t</configuration>\n\t\t\t\t<dependencies>\n\t\t\t\t\t<!-- This dependency is not in Maven Central. See ../oracle-jdbc/README.md for instructions -->\n\t\t\t\t\t<dependency>\n\t\t\t\t\t\t<groupId>com.oracle</groupId>\n\t\t\t\t\t\t<artifactId>ojdbc6</artifactId>\n\t\t\t\t\t\t<version>11.2.0.4</version>\n\t\t\t\t\t</dependency>\n\t\t\t\t</dependencies>\n\t\t\t</plugin>\n\t\t</plugins>\n\t</build>\n</project>"
  },
  {
    "path": "data-with-flyway/src/main/resources/database/migrations/V1__Create_person_table.sql",
    "content": "CREATE TABLE MYSCHEMA.PERSON (\n    ID NUMBER(10) not null,\n    NAME VARCHAR2(100) not null\n);\n\nALTER TABLE PERSON ADD (\n  CONSTRAINT person_pk PRIMARY KEY (ID));\n\nCREATE SEQUENCE person_seq;\n\nCREATE OR REPLACE TRIGGER person_autoinc \nBEFORE INSERT ON PERSON \nFOR EACH ROW\n\nBEGIN\n  SELECT person_seq.NEXTVAL\n  INTO   :new.id\n  FROM   dual;\nEND;"
  },
  {
    "path": "data-with-flyway/src/main/resources/database/migrations/V2__Add_people.sql",
    "content": "insert into MYSCHEMA.PERSON (NAME) values ('Axel');\ninsert into MYSCHEMA.PERSON (NAME) values ('Mr. Foo');\ninsert into MYSCHEMA.PERSON (NAME) values ('Ms. Bar');"
  },
  {
    "path": "data-with-flyway/src/main/resources/database/migrations/V3__Ms_Bar_name_change.sql",
    "content": "update MYSCHEMA.PERSON set name='Mrs. Foo' where id=3;"
  },
  {
    "path": "flyway.sh",
    "content": "#!/bin/bash\n\nset -e\n\nif [ ! -f /home/vagrant/vagrant-ubuntu-oracle-xe/oracle-jdbc/ojdbc6.jar ]; then\n  echo 'Not running Flyway migrations as oracle-jdbc/ojdbc6.jar is not present.'\n  echo 'See README.md if you want to use Flyway.'\n  exit 0\nfi\n\nif [ ! -d /root/.m2/repository/com/oracle/ojdbc6 ]; then\n  # Install the Oracle JDBC driver in the local Maven repository\n  cd /home/vagrant/vagrant-ubuntu-oracle-xe/oracle-jdbc\n  mvn install:install-file -Dfile=ojdbc6.jar -DpomFile=pom.xml\nfi\n\n# Run Flyway migrations\nmvn -f /home/vagrant/vagrant-ubuntu-oracle-xe/data-with-flyway/pom.xml compile flyway:migrate\n"
  },
  {
    "path": "manifests/base.pp",
    "content": "node oracle {\n  include oracle::server\n  include oracle::swap\n  include oracle::xe\n\n  user { \"vagrant\":\n    groups => \"dba\",\n    # So that we let Oracle installer create the group\n    require => Service[\"oracle-xe\"],\n  }\n}\n\n$a = file('/home/vagrant/vagrant-ubuntu-oracle-xe/oracle-jdbc/ojdbc6.jar', '/dev/null')\nif ($a != '') {\n    # java/maven needed for flyway command\n    class { 'java':\n      distribution => 'jdk',\n    }\n    class { \"maven::maven\":\n    \tversion => \"3.2.2\",\n    }\n    package { 'maven':\n    \tensure => present,\n    }\n}\n"
  },
  {
    "path": "modules/oracle/files/60-oracle.conf",
    "content": "# Oracle 11g XE kernel parameters  \nfs.file-max=6815744  \nnet.ipv4.ip_local_port_range=9000 65000  \nkernel.sem=250 32000 100 128 \nkernel.shmmax=107374183\n"
  },
  {
    "path": "modules/oracle/files/S01shm_load",
    "content": "#!/bin/sh\n\ncase \"$1\" in\n  start)\n    mkdir /var/lock/subsys 2>/dev/null\n    touch /var/lock/subsys/listener\n    rm -rf /dev/shm 2>/dev/null\n    mkdir /dev/shm 2>/dev/null\n    mount -t tmpfs shmfs -o size=2048m /dev/shm\n    ;;\n  *)\n    echo error\n    exit 1\n    ;;\nesac \n"
  },
  {
    "path": "modules/oracle/files/chkconfig",
    "content": "#! /bin/bash\n# Oracle 11gR2 XE installer chkconfig hack for Ubuntu\n# http://meandmyubuntulinux.blogspot.co.uk/2012/05/installing-oracle-11g-r2-express.html\n\nfile=/etc/init.d/oracle-xe\n\nif [[ ! `tail -n1 $file | grep INIT` ]]; then\n  echo >> $file\n  echo '### BEGIN INIT INFO' >> $file\n  echo '# Provides: OracleXE' >> $file\n  echo '# Required-Start: $remote_fs $syslog' >> $file\n  echo '# Required-Stop: $remote_fs $syslog' >> $file\n  echo '# Default-Start: 2 3 4 5' >> $file\n  echo '# Default-Stop: 0 1 6' >> $file\n  echo '# Short-Description: Oracle 11g Express Edition' >> $file\n  echo '### END INIT INFO' >> $file\nfi\n\nupdate-rc.d oracle-xe defaults 80 01\n"
  },
  {
    "path": "modules/oracle/files/oracle-env.sh",
    "content": "export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe\nexport ORACLE_SID=XE\nexport NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`\nexport ORACLE_BASE=/u01/app/oracle\nexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH\nexport PATH=$ORACLE_HOME/bin:$PATH\n"
  },
  {
    "path": "modules/oracle/files/xe.rsp",
    "content": "ORACLE_LISTENER_PORT=1521\nORACLE_HTTP_PORT=0\nORACLE_PASSWORD=manager\nORACLE_CONFIRM_PASSWORD=manager\nORACLE_DBENABLE=y\n"
  },
  {
    "path": "modules/oracle/manifests/init.pp",
    "content": "class oracle::server {\n  exec { \"apt-update\":\n    command => \"/usr/bin/apt-get -y update\",\n    timeout => 3600;\n  }\n\n  package {\n    [\"alien\", \"bc\", \"libaio1\", \"unixodbc\", \"unzip\", \"rlwrap\", \"dos2unix\"]:\n      ensure => installed;\n  }\n\n  exec { \"procps\":\n    refreshonly => true,\n    command => \"/etc/init.d/procps start\";\n  }\n\n  file {\n    \"/tmp/chkconfig\":\n      mode => \"0755\",\n      source => \"puppet:///modules/oracle/chkconfig\";\n    \"/tmp/60-oracle.conf\":\n      notify => Exec['procps'],\n      source => \"puppet:///modules/oracle/60-oracle.conf\";\n    \"/tmp/S01shm_load\":\n      mode => \"0755\",\n      source => \"puppet:///modules/oracle/S01shm_load\";\n  }\n\n  # If we're running on Windows, then Git may have converted line endings to CRLF upon cloning the\n  # repository. Here we use dos2unix to make sure that they are LF.\n  exec {\n    \"dos2unix chkconfig\":\n      command => \"/usr/bin/dos2unix -n /tmp/chkconfig /sbin/chkconfig\",\n      creates => \"/sbin/chkconfig\",\n      require => [File[\"/tmp/chkconfig\"], Package[\"dos2unix\"]];\n    \"dos2unix 60-oracle.conf\":\n      command => \"/usr/bin/dos2unix -n /tmp/60-oracle.conf /etc/sysctl.d/60-oracle.conf\",\n      creates => \"/etc/sysctl.d/60-oracle.conf\",\n      require => [File[\"/tmp/60-oracle.conf\"], Package[\"dos2unix\"]];\n    \"dos2unix S01shm_load\":\n      command => \"/usr/bin/dos2unix -n /tmp/S01shm_load /etc/rc2.d/S01shm_load\",\n      creates => \"/etc/rc2.d/S01shm_load\",\n      require => [File[\"/tmp/S01shm_load\"], Package[\"dos2unix\"]];\n  }\n\n  user {\n    \"syslog\":\n      ensure => present,\n      groups => [\"syslog\", \"adm\"];\n  }\n\n  group {\n    \"puppet\":\n      ensure => present;\n  }\n\n  exec { \"set up shm\":\n    command => \"/etc/rc2.d/S01shm_load start\",\n    require => Exec[\"dos2unix S01shm_load\"],\n    user => root,\n    unless => \"/bin/mount | grep /dev/shm 2>/dev/null\";\n  }\n\n  Exec[\"apt-update\"] -> Package <| |>\n}\n\nclass oracle::swap {\n  exec {\n    \"create swapfile\":\n      # Needs to be 2 times the memory\n      command => \"/bin/dd if=/dev/zero of=/swapfile bs=1M count=1024\",\n      user => root,\n      creates => \"/swapfile\";\n    \"set up swapfile\":\n      command => \"/sbin/mkswap /swapfile\",\n      require => Exec[\"create swapfile\"],\n      user => root,\n      unless => \"/usr/bin/file /swapfile | grep 'swap file' 2>/dev/null\";\n    \"enable swapfile\":\n      command => \"/sbin/swapon /swapfile\",\n      require => Exec[\"set up swapfile\"],\n      user => root,\n      unless => \"/bin/cat /proc/swaps | grep '^/swapfile' 2>/dev/null\";\n    \"add swapfile entry to fstab\":\n      command => \"/bin/echo >>/etc/fstab /swapfile swap swap defaults 0 0\",\n      user => root,\n      unless => \"/bin/grep '^/swapfile' /etc/fstab 2>/dev/null\";\n  }\n\n  file {\n    \"/swapfile\":\n      mode => \"600\",\n      owner => root,\n      group => root,\n      require => Exec['create swapfile'];\n  }\n}\n\nclass oracle::xe {\n  file {\n    \"/home/vagrant/oracle-xe-11.2.0-1.0.x86_64.rpm.zip\":\n      source => \"puppet:///modules/oracle/oracle-xe-11.2.0-1.0.x86_64.rpm.zip\";\n    \"/tmp/oracle-env.sh\":\n      source => \"puppet:///modules/oracle/oracle-env.sh\";\n    \"/tmp/xe.rsp.orig\":\n      source => \"puppet:///modules/oracle/xe.rsp\";\n    \"/bin/awk\":\n      ensure => link,\n      target => \"/usr/bin/awk\";\n    \"/var/lock/subsys\":\n      ensure => directory;\n    \"/var/lock/subsys/listener\":\n      ensure => present;\n  }\n\n  exec {\n    \"dos2unix oracle-env.sh\":\n      command => \"/usr/bin/dos2unix -n /tmp/oracle-env.sh /etc/profile.d/oracle-env.sh\",\n      creates => \"/etc/profile.d/oracle-env.sh\",\n      require => [File[\"/tmp/oracle-env.sh\"], Package[\"dos2unix\"]];\n    \"dos2unix xe.rsp\":\n      command => \"/usr/bin/dos2unix -n /tmp/xe.rsp.orig /tmp/xe.rsp\",\n      creates => \"/tmp/xe.rsp\",\n      require => [File[\"/tmp/xe.rsp.orig\"], Package[\"dos2unix\"]];\n  }\n\n  exec {\n    \"unzip xe\":\n      command => \"/usr/bin/unzip -o oracle-xe-11.2.0-1.0.x86_64.rpm.zip\",\n      require => [Package[\"unzip\"], File[\"/home/vagrant/oracle-xe-11.2.0-1.0.x86_64.rpm.zip\"]],\n      cwd => \"/home/vagrant\",\n      user => root,\n      creates => \"/home/vagrant/oracle-xe-11.2.0-1.0.x86_64.rpm\",\n      timeout => 3600,\n      unless => \"/usr/bin/test -f /etc/default/oracle-xe\";\n    \"alien xe\":\n      command => \"/usr/bin/alien --to-deb --scripts Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm\",\n      cwd => \"/home/vagrant\",\n      require => [Package[\"alien\"], Exec[\"unzip xe\"]],\n      creates => \"/home/vagrant/oracle-xe_11.2.0-2_amd64.deb\",\n      user => root,\n      timeout => 3600,\n      unless => \"/usr/bin/test -f /etc/default/oracle-xe\";\n    \"configure xe\":\n      command => \"/etc/init.d/oracle-xe configure responseFile=/tmp/xe.rsp >> /tmp/xe-install.log\",\n      timeout => 3600,\n      require => [Package[\"oracle-xe\"],\n                  Exec[\"dos2unix oracle-env.sh\"],\n                  Exec[\"dos2unix xe.rsp\"],\n                  File[\"/var/lock/subsys/listener\"],\n                  Exec[\"set up shm\"],\n                  Exec[\"enable swapfile\"]],\n      creates => \"/etc/default/oracle-xe\";\n  }\n\n  package {\n    \"oracle-xe\":\n      provider => \"dpkg\",\n      ensure => latest,\n      require => [Exec[\"alien xe\"]],\n      source => \"/home/vagrant/oracle-xe_11.2.0-2_amd64.deb\",\n  }\n\n  exec {\n    \"run chkconfig\":\n      command => \"/sbin/chkconfig\",\n      user => root,\n      require => Service[\"oracle-xe\"];\n  }\n\n  service {\n    \"oracle-xe\":\n      ensure => \"running\",\n      require => [Package[\"oracle-xe\"],\n                  Exec[\"configure xe\"],\n                  Exec[\"dos2unix chkconfig\"],\n                  Exec[\"dos2unix 60-oracle.conf\"]],\n  }\n}\n"
  },
  {
    "path": "oracle-jdbc/README.md",
    "content": "## Oracle JDBC Driver\n\nThis folder is here to provide people that use this project a way to install Oracle JDBC driver in their\nlocal Maven repository on the host.\n\n### Installation (Manual)\n\nYou don't need to do this by hand; Puppet has instructions to run these steps automatically on the guest. These steps\nare provided here for reference.\n\n1. Go to [http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html)\n2. Accept the license and download the `ojdbc6.jar` file under the *Oracle Database 11g Release 2 (11.2.0.4) JDBC\n   Drivers* heading (\"Classes for use with JDK 1.6. It contains the JDBC driver classes except classes for NLS support\n   in Oracle Object and Collection types.\").\n3. Execute the following maven command to place the jar in your local Maven repository (`~/.m2/repository`):\n\n        mvn install:install-file -Dfile=ojdbc6.jar -DpomFile=pom.xml\n\nIf you are running this command on Windows, since Windows' shell is terrible, you need to quote each argument\nindividually, like so:\n\n    mvn install:install-file '-Dfile=ojdbc6.jar' '-DpomFile=pom.xml'\n"
  },
  {
    "path": "oracle-jdbc/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\t<modelVersion>4.0.0</modelVersion>\n\t<groupId>com.oracle</groupId>\n\t<artifactId>ojdbc6</artifactId>\n\t<version>11.2.0.4</version>\n\t<name>Oracle 11G JDBC Driver</name>\n\t<description>Oracle Database 11g Release 2 (11.2.0.4) JDBC Drivers</description>\n</project>"
  }
]