Lesson 3: Creating an application and an environment
Applications are collections of components. Environments represent systems on which you deploy the application components.
Before you begin
Online
, as in the
following figure:About this task
Creating an application
Creating an application involves selecting the components that are in the application.
Procedure
- Click the Applications tab, and then click Create Application.
-
Name the new application
JPetStore
, and then click Save. - Add the components to the application:
-
Click the Applications tab, and then click the new application,
JPetStore
. - Click the Components tab for the application (not the Components tab at the top of the page), and then click Add Component.
- In the Add a Component window,
in the Select a Component list, select the
three components:
JPetStore-APP
,JPetStore-WEB
, andJPetStore-DB
. - Click Save.
-
Click the Applications tab, and then click the new application,
Results
Creating an environment
Creating an environment involves selecting one or more agent resources and specifying which components are deployed to each agent resource.
Procedure
- Define an environment for the application:
- Go to the Environments tab for the application.
- Click Create Environment.
- Specify the name to be Tutorial environment 1.
- Accept the defaults in the other fields in this window and click Save.
- Specify the properties for the environment.When you created the component processes, you included parameters that specify the location of artifacts on the target system, such as the location of the application server. Because these properties can vary on different target systems, you specify these properties as environment properties.
- Add the agent to the environment.When you set up the agent, you added the agent as a resource to a resource group. Now you can use that resource as part of the environment, as described in the following steps:The resource is shown on the Resources tab for the environment, as shown in the following figure:
- Map the components to this agent resource.
If you had many agents on a system with multiple nodes, you would specify which components run on each agent resource. In this case, you have only one agent resource, so all of the components run on this agent.Now the components are mapped to the target system, as shown in the following figure: