이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Appendix A. Editing Profiles with the Built-In Text Editor


Abstract

When you have a lot of changes and additions to make to a profile's configuration, it is usually more convenient to do this interactively, using the built-in text editor for profiles. The editor can be accessed by entering the profile-edit command with no arguments except for the profile's name (and optionally, version); or adding the --pid option for editing OSGi PID properties; or adding the --resource option for editing general resources.

A.1. Editing Agent Properties

Overview

This section explains how to use the built-in text editor to modify a profile's agent properties, which are mainly used to define what bundles and features are deployed by the profile.

Open the agent properties resource

To start editing a profile's agent properties using the built-in text editor, enter the following console command:
JBossFuse:karaf@root> profile-edit Profile [Version]
Where Profile is the name of the profile to edit and you can optionally specify the profile version, Version, as well. The text editor opens in the console window, showing the current profile name and version in the top-left corner of the Window. The bottom row of the editor screen summarizes the available editing commands and you can use the arrow keys to move about the screen.

Specifying feature repository locations

To specify the location of a feature repository, add a line in the following format:
repository.ID=URL
Where ID is an arbitrary unique identifier and URL gives the location of a single feature repository (only one repository URL can be specified on a line).

Specifying deployed features

To specify a feature to deploy (which must be available from one of the specified feature repositories), add a line in the following format:
feature.ID=FeatureName
Where ID is an arbitrary unique identifier and FeatureName is the name of a feature.

Specifying deployed bundles

To specify a bundle to deploy, add a line in the following format:
bundle.ID=URL
Where ID is an arbitrary unique identifier and URL specifies the bundle's location.
Note
A bundle entry can be used in combination with a blueprint: (or spring:) URL handler to deploy a Blueprint XML resource (or a Spring XML resource) as an OSGi bundle.

Specifying bundle overrides

To specify a bundle override, add a line in the following format:
override.ID=URL
Where ID is an arbitrary unique identifier and URL specifies the bundle's location.
Note
A bundle override is used to override a bundle installed by a feature, replacing it with a different version of the bundle. For example, this functionality is used by the patching system to install a patched bundle in a container.

Specifying etc/config.properties properties

To specify Java system properties that affect the Apache Karaf container (analogous to editing etc/config.properties in a standalone container), add a line in the following format:
config.Property=Value

Specifying etc/system.properties properties

To specify Java system properties that affect the bundles deployed in the container (analogous to editing etc/system.properties in a standalone container), add a line in the following format:
system.Property=Value
If the system property, Property, is already set at the JVM level (for example, through the --jvm-opts option to the fabric:container-create command), the preceding fabric:profile-edit command will not override the JVM level setting. To override a JVM level setting, set the system property as follows:
system.karaf.override.Property=Value

Specifying libraries to add to Java runtime lib/

To specify a Java library to deploy (equivalent to adding a library to the lib/ directory of the underlying Java runtime), add a line in the following format:
lib.ID=URL
Where ID is an arbitrary unique identifier and URL specifies the library's location.

Specifying libraries to add to Java runtime lib/ext/

To specify a Java extension library to deploy (equivalent to adding a library to the lib/ext/ directory of the underlying Java runtime), add a line in the following format:
ext.ID=URL
Where ID is an arbitrary unique identifier and URL specifies the extension library's location.

Specifying libraries to add to Java runtime lib/endorsed/

To specify a Java endorsed library to deploy (equivalent to adding a library to the lib/endorsed/ directory of the underlying Java runtime), add a line in the following format:
endorsed.ID=URL
Where ID is an arbitrary unique identifier and URL specifies the endorsed library's location.

Example

To open the mq-client profile's agent properties for editing, enter the following console command:
JBossFuse:karaf@root> profile-edit mq-client
The text editor starts up, and you should see the following screen in the console window:
Profile:mq-client 1.0                                                                 L:1 C:1
#
# Copyright (C) Red Hat, Inc.
# http://redhat.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

repository.activemq=mvn:org.apache.activemq/activemq-karaf/${version:activemq}/xml/features
repository.karaf-standard=mvn\:org.apache.karaf.assemblies.features/standard/${version:karaf}/
xml/features

     ^X Quit    ^S Save    ^Z Undo    ^R Redo    ^G Go To    ^F Find    ^N Next    ^P Previous
Type ^X to quit the text editor and get back to the console prompt.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.