Walkthrough: Configuring and deploying an application
This topic walks you through the process of configuring and deploying a sample application in BMC Release Process Management (BRPM). The walkthrough includes the following sections:
Introduction to this walkthrough
This walkthrough is an exercise that you can perform to understand how BRPM and some of its functionality works. The steps include the building blocks of how to create an application and environments with components where you will run automation scripts that you can download in this walkthrough.
First, you will create and configure an application according to the following steps:
Then, you will deploy the configured application on one of the environments:
What do I need to do before I get started
This example assumes that you have two servers:
- Microsoft Windows server (source server) with BRPM and the NSH and RSCD agents installed
- Linux server (target server) for deployment with the NSH and RSCD agents installed
On the Windows source server, do the following:
- Download and save the configuration.zip file containing the show_processes script that is required for the walkthrough. The file location in the walkthrough is C:\BMC\DEV.
- Download and save the SH_unzip and SH_runcommand scripts.
- Log in to BRPM as administrator—the default superuser.
Key terminology
Application. An application represents the software unit necessary for the deployment process. It comprises various components that are mapped to different environments.
Environment. An environment represents a set of servers grouped together for a particular purpose in the deployment process. Environments can be of various types depending on the purpose for which they are created. For example, development environment, QA environment, staging environment, production environment, and so on. With the help of the environment types, environments are mapped to the deployment stages.
Component. Components form pieces of an application and are assigned to various environments for deployment.
Request. A request is the main unit of deployment in BRPM. It represents the mechanism used to deploy one or many components of an application into an environment. Requests contain different tasks related to the deployment process. They are comprised of steps, which can be manual (for example, check logs for errors) or automated (for example, deploy package using one of the automation scripts). Requests and steps can be assigned to users and scheduled in the calendar. Requests follow a series of states and transitions from created to complete.
Property. Each step in a request can determine which servers and components are affected during the execution. Steps can also draw properties assigned to those components. Properties are the place to store settings data and values that are important to the execution of requests. When you put values such as “classpath” in properties, the same value is mapped to each request working with those components in those environments. Properties can have property values (default values), installed components, application components, requests, servers, and server levels.
For more information, go to Managing configuration of applications, topology, and infrastructure and Managing and optimizing the application release workflow.
How do I configure an application in BRPM
In this walkthrough, you will configure a sample application with several environments and components. To configure an application, you need to do the following:
Create a user
Step | Example screen (click the image to expand) | |
---|---|---|
1 | Create an operational group of users that will be assigned to the application.
| |
2 | Create a user and add the user to the Operations group.
| |
3 | Add a group to the team.
|
Create an application
Step | Example screen (click the image to expand) | |
---|---|---|
1 | Create the JPetStore application with the Retail Online team.
| |
2 | Add DEV, SIT, UAT, and PROD environments to the JPetStore application.
|
Configure application environments
Step | Example screen (click the image to expand) | |
---|---|---|
1 | Now that the required environments are created and added to the JPetStore application, add the General, AppServer, and Database components to the application.
| |
2 | After you added the components, click Copy All Components to All Environments to associate the components with environments. | |
3 | Define the types of the DEV, SIT, UAT, and PROD environments.
|
Create a target server for deployment
Step | Example screen (click the image to expand) | |
---|---|---|
1 | Create a server that will be used for deployment of the JPetStore application. In this walkthrough, the target server IP is 10.128.36.152, it is running on the Linux OS and is using the NSH agent.
| |
2 | Add the 152-test.corp.net server to the JPetStore application.
|
Set up component properties
Create the SSH_USER and SSH_PASSWORD properties for the AppServer and Database components. These properties will be used to connect to the 152-test.corp.net server that runs on Linux.
Step | Example screen (click the image to expand) | |
---|---|---|
1 | Create the SSH_USER property.
| |
2 | Create the SSH_Password property.
|
How do I deploy an application in BRPM
In this walkthrough, to deploy the application, do the following:
Prepare automation for a request
In this part of walkthrough, you will import two default Remote Dispatcher scripts for running automation on the target server and create two Remote Shell automation scripts (see What do I need to do before I get started).
Step | Example screen (click the image to expand) | |
---|---|---|
1 | Enable automation.
| |
2 | Import the default Remote Dispatcher scripts.
| |
3 | Create the SH_unzip script for unzipping a file.
| |
4 | Create the SH_runcommand script for executing commands on the target server.
| |
5 | Change the status of the created scripts. For more information, see Using status of objects. In the Automation table, next to the SH_runcommand and SH_unzip script, in the Actions column, click Pending, and then Released. |
Create and start a request
Step | Example screen (click the image to expand) | |
---|---|---|
1 | Create a request.
| |
2 | Add an automation step that will copy the configuration.zip file from the source server on which BRPM is running to the tmp directory on the target server.
| |
3 | Add an automation step that will unzip the configuration.zip file on the target server.
| |
4 | Add an automation step that will check if the required files are successfully unzipped on the target server.
| |
5 | Add an automation step that will make the show_processes.sh file executable.
| |
6 | Add an automation step that will execute the show_processes script from the configuration.zip file.
| |
7 | On the right side of your screen, click Plan Request, and then Start Request. |
View automation results
After the request is complete, you can view the results of the automation steps.
Step | Example screen (click the image to expand) | |
---|---|---|
1 | Click the Copy a file step, and then go to the Notes tab. The configuration.zip file is successfully copied to the target server. | |
2 | Click the Unzip a file step and go to the Notes tab. The configuration.zip file is successfully unzipped to the tmp directory on the target server. The archive contains several random files and the show_processes.sh script that is executed in the Execute script step. | |
3 | Click the Verify copy step, and then go to the Notes tab. The executed | |
4 | Click the Set permissions step, and then go to the Notes tab. The show_processes.sh script is made executable. | |
5 | Click the Execute script step, and then go to the Notes tab. The show_processes.sh script is executed successfully, and current processes that run on the target server are shown. |
Troubleshooting
Step | Example screen (click the image to expand) | |
---|---|---|
In case, you start the request and some steps get the Problem status, do the following:
|
Wrapping it up
In this walkthrough, you went through the process of creating a BRPM user who was assigned to the application with certain environments and components. You ran automation scripts that copied a zip file from one server to another, unzipped it, and ran a script from the zip file on the target server.
Where to go from here
Check out Managing automation to see how you can optimize the process of application deployment using different script types and Managing plans to organize the process of deployment more efficiently. Also, you can check End-to-end process.
Comments
Log in or register to comment.