Managing the environment
Managing the environment comprises the following activities:
- Defining the topology
- Creating channel templates
- Creating channels
- Creating environments
- Creating routes
- Defining processes
- Creating triggers
- Creating content processes
- Creating a channel/environment process
- Creating the properties hierarchy
- Adding properties to all levels of the hierarchy
Defining the topology (where you will deploy)
The topology defines the targets for the deployment and any dependencies. It represents the business infrastructure.
- Create a channel template.
A channel is a logical target that represents a service, such as IBM WebSphere or Apache Tomcat. Templates enable you to organize according to service categories, such as templates for all WebSphere systems, JBoss, and SQL. Ultimately, you will want to create a template for every action pack (group of actions).
- Give the template an appropriate name (such as JBoss).
- Select an appropriate action pack, such as JBoss, for the template.
- Enter the root directory, which defines the directory level for channel access (for example, /var/www or C:\apache\htdocs.
- Create channels based on the previously defined channel templates.
Channels correspond to servers, so you need one channel for the database and one for the web server. Channels are only outbound. Incoming dataalways goes to the deployment server and always deploys to logical endpoints. Channels associate those logical endpoints to the physical targets.
- Create environments and add the channels to them.
Environments define a relationship between logical endpoints (channels), such as between a database and web server. Packages are targeted to an environment. You need an environment for test and one for production, with each environment containing a database channel and a web server channel.
- Create routes, and add the environments to them.
Aroute connects environments in a sequence, with at least one environment per route. If multiple environments are in a route, you can choose the order of progression through each, and you can allow decision points at each step to control promotion to the next step. An application might have multiple routes through a test and a production environment.
You now have your topology in place, modeling your physical infrastructure around your business model.
Defining the deployment process (how to deploy the application)
Create the deployment processes thatactually doesthe work, using the action library to define the processes. You can create different types of processes by defining the activities and triggers associated with them.
Activities are basic building blocks with parameters that enable them to be reused in different environments. They represent single execution steps or commands within the deployment, such as sending a file or suspending deployment.
- Create a deployment process for each type of package content, and define its activities. You need processes for the WAR file and the SQL file:
- The WAR file process could include “send content” commands to copy the file, then “invoke action” commands to stop and restart a service.
- The SQL file process could include commands that run the database command-line utility to process a script for applying the SQL file to the database.
Add triggers to the processes. A process has one or more triggers, which determine if or when the process deploys. For example, you could create triggersforthe deployment process that ensure that the content is in place before deploying. You need a trigger for the WAR file process and one for the SQL file process.
Triggers have a pattern and a template. For a given channel, the template contains a pattern that the system can use, for example, to search for a matching file name. An environment could have channels that are never triggered.
Adding properties to the hierarchy
To define properties at all levels of the properties hierarchy by observing the order of precedence, see Properties.
To add properties at all levels of the properties hierarchy, see Creating and editing properties.