Show Table of Contents
2.2. Deploy a Profile
Deploy a profile to the child container
Having created the child container, as described in Section 2.1, “Create a Fabric”, you can now deploy a profile to it.
Note
Do not deploy profiles that have the same PID defined with different values. If you do, the fabric uses the values of the last one deployed.
To deploy a profile to the container, follow these steps:
- Open a terminal and
cdto the$FUSE_HOME/quickstarts/beginner/camel-logdirectory. - Build the camel-log quickstart by entering this command:
$ mvn clean install
- Upload the camel-log quickstart profile to the fabric container by entering this command:
$ mvn fabric8:deploy
NoteIf this is the first time you've run this command, it prompts you to enter theusernameandpasswordto use to log into the fabric container. - Deploy the
quickstarts-beginner-camel.logprofile into thechildcontainer by entering this console command:JBossFuse:karaf@root> fabric:container-change-profile child quickstarts-beginner-camel.log
- Verify that the camel-log quickstart profile,
quickstarts-beginner-camel.log, was uploaded successfully by entering thefabric:statusconsole command:JBossFuse:karaf@root> fabric:status [profile] [instances] [health] fabric 1 100% fabric-ensemble-0000-1 1 100% jboss-fuse-full 1 100% quickstarts-beginner-camel.log 1 100% - Verify that the
quickstarts-beginner-camel.logprofile deployed successfully to thechildcontainer, issuing thefabric:container-listcommand:JBossFuse:karaf@root> fabric:container-list
until thechildcontainer's status changes tosuccess:[id] [version] [type] [connected] [profiles] [provision status] root* 1.0 karaf yes fabric success fabric-ensemble-0000-1 jboss-fuse-full child 1.0 karaf yes quickstarts-beginner-camel.log success
View the sample output
When it is running, the
quickstarts-beginner-camel.log profile writes a message to the container's log every five seconds. To verify that the profile is running properly, you can look for these messages in the child container's log, as follows:
- Connect to the
childcontainer, by entering the following console command:JBossFuse:karaf@root> container-connect child
- After logging on to the
childcontainer, view thechildcontainer's log using thelog:tailcommand, as follows:JBossFuse:karaf@root> log:tail
You should see some output like the following:2016-06-16 11:47:51,012 | INFO | #2 - timer://foo | log-route | ? ? | 153 - org.apache.camel.camel-core - 2.17.1.redhat-630187 | >>> Hello from Fabric based Camel route! : child 2016-06-16 11:47:56,011 | INFO | #2 - timer://foo | log-route | ? ? | 153 - org.apache.camel.camel-core - 2.17.1.redhat-630187 | >>> Hello from Fabric based Camel route! : child - Type Ctrl-C to exit the log view and return to the child container's console prompt.
- Type Ctrl-D to exit the child container's console, which returns you to the root container's console.

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.