此内容没有您所选择的语言版本。

Chapter 6. Fabric Profiles


Abstract

A profile is the basic unit of deployment in a fabric. This chapter describes how to create, edit, and deploy profiles into containers. You can also create different versions of a profile, which makes it possible to support rolling upgrades across the containers in your fabric.

6.1. Introduction to Profiles

Overview

A profile is a description of how to provision a logical group of containers. Each profile can have none, one, or more parents, which allows you to have profile hierarchies. A container can be assigned one or more profiles. Profiles are also versioned, which enables you to maintain different versions of each profile, and then upgrade or roll back containers, by changing the version of the profiles they use.

What is in a profile?

A profile can contain one or more of the following resources:
  • OSGi bundle URLs
  • Web ARchive (WAR) URLs
  • Fuse Application Bundle (FAB) URLs
  • OSGi Configuration Admin PIDs
  • Apache Karaf feature repository URLs
  • Apache Karaf features
  • Maven artifact repository URLs
  • Blueprint XML files or Spring XML files (for example, for defining broker configurations or Camel routes)
  • Any kind of resource that might be needed by an application (for example, Java properties file, JSON file, XML file, YML file)
  • System properties that affect the Apache Karaf container (analogous to editing etc/config.properties)
  • System properties that affect installed bundles (analogous to editing etc/system.properties)

Profile hierarchies

Frequently, multiple profiles share a lot of configuration details: such as common frameworks, libraries, and so on. Defining these details separately for each profile would create a considerable maintenance headache. To avoid duplication across profiles, therefore, Fabric uses a hierarchical model for profiles. You can define a generic profile (base profile) containing the common configuration details, and then define child profiles that inherit these generic configuration details.

Some basic profiles

Fabric provides a rich set of predefined profiles, which can be used as the basic building blocks for defining your own profiles. Some of the more interesting predefined profiles are:
[default]
The default profile defines all of the basic requirements for a Fabric container. For example it specifies the fabric-agent feature, the Fabric registry URL, and the list of Maven repositories from which artifacts can be downloaded.
[karaf]
Inherits from the default profile and defines the Karaf feature repositories, which makes the Apache Karaf features accessible.
[feature-camel]
Inherits from karaf, defines the Camel feature repositories, and installs some core Camel features: such as camel-core and camel-blueprint. If you are deploying a Camel application, it is recommended that you inherit from this profile.
[feature-cxf]
Inherits from karaf, defines the CXF feature repositories, and installs some core CXF features. If you are deploying a CXF application, it is recommended that you inherit from this profile.
[mq-base]
Inherits from the karaf profile and installs the mq-fabric feature
[mq-default]
Inherits from the mq-base profile and provides the configuration for an A-MQ broker. Use this profile, if you want to deploy a minimal installation of an ActiveMQ broker.
[jboss-fuse-full]
Includes all of the features and bundles required for the JBoss Fuse full container.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.