Show Table of Contents
6.5. Environment Specific Values in Fabric Profiles.
If you run a number of Fuse systems you may want to define environment-specific configurations. To do this you can create a profile containing properties as key-value pairs, and assign it to a container. When it is assigned to a container, every profile in that container can refer to the information stored in it.
For example, use the following commands to set up a proxy server and define environment-specific values for it.
- Create a profile called
local_valuesJBossFuse:karaf@root> profile-create local_values
- Edit the new profile to include the hostname information.
JBossFuse:karaf@root> fabric:profile-edit --pid io.fabric8.examplesystem/url=www.example.com local_values
The contents of theio.fabric8.examplesystem PIDin thelocal_valuesprofile will be:url=www.example.com
- Add the new profile to the
proxy-servercontainer.JBossFuse:karaf@root> container-add-profile proxy-server local_values
- Create another new profile.
JBossFuse:karaf@root> profile-create local_values_test
- Set the values in
profile:io.fabric8.examplesystemtolocal_values_test.JBossFuse:karaf@root> fabric:profile-edit --pid 'csp.test/testUrl=${profile:io.fabric8.examplesystem/url}' local_values_test Setting value:${profile:io.fabric8.examplesystem/url} key:testUrl on pid:csp.test and profile:local_values_test version:1.0The content ofpid:csp.testwill be:testUrl=${profile:io.fabric8.examplesystem/url} - Add the
local_valuesprofile to theabccontainer.JBossFuse:karaf@root> container-add-profile abc local_values
- Add the
local_values_testprofile to theabccontainer.JBossFuse:karaf@root> container-add-profile abc local_values_test
- Sign on to the
abccontainer.JBossFuse:karaf@root> fabric:container-connect abc
- Issue the
config:proplistcommand to show resolved environment settings.JBossFuse:admin@abc> config:proplist --pid csp.test fabric.zookeeper.pid = csp.test service.pid = csp.test testUrl = www.example.com

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.