3.4    Deploying Repository Objects

Chapter 14 will provide more detailed information about the processes, procedures, and steps necessary for managing the lifecycle of a repository-based security model using SAP HANA application lifecycle management. In this section, we’ll simply will introduce you to lifecycle management terms and concepts specific to catalog objects. Specifically, we’ll define the terms content vendor and delivery unit. We’ll also demonstrate how to package repository-based content into a delivery unit and export it to a file using the web-based SAP HANA application lifecycle management GUI.

With most security models, at some point, you’ll need to move, share, or migrate to a new SAP HANA environment. Before you can properly do that, you’ll must ensure that all the objects that the model references are also available in each environment. We refer to these objects as security model dependencies. Security model dependencies are typically composed of various catalog objects. The makeup of a properly designed security model consists of a series of repository roles. When these repository roles reference repository-based catalog objects, you can move all parts of the model to another environment via the application lifecycle management tools built into SAP HANA XS platform.

We’ve already introduced the processes necessary for creating repository schemas and tables. Assuming you develop all other objects as repository-based artifacts, moving these objects between environments will be possible. However, before you can export these objects and then import them into another environment, you must ensure that the source SAP HANA system is set up to support such activities. Two key items must be configured before you can proceed: First, you’ll need to define the content vendor within our source SAP HANA system, and second, you must define a delivery unit.

Each SAP HANA instance must be configured with a content vendor before you can conduct lifecycle management activities. The content vendor is a value used to uniquely identify the organization or system that generated a delivery unit or exported content. The typical format of its value looks similar to that of a domain name used in an email address, but other formats are supported. For example, the value can be something like mycompany.com or MyCompanyName. We don’t recommend using spaces between characters because some SAP HANA interfaces don’t support spaces when specifying the content vendor name.

The simplest way to establish a content vendor within an SAP HANA system is to ask your SAP HANA administrator to execute an ALTER SYSTEM SQL statement. The following example will set the content vendor to 'mycompany.com':

ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM')     
SET ('repository', 'content_vendor') = 'mycompany.com'
WITH RECONFIGURE;

The second example will set the content vendor to 'MyCompanyName':

ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM')     
SET ('repository', 'content_vendor') = 'MyCompanyName'
WITH RECONFIGURE;

For this statement to work in your environment, simply change mycompany.com to a value appropriate for your organization. Make sure you include the WITH CONFIGURE statement to activate the change without needing to restart the system.

You can also change the content vendor using the web-based SAP HANA application lifecycle management GUI. To access this web-based GUI, enter the correct URL into a supported web browser’s address bar using the following template:

Replace <sap_hana_host> with the host name of the SAP HANA system in your environment and <instance_number> with the two-digit instance number corresponding to your SAP HANA system.

For secure access, use the following template:

To access SAP HANA application lifecycle management, you’ll need to be granted the role sap.hana.xs.lm.roles::Administrator or a role with similar privileges.

Once you have accessed the Settings page, look for the General then vendor settings. Click the Change Vendor button to adjust the content vendor name.

Once a content vendor is defined, you can then define a delivery unit. A delivery unit is a logical object that can be configured with one or more repository packages. As mentioned in Chapter 2, a package is a logical organization unit used to store development artifacts. The main purpose of a delivery unit is to create bundles of packages containing repository objects so that you can transport these objects to another SAP HANA system.

To create a delivery unit using the web-based SAP HANA application lifecycle management GUI, enter the correct URL into a supported web browser’s address bar using the following template:

Replace <sap_hana_host> with the host name of the SAP HANA system in your environment and <instance_number> with the two-digit instance number corresponding to your SAP HANA system.

For secure access, use the following template:

To access SAP HANA application lifecycle management, you’ll need to be granted the role sap.hana.xs.lm.roles::Administrator or a role with similar privileges. You’ll specifically need the system privilege REPO.MAINTAIN_DELIVERY_UNITS that is part of this role to manage a delivery unit.

Once you gain access to the SAP HANA application lifecycle management GUI, you’ll find yourself on the Delivery Units tab. On the left side of the interface, you’ll see a list of delivery units. When you click on each delivery unit, configuration options will appear to the right in the Details section.

Above the list of delivery units, you’ll see a series of action buttons, as shown in Figure 3.6, which also shows the list of delivery units found in most SAP HANA 2.0 SPS 04 systems.

Overview of the Delivery Units Management Interface in SAP HANA Application Lifecycle Management

Figure 3.6    Overview of the Delivery Units Management Interface in SAP HANA Application Lifecycle Management

To create a delivery unit, click the + Create button. The New Delivery Unit window will open, as shown in Figure 3.7. Enter the Name of the delivery unit and optionally maintain the Version, Description, and Responsible fields. These fields give you the option of providing additional metadata for the delivery unit. Click Create to continue.

New Delivery Unit Configuration Window

Figure 3.7    New Delivery Unit Configuration Window

The Details section for the new delivery unit window will now be displayed. At this point, you’ll need to assign one or more packages to the delivery unit. Locate the Assigned Packages section near the bottom of the window. Click the Assign button. The Assign Packages window will open, as shown in Figure 3.8. Highlight the packages you want to assign and click the Assign button. You’ll now see your selected packages listed in the Assigned Packages section.

Assigning Packages to a Delivery Unit

Figure 3.8    Assigning Packages to a Delivery Unit

Now that you’ve defined a delivery unit, you can use SAP HANA application lifecycle management to export your package content to a file. You can use this file as a backup, store the file for later use as an import source, or share the file with others. To export the delivery unit, locate your delivery unit in the delivery unit management interface of the SAP HANA application lifecycle management tool. Click the Export button in the icon action bar.

The Export Delivery Unit to File window will appear. Choose a file format based on the information outlined in SAP Note 1984354. If you’re exporting and subsequently importing to the same version SAP HANA system, simply choose the highest version number. Your browser will prompt you to save a .tgz file to the operating system folder of choice.

The delivery unit file should now exist under the specified file path you provided when saving the file. Delivery unit files use the .tgz file extension, commonly used on Unix and Linux systems for files containing a compressed archive. Therefore, the delivery unit file in fact is a compressed archived containing all the SAP HANA development artifacts associated with the exported delivery unit. You can use this file as a source and import the file into another SAP HANA system or even the same SAP HANA system. In most instances, these files provide an excellent backup mechanism for the content you create in an SAP HANA repository.

To import a delivery unit file, locate the delivery unit management interface of SAP HANA application lifecycle management. Click the Import button on the icon action bar. The Import Delivery Unit window will appear, as shown in Figure 3.9. Click the Browse… button to locate the .tgz file.

Import Delivery Unit Dialog for Selecting the .tgz File from Your Filesystem

Figure 3.9    Import Delivery Unit Dialog for Selecting the .tgz File from Your Filesystem

Once you’ve selected the file, click the Import button. The Confirm Import of Delivery Unit window will open, as shown in Figure 3.10. Review the Object Test Import Result section to make sure the expected objects are imported into the system without errors. Click Import again to continue.

Confirm Import of Delivery Unit Information Window

Figure 3.10    Confirm Import of Delivery Unit Information Window

To validate the status of the import, locate the notification bar at the bottom of the browser screen. If this bar is not visible, hover your mouse cursor over the bottom middle part of the screen to reveal a popup icon in the shape of an eye. Click the eye and then the upward-facing chevron to open the status window. The Notifications window, as shown in Figure 3.11, should now appear at the bottom of the screen.

SAP HANA Application Lifecycle Management Notification Window

Figure 3.11    SAP HANA Application Lifecycle Management Notification Window