IBM UrbanCode provides a suite of tools to handle the build, release, and deployment phases of larger DevOps cycles. UrbanCode Deploy handles automating application deployments. It provides continuous delivery during agile development, and the auditing trails, version support, and approval trails needed in production. Part 1 of this pair of articles describes how to set up the deployment of a single Liberty server.

Before you start, access the IBM UrbanCode Deploy Documentation in the IBM Knowledge Center to install and set up your UrbanCode Deploy environment.

The order in which I walk through the UCD object creation differs slightly from the recommended path:

Application → Components → Resources/agents → Environments

This is so that you can test a component process in isolation once the component is added to the application. This eliminates the need to create an application process before testing a component.

This also allows me the option of grouping any properties that can be re-used across components under the application property section.

The order recommended by the UrbanCode Deploy tutorial documentation is to create the components before the application.

1. Creating the UrbanCode Deploy Liberty application

An UrbanCode Deploy application is the collection of the components needed for automated deployment. Artifacts are the application files need for installation and components encapsulate the artifacts needed to install an application.

Create the Liberty application on the UrbanCode Deploy dashboard:

  1. Click Create New Application and give the application a name, such as Liberty Profile Application:



2. Any properties that can be referenced across multiple component designs can optionally be added to the application property section.
I added the following properties:

  • liberty_directory, which resolves to the Liberty profile installation directory.
  • liberty_jar_name, which resolves to the name of the installation JAR file.
  • liberty_profile_directory, which resolves to the location of the Liberty profile server directory.
  • liberty_serverName, which resolves to the name of the Liberty profile server.
  • liberty_root, which resolves to the Liberty profile installation root directory.


Most of the properties used in the Liberty component process design are defined under Liberty Profile Application > Configuration > Application Properties. The same property can have different values by doing a re-declaration at the component, environment, and/or resource level. The property value is resolved based on object precedence.



There are exceptions: for example; properties referenced in the component  ‘basic setting’  panel did not resolve when only declared in the application property section.  I added the following property in the component properties section.

  • liberty_install_resp, which resolves to the installation location of Liberty Repository.

UCD Component Property Declaration

UCD Component Property Declaration

See Using properties in the Knowledge Center.

You have now created an application called Liberty Profile Application. In the next section you will create a component in the application called Liberty Component.

2. Creating an UrbanCode Deploy Liberty component

A component is the primary container for artifacts needed for the installation of the application. In this article, the Liberty Profile Installation file is the artifact.

  1. Click Create New Component and give the component the name Liberty Component:

UCD Create Component

UCD Create Component

2. Set Source Config Type to File System (Versioned) (see (1) in the figure below). This is where UrbanCode Deploy will retrieve the artifacts from. Other sources such as Subversion and Maven are also supported.
3. In the Base Path field, type the name of the liberty_install_resp property (see (2)). This field does not auto-complete so ensure you enter the name in the correct format (see Using properties).
4. Select the Import Versions Automatically check box (see (3)). This makes UrbanCode Deploy poll for new artifact versions to manage.
5. Select the Copy to Code Station check box (see (4)). This imports artifacts into the UrbanCode Deploy code station. The amount of data in code station can become an issue so you can configure the lifecycle of artifacts in code station in the Settings view.
6. Select the Run process after creating a new version check box (see (5)). This triggers UrbanCode Deploy application processes.

UCD Liberty Profile Component

UCD Liberty Profile Component

You have now created a component for the Liberty Profile Installation file by filling in basic component information. Next you must create the set of component processes needed to act on the Liberty Profile artifact.

3. Creating the component process

  1. Create a new component process with the name Liberty Profile Install.
  2. Set the Process Type to Deployment and the Inventory Status to Active.
  3. During deployment automation execution, the target system’s local UrbanCode Deploy agent creates a default working directory with the component name. The targent system’s local agent will download and store the component artifact in this default directory. By default UrbanCode Deploy sets a server property as a references to the component’s Default Working Directory value. You can reference the same server property in your process design. Notice the Default Working Directory field is set by default.

UCD Liberty Profile Component Process Create

UCD Liberty Profile Component Process Create

You have now created the component process.

4. Creating the process design

We will now create the Liberty Profile Install process design for the Liberty Profile component with the following steps:

  • Stop the previously running Liberty Profile (see (1) in the figure below).
  • Delete the previous Liberty Profile installation (see (2)).
  • Download the Liberty Install artifact to a component default working directory on the target system (see (3)).
  • Install Liberty profile (see (4)).
  • Create the Liberty profile server (see (5)).


TIP: Create component processes as though the target systems already have an active deployment; in this example, Liberty Profile. Processing optionally continues past steps 1 and 2 if the server is not running or installed.

All of the following steps for the process design are available in the UrbanCode Deploy Liberty plug-in. You just need to add them to the design and configure certain settings.

  1. Add the Liberty Profile Stop Server step to the process design:

    'Stop Server' Liberty Profile Process Step

    ‘Stop Server’ Liberty Profile Process Step
    • In the Server Name field, type the name of the application property liberty_serverName (see (1) in the figure above). Manage component and application properties from the Configuration panel (see also Using properties).
    • In the WebSphere Liberty Installation Directory field, type the name of the application property liberty_root (see (2)).
    • Select the Allow Failure field (see 3). This means that processing can continue if the Liberty server is stopped or not deployed.
    • Leave the Working Directory field empty; it defaults to previously discussed Default Working Directory. UrbanCode Deploy creates a working directory with the name of the component. You can optionally reference the component’s default working directory as ${p:resource/work.dir}/${}.
  2. Add the Liberty Profile Delete Files and Directories step to the process design:

    UCD Process Step: Working and Base Directory.

    UrbanCode Deploy Process Step: Working and Base Directory.
    • Set Working Directory to the installed Liberty server location.
    • Set Base Directory to the current working directory.
    • Enable the Allow Failure option.
      When you change the working directory path, remember to review the Base Directory and Working Directory values. The base directory value is appended to the working directory value during process execution.
  3. Add the Download Artifacts step to the process design:

    UCD Download Artifacts

    UCD Download Artifacts
    • Accept the default settings this design step.
  4. Add the Liberty Profile Install Server Archive step to the process design:


    Reference the application properties liberty_serverName and liberty_root again in this step.

  5. Add the Liberty Profile Create Server step to the process design.

