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

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.
  1. Create a profile called local_values
    JBossFuse:karaf@root> profile-create local_values
  2. 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 the io.fabric8.examplesystem PID in the local_values profile will be:
    url=www.example.com
  3. Add the new profile to the proxy-server container.
    JBossFuse:karaf@root> container-add-profile proxy-server local_values
  4. Create another new profile.
    JBossFuse:karaf@root> profile-create local_values_test
  5. Set the values in profile:io.fabric8.examplesystem to local_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.0
    The content of pid:csp.test will be:
    testUrl=${profile:io.fabric8.examplesystem/url}
  6. Add the local_values profile to the abc container.
    JBossFuse:karaf@root> container-add-profile abc local_values
  7. Add the local_values_test profile to the abc container.
    JBossFuse:karaf@root> container-add-profile abc local_values_test
  8. Sign on to the abc container.
    JBossFuse:karaf@root> fabric:container-connect abc
  9. Issue the config:proplist command 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
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.