fabric:profile-edit
Name
fabric:profile-edit — edits the specified version of the specified profile (where the version defaults to the current default version)
Synopsis
fabric:profile-edit
[
--help
] [[
-p
] | [
--pid
]PID
] [[
-r
] | [
--repositories
] | [
-f
] | [
--features
] | [
-b
] | [
--bundles
] | [
--fabs
] | [
-c
] | [
--config
] | [
-s
] | [
--system
] | [
-o
] | [
--overrides
]] [[
--set
] | [
--delete
]] [[
--append
] | [
--remove
]] [
--import-pid
] [[
--delimiter
]delim
] [[
--resource
]ResourceName
] {
Profile
} [
Version
]
Description
- Feature repository locations—to add a feature repository to the profile, enter a command in the following format:
fabric:profile-edit --repositories RepoList Profile [Version]
For example, to add thefuse-fabric
feature repository to the profile, enter a command like the following:fabric:profile-edit --repositories mvn:org.fusesource.fabric/fuse-fabric/6.0.0.redhat-024/xml/features Profile [Version]
To delete repositories, enter a command of the following form:fabric:profile-edit --delete --repositories RepoList Profile [Version]
To edit repository locations directly, using a visual text editor, enter the following command:fabric:profile-edit Profile [Version]
The visual editor opens, showing the contents of the specified profile's agent properties. To edit the repository settings, add, modify, or delete lines of the following form:repository.ID=URL
WhereID
is an arbitrary unique identifier andURL
gives the location of a single feature repository. Only one repository URL can be specified on each line. - Features to install—to add features to the profile, enter a command in the following format:
fabric:profile-edit --features FeatureList Profile [Version]
Where FeatureList is a comma-separated list of features. For example, to add thecamel-jetty
and thecamel-quartz
features to the default version of thesample
profile, enter a command like the following:fabric:profile-edit --features camel-jetty,camel-quartz sample
To delete features, enter a command of the following form:fabric:profile-edit --delete --features FeatureList Profile [Version]
To edit features directly, using the visual text editor, enter the following command:fabric:profile-edit Profile [Version]
The visual editor opens, showing the contents of the specified profile's agent properties. To edit the features, add, modify, or delete lines of the following form:feature.ID=FeatureName
WhereID
is an arbitrary unique identifier andFeatureName
is the name of a feature. - Bundles to install—to add bundles to the profile, enter a command in the following format:
fabric:profile-edit --bundles BundleList Profile [Version]
For example, to addcamel-quartz
bundle to thesample
profile, enter a command like the following:fabric:profile-edit --bundles mvn:org.apache.camel/camel-quartz/2.10.0.redhat-60024 sample
To delete bundles, enter a command of the following form:fabric:profile-edit --delete --bundles BundleList Profile [Version]
To edit bundles directly, using the visual text editor, enter the following command:fabric:profile-edit Profile [Version]
The visual editor opens, showing the contents of the specified profile's agent properties. To edit the bundles, add, modify, or delete lines of the following form:bundle.ID=URL
WhereID
is an arbitrary unique identifier andURL
specifies the bundle's location. - Configuration settings for the OSGi Config Admin service—to modify or create a configuration setting from the OSGi Config Admin service, enter a command in the following format:
fabric:profile-edit --pid PID/Property=Value Profile [Version]
Where PID is a persistent ID, which is used in the context of the OSGi Config Admin service to identify a collection of related properties. For example, to change the value of the secure HTTPS port used by the Jetty server in thesample
profile, you could edit theorg.osgi.service.http.port.secure
property from theorg.ops4j.pax.web
PID using a command like the following:fabric:profile-edit --pid org.ops4j.pax.web/org.osgi.service.http.port.secure=8553 sample
To delete a property, enter a command of the following form:fabric:profile-edit --delete --pid PID/Property Profile [Version]
To edit OSGi Config Admin settings directly, using the visual text editor, enter the following command:fabric:profile-edit --pid PID Profile [Version]
The visual editor opens, showing the contents of the specified profile'sPID.properties
file (which is actually stored in the ZooKeeper registry). To edit the properties, add, modify, or delete lines of the following form:Property=Value
- Property settings from etc/config.properties—to modify or create a Java system property in the container's
etc/config.properties
file (which affects the container), enter a command in the following format:fabric:profile-edit --config Property=Value Profile [Version]
For example, to change the value of thekaraf.startlevel.bundle
Java system property inconfig.properties
, you would enter a command like the following:fabric:profile-edit --config karaf.startlevel.bundle=80 Profile [Version]
To delete a Java system property fromconfig.properties
, enter a command of the following form:fabric:profile-edit --delete --config Property Profile [Version]
To edit the Java system properties directly, using the visual text editor, enter the following command:fabric:profile-edit Profile [Version]
The visual editor opens, showing the contents of the specified profile's agent properties. To edit the Java system properties (analogous toetc/config.properties
), add, modify, or delete lines of the following form:config.Property=Value
- Property settings from etc/system.properties—to modify or create a Java system property in the container's
etc/system.properties
file (which affects bundles deployed in the container), enter a command in the following format:fabric:profile-edit --system Property=Value Profile [Version]
For example, to change the default port for the OSGi HTTP service, you would enter a command like the following:fabric:profile-edit --system org.osgi.service.http.port=8181 Profile [Version]
If the system property,Property
, is already set at the JVM level (for example, through the--jvm-opts
option to thefabric:container-create
command), the precedingfabric:profile-edit
command will not override the JVM level setting. If you want to override the JVM level setting, you must indicate this explicitly by adding thekaraf.override
prefix to the property name,Property
—for example:fabric:profile-edit --system karaf.override.Property=Value Profile [Version]
To delete a Java system property fromsystem.properties
, enter a command of the following form:fabric:profile-edit --delete --system Property Profile [Version]
To edit the Java system properties directly, using the visual text editor, enter the following command:fabric:profile-edit Profile [Version]
The visual editor opens, showing the contents of the specified profile's agent properties. To edit the Java system properties (analogous toetc/system.properties
), add, modify, or delete lines of the following form:system.Property=Value
If you want to ensure that this setting overrides any JVM level setting, set the system property as follows:system.karaf.override.Property=Value
fabric:profile-edit
are immediately propagated to the containers that use that profile. This is not the recommended way to edit profiles, however: if you change multiple settings in the profile, you could potentially put the affected containers into an inconsistent state. To guarantee atomicity, it is better to use the fabric:profile-edit
command in combination with the fabric:container-upgrade
command—see fabric:container-upgrade.
Enclosing an Option Value in Quotes
http.nonProxyHosts="myserver1|myserver2"
, on the default
profile, you would use the following command:
fabric:profile-edit --system "karaf.override.http.nonProxyHosts=\"myserver1|myserver2\"" default
karaf.override
prefix is prepended to the property name, because http.nonProxyHosts
is already set at the JVM level and needs to be overridden.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-p, --pid | Edit an OSGi configuration property, specified in the format PID/Property. |
-r, --repositories | Edit the list of feature repositories. |
-f, --features | Edit features, specifying a comma-separated list of features to add (or delete). |
-b, --bundles | Edit bundles, specifying a comma-separated list of bundles to add (or delete). |
-f, --fabs | Edit Fuse Application Bundles (FABs), specifying a comma-separated list of FABs to add (or delete). |
-c, --config | Edit the Java system properties that affect the container (analogous to editing etc/config.properties in a root container). |
-s, --system | Edit the Java system properties that affect installed bundles (analogous to editing etc/system.properties in a root container). |
-o, --overrides | Edit the bundle overrides, specifying a comma-separated list of bundles to add (or delete). A bundle override can be used to override the bundle version installed by a feature. For example, if a feature installs version 1.0.0 of a particular bundle, you could use a bundle override to install version 1.0.1 of the bundle instead. |
--set | Set or create values (selected by default). |
--delete | Delete values. |
--append | When editing list values, append the specified value to the list. Can only be used in combination with the --config , --system , and --pid options. |
--remove | When editing list values, remove the specified value from the list. Can only be used in combination with the --config , --system , and --pid options. |
--delimiter | Specifies the delimiter to use in combination with the --append and --remove options. Default is , (comma). |
--resource | When editing with the visual text editor, specifies the name of the resource to edit. |
-i, --import-pid | Imports the PIDs that are edited, from local OSGi Config Admin. |
Profile | (Required) Name of the profile to edit. |
Version | Version of the profile to edit. Defaults to the current default version (use version-list to find the current default). |