Chapter 11. Deploying Projects to a Container
Abstract
To deploy a project into a container, you must either have already started the container using its command shell, or you must start it up from inside the JBoss Fuse Tooling (for details, see Chapter 19, Managing servers.
The Deploy to... tool (
) makes deploying applications into containers a one step process.
The tooling supports direct deployment into the following containers:
- Red Hat JBoss Fuse
- Apache ServiceMix
- Apache Karaf
You can deploy Fuse projects into a container three ways:
- via a container's deploy folderYou copy the package generated by the tooling into the container's deploy folder. This method has two drawbacks, as the tooling does not:
- verify that the project builds a package that is compatible with the target container
- provide feedback as to whether the deployment succeeds or fails
- via a JMX connected containerThe tooling builds the project, and, regardless of the packaging specified in the project's POM, installs the generated artifacts as a bundle. You can use Fabric Explorer to determine whether the project deploys successfully.
- via a fabric profileThe tooling builds the project, packages the generated artifacts into a bundle, adds the bundle to the profile, and copies the bundle into the fabric's internal repository.ImportantIf the profile is not assigned to a running container the project will not be deployed into the fabric. You must assign the profile to a running container before you can see the project running.
Note
You can deploy a project by dropping it onto a connected container in Fabric Explorer, or onto a fabric profile in Fabric Explorer.
11.1. Using a Container's Deploy Folder
When the tooling deploys a project into a container's deploy folder, it builds the project as specified in the project's POM and copies the resulting package to a predetermined location. The tooling assumes two things:
- the specified location is a container's deploy folder
- the package generated by the project is compatible with the container
Before you can deploy a project to a container's deploy folder you must add the container's deployment information to the tooling. Once the tooling knows the container's information, the container will appear as an option in the
menu.
11.1.1. Configuring a Container's Deploy Folder
Overview
Before you can deploy applications into a container's deploy folder, you must provide the tooling with the location of the container's deploy folder. The Deploy Folders preference panel enables you to configure one or more containers. You provide a name for the container and the full path to the container's deployment folder.
Accessing the Deploy Folder preference panel
You can access the deployment folders preference panel two ways:
- selecting
from the main menu This method opens the general Eclipse preference window. You need to selectfrom the list of preferences in the panel on the left side of the widow. - selecting
from the project's context menu This method opens the preferences window and ensures that the Deploy Folders panel is selected.
Add a container's deploy folder
To add a container's deploy folder:
- Open the Deploy Folder preference panel.
- In the Name field, enter a name for the target container.The name can be any unique string.
- In the Deploy Folder field, enter the full path to the container's deployment folder.The button opens a file explorer.ImportantThe tooling does not validate whether the selected folder is a valid deployment folder for a container.
- In the Description field, enter a description for the container.
- Clickto add the new container to the table of configured containers.
- Clickto close the preferences window.
When you add a container to the list, it appears in the context menus'
submenu.
Edit a container's deploy folder
To edit a container's deploy folder:
- Open the Deploy Folder preference panel.
- Select the container whose configuration you want to edit.
- Edit the information that needs updating.ImportantChanging the value of the Name field creates a new container configuration.
- Click.
- Clickto close the preferences window.
Delete a container's deploy folder
To delete a container's deploy folder:
- Open the Deploy Folder preference panel.
- Select the container to be deleted.
- Click.
- Clickto close the preferences window.
Related topics
Chapter 11, Deploying Projects to a Container |
Deploy Folders |
11.1.2. Deploying a Project to a Container's Deploy Folder
Overview
When the tooling deploys a project to a container's deploy folder, it builds the project and copies the results to the deploy folder configured for the container.
Procedure
To deploy a project to a container's deploy folder:
- Select the routing context file that you want to deploy.ImportantThe project must be configured to package the results in a format that the target container can deploy.
- Select
from the project's context menu. The tooling builds the project and copies the results to the selected container's deploy folder.NoteIf you have not already configured a container, you can do so by selectingfrom the context menu. - Check the Console view to see if your project was successfully built and copied to the target container.
- Check the container's log files to see if the project was successfully deployed.
Related topics
Section 11.1.1, “Configuring a Container's Deploy Folder” |