Running in Local Mode
Local mode allows application testing and debugging on the local file system.
This procedure shows you how to create runtime entities and deploy and run an application using bwadmin local mode.
You learn how to:
-
Set the bwadmin mode
-
Create a domain, AppSpace, and AppNode
-
Upload an application archive
-
Start the AppSpace
-
Deploy and start the uploaded application
- Procedure
- In a terminal, navigate to the following paths:
Windows:
BW_HOME\binUnix:${BW_HOME}/bin - Set the bwadmin mode to local.
Windows:
BW_HOME\bin>bwadmin mode localUnix:[root@BW_HOME bin]# ./bwadmin mode local - Create a domain. For more information, see
Creating a Domain.
Windows:
BW_HOME\bin>bwadmin create domain D1Unix:[root@BW_HOME bin]# ./bwadmin create domain D1 - Show the domain.
Windows:
BW_HOME\bin>bwadmin show domainUnix:[root@BW_HOME bin]# ./bwadmin show domain - Create an AppSpace in the domain. For more information, see
Creating an AppSpace.
Windows:
BW_HOME\bin>bwadmin create -d D1 appspace AS1Unix:[root@BW_HOME bin]# ./bwadmin create -d D1 appspace AS1 - Create an AppNode in the AppSpace. When creating an AppNode, you must specify the HTTP management port that allows communication with the AppNode.
Windows:
BW_HOME\bin>bwadmin create -domain D1 -appspace AS1 -httpPort 8060 appnode AN1Unix:[root@BW_HOME bin]# ./bwadmin create -domain D1 -appspace AS1 -httpPort 8060 appnode AN1The HTTP management port must be unique across all defined AppNodes on a machine. If the specified port is already in use, an error is issued and the AppNode cannot be created.
For more information, see Creating an AppNode.
- Use the
show command for the AppSpace after you've created the AppNode.
BW_HOME\bin>bwadmin show -domain D1 -appspace AS1 appnodes - Upload an application archive into the domain. The following command uploads the Bookstore sample application archive. Use forward slash in the Windows command line.
Windows:
BW_HOME\bin>bwadmin upload -domain D1 ../samples/core/admin/ears/bookstore/tibco.bw.sample.binding.rest.BookStore.application_1.0.0.earUnix:[root@BW_HOME bin]# ./bwadmin upload -domain D1 ../samples/core/admin/ears/bookstore/tibco.bw.sample.binding.rest.BookStore.application_1.0.0.earFor more information, see Uploading an Archive. - Show that the application archive was uploaded.
Windows:
BW_HOME\bin>bwadmin show -domain D1 archivesUnix:[root@BW_HOME bin]# ./bwadmin show -domain D1 archives - Start the AppSpace. This starts the AppNode in the AppSpace.
Windows:
BW_HOME\bin>bwadmin start -domain D1 appspace AS1Unix:[root@BW_HOME bin]# ./bwadmin start -domain D1 appspace AS1For more information, see Starting an AppSpace. - Deploy the application into the AppSpace. This deploys the application to the AppNode.
Windows:
BW_HOME\bin>bwadmin deploy -domain D1 -appspace AS1 tibco.bw.sample.binding.rest.BookStore.application_1.0.0.earUnix:[root@BW_HOME bin]# ./bwadmin deploy -domain D1 -appspace AS1 tibco.bw.sample.binding.rest.BookStore.application_1.0.0.earFor more information, see Deploying an Application. - See the deployed application using show command.
Windows:
BW_HOME\bin>bwadmin show -domain D1 applicationUnix:[root@BW_HOME bin]# ./bwadmin show -domain D1 application - Start the application. Each uploaded application maintains a version. The version number is required for starting and stopping the application.
Windows:
BW_HOME\bin>bwadmin start -d D1 -appspace AS1 application tibco.bw.sample.binding.rest.BookStore.application 1.0Unix:[root@BW_HOME bin]# ./bwadmin start -d D1 -appspace AS1To find the version number, you can use the show command, for example:bwadmin show -domain D1 applicationFor more information, see Starting an Application.
Use the -csv command to print the table content as a comma separated value table. The first row contains the headers and applies to domains, AppSpaces, AppNodes, Applications, Archive, Archives, Machines and Installations. For example,
bwadmin[admin@d1]> show -csv appsto show all the Applications in the csv format. - Optionally, stop and undeploy the application, stop the AppSpace, and delete the entities (archive, AppNode, AppSpace, and domain).