Solution Installer: Editing the sample bootstrap filesAdded by IBM | Edited by IBM on April 12, 2013 | Version 2 (Show original)
|The sample bootstrap scripts allow developers to quickly create their own batch or shell scripts. These scripts are used to install a Portal Application Archive (PAA) application to IBM WebSphere Portal.
Developers can use the sample bootstrap files as a template to create installation scripts for their applications. Developers can edit the sample scripts to create their own bootstrap files. For complex applications, more tasks might be required. The developer must add these additional tasks.
- Review the content in the PortalServer/doc/paa-samples/bootstrap directory.
install.bat and install.sh
This template batch file contains scripts that can deploy a PAA file into the WebSphere Portal environment. The batch file runs the install-paa and deploy-paa commands against a PAA file.uninstall.bat and uninstall.sh
This template batch file contains scripts that can remove a PAA file from the WebSphere Portal environment. The batch file runs the remove-paa and uninstall-paa commands against a PAA file.settings.properties
Correctly set the properties in this file before you run the bootstrap script file. Some of the properties are specific to the PAA file. The developers must set these properties before they release the application. The following properties are PAA file specific:
- PAA_NAME: Enter the name of the PAA file.
- APP_NAME: Enter the name of the application. This value is the assembly name, which is specified in the assembly level sdd.xml file.
- PAA_RELATIVE_PATH: Enter the relative path to the PAA file. This value is the directory where the developer wants to place the PAA file. As an example, enter PAA_RELATIVE_PATH=paa/Sample2.paa.
The other properties are user-specific. The application user sets these values according to their WebSphere Portal environment. Then, the user can run the batch file. The following user-specific properties are mandatory:
The developer creates an application read me. The read me includes the required user properties.
- PROFILE_DIR: Enter the WebSphere Portal profile directory. As an example, enter PROFILE_DIR=/opt/IBM/WebSphere/wp_profile.
- OFFLINE_MODE: This property tells the installation program to install the application with or without trying to access the external DTD files. Set this value to false if the environment has direct access to the internet.
Developers can create more properties with the keyword=value
- Configure and customize the bootstrap files for your application:
- Copy all the bootstrap files to a workspace.
- Edit the PAA file related properties in the settings.properties file.
Tip: The minimum values that you must specify are: PAA_NAME, APP_NAME, and PAA_RELATIVE_PATH.
- Add any additional properties to the settings.properties file with the keyword=value format.
- Edit the install and uninstall script files according to your application requirements.
Tip: The install script file runs the install-paa and deploy-paa tasks. The uninstall script file runs the remove-paa and uninstall-paa tasks. Customize the install and uninstall script files with more tasks that are required for your application.
- Run the bootstrap files with the appropriate user settings:
- Create a readme file for your application with the following minimum information:
Set the user environment properties in the settings.properties file. The user must at least correctly enter the PROFILE_DIR value.
Open a command prompt and change to the directory where the bootstrap file is located.
Run one of the following commands from the command prompt:
- What the application does.
- Why a user wants to use the application.
- How to set user environment properties in the settings.properties file.
- How to run the install and uninstall script files.
- What post-installation steps are required.
If using a Linux based operating system:
Review the following example for information about how to edit and run the bootstrap files for Sample2.paa:
Review the following notes:
- If you do not have Run permissions on the bootstrap files, run the chmod command against the shell script files. As an example, enter chmod 755 install.sh.
- If you get an EOL error when you run the shell script files, run the dos2unix command to ensure that the shell script files contain the correct UNIX end-of-line characters. As an example, enter dos2unix install.sh.
Parent topic: 126.96.36.199: Supplemental Documentation
The Bootstrap files and sample PAA files are in the WebSphere/PortalServer/doc/paa-samples
- Create a workspace directory.
- Copy the Sample2.paa file and the bootstrap directory from the paa-samples directory to the \temp\workspace directory.
- Edit the following properties in the settings.properties file:
The developer must set these values.
- Edit the PROFILE_DIR property in the settings.properties file.
Note: The user must set this value.
- Open a command prompt and change to the workspace directory.
- Run the install.sh|bat command.
Note: If you want to remove the application, run the uninstall.sh|bat command from the command prompt.