In our article series, we are exploring the capabilities of Oracle Enterprise Manager Cloud Control 13c for the private Database-as-a-Service (DBaaS) cloud – including the setup of such a cloud. In the previous parts, we started the setup of the private DBaaS cloud, including the configuration of the self-service portal. The full procedure includes setting up the Enterprise Manager software library, creating the PaaS infrastructure zones, database pools, and quotas for the users, service templates, and optionally chargeback plans to apply to the users for cloud allocation and cloud usage.

We configured the software library, set up the Enterprise Manager self update system, and downloaded the latest plug-ins from the external Enterprise Manager store. We created a custom cloud role in Enterprise Manager, and a Cloud SSA user named as "SAI_DAS". Next, we created a PaaS Infrastructure Zone named as “Sainath_PaaS_Zone”, a group of hosts that will be used for Database as a Service. Members (hosts) were added to the PaaS Infrastructure Zone.

After the PaaS zone, a new database pool was created – this was a group of database servers where the database software had been preinstalled. All the servers in the database pool were required to be of the same platform as well as the same database version. Next, we added our Oracle Home targets to the pool, with each Oracle Home target belonging only to a single database pool. We also specified the Placement Policy Constraint “Maximum number of Database Instances per host” as 10 instances.

After the database pool was created, we selected “Quotas” from the left panel, and then entered the quotas for the role selected. The Quotas page allows the SSA Administrator to configure the total amount of resources which are allocated to the self service user via the role. Quotas are an important aspect of the cloud and are required in order to control the usage of the self-service cloud. In our case, we have assigned the Memory quota as 16 GB, the Storage quota as 100 GB, the number of Database Requests as 10, the number of Schema Service Requests as 50, and the number of PDB Service Requests as 25. This is the total amount of resources that can be utilized by any SSA user to whom the custom role is assigned.

Next, we selected Data Sources from the left panel, and on the page that appears, clicked on the Data Profiles tab and created a new profile. In the creation wizard that started, we selected the Reference target as the “saiprod” database. This is the production database that will be used as the master source. We chose to include “Data Content” and “Structure and Data” by creating an RMAN backup from the source database. The profile will be used for the Database-as-a-service functionality. You can set the schedule to repeat the profile creation at an interval; this means a new backup will be taken repeatedly, and can be selected by the self-service user. It is also possible to set a purge policy, and if you do this, you can purge the backups based on either the number of maximum snapshots, or the number of days. This helps in keeping the backups of the profile manageable.

After the database profile creation completed successfully, we could also refresh it at any time in the future to cater for new or changed data in the Saiprod database. As the cloud administrator, you would want any such data to be available to the self-service user for creating a copy of the Saiprod database. In this case there is no need for the cloud administrator to recreate the entire profile, since there is a “Refresh Profile” capability which will create a new RMAN Full Backup with the changed data. This new backup version can then be selected by the SSA user at the time of self-service of the single instance database.

We then started to create a new database profile to be used for the Snap Clone functionality. We clicked on “Create” in the Data Profiles tab and specified the reference target again as the “saiprod” database, and included the “Structure and Data” by including an “RMAN Database Image” for this new profile, instead of an RMAN backup. This profile will be used for the Database-as-a-Service functionality using the Snap Clone functionality. If the production data has changed, the cloud administrator can click on “Refresh Profile” at any time after the profile creation; this will create a new RMAN Datafile Image backup.

Create Service Template: Single Instance Database

The next step is to create service templates for the database cloud, which can then be used by the SSA user to provision databases in the pool. The profiles created in the previous section are like gold copies of an Oracle database, and they are used by service templates.

The service template is what is offered to the SSA user and forms the basis of the functionality of the cloud.

However, before a service template can be created, we need to set up multiple “Database Sizes”. These will be used to override the initialization parameter values in the service template once associated with that template.

The create_database_size verb is explained in the EMCLI (Enterprise Manager Command Line Interface) documentation. This is used to specify multiple database sizes. Use emcli commands as follows to create the database sizes you want to use in your service templates. (Note that we have used conservative numbers to avoid overloading of our demonstration host, which has limited memory.) Be aware that the OMS home directory may be different in your case, depending on where you have installed Enterprise Manager.


cd /u01/app/oracle/middleware/oms/bin
./emcli login -username=sysman
Enter password
Login successful

./emcli create_database_size   -name=Small   -description="Small size database" -attributes="cpu:2;storage:2;memory:1;processes:350"

Database size 'Small' has been successfully created

./emcli create_database_size   -name=Medium -description="Medium size database" -attributes="cpu:3;storage:3;memory:1;processes:500"

Database size 'Medium' has been successfully created    

./emcli create_database_size -name=Large -description="Large size database" -attributes="cpu:4;storage:4;memory:2;processes:700"

Database size 'Large' has been successfully created    

After creation, you can also list the database sizes using emcli:

./emcli list_database_sizes
____________________________________________
Name:Large
Description:Large size database
CPU(cores):4
Memory(GB):2
Processes(COUNT):700
Storage(GB):4
____________________________________________
Name:Medium
Description:Medium size database
CPU(cores):3
Memory(GB):1
Processes(COUNT):500
Storage(GB):3
____________________________________________
Name:Small
Description:Small size database
CPU(cores):2
Memory(GB):1
Processes(COUNT):350
Storage(GB):2
____________________________________________

We continue in the next part of this article series.