Automated Oracle RAC installation using Ansible (part 1)

In this post I thought we’d quickly go through the existing roles that are used in doing the RAC-install and see what they do. There are a few other roles as well, which are not being used at the moment, so we’ll not go through them.
The following roles are also used when setting up a Grid Infrastructure in a Stand-alone configuration (Oracle Restart)

Below is pretty much a copy of the README.md from the Github page.

The different roles are:

common: This will configure stuff common to all machines

  • Install some generic packages
  • Configure ntp
  • Possibly add a default/deploy user.

orahost: This will configure the host specific Oracle stuff:

  • Add a user & group (at the moment only a dba group)
  • Create directory structures
  • Generate ssh-keys and set up passwordless ssh between clusternodes in case of RAC/RAC One node
  • Handle filesystem storage (partition devices, creates vg/lv and a ext4 filesystem etc).
  • Install required packages
  • Change kernel parameters
  • Set up pam.d/limits config
  • Configures Hugepages (as a percentage of total RAM)
  • Disables transparent hugepages
  • Disables NUMA (if needed)
  • Configures the interconnect network (if needed)
  • Configures Oracle ASMLib

orahost-storage: This role configures storage that shoud be used by ASM.

  • Partitions devices (using parted)
  • Create ASMlib labels on disks

oraswgi-install: This role will install and configure Oracle Grid Infrastructure. Tested with 12.1.0.1/12.1.0.2

  • Adds a .profile_grid to the oracle user
  • Sets up directory structures
  • Copies the install-files to the servers
  • Install Oracle Grid Infrastructure

oraasm-configureasm: This role will create and configure the ASM-instance with an initial diskgroup.

  • Generates a shellscript that uses asmca to create the ASM instance

oraasm-createdg: This role will create the diskgroup(s) that should be used for database storage. Uses asmca to create diskgroups.

  • Generates a shellscript that uses asmca to create the diskgroups. Note: It will try to create the initial diskgroup again, and fail but that is ok, the error is ignored and the play will continue.

oraswdb-install: This role will install the oracle database server(s). If there will be more than one database running it will get its own ORACLE_HOME. It performs both Single Instance/RAC installations.

  • Creates a .profile_databasename
  • Creates directory structures
  • Transfers install files to server(s)
  • Installs the database-server(s)

oradb-create: This role creates the databases (RAC/RAC One Node, Single Instance). Performs a dbca silent run to create the database. Note: At the moment there is no listener configured when creating a database on a filesystem (i.e no grid infrastructure present). Will be added later though.

  • Generates a responsefile to be used by dbca
  • Creates the db using dbca
  • Changes init parameters based on input.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s