Chapter 32. Working with Fabric Profiles


Profiles are applied to fabric containers, and they determine the function and behavior of their containers. A profile consists of code and configurations, which specify the type of service or application a container runs. The code may come from OSGi bundles and Karaf features pulled from repositories, also specified in the profile. Defined hierarchically, profiles can be set up to inherit from other profiles, building on their parents' definitions.

32.1. Creating a new profile

Overview

The tooling provides access to numerous profiles, each of which imparts specific functionality and behaviors to the containers to which it's assigned. But you may want to create new profiles that inherit from these base profiles, so you can override, for example, configuration details. You may also want to create your own profiles to deploy your own code. To do so, you create a new profile based on an existing one, and then change its configuration and properties to generate the specific behaviors you want to deploy to the target containers.
Note
This procedure creates a brand new profile. If you want to create a new version of an existing profile to incrementally test changes to deployed containers, see Chapter 33, Working with Versions

Procedure

To create a new profile:
  1. In Fabric Explorer, expand the fabric in which you want to create a new profile.
  2. Expand the fabric's tree to the level of the profiles, as shown in Figure 32.1.

    Figure 32.1. Accessing the profiles

    accessing profiles in Fabric Navigator
  3. Select the profile on which you want to base the new profile, and right-click it to open the context menu.
    Important
    Because the selected profile is the parent of the new profile, the new profile inherits the selected profile's configurations, properties, features, repositories and bundles as well as those of the selected profile's ancestors. However, a child's configurations override an ancestor's when their configuration files have the same name.
    Note
    Neither configuration files nor properties are visible within the tooling, but you can view them in the Red Hat JBoss Fuse Management Console. For details, see the Red Hat JBoss Fuse Management Console documentation at https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/.
  4. Select Create a new Profile.

    Figure 32.2. Create Profile dialog

    naming the profile
  5. In Profile name, enter a name for the new profile.
    Use a name that is descriptive of the new profile's function.
  6. Click OK to create and save the new profile.
    The new profile is added to the list of profiles in Fabric Explorer, under its parent profile.
  7. In Fabric Explorer, select the new profile to populate the Properties editor with the new profile's properties information and profile details.
  8. In the Properties editor, click the Details tab.

    Figure 32.3. Profiles page

    configuring new profile details
    On the Profiles page, you can add, delete, or edit features, the repositories from which features are downloaded, and bundles. You can also add or remove parent profiles. Profiles can have multiple parents, and they inherit the qualities of each
    Features are files that aggregate references to interdependent or related bundles that together define a feature. Typically, you'd use bundles only if the feature they define is not already included in a features file. For more information on bundles and features, see Deploying Features.
    Child profiles inherit everything (configurations, properties, features, repositories, and bundles) from their immediate parents and from all of their parents' ancestors. When the child's and any ancestor's configuration file have the same name, the child's configuration file replaces the ancestor's file. Otherwise, configurations are cumulative.
    Note
    The Profiles page displays only the features, repositories, and bundles added by the child profile, not those contributed by the profile's parents or other ancestors. The Parents pane shows (highlighted) the profile's immediate parents only.
  9. Make the changes you want to the new profile to configure it.
    Changes are automatically saved as you make them.
    Note
    In Fuse Integration perspective, you can easily add a Fuse project to the new profile by dragging it from Project Explorer and dropping it onto the new profile in Fabric Explorer. When you do, the fabric tooling builds the project, runs all tests, installs the project in the new profile, and uploads the profile into the fabric's internal Maven repository. Because profiles are stored in a fabric's internal repository, they cannot be shared across other fabrics.
    Important
    If you drop your project on a fabric container, rather than on a profile, the next time that container is provisioned, your project is wiped out.
    You can now assign the new profile to a container.
  10. In Fabric Explorer, select the container to which you want to assign the new profile.
    The fabric tooling populates the Properties editor with the container's properties information and profile details.
  11. Open the container's Details tab, and then select the new profile in the Profiles list.
    Repeat Step 10 and Step 11 for each container to which you want to assign the new profile.

Related topics

Section 33.1, “Creating a new version of a profile”
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.