ZQ410 Unit 2 Transcript: Configuring Components and Component Processes
ZQ410 Unit 2 Transcript: Configuring Components and Component Processes
Slide 1
Components represent deployable items along with user-defined processes that operate on them,
usually by deploying them. In this unit, you learn how to create a component, import component
versions, create component processes, and work with properties.
Slide 2
Unit objectives
• Describe the purpose and structure of a component
• Create components and import component artifacts
• Create component processes to deploy components
• Store component information with properties
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Slide 3
Topics
• Components overview
• Creating components and importing component artifacts
• Creating processes to deploy components
• Storing information with properties
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Slide 4
Application
Component processes
Component processes Resources
Steps
Agent
Properties
Properties
Component
Versions
Versions Files
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
You will see this representation of the objects in IBM UrbanCode Deploy for the next two units.
This slide shows a visual that groups the parts of the product that make up an application.
Slide 5
Application
Component processes
Component processes Resources
Steps
Agent
Properties
Properties
Component
Versions
Versions Files
What
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
This section focuses on components, which are containers for deployable items and their
deployment instructions. A component usually contains a closely related set of artifacts, and you
would deploy its content on a single target.
Slide 6
Component tiers
of an application
Web
Images and static content
component
Database
Application component
Application WAR file
Application
SQL
component
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
An application consists of a break down of components. In this example, the application has three
component tiers: one for the web content, one for the database content, and one for the
application content. This arrangement gives flexibility to deployments. You can see what versions
of each component are deployed to specific environments. The benefit of IBM UrbanCode Deploy
is that it manages the source file and identifies which files have changes. Then, it deploys only
the changed files.
Slide 7
Properties
Steps
Component
processes
Component
Versions
Files
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
From a high-level view, a component has three major parts: versions, component processes, and
properties.
• A version contains a set of artifacts. Versions ensure that the appropriate set of files get
deployed.
• A component process is a list of commands that run on a target computer. Steps can
manipulate files, run system commands, download files, and run programs.
• Properties are variables that store the locations of files, folders, servers, or other resources
that might change.
Slide 8
Topics
• Components overview
• Creating components and importing component artifacts
• Creating processes to deploy components
• Storing information with properties
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Slide 9
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
When you create a component, you identify its type of artifacts and the location of the artifacts. In
most cases, you add components by connecting the server to the system that hosts the artifacts,
such as a Maven repository. In this example, and when you work through the lab, the versions
are imported from the file system.
Slide 10
Current component
version
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
After you define the source for a component, you import its artifacts on the Versions tab. Each
time a component is imported, including the first time, a new version of the component is created.
This is called versioning.
To manually import a new version, you click Import New Versions. The status of the import
process displays in the Currently Running Version Imports section. You can see the agent that is
importing the component.
10
Slide 11
The agent is typically on the same computer where the artifacts are located
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Version artifacts are imported by the agent on that system. The agent copies the files from a
repository or file system into CodeStation. You can choose the agent that imports versions in the
System Settings.
11
Slide 12
New component
version successfully
imported
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
A component might have several versions in CodeStation, and each version has a unique set of
files.
12
Slide 13
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
You can see the version import history in the Configuration tab. If the version import failed, you
can view the error log. Make sure that the files are available on the agent system and that the
location of these files is correct on the component.
13
Slide 14
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
After a version is imported successfully, click the new version to view the files that were imported.
Versions let you see all of the files that are associated with a component. In this example, the
images for the web server are listed in the Artifacts section.
14
Slide 15
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
The Changes tab tracks changes made to the component. You can see who modified the
component and the date and time the change was made. This provides you with an audit trail of
who is changing things. In this example, you can see that the basePath property was changed.
15
Slide 16
Topics
• Components overview
• Creating components and importing component artifacts
• Creating processes to deploy components
• Storing information with properties
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
16
Slide 17
Configuration
• Applies a configuration inventory to a deployed component
Deployment
Operational (with • Does not add or remove artifacts from the inventory; it runs steps
version) on a currently deployed component
Operational (no • Same as the Operational (with version) type, except that this type
version needed) does not use a component version
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
At this point, you created your components and imported the versions. So, how does the actual
deployment happen? You deploy components with component processes. Processes define what
IBM UrbanCode Deploy does with a component's artifacts. For example, a component process
can run tasks on a single component, such as deploying it, uninstalling it, or running configuration
tasks on it.
17
Slide 18
${p:resource/work.dir} is
the default working
directory for the agent
${p:component.name} is
the component name
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
You create a component process in two steps: first, you configure basic information, such as the
name and process type; then, you use the process editor to assemble the process. A component
process is defined for a specific component.
18
Slide 19
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Component processes are created with the process editor. To open the process editor, click the
process name. The process editor has a Steps palette on the left and a design space on the right.
A process begins with the Start step and must end with the Finish step.
19
Slide 20
Process steps are selected from a menu of standard steps that replace typical
deployment scripts and manual processes
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
The available steps in the palette are determined by the installed plug-ins. Plug-ins consist of
distinct processes called steps. Each step consists of a number of properties, a command that
runs the step, and post-processing instructions. Step properties can serve various purposes, from
providing input to the command to supplying some, or all, of the actual command itself.
Some plug-ins are included with the product, but you can install others. IBM UrbanCode Deploy
provides steps for several utility processes, such as inventory management, and workflow control.
20
Slide 21
A number of plug-ins come with the product and many others are available that
can be downloaded and installed
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Other process steps are provided by plug-ins that provide integration with common deployment
tools and application servers. A full list of plug-ins can be found on DeveloperWorks at this
address: https://developer.ibm.com/urbancode/plugins/.
Plug-ins provide processing and integration functions. There are two types of plug-ins:
• Source-type plug-ins integrate with external systems to import artifacts and create
component versions. Source-type plug-in properties are typically defined when a component
is created.
• Automation-type plug-ins provide process steps that manipulate components, typically by
deploying them. Automation-type plug-in properties can be set at design time in the process
editor, or at run time in the user interface.
21
Slide 22
The palette provides automation steps that you can drag onto the process editor
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
The process editor is a visual drag-and-drop editor where you can drag process steps from the
palette onto the design space and configure them as you go. As more steps are placed, you
visually define their relationships with one another.
When you drag a step into the process editor, you can edit the fields for that step. In this
example, the Download Artifacts step is prepopulated with information that you can use.
22
Slide 23
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Each time that you save your process, a new version of that process is saved. You can scroll
through the versions to view them and then reset to any process version that you previously
saved.
23
Slide 24
The Changes tab tracks the creation date and author of the versions
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
When a process is created, information is gathered to inform when a change was made and who
made it.
24
Slide 25
Branching steps • Branch processes so multiple steps run at the same time
Process step • Items that a post-processing script finds in the step's output log
properties
Preconditions • Preconditions determine whether the step runs
25
Slide 26
Process succeeded
Process failed
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
By default, all connections between steps have the flag set to succeeded, which is the green
circle with a check. This means that the originating step must finish processing before the next
step starts to process. If you set the flag to failed, which is the red circle with an explanation point,
then the step must have a failed process to reach the next step in that branch. And if you set the
flag to a gray circle, the process moves to the next step, whether the previous step’s process
completed or failed.
26
Slide 27
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
When you add a switch step, you specify a property. Then, you add two or more outgoing
connections from the step, each with a possible value for that property. At run time, the process
follows the connection with the matching property value.
27
Slide 28
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
You can branch processes so that multiple steps run at the same time by adding multiple
outgoing connections from a step. You can use a Join step to merge processes into running a
single step at a time. Join steps indicate that all connections to the Join step must succeed. If any
of the steps that connect to a Join step fail or do not run, the Join step causes the process to fail.
In this example, all steps leading up to Steps R and B must complete, as Steps R and B both
connect to a Join step.
28
Slide 29
Topics
• Components overview
• Creating components and importing component artifacts
• Creating processes to deploy components
• Storing information with properties
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
29
Slide 30
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Properties are pointers to values. They store information about components, environments,
processes, applications, and global properties for the system. In this example of a component
step, the URL field points to a value that is defined for the environment. At run time, the
environment property, in this case the db.url value, will be substituted here.
30
Slide 31
Component
Component
Resource property Environment
types
Version
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Component properties: Component properties are values defined and set directly on the
component. They stay the same for all versions of the component. So, any time you import a new
version, the properties are already set.
Property definitions: Components have a special type of property called property definitions.
Component property definitions can be used for environments, versions, and resources. You use
definitions when you have a value that the component uses that needs to change each time you
use that component. These properties are defined on the component, but their values are set in
other places. For example, Component environment properties are defined on a component, but
the values are not specified until the component is deployed to an environment. In the previous
slide, the URL field pointed to a predefined environment property called db.url. This allows you to
assign a different database URL to each environment. You might want to do this if you have a
test database at one URL for your development environment and a production database at
another.
• For example, if different database users have access to the development and test
databases, you can set the database user name and password in each environment. Then,
you use a component environment property to point the correct database URL for each
environment. is different in every environment (DEV, QA, SIT, etc.)
• Component version properties are defined on a component, but the values are specified on
component versions. This type of property stores information that changes with each version
of the component, such as a version number. Each component version can have a different
value for its component version property.
• Component resource properties are defined on components, but they are not given a value
until the component is added to an environment as a resource. Then, the property behaves
much like a resource property. Because a component can be added to an environment
multiple times, each instance of the component can have a different value for the component
resource property. If you need to use two copies of a component in the same environment
but use a different value between them, use a resource property definition.
31
Slide 32
Property notation
Component ${p:component/propertyName}
${p:elementType/propertyName}
Environment ${p:environment/propertyName}
location property name
Version ${p:version/propertyName}
Resource ${p:resource/propertyName}
${p:environment/db.url}
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Properties are referred to by scope. Scope is the type of artifact that contains the property, such
as the environment or component. When you refer to a property, you use the notation that starts
with a dollar sign, open curly brace, p, which stands for property, and then a colon. Then you
identify the artifact, followed by a slash, the property name, and a closed curly brace.
${p:component/prop.name}, where the “p” stands for “property.” It’s says to look in this location
with this name.
Keep in consideration where values change; that is where you want to set the properties.
This slide shows the most commonly used component properties and definition. Application,
environments, resources, the system, and agents all have properties as well. For more
information, see the IBM Knowledge Center:
https://www.ibm.com/support/knowledgecenter/SS4GSP_6.2.3/com.ibm.udeploy.doc/topics/ud_pr
operties_overview.html.
32
Slide 33
${p:elementType/propertyName} ${p:propertyName}
${p:environment/db.url} ${p:db.url}
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
There might be situations where you don’t want to reference a specific artifact. In this case, you
can refer to a property without scope by leaving out the artifact (${p:propertyName}). For
example, with the environment variable, db.url, you can refer to it with the artifact name,
environment, as you see on the left (${p:environment/db.url}). Or you can refer to the same
environment variable without scope by removing the artifact name, as shown in the right
(${p:db.url}). In this way, you can refer to properties defined in other places, such as in the
application, system, or resource.
33
Slide 34
Property scope determines the precedence of properties with the same name
4 5
Agent Environment
3 6
Resource Component
2 7
Component
Application
version
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
If a property is defined in multiple places, its value is determined by the property’s order of
precedence. The order of precedence allows you to override properties in specific contexts. If you
refer to a property without scope, then the property with the highest order of precedence is used.
This slide shows the order of precedence from highest to lowest. The highest precedence is given
to properties that are referenced in processes. The lowest precedence is given to properties
referenced in the system.
In this way, you can override properties to change the application behavior without changing the
code. For example, an application might have a database for testing and a separate database for
production use. In this case, you might create an application property, such as databaseLocation,
to store the testing database location. The application and component processes can refer to the
property without specifying the application scope, like this: ${p:databaseLocation}. Then, in the
production environment, you can override the application property with an environment property
that specifies the production database location. The processes still refer to
${p:databaseLocation}, but in the context of the production environment, the environment
property takes precedence, so the application uses the production database.
34
Slide 35
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
Properties for applications, processes, components, component versions, resources, and agents
are available on their respective configuration tabs. System (global) properties are available on
the Settings tab at the top of the page, by clicking Settings > Properties.
35
Slide 36
Unit summary
• A component has three major parts: versions, processes, and properties
• Components are added by connecting the server to the system that hosts the artifacts
• A component version contains a set of deployable artifacts
• A component process is a series of user-defined steps that operate on a component's artifacts
• Component properties are values that are assigned on individual components
• Property definitions are defined on the component, but their values are set in other places
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
36
Slide 37
Unit 2: Configuring components and component processes © Copyright IBM Corporation 2017
37