I also defined other Liberty Profile component processes to be used with Liberty Profile application processes. The Liberty plug-in support was useful in designing the following component processes:

Component Process Design: Uninstall Liberty Server


Both steps use the Liberty plug-in support.

Component Process Design: Start Liberty Server


Component Process Design: Stop Liberty Server


The Liberty Profile Stop Server step uses Liberty plug-in support.

5. Integrating the component into the Liberty Profile application

With the Liberty Profile component processes created, you need to associate the component with the Liberty Profile application. In the application, click Add Component and select the component name:


6. Creating Resources for the Liberty Profile application

Resources are generally the UrbanCode Deploy application deployment targets; a server, for example. Any systems with UrbanCode Deploy agents installed will show up in the Resources > Agents panel of the administration dashboard. Include agents in new or existing top-level group declarations to make them available for application deployments.

  1. Create a top-level group called Liberty Windows Group.
  2. Add any target deployment system agents to the group.


    For the component processes to run, the component needs to be registered with the system agent.

  3. Add the component to an agent in the Resource view:


7. Creating an application environment

  1. With the resources in place, create an application environment for Liberty Profile:


  2. To complete creating the environment, add a top-level group resource:


8. Creating processes for the Liberty Profile application

With component, resource, and environment declared, the Liberty Profile application needs processes to manage the component process execution.

Create an application process:
1. Click Create New Process.


2. Name the process Liberty Profile Install.


3. In the Inventory Management field, select Automatic.
4. In the Offline Agent Handling field, select Check Before Execution.
5. Add a Liberty Profile component > Liberty Profile Install step to the new application process design.


6. Add a Liberty Profile component  > Liberty Profile Start Server step to the application process design.
7. Organize the application process design steps as follows:


8. Remember; before doing a full deployment, you can test component processes. Access the Component page of the application, click Run Process, then click Submit to run the component process.



8. Running the deployment process

You’re now ready to run the deployment automation:

  1. Click the Request Process button next to the Environment definition to start the deployment:


  2. Clear the Only Changed Versions check box to force the overlay of previous deployments. This is useful for deployment automation testing:


The submitted process automation displays in an execution panel:


The completed process request:


And that completes a single Liberty deployment.

If you want to deploy across more servers, add additional agents to a new or existing top-level group resource. Applications deploy across multiple resources by adding them to an existing or new environment. Creating additional UrbanCode Deploy environments is another way to group systems and control deployments because environments are a specified option in running the application process.

In Part 2, we install a simple server application with the Liberty deployment.

7 comments on"Deploying Liberty using IBM UrbanCode Deploy (Part 1)"

  1. Craig Simmons January 18, 2017

    Hi. I’m getting to point 8.5 (Creating processes for the Liberty Profile application – Add a Liberty Profile component > Liberty Profile Install step to the new application process design) and then things aren’t clear to me. Apologies, I’m a newbie here. At this point…

    Home>Applications>Liberty Profile Application>Processes>Process: Liberty Profile Install

    I’m in the Process Designer, but unlike earlier, I do not see my Application Server menu option on the left, I only see the following menus: –
    Application Steps
    Component Process Steps
    Utility Steps

    Have I missed something there? The text and accompanying images above don’t seem completely clear to me

    • Craig Simmons January 18, 2017

      BTW, there are two step 8’s above

      • Craig Simmons January 18, 2017

        Just to confirm:-
        If I look at the design view under: –

        Home>Components>Liberty Component>Processes>Process: Liberty Profile Install

        I see the following menus on the left: –

        Utility Steps
        Application Server
        IBM Urban Code Deploy
        Resource Tools
        System Utility

        If however I look at: –

        Home>Applications>Liberty Profile Application>Processes>Process: Liberty Profile Install

        I only see: –

        Application Steps
        Component Process Steps
        Utility Steps

  2. Mike Shaffer January 05, 2017

    The “/” character is only superfluous if work.dir ends in a slash. Having an additional “/” should have no impact and gives the additional assurance that if you need ${} to nest under ${resource/work.dir} it will do so, this is certainly the case for Linux.

  3. The above states:

    You can optionally reference the component’s default working directory as ${p:resource/work.dir}/${}.

    I actually needed to reference the agent’s working directory for a totally unrelated item and noticed that there is an extra ‘/’ char. I think it should state:

    You can optionally reference the component’s default working directory as ${p:resource/work.dir}${}.

  4. Jeremy Hughes January 16, 2015

    Tom, that’s a great question. This UrbanCode licensing page might help but does talk about the agent contacting the license server. It may be possible to do that indirectly. This Knowledge Center page has some information:

  5. Regarding the statement

    Be aware that you will need access to a Rational Common License server to complete the install.

    Is it the urbancode server or the agent which will need access to a Rational Common License servers? Our agents which would be installing liberty run in a more restricted environment and won’t have direct access to a Rational Common License server. If it is good enough for the urbancode server to have access, however, then following your steps should be straight forward.

Join The Discussion

Your email address will not be published. Required fields are marked *