Using MidVision RapidDeploy to install, configure and deploy IBM WebSphere Liberty Profile

Prerequisites

You will need the following to perform this task

  • An SSH enabled Linux server either on-prem or using a cloud provider such as Amazon AWS. You will need the (preferably root) connection details such as IP address, SSH port (default 22), username, password (or key/pem file).
  • An running instance of RapidDeploy with the 'WebSphere Liberty Profile' plugin installed.
  • An ear/war file to deploy to Liberty Profile
  • The Liberty Profile binary package (if installing the binary using this process). The default IBM package name is [wlp-runtime-8.5.5.5.jar]. You can download the package from the IBM download page.

What we will cover in this article

In this article we will follow a step-by-step path to:

  1. Create a target server (node) definition in RapidDeploy which will define the required parameters to perform a deployment to this node using SSH.
  2. Create a target WebSphere Liberty Profile environment definition in RapidDeploy
  3. Create a binary install and deployment project definition in RapidDeploy with the tasks required to install IBM WebSphere Liberty Profile binaries, create a server, deploy a war file and finally start the server
  4. Create a deployment package to collect together the configuration and binaries to perform the above tasks
  5. Run a deployment which will provision Liberty Profile binaries, create a server, deploy the war file to this server and start the server

Create a server definition in RapidDeploy

  1. Log into the RapidDeploy server.
  2. Select Resources > Targets > Servers from the side menu. Click the 'Add Server Wizard' in the top right hand corner.Server List View
  3. On the 'General' tab, fill in a name [WLPServer], an IP address [as recorded earlier], a remote build store (existing filesystem on the remote server) where files will be copied to [/tmp] and set the operating system to [Linux].Server General Tab
  4. Select the 'Transport' tab. From the drop-down, select 'SSH Transport'. Server Connection Settings Tab
  5. Fill in the transport tab. Use the data you collected in the prerequisites. Once you have filled in the data, choose the 'Test Connection' button to check that you can connect to the target successfully.Server SUDO settings
  6. Leave the next 'Cloud' tab blank.
  7. On the final summary tab, click the 'Create This Server' button.Server Summary Tab

    You have now created a target for deploying the WebSphere Liberty Profile components on to.

Create a WebSphere Liberty Profile environment definition in RapidDeploy

  1. Select Resources > Targets > Environments from the side menu. Click the 'Add Environment' Wizard button in the top right hand corner.
  2. Select the 'Parent Server' to be the server we previously created [WLPServer]Environment details Tab
  3. Give the environment a name, for example [WLPEnvironment]
  4. On the 'Product' tab, select the 'WebSphere Liberty Profile Environment' plugin from the upper right hand drop list.
  5. Fill in the values based on your desired installation characteristics.
  6. Click the 'Create' button. If any required values have not been completed, they will be highlighted in red.

Create a WebSphere Liberty Profile project in RapidDeploy

  1. Select Resources > Projects from the side menu. Click the 'Add Project Wizard' button in the top right hand corner.
  2. On the first tab, give a name to the project, for example [WLPProject] and supply a short description. Click 'Next"
  3. The 'SCM repository' tab allows you to select an SCM tool. We are using the default of 'Filesystem' which is effectively no SCM. You can safely accept the other defaults.Project SCM tab
  4. The 'Artifact Repository' tab can be left as the default. The search string defaults to the project name, e.g. [WLPProject]Project Artifact tab
  5. Leave the build tab blank
  6. Select the 'WebSphere Liberty Profile' plugin from the drop-list on the 'Product' tab. Leave the values as the default.
  7. Leave the 'File System' tab with default values.Project Filesystem tab
  8. On the 'Environment' tab, choose the Server and Environment we created earlier. Enter a name for the application.Targets tab
  9. Accept the defaults on the remaining tabs and on the final summary panel, click the 'Create' button.Project summary

Update Project with a list of tasks to perform

  1. Select Resources > Projects from the side menu. Click the 'Edit (pencil)' button next to the project you just created.
  2. Select the 'Orchestration' tab.
  3. Add the task to install the liberty profile [InstallWebSphereLIbertyProfileTask]Select task
  4. Add the task to create the server [CreateOrUpdateServerTask]
  5. Add the tasks to deploy an application [DeployAppTask] and start the server [StartServerTask].
  6. You should now have a task list similar to:Task list
  7. Save the project.

Upload files from your desktop

  1. Select Resources > Projects from the side menu. Click the 'Edit (pencil)' button next to the project you just created.
  2. Select the 'Files' tab.
  3. Navigate to the project 'J2EE' directory. Which this directory selected, click on the 'Upload button'Project files upload
  4. If the [DeployAppTask] was selected and enabled, upload the ear/war file to deploy.
  5. If the [InstallWebSphereLIbertyProfileTask] was selected and enabled, upload the binary install package. The default IBM package name is [wlp-runtime-8.5.5.5.jar].

Create a Deployment package

  1. Edit the project we have just created.
  2. Select the 'Packages' tab.
  3. Click the 'Create Package' button. A new package will be created automatically.Create a package

Perform a deployment

We now have a project that determines WHAT we are going to do. We also have environment configuration that determines WHERE this will be done. We can now perform a deployment.

To do this simply click on

  1. Jobs > New Job and select your project
  2. Select the environment and application (there is only one). When you click the application it will appear in the 'Deployment Schedule' panel. Click 'Next'.Select an application
  3. On the 'Version Selection' panel, accept the default of the latest package version. Tick the 'Skip to finish' checkbox if it is not already selected. Click 'Next'Select a version
  4. On the summary, panel, click 'Start Jobs'. Complete any optional summary notes and click 'Yes'Run the job

Test your deployment

In order to test the deployment, connect to the Web URL of your web server using http://YourHostIP:9080/YourContextRoot

Conclusion

We have shown how RapidDeploy can install WebSphere Liberty Profile to a location of your choosing. You can scale this to deploy to all of your endpoints simply by creating more server objects and/or environment installations. We also have shown the simple use of one of our transport mechanisms, an SSH connection.

There is much more that RapidDeploy can do and we are very keen to assist you as you explore it further.