ingwarsw / oracle

the custom types needed to manage the basic setup of an Oracle database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

####Table of Contents

Powered By EasyType

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with oracle
  4. Usage - Configuration options and additional functionality
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

##Overview

This module contains a couple of Puppet custom types to manage 'stuff' in an Oracle database. At this point in time we support manage tablespacses, oracle users, grants, roles and services. To learn more, check the blog post

##Module Description

This module contains custom types that can help you manage DBA objects in an Oracle database. It runs after the database is installed. IT DOESN'T INSTALL the Oracle database software. With this module, you can setup a database to receive an application. You can:

  • create a tablespace
  • create a user with the required grants and quota's
  • create one or more roles
  • create one or more services

##Setup

###What oracle affects

The types in this module will change settings inside a Oracle Database. No changes will be made outside of the database.

###Setup Requirements

To use this module, you need a running Oracle database. I can recommend Edwin Biemonds Puppet OraDb module. The Oracle module itself is based on easy_type.

###Beginning with oracle module

After you have a running database, (See Edwin Biemonds Puppet OraDb module), you need to install easy_type, and this module.

puppet module install hajee/easy_type
puppet module install hajee/oracle

##Usage

The module contains the following types:

tablespace, oracle_user, role and listener. Here are a couple of examples on how to use them.

###listener

This is the only module that does it's work outside of the Oracle database. It makes sure the Oracle SQL*Net listener is running.

listener {'listener':
  ensure  => running,
  require => Exec['db_install_instance'],
}

###oracle_user

This type allows you to manage a user inside an Oracle Database. It recognises most of the options that CREATE USER supports. Besides these options, you can also use this type to manage the grants and the quota's for this user.

oracle_user{user_name:
  temporary_tablespace      => temp,
  default_tablespace        => 'my_app_ts,
  password                  => 'verysecret',
  require                   => Tablespace['my_app_ts'],
  grants                    => ['SELECT ANY TABLE', 'CONNECT', 'CREATE TABLE', 'CREATE TRIGGER'],
  quotas                    => {
                                  "my_app_ts"  => 'unlimited'
                                },
}

###tablespace

This type allows you to manage a tablespace inside an Oracle Database. It recognises most of the options that CREATE TABLESPACE supports.

tablespace {'my_app_ts':
  ensure                    => present,
  size                      => 20G,
  logging                   => yes,
  autoextend                => on,
  next                      => 100M,
  max_size                  => 12288M,
  extent_management         => local,
  segment_space_management  => auto,
}

###role

This type allows you to create or delete a role inside an Oracle Database. It recognises a limit part of the options that CREATE ROLE supports.

role {'just_a_role':
  ensure    => present,
}

###oracle_service

his type allows you to create or delete a service inside an Oracle Database.

oracle_service{'my_app_service':
  ensure  => present,
}

##Limitations

This module is tested on Oracle 11 on CentOS and Redhat. It will probably work on other Linux distributions. It will definitely not work on Windows. As far as Oracle compatibility. Most of the sql commands's it creates under the hood are pretty much Oracle version independent. It should work on most Oracle versions.

##Development

This is an open projects, and contributions are welcome.

###OS support

Currently we have tested:

  • Oracle 11.2.0.2 & 11.2.0.4
  • CentOS 5.8
  • Redhat 5

It would be great if we could get it working and tested on:

  • Oracle 12
  • Debian
  • Windows
  • Ubuntu
  • ....

###Oracle version support

Currently we have tested:

  • Oracle 11.2.0.2
  • Oracle 11.2.0.4

It would be great if we could get it working and tested on:

  • Oracle 12

###Managable Oracle objects

Obviously Oracle has many many many more DBA objects that need management. For some of these Puppet would be a big help. It would be great if we could get help getting this module to support all of the objects.

If you have knowledge in these technologies, know how to code, and wish to contribute to this project, we would welcome the help.

###Testing

Make sure you have:

  • rake
  • bundler

Install the necessary gems:

bundle install

And run the tests from the root of the source code:

rake test

We are currently working on getting the acceptance test running as well.

Bitdeli Badge

About

the custom types needed to manage the basic setup of an Oracle database

License:Apache License 2.0


Languages

Language:Ruby 97.5%Language:Puppet 2.5